/* CTRM 方案 A：明亮工作台 · Teal 品牌色 */
:root {
  --bg-page: #f4f6f9;
  --bg-elevated: #ffffff;
  --bg-subtle: #eef2f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1a2332;
  --muted: #5c6b7a;
  --placeholder: #94a3b8;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-muted: #99f6e4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --success: #059669;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --sidebar-w: 248px;
  --radius: 10px;
  --font: 'IBM Plex Sans SC', system-ui, -apple-system, sans-serif;
  /* Modal / form readability (CTRM-MODAL-FORM-CONTRAST-UX-R1) */
  --ctrm-text-main: #111827;
  --ctrm-text-secondary: #374151;
  --ctrm-text-muted: #6b7280;
  --ctrm-border-strong: #9ca3af;
  --ctrm-border-normal: #d1d5db;
  --ctrm-field-bg: #ffffff;
  --ctrm-field-readonly-bg: #f3f4f6;
  --ctrm-panel-bg: #ffffff;
  --ctrm-modal-backdrop: rgba(15, 23, 42, 0.48);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

/* 鉴权完成前隐藏业务页，避免未登录闪屏 */
html.ctrm-auth-pending body {
  visibility: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ctrm-app { display: flex; min-height: 100vh; }

/* —— 侧栏 —— */
.ctrm-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.ctrm-brand {
  padding: 0 1rem 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.ctrm-nav-arch {
  flex-shrink: 0;
  margin: 0 0.85rem 0.5rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--placeholder);
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: 6px;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ctrm-home-section {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--placeholder);
  margin: 1.75rem 0 0.75rem;
}

.ctrm-home-section:first-of-type {
  margin-top: 0.5rem;
}

.ctrm-nav--scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-bottom: 0.25rem;
}

.ctrm-nav a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.ctrm-nav a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.ctrm-nav a.active {
  color: var(--accent-hover);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.ctrm-nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.85rem 1rem 0.3rem;
  font-size: 0.65rem;
  color: var(--placeholder);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.ctrm-nav-section:first-child {
  padding-top: 0.35rem;
}

.ctrm-nav-subsection {
  padding: 0.5rem 1rem 0.12rem 1.35rem;
  font-size: 0.68rem;
  color: var(--placeholder);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.ctrm-nav-subsection + a {
  padding-left: 1.35rem;
}

.ctrm-nav-link--reserved {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.ctrm-nav-reserved-badge {
  flex-shrink: 0;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.14);
  color: var(--placeholder);
  text-transform: lowercase;
}

.ctrm-nav-section--planned {
  padding-bottom: 0.55rem;
  opacity: 0.75;
}

.ctrm-nav-badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--placeholder);
  text-transform: uppercase;
}

.ctrm-sidebar-user {
  flex-shrink: 0;
  margin: 0 0.85rem 0.5rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ctrm-sidebar-user-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}

.ctrm-sidebar-chpw {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.ctrm-sidebar-chpw:hover {
  text-decoration: underline;
}

.ctrm-sidebar-chpw--active {
  font-weight: 600;
}

.ctrm-sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}

.ctrm-sidebar-logout {
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.ctrm-sidebar-logout:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.ctrm-sidebar-footer {
  flex-shrink: 0;
  padding: 0.65rem 1rem 0;
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  padding-bottom: 0.5rem;
}

.ctrm-sidebar-footer a {
  color: var(--muted);
  text-decoration: none;
}

.ctrm-sidebar-footer a:hover { color: var(--accent); }

/* —— 主区 —— */
.ctrm-main {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  overflow-x: auto;
  background: var(--bg-page);
}

.ctrm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.ctrm-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.ctrm-header--sub {
  display: block;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.ctrm-header--sub h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.ctrm-lead {
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
  max-width: 52rem;
}

.ctrm-lead a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.ctrm-lead a:hover { text-decoration: underline; }

.ctrm-lead strong { color: var(--accent-hover); }

.ctrm-health-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

.ctrm-health-badge.ok {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--accent-muted);
}

.ctrm-health-badge.err {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}

/* —— Toast —— */
.ctrm-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  display: none;
  max-width: 360px;
  border-left: 4px solid var(--success);
  color: var(--text);
}

.ctrm-toast.show { display: block; }

.ctrm-toast.err {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

/* strategy_ledger: toast above modal actions (POLISH R2) */
body.ctrm-modal-open .ctrm-toast {
  bottom: auto;
  top: 20px;
  right: 20px;
  z-index: 1200;
  max-width: 320px;
}

/* —— 卡片面板 —— */
.ctrm-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.ctrm-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

/* —— 表单 —— */
.ctrm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px 16px;
}

.ctrm-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
}

.ctrm-field input,
.ctrm-field select,
.ctrm-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ctrm-field input::placeholder,
.ctrm-field textarea::placeholder {
  color: var(--placeholder);
}

.ctrm-field input:focus,
.ctrm-field select:focus,
.ctrm-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.ctrm-field textarea { min-height: 72px; resize: vertical; }

.ctrm-readonly-value,
.ctrm-rule-mode {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--muted);
}

.ctrm-rule-mode {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  margin: 0.75rem 0 1rem;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: var(--accent-muted);
}

.ctrm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: var(--accent-hover); }

.btn:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--muted);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.btn-danger {
  background: var(--bg-elevated);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-danger:hover { background: var(--danger-soft); }

/* —— 表格 —— */
.ctrm-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table.ctrm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.ctrm-table th,
.ctrm-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ctrm-table th {
  background: var(--bg-subtle);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ctrm-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.ctrm-table tbody tr:hover td {
  background: var(--accent-soft);
}

.ctrm-table tbody tr.is-editing td {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ctrm-table .link {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.ctrm-table .link:hover { color: var(--accent-hover); }

/* —— Tabs —— */
.ctrm-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ctrm-tabs--master {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.ctrm-tabs--master button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ctrm-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: all 0.15s;
}

.ctrm-tabs button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.ctrm-tabs button.active {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ctrm-tabs--data-rules {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.ctrm-tabs--market-prices {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.ctrm-tab-panel[hidden] {
  display: none !important;
}

.ctrm-tab-panel:not([hidden]) {
  display: block;
}

/* data_rules MAF secondary tabs (lighter than primary ctrm-tabs) */
#maf-subtabs.ctrm-subtabs {
  display: flex;
  gap: 6px;
  margin: 0.75rem 0 1rem;
  flex-wrap: wrap;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border, #d8dee6);
}

#maf-subtabs .ctrm-subtab {
  padding: 6px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.92em;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

#maf-subtabs .ctrm-subtab:hover {
  color: var(--text);
  background: var(--bg-elevated, rgba(0, 0, 0, 0.03));
}

#maf-subtabs .ctrm-subtab.is-active {
  color: var(--accent-hover, var(--text));
  border-bottom-color: var(--accent, #3b82f6);
  background: var(--bg-elevated, #fff);
}

.ctrm-subtab-panel[hidden] {
  display: none !important;
}

.ctrm-subtab-panel:not([hidden]) {
  display: block;
}

.ctrm-subtab-panel.is-active {
  padding-top: 0.25rem;
}

/* —— 首页入口卡片 —— */
.ctrm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.ctrm-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  overflow: hidden;
}

.ctrm-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.ctrm-card:hover {
  border-color: var(--accent-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ctrm-card h3 {
  color: var(--text);
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.ctrm-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.ctrm-card--master::before { background: #0d9488; }
.ctrm-card--physical::before { background: #2563eb; }
.ctrm-card--futures::before { background: #7c3aed; }
.ctrm-card--inventory::before { background: #d97706; }
.ctrm-card--market::before { background: #0891b2; }

.ctrm-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.ctrm-hint code {
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.ctrm-field-wide { grid-column: 1 / -1; }
.ctrm-field-hint {
  grid-column: 1 / -1;
  margin: -0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.ctrm-field-hint code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.ctrm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.ctrm-spot-exposure-panel .ctrm-exposure-cards {
  margin: 0.75rem 0 1rem;
}
.ctrm-exposure-quality-warn {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 0.9rem;
}
.ctrm-reserved-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-right: 0.25rem;
}
.ctrm-exposure-row {
  cursor: pointer;
}
.ctrm-exposure-row:hover td {
  background: rgba(59, 130, 246, 0.06);
}
.ctrm-exposure-detail-wrap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.ctrm-exposure-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ctrm-stat {
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.ctrm-stat .label { display: block; font-size: 0.8rem; color: var(--muted); }
.ctrm-stat .value { font-size: 1.25rem; font-weight: 600; }
.ctrm-cell-err { color: #b91c1c; font-size: 0.85rem; }
.ctrm-maf-section { margin-bottom: 1.25rem; }
.ctrm-maf-section h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-weight: 600;
}
.ctrm-table--compact th {
  width: 28%;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
}
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.82rem; }
.ctrm-grid--filters { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ctrm-muted { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.ctrm-maf-job-panel { margin-top: 0.5rem; }
.ctrm-maf-job-status-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.ctrm-maf-job-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.ctrm-maf-job-row:last-child { border-bottom: none; }
.ctrm-maf-job-row .ctrm-maf-job-type { font-weight: 600; }
.ctrm-maf-job-row .ctrm-maf-job-meta { color: var(--muted); font-size: 0.85rem; }
.di-maf-ops-embed { margin-top: 1rem; }
.di-maf-ops-embed .di-maf-ops-panel { margin-top: 0.75rem; }
.di-maf-ops-embed .di-maf-ops-panel:first-child { margin-top: 0; }
.ctrm-col-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.ctrm-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}
.ctrm-maf-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.ctrm-maf-block summary {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--surface-2);
}
.ctrm-maf-block[open] summary { border-bottom: 1px solid var(--border); }
.ctrm-maf-block .ctrm-table { margin: 0; }

@media (max-width: 768px) {
  .ctrm-app { flex-direction: column; }
  .ctrm-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .ctrm-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0.75rem 0.75rem;
  }
  .ctrm-nav a {
    padding: 0.45rem 0.85rem;
    border-left: none;
    border-radius: 8px;
  }
  .ctrm-nav a.active {
    border-left: none;
  }
  .ctrm-nav-arch { display: none; }
  .ctrm-nav-section--planned .ctrm-nav-badge { display: none; }
  .ctrm-brand { border-bottom: none; margin-bottom: 0; }
  .ctrm-main { padding: 1rem; }
}

/* 系统助手 */
.ctrm-chat-panel { display: flex; flex-direction: column; min-height: 420px; }
.ctrm-chat-log {
  flex: 1;
  max-height: 55vh;
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.ctrm-chat-msg { margin-bottom: 1rem; }
.ctrm-chat-msg--user .ctrm-chat-body {
  background: var(--accent, #1d4ed8);
  color: #fff;
  border-radius: 10px 10px 4px 10px;
  padding: 0.65rem 0.9rem;
  display: inline-block;
  max-width: 92%;
}
.ctrm-chat-msg--assistant .ctrm-chat-body {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 10px 10px 10px 4px;
  padding: 0.65rem 0.9rem;
  max-width: 96%;
  line-height: 1.55;
}
.ctrm-chat-msg--error .ctrm-chat-body { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.ctrm-chat-role { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; }
.ctrm-chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 4rem;
  font-family: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ctrm-chat-body code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.ctrm-chat-msg--user .ctrm-chat-body code { background: rgba(255,255,255,0.2); }

[hidden] {
  display: none !important;
}

.ctrm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrm-modal[hidden] { display: none !important; }
.ctrm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ctrm-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow: auto;
  margin: 1rem;
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.08);
  padding: 1.25rem 1.5rem;
}

/* Exchange premium modal — market_prices.html#exchange_premium only */
.ctrm-modal-panel.market-ep-modal {
  width: min(1100px, calc(100vw - 32px));
  max-width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.market-ep-modal .ctrm-modal-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.market-ep-modal .ctrm-modal-header h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.market-ep-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 0.5rem;
}

.market-ep-modal #market-ep-modal-notice {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.market-ep-modal #market-ep-modal-subtitle {
  font-size: 12px;
  margin: 0;
}

.market-ep-modal-tabs.ctrm-subtabs {
  display: flex;
  gap: 4px;
  margin: 0 0 4px;
  flex-wrap: wrap;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.market-ep-modal-tabs .ctrm-subtab {
  padding: 4px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted, #94a3b8);
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.market-ep-modal-tabs .ctrm-subtab:hover {
  color: var(--text, #e2e8f0);
  background: rgba(148, 163, 184, 0.08);
}

.market-ep-modal-tabs .ctrm-subtab.is-active {
  color: var(--accent-hover, #e2e8f0);
  border-bottom-color: var(--accent, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
}

.market-ep-tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.5rem;
}

.market-ep-tab-panel[hidden] {
  display: none !important;
}

.market-ep-quality-placeholder {
  font-size: 12px;
  line-height: 1.5;
  margin: 0.25rem 0 0;
}

.market-ep-section {
  margin: 0;
}

.market-ep-form-section .ctrm-form-panel-title,
.market-ep-view-section .ctrm-list-panel-title {
  font-size: 13px;
  margin-bottom: 6px;
}

.market-ep-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}

.market-ep-form-grid .market-ep-form-note {
  grid-column: 1 / -1;
}

.market-ep-modal .ctrm-field label {
  font-size: 12px;
  margin-bottom: 2px;
}

.market-ep-modal .ctrm-field input,
.market-ep-modal .ctrm-field select {
  height: 34px;
  min-height: 34px;
  font-size: 13px;
  padding: 4px 8px;
}

.market-ep-toolbar {
  margin-top: 6px;
  gap: 6px;
}

.market-ep-toolbar .btn {
  padding: 4px 10px;
  font-size: 12px;
}

.market-ep-view-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(52vh, 440px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
}

.market-ep-view-table {
  overflow-x: auto;
}

.market-ep-view-table .ctrm-table {
  min-width: 520px;
  margin: 0;
}

.market-ep-view-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  padding: 6px 10px;
  line-height: 1.3;
  background: #1e293b;
}

.market-ep-view-table tbody td {
  font-size: 12px;
  padding: 6px 10px;
  line-height: 1.35;
  vertical-align: middle;
}

.market-ep-modal .market-ep-status-pill {
  font-size: 11px;
  padding: 1px 6px;
  line-height: 1.3;
}

.market-ep-modal .market-ep-action-btn {
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.3;
  margin-right: 4px;
}

.market-ep-modal .col-action {
  white-space: nowrap;
}

.market-ep-factory-rule-row td {
  padding: 8px 10px !important;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.market-ep-factory-rule-card {
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 6px;
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  padding: 8px 10px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.market-ep-factory-rule-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.market-ep-factory-rule-card-body {
  color: #94a3b8;
}

.market-ep-factory-rule-body {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.market-ep-factory-rule-body + .market-ep-factory-rule-body {
  margin-top: 6px;
}

@media (max-width: 520px) {
  .market-ep-factory-rule-card {
    padding: 7px 8px;
    font-size: 11px;
  }

  .market-ep-factory-rule-card-title,
  .market-ep-factory-rule-body {
    font-size: 11px;
  }
}

/* Manual seed review badge — UI hint only, not used in calculations */
.market-review-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.55);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: middle;
  white-space: nowrap;
}

.market-review-badge--done {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(30, 41, 59, 0.45);
  color: #94a3b8;
  font-weight: 500;
}

.market-review-mark-done {
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.3;
  vertical-align: middle;
}

.market-ep-status-cell {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.market-ep-factory-rule-card-title .market-review-badge {
  margin-left: 8px;
  vertical-align: baseline;
}

.market-ep-commodity-card-title .market-review-badge {
  margin-left: 6px;
}

.market-ep-commodity-card-meta .market-ep-card-review-line {
  display: inline-block;
  margin-bottom: 2px;
}

.market-ep-commodity-card-meta .market-ep-card-review-count {
  margin-left: 0;
}

.market-wrc-modal .ctrm-modal-header .market-review-badge {
  margin-left: 8px;
}

.market-review-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 6px 0 10px;
  padding: 6px 10px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.35);
}

.market-review-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--text, #e5e7eb);
  cursor: pointer;
  user-select: none;
}

.market-review-filter-label input {
  margin: 0;
}

.market-review-muted {
  font-size: 11px;
  color: var(--muted, #94a3b8);
}

.market-review-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.market-review-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.market-review-bulk-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.market-review-bulk-count {
  font-size: 11px;
  color: var(--muted, #94a3b8);
}

@media (max-width: 520px) {
  .market-review-filter {
    padding: 6px 8px;
  }

  .market-review-bulk-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .market-review-badge {
    margin-left: 4px;
    font-size: 9px;
  }
}

@media (max-width: 900px) {
  .market-ep-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .market-ep-form-grid {
    grid-template-columns: 1fr;
  }

  .ctrm-modal-panel.market-ep-modal {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 0.75rem;
  }
}

/* Exchange premium commodity cards — grouped by exchange */
.market-ep-exchange-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.market-ep-exchange-group {
  margin: 0;
}

.market-ep-exchange-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #e5e7eb);
}

.market-ep-commodity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px 10px;
}

.market-ep-commodity-card {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.35));
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface, #0f172a);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.market-ep-commodity-card:hover {
  border-color: #94a3b8;
  background: var(--surface-2, #1e293b);
}

.market-ep-commodity-card-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.market-ep-commodity-card-meta {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .market-ep-commodity-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 420px) {
  .market-ep-commodity-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Warehouse receipt cost — market_prices.html#warehouse_receipt_cost */
.market-wrc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: auto;
  max-height: min(72vh, 640px);
}

.market-wrc-section .ctrm-form-panel-title {
  font-size: 13px;
  margin-bottom: 6px;
}

.market-wrc-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}

.market-wrc-meta-grid .market-wrc-remark-field {
  grid-column: 1 / -1;
}

.market-wrc-fee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}

.market-wrc-fee-grid--holding {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-wrc-fee-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-wrc-fee-input input {
  flex: 1 1 auto;
  min-width: 0;
}

.market-wrc-fee-input input[readonly] {
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted, #94a3b8);
}

.market-wrc-unit {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}

.market-wrc-modal .ctrm-field label {
  font-size: 12px;
  margin-bottom: 2px;
}

.market-wrc-modal .ctrm-field input,
.market-wrc-modal .ctrm-field select {
  height: 34px;
  min-height: 34px;
  font-size: 13px;
  padding: 4px 8px;
}

@media (max-width: 900px) {
  .market-wrc-fee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-wrc-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .market-wrc-fee-grid,
  .market-wrc-meta-grid {
    grid-template-columns: 1fr;
  }
}

.ctrm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.ctrm-modal-header h2,
.ctrm-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.ctrm-modal-body {
  color: #e5e7eb;
}

.ctrm-modal-panel .ctrm-hint,
.ctrm-modal-panel .ctrm-muted,
.ctrm-modal-panel .ctrm-field-hint {
  color: #cbd5e1;
}

.ctrm-modal-panel .ctrm-hint code,
.ctrm-modal-panel code {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
}

.ctrm-modal-panel .ctrm-field label {
  color: #f1f5f9;
  font-weight: 600;
}

.ctrm-modal-panel .ctrm-field input,
.ctrm-modal-panel .ctrm-field select,
.ctrm-modal-panel .ctrm-field textarea,
.ctrm-modal-panel .master-batch-textarea,
.ctrm-modal-panel .ctrm-input--sm {
  background: #020617;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.ctrm-modal-panel .ctrm-field input::placeholder,
.ctrm-modal-panel .ctrm-field textarea::placeholder,
.ctrm-modal-panel .master-batch-textarea::placeholder {
  color: #94a3b8;
}

.ctrm-modal-panel .ctrm-field input:focus,
.ctrm-modal-panel .ctrm-field select:focus,
.ctrm-modal-panel .ctrm-field textarea:focus,
.ctrm-modal-panel .master-batch-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

.ctrm-modal-panel .ctrm-field input:disabled,
.ctrm-modal-panel .ctrm-field select:disabled,
.ctrm-modal-panel .ctrm-field textarea:disabled,
.ctrm-modal-panel .ctrm-field input[readonly],
.ctrm-modal-panel .ctrm-field textarea[readonly],
.ctrm-modal-panel .ctrm-readonly-input {
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
  opacity: 1;
  cursor: not-allowed;
}

.ctrm-modal-panel .ctrm-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.35);
}

.ctrm-modal-panel .ctrm-table th {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.ctrm-modal-panel .ctrm-table td {
  color: #e5e7eb;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.ctrm-modal-panel .ctrm-table tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.45);
}

.ctrm-modal-panel .ctrm-table tbody tr:hover td {
  background: rgba(51, 65, 85, 0.6);
}

.ctrm-modal-panel .ctrm-table .link {
  color: #38bdf8;
}

.ctrm-modal-panel .ctrm-table .link:hover {
  color: #7dd3fc;
}

.ctrm-modal-panel .ctrm-actions {
  border-top-color: rgba(148, 163, 184, 0.25);
}

.ctrm-modal-panel .btn {
  background: #0d9488;
  color: #fff;
  border: 1px solid transparent;
}

.ctrm-modal-panel .btn:hover:not(:disabled) {
  background: #14b8a6;
}

.ctrm-modal-panel .btn:disabled {
  background: rgba(51, 65, 85, 0.65);
  color: rgba(226, 232, 240, 0.55);
  cursor: not-allowed;
  opacity: 1;
}

.ctrm-modal-panel .btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.ctrm-modal-panel .btn-secondary:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.55);
}

.ctrm-modal-panel .btn-danger {
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.55);
}

.ctrm-modal-panel .btn-danger:hover:not(:disabled) {
  background: rgba(153, 27, 27, 0.75);
  color: #fff;
  border-color: rgba(248, 113, 113, 0.75);
}

.ctrm-modal-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.ctrm-modal-panel .ctrm-check {
  color: #e5e7eb;
}

.ctrm-modal-panel .master-futures-batch-context {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.3);
}

.ctrm-modal-panel .master-futures-batch-context-title,
.ctrm-modal-panel .master-futures-batch-context-field dt {
  color: #cbd5e1;
}

.ctrm-modal-panel .master-futures-batch-context-field dd {
  color: #f1f5f9;
}

.ctrm-modal-panel .master-batch-row--new td:last-child {
  color: #60a5fa;
}

.ctrm-modal-panel .master-batch-row--skip td:last-child {
  color: #94a3b8;
}

.ctrm-modal-panel .master-batch-row--error td {
  color: #fca5a5;
}

.ctrm-modal-panel .master-futures-compare-block h4 {
  color: #f8fafc;
}

.ctrm-modal-panel .master-futures-compare-status--new {
  color: #60a5fa;
}

.ctrm-modal-panel .master-futures-compare-status--same {
  color: #4ade80;
}

.ctrm-modal-panel .master-futures-compare-status--different {
  color: #fbbf24;
}

.ctrm-modal-panel .master-futures-diff-row td:nth-child(2) {
  background: rgba(37, 99, 235, 0.18);
}

.ctrm-modal-panel .master-futures-diff-row td:nth-child(3) {
  background: rgba(22, 163, 74, 0.18);
}

.ctrm-modal-panel .ctrm-input-suffix-tag {
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.45);
}

body.ctrm-modal-open { overflow: hidden; }

.ctrm-review-panel {
  width: min(960px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.ctrm-review-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #94a3b8;
  z-index: 2;
}

.ctrm-review-close:hover {
  color: #f8fafc;
}

.ctrm-review-header__kicker {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.ctrm-review-header__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: #f8fafc;
}

.ctrm-review-header__sub {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.ctrm-review-summary {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.ctrm-review-summary__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.ctrm-review-freshness {
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

.ctrm-review-freshness--ok { color: var(--success); }
.ctrm-review-freshness--attention { color: var(--warning); }

.ctrm-review-filter-legend {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.55);
  border-left: 3px solid #38bdf8;
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

.ctrm-review-filter-legend p + p {
  margin-top: 0.35rem;
}

.ctrm-review-empty-attention {
  padding: 1.25rem 1rem;
  text-align: center;
  color: #4ade80;
  font-weight: 600;
  background: rgba(22, 101, 52, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 8px;
}

.ctrm-review-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ctrm-review-group {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.35rem 0.75rem 0.75rem;
  background: rgba(15, 23, 42, 0.45);
}

.ctrm-review-group summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
  color: #f1f5f9;
}

.ctrm-review-table th:first-child { width: 28%; white-space: nowrap; }
.ctrm-review-table th:nth-child(3) { width: 10rem; }
.ctrm-review-table th:nth-child(4) { width: 6rem; }

.ctrm-src-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--border);
}

.ctrm-src-badge--maf-derived {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.ctrm-src-badge--ctrm-system {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--accent-muted);
}

.ctrm-src-badge--ctrm-calculated {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.ctrm-src-badge--ctrm-manual {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.ctrm-src-badge--maf-raw {
  background: #f8fafc;
  color: var(--muted);
}

.ctrm-src-badge--unknown {
  background: var(--danger-soft);
  color: var(--danger);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--maf-derived {
  background: rgba(30, 58, 138, 0.45);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.45);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--ctrm-system {
  background: rgba(13, 148, 136, 0.25);
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.4);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--ctrm-calculated {
  background: rgba(146, 64, 14, 0.35);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.4);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--ctrm-manual {
  background: rgba(6, 95, 70, 0.35);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--maf-raw {
  background: rgba(51, 65, 85, 0.65);
  color: #e2e8f0;
}

.ctrm-modal-panel.ctrm-review-panel .ctrm-src-badge--unknown {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

.ctrm-fx-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  min-width: 9rem;
}

.ctrm-input--sm {
  width: 5.5rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.875rem;
}

/* P4-1 Strategy Ledger */
.strategy-ledger-kpi { margin-bottom: 0.5rem; }
.strategy-ledger-grid { font-size: 0.85rem; }
.strategy-ledger-grid th,
.strategy-ledger-grid td { white-space: nowrap; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.strategy-ledger-actions { white-space: nowrap; }
.strategy-ledger-actions .btn { margin-right: 0.25rem; }
.strategy-ledger-form { max-width: 960px; width: 95vw; max-height: 90vh; overflow-y: auto; }
.strategy-ledger-form-sections { display: flex; flex-direction: column; gap: 0.75rem; }
.strategy-ledger-field-group {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem 0.75rem;
  background: var(--surface, #fff);
}
.strategy-ledger-field-group-title {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  list-style: none;
}
.strategy-ledger-field-group-title::-webkit-details-marker { display: none; }
.strategy-ledger-field-group[open] > .strategy-ledger-field-group-title { margin-bottom: 0.5rem; }
.strategy-ledger-advanced-hint { margin: 0 0 0.5rem; font-size: 0.85rem; }
.strategy-ledger-readonly {
  background: var(--muted-bg, #f3f4f6);
  color: var(--muted, #64748b);
  cursor: not-allowed;
}
.strategy-ledger-form-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
/* EXEC-MODAL-UNIFY-R2 / D108 */
.fo-exec-modal-unify-r2 .fo-exec-modal-section-r2{margin:0 0 0.75rem}
.fo-exec-modal-unify-r2 .fo-exec-modal-section-r2 .ctrm-panel-subtitle{font-size:0.85rem;margin:0 0 0.4rem;font-weight:600}
.fo-exec-modal-unify-r2 .fo-exec-modal-grid-r2{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:0.65rem 0.85rem}
.fo-exec-modal-unify-r2 .fo-exec-modal-form-r2{display:block}

.strategy-ledger-form-grid .ctrm-field--full { grid-column: 1 / -1; }
.strategy-ledger-form-grid textarea {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
  font-family: inherit;
  font-size: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
}
.strategy-ledger-toolbar { flex-wrap: wrap; gap: 0.5rem; }
.strategy-ledger-position-panel { margin-top: 0.5rem; }
.strategy-ledger-position-kpi { margin: 0.75rem 0; }
.strategy-ledger-qty-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ctrm-muted, #64748b);
  line-height: 1.4;
}
.strategy-ledger-guide summary { cursor: pointer; list-style: none; }
.strategy-ledger-guide summary::-webkit-details-marker { display: none; }
.strategy-ledger-guide-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.strategy-ledger-guide-list li { margin-bottom: 0.35rem; }
.strategy-ledger-history-panel { max-width: 960px; width: 95vw; max-height: 90vh; overflow-y: auto; }
.strategy-ledger-history-wrap { max-height: 360px; overflow: auto; }
.strategy-ledger-history-detail {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.88rem;
}
.strategy-ledger-diff-row {
  display: grid;
  grid-template-columns: 8rem 1fr auto 1fr;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}
.strategy-ledger-diff-row:last-child { border-bottom: none; }
.strategy-ledger-diff-before { color: var(--muted); }
.strategy-ledger-diff-after { font-weight: 600; }
.strategy-ledger-diff-arrow { color: var(--muted); font-size: 0.85rem; }
.strategy-ledger-snapshot-panel { margin-top: 1.5rem; border-top: 2px solid var(--border); padding-top: 1rem; }
.strategy-ledger-check { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; min-height: 2.25rem; }
.strategy-ledger-template-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.strategy-ledger-template-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.strategy-ledger-template-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.strategy-ledger-template-btn { font-size: 0.82rem; }
.strategy-ledger-template-btn.btn-template-active {
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: var(--accent, #0ea5e9);
}
.strategy-ledger-template-hint {
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  background: var(--muted-bg, #f8fafc);
  border-radius: 6px;
  font-size: 0.85rem;
}
.strategy-ledger-template-hint-title { margin: 0.35rem 0 0.25rem; font-size: 0.85rem; }
.strategy-ledger-template-hint-list {
  margin: 0 0 0.35rem;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 1rem;
}
.strategy-ledger-template-hint-foot { margin: 0; font-size: 0.8rem; }
.strategy-ledger-group-hint { margin: 0 0 0.5rem; font-size: 0.82rem; }
.strategy-ledger-field-tag {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted, #64748b);
  white-space: nowrap;
}
.strategy-ledger-focus-field {
  outline: 1px dashed var(--accent, #0ea5e9);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Strategy Ledger — readable light modals (CTRM-MODAL-FORM-CONTRAST-UX-R1) */
.ctrm-modal-panel.strategy-ledger-form,
.ctrm-modal-panel.strategy-ledger-history-panel,
.ctrm-modal-panel.ctrm-modal-panel--readable {
  background: var(--ctrm-panel-bg);
  color: var(--ctrm-text-main);
  border: 1px solid var(--ctrm-border-normal);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 1.25rem 1.5rem 1.5rem;
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-panel-title,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-panel-title,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-panel-title {
  color: var(--ctrm-text-main);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  margin-bottom: 0.65rem;
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-field label,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-field label,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field label {
  color: var(--ctrm-text-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-hint,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-hint,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-group-hint,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-advanced-hint,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-qty-hint,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-hint,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-hint-foot,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-hint-title,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-hint {
  color: var(--ctrm-text-muted);
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-muted,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-muted,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-muted {
  color: var(--ctrm-text-muted);
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-field-group-title,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-label,
.ctrm-modal-panel.ctrm-modal-panel--readable .strategy-ledger-field-group-title {
  color: var(--ctrm-text-main);
  font-weight: 600;
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-field-tag {
  color: var(--ctrm-text-muted);
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-field input,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field select,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field textarea,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-form-grid textarea,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-field input,
.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-field select,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field input,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field select,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field textarea {
  background: var(--ctrm-field-bg);
  color: var(--ctrm-text-main);
  border: 1px solid var(--ctrm-border-normal);
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-field input::placeholder,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field textarea::placeholder,
.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-form-grid textarea::placeholder,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field input::placeholder,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field textarea::placeholder {
  color: var(--ctrm-border-strong);
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-field input:focus,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field select:focus,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field textarea:focus,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field input:focus,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field select:focus,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-readonly,
.ctrm-modal-panel.strategy-ledger-form input[readonly],
.ctrm-modal-panel.strategy-ledger-form textarea[readonly],
.ctrm-modal-panel.ctrm-modal-panel--readable input[readonly],
.ctrm-modal-panel.ctrm-modal-panel--readable textarea[readonly] {
  background: var(--ctrm-field-readonly-bg);
  color: var(--ctrm-text-main);
  border-color: #cbd5e1;
  opacity: 1;
  cursor: default;
}

.ctrm-modal-panel.strategy-ledger-form .ctrm-field input:disabled,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field select:disabled,
.ctrm-modal-panel.strategy-ledger-form .ctrm-field textarea:disabled,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field input:disabled,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field select:disabled,
.ctrm-modal-panel.ctrm-modal-panel--readable .ctrm-field textarea:disabled {
  background: #f9fafb;
  color: var(--ctrm-text-muted);
  border-color: var(--ctrm-border-normal);
  opacity: 1;
  cursor: not-allowed;
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-field-group {
  border-color: var(--ctrm-border-normal);
  background: #f9fafb;
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-section {
  border-color: var(--ctrm-border-normal);
}

.ctrm-modal-panel.strategy-ledger-form .strategy-ledger-template-hint {
  background: #f8fafc;
  border-color: var(--ctrm-border-normal);
  color: var(--ctrm-text-secondary);
}

.ctrm-modal-panel.strategy-ledger-history-panel .ctrm-hint {
  color: var(--ctrm-text-muted);
}

.ctrm-modal:has(.ctrm-modal-panel--readable) .ctrm-modal-backdrop,
.ctrm-modal:has(.strategy-ledger-form) .ctrm-modal-backdrop,
.ctrm-modal:has(.strategy-ledger-history-panel) .ctrm-modal-backdrop {
  background: var(--ctrm-modal-backdrop);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Snapshot / position filters on page (same page, low-contrast labels) */
.strategy-ledger-snapshot-panel .ctrm-field label,
.strategy-ledger-position-panel .ctrm-field label {
  color: #334155;
  font-weight: 600;
  font-size: 0.8125rem;
}

.strategy-ledger-snapshot-panel .ctrm-hint,
.strategy-ledger-position-panel .ctrm-hint {
  color: #475569;
}

.strategy-ledger-snapshot-panel .ctrm-field input,
.strategy-ledger-snapshot-panel .ctrm-field select,
.strategy-ledger-position-panel .ctrm-field input,
.strategy-ledger-position-panel .ctrm-field select {
  color: #0f172a;
  background: #ffffff;
}

.strategy-ledger-snapshot-panel .strategy-ledger-check {
  color: #334155;
  font-weight: 500;
}

.strategy-ledger-primary-actions .btn-lg {
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
}

.strategy-ledger-advanced-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.strategy-ledger-advanced-actions summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.strategy-ledger-daily-trades-panel {
  margin-top: 0.5rem;
}

.strategy-ledger-daily-kpi {
  margin: 0.75rem 0;
}

.strategy-ledger-advanced-ledger > summary {
  cursor: pointer;
  font-weight: 600;
}

/* P4-4-ui-7 Strategy Ledger Business Workspace */
.strategy-ledger-workspace .strategy-ledger-workspace-header h1 {
  margin-bottom: 0.35rem;
}

.strategy-ledger-workspace-hero {
  margin-bottom: 0.75rem;
  border: 2px solid var(--accent, #2563eb);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.strategy-ledger-toolbar--primary {
  gap: 0.65rem;
  align-items: center;
}

.strategy-ledger-toolbar--primary .btn-primary-trade {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.strategy-ledger-main-panel {
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  margin-bottom: 0.75rem;
}

.strategy-ledger-main-panel > .ctrm-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.strategy-ledger-daily-trades-panel .ctrm-field label,
.strategy-ledger-position-panel .ctrm-field label {
  color: #334155;
  font-weight: 600;
  font-size: 0.8125rem;
}

.strategy-ledger-advanced-workspace {
  margin-top: 1rem;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  opacity: 0.98;
}

.strategy-ledger-advanced-workspace > summary.strategy-ledger-advanced-workspace-title {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #64748b;
  padding: 0.25rem 0;
  list-style: none;
}

.strategy-ledger-advanced-workspace > summary.strategy-ledger-advanced-workspace-title::-webkit-details-marker {
  display: none;
}

.strategy-ledger-advanced-workspace-hint {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.82rem;
  color: #64748b;
}

.strategy-ledger-advanced-section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.strategy-ledger-advanced-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.strategy-ledger-advanced-workspace .strategy-ledger-toolbar .btn {
  font-size: 0.82rem;
}

.strategy-position-net-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  line-height: 1.25;
}

.strategy-position-net-qty {
  font-weight: 600;
}

.strategy-position-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  line-height: 1.3;
  white-space: nowrap;
}

.strategy-position-status-open {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}

.strategy-position-status-closed {
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
}

.strategy-ledger-biz-pnl-disclaimer {
  border-left: 3px solid #f59e0b;
  padding-left: 0.65rem;
  margin-top: 0.35rem;
  background: rgba(245, 158, 11, 0.06);
}

.strategy-ledger-biz-settlement-panel {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.35rem;
  background: #f8fafc;
}

.strategy-ledger-biz-settlement-panel .ctrm-field select {
  color: #0f172a;
  background: #ffffff;
}

.strategy-biz-pnl-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.strategy-biz-pnl-status-ok {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.strategy-biz-pnl-status-closed {
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
}

.strategy-biz-pnl-status-warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.strategy-ledger-position-panel .strategy-ledger-grid th.strategy-col-num,
.strategy-ledger-position-panel .strategy-ledger-grid td.strategy-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strategy-ledger-position-panel .strategy-ledger-grid td.strategy-col-pnl,
.strategy-ledger-position-panel .strategy-ledger-grid th.strategy-col-pnl {
  font-weight: 600;
}

.strategy-ledger-daily-metric-panel {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.5rem;
  background: rgba(59, 130, 246, 0.04);
}

.strategy-ledger-biz-settlement-fallback {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 0.5rem;
}

.strategy-ledger-biz-settlement-fallback summary {
  cursor: pointer;
  list-style: disclosure-closed;
}

.strategy-position-model-cell {
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 14rem;
}

.strategy-position-model-cell .strategy-model-name {
  font-weight: 600;
  color: #0f172a;
}

.strategy-position-model-cell .strategy-model-source {
  font-size: 0.75rem;
  color: #64748b;
}

.strategy-ledger-library-hint {
  margin: 0;
}

.strategy-ledger-library-panel {
  border-color: rgba(99, 102, 241, 0.35);
}

.strategy-ledger-library-panel > .ctrm-panel-title {
  color: #3730a3;
}

.strategy-library-grid .strategy-library-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.strategy-library-status-active {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.strategy-library-status-inactive {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.strategy-library-status-deleted {
  color: #64748b;
  background: rgba(100, 116, 139, 0.15);
}

.strategy-library-status-draft {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}

.strategy-library-formula-cell {
  max-width: 10rem;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
}

/* Strategy library — R8A overview navigation (L1–L3 drill-down) */
.strategy-library-overview-panel {
  margin-bottom: 1rem;
}

.strategy-library-overview-breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.strategy-library-overview-layers {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.strategy-library-overview-layer-title {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(51, 65, 85, 0.9);
}

.strategy-library-overview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.strategy-library-overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.strategy-library-overview-chip:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
}

.strategy-library-overview-chip.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
  font-weight: 600;
}

.strategy-library-overview-chip.is-empty {
  opacity: 0.55;
}

.strategy-library-overview-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
}

.strategy-library-overview-chip.is-active .strategy-library-overview-chip-count {
  background: rgba(34, 197, 94, 0.2);
}

.strategy-library-overview-empty-hint {
  font-size: 0.8125rem;
}

.strategy-library-overview-actions {
  margin-top: 0.65rem;
}

.strategy-library-workbench-filters {
  margin: 0.65rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-panel-subtle, #f8fafc);
}

.strategy-library-workbench-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.strategy-library-workbench-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.strategy-library-workbench-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.strategy-library-workbench-chip {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8125rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
  line-height: 1.4;
}

.strategy-library-workbench-chip:hover {
  border-color: #6366f1;
}

.strategy-library-workbench-chip.is-active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}

.strategy-library-workbench-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
}

.strategy-library-workbench-count {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

/* Strategy library workbench L1–L3 tables (R19) */
.strategy-library-workbench-l1-l3-table {
  table-layout: fixed;
  width: 100%;
}

.strategy-library-workbench-l1-l3-table thead th {
  height: 2.25rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}

.strategy-library-workbench-l1-l3-table tbody td {
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.4;
  vertical-align: middle;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-commodity {
  width: 11rem;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-category {
  width: 7rem;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-desc {
  width: 18rem;
  max-width: 18rem;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-count {
  width: 4.5rem;
  text-align: center;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-model-count {
  width: 5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-badge {
  width: 5.5rem;
  text-align: center;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-actions {
  width: 11.5rem;
}

.strategy-library-workbench-l1-l3-table .library-workbench-l1-l3-col-logic {
  width: 9rem;
}

.library-workbench-l1-l3-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: #2563eb;
  font-size: 0.875rem;
}

.library-workbench-l1-l3-empty {
  padding: 2.5rem 1rem;
  text-align: center;
}

.library-workbench-l1-l3-empty-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.library-workbench-l1-l3-empty-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

.library-workbench-l1-l3-badge {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
}

.library-workbench-l1-l3-badge--incomplete {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.library-workbench-l1-l3-badge--stale {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.library-workbench-l1-l3-count-zero {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.library-workbench-l1-l3-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.library-workbench-l1-l3-btn {
  white-space: nowrap;
}

.library-workbench-l1-l3-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.library-workbench-l1-l3-logic-name {
  display: block;
  font-weight: 600;
}

.library-workbench-l1-l3-logic-canonical {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
}

.library-workbench-l1-l3-model-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 0;
  min-width: auto;
  text-align: right;
}

/* Strategy library workbench Reference View (R20) */
.library-workbench-reference-content {
  font-size: 0.875rem;
}

.library-workbench-reference-intro {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.library-workbench-reference-picker {
  margin-bottom: 0.75rem;
  align-items: flex-end;
}

.library-workbench-reference-picker-actions {
  display: flex;
  align-items: flex-end;
}

.library-workbench-reference-select {
  min-width: 16rem;
  max-width: 100%;
}

.library-workbench-reference-hint {
  margin: 0.5rem 0 0;
}

.library-workbench-reference-panel {
  margin-top: 0.75rem;
}

.library-workbench-reference-model-label {
  margin: 0 0 0.65rem;
  font-weight: 600;
}

.library-workbench-reference-summary {
  margin: 0 0 0.75rem;
}

.library-workbench-reference-table-wrap {
  margin-top: 0.5rem;
}

.library-workbench-reference-table th,
.library-workbench-reference-table td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.library-workbench-reference-empty {
  margin: 1rem 0 0;
  text-align: center;
  padding: 1.5rem 1rem;
}

.library-workbench-reference-error {
  margin: 0.75rem 0 0;
}

/* Strategy library — R8A indicator filter tab (readonly indicator_preview) */
.library-indicator-filter-intro {
  margin: 0 0 0.75rem;
}

.library-indicator-filter-toolbar {
  margin-bottom: 0.5rem;
}

.library-indicator-filter-filters {
  margin-bottom: 0.5rem;
}

.library-indicator-filter-count {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}

.library-indicator-filter-table th,
.library-indicator-filter-table td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.library-indicator-filter-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.library-indicator-filter-sortable {
  cursor: pointer;
  user-select: none;
}

.library-indicator-filter-sortable.is-sorted-desc::after {
  content: ' ↓';
  opacity: 0.6;
}

.library-indicator-filter-sortable.is-sorted-asc::after {
  content: ' ↑';
  opacity: 0.6;
}

.library-indicator-filter-quality-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 14rem;
}

.library-indicator-filter-quality-ok,
.library-indicator-warning-none {
  color: #15803d;
  font-size: 0.8125rem;
}

.library-indicator-filter-quality-badge,
.library-indicator-preview-warning-badge,
.library-indicator-warning-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  max-width: 16rem;
}

.library-indicator-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.library-indicator-warning-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  color: #78350f;
  background: transparent;
  padding: 0;
}

.library-indicator-warning-zh {
  font-size: 0.7rem;
  line-height: 1.35;
  color: #a16207;
}

.library-indicator-filter-actions {
  white-space: nowrap;
}

.library-indicator-filter-actions .library-score-plan-linkage-link {
  margin-left: 0.25rem;
}

.library-score-preview-linkage-actions {
  margin-top: 0.65rem;
}

.library-score-preview-linkage-hint {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
}

.library-score-plan-linkage-link {
  text-decoration: none;
}

.library-indicator-filter-col-actions {
  width: 9.5rem;
}

/* R12B: score_preview 关注标签（非交易建议） */
.library-score-band-badge,
.library-score-review-badge,
.library-score-attention-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.35;
  border: 1px solid transparent;
  white-space: nowrap;
}

.library-score-band--high {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.library-score-band--medium {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.library-score-band--low {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.library-score-band--excluded,
.library-score-band--unavailable {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.library-score-review--watch {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}

.library-score-review--review {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.library-score-review--low_data,
.library-score-review--excluded,
.library-score-review--not_scored {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.library-score-attention--elevated {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.library-score-attention--normal {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.library-score-attention--muted,
.library-score-attention--suppressed,
.library-score-attention--none {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.library-score-preview-note {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.8125rem;
}

.library-score-unscored {
  color: #b45309;
  font-style: italic;
}

.library-score-exclusion-list,
.library-score-penalty-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}

.library-score-exclusion-level {
  display: inline-block;
  min-width: 2.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #b91c1c;
}

.library-indicator-preview-content .library-score-preview-details {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border, #e2e8f0);
}

/* R15: score plan linkage reference panel (read-only · no trade advice) */
.fo-score-linkage-reference-panel {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.fo-score-linkage-reference-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
}

.fo-score-linkage-reference-body {
  margin-top: 0.5rem;
}

.fo-score-linkage-reference-note {
  margin: 0.35rem 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.fo-score-linkage-reference-note--lead {
  font-weight: 500;
  color: #475569;
}

.fo-score-linkage-reference-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.fo-score-linkage-reference-dl dt {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.fo-score-linkage-reference-dl dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
}

.fo-score-linkage-return-wrap {
  margin: 0.75rem 0 0;
}

.fo-score-linkage-return-link {
  font-size: 0.875rem;
}

.library-workbench-view-empty {
  margin: 1rem 0;
  text-align: center;
  padding: 1.5rem 1rem;
  color: #64748b;
}

/* Strategy library — R8B detail indicator_preview collapsible */
.library-indicator-preview-details {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.375rem;
  background: #f8fafc;
  padding: 0.65rem 0.85rem;
}

.library-indicator-preview-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.library-indicator-preview-summary::-webkit-details-marker {
  display: none;
}

.library-indicator-preview-sub {
  font-size: 0.8125rem;
  font-weight: 400;
}

.library-indicator-preview-body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.library-indicator-preview-content {
  display: grid;
  gap: 1rem;
}

.library-indicator-preview-group-title {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
}

.library-indicator-preview-dl dd {
  line-height: 1.45;
}

.strategy-library-index-table {
  table-layout: auto;
}

.strategy-library-index-table .strategy-library-col-actions {
  width: 14rem;
  white-space: nowrap;
}

/* SI-TAB-POLISH-R3 — row chips + dual-tab filters (no horizontal scroll) */
.si-tab-r3-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.65rem;
}
.si-tab-r3-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin-top: 0.25rem;
}
.si-tab-r3-chip {
  font-size: 0.75rem;
  line-height: 1.25;
  max-width: 100%;
}
.si-tab-r3-chip--muted {
  font-size: 0.75rem;
}
.si-tab-r3-pending-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.25rem;
  border-radius: 50%;
  background: #d97706;
  vertical-align: middle;
}
.si-tab-r3-bsi-btn {
  cursor: pointer;
  border: 1px solid #93c5fd;
  font: inherit;
}

/* Strategy library — R2 page IA (middle-layer workbench) */
.library-ia-r2-landing {
  margin-bottom: 1rem;
}

.library-ia-r2-lead {
  margin: 0 0 0.75rem;
}

.library-ia-r2-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-subtle, #f8fafc);
}

.library-ia-r2-chain-step {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--bg, #fff);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.library-ia-r2-chain-step.is-current {
  border-color: #2563eb;
  background: #eff6ff;
}

.library-ia-r2-chain-step--reserved {
  cursor: default;
  opacity: 0.72;
  background: #f1f5f9;
}

.library-ia-r2-chain-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted, #64748b);
}

.library-ia-r2-chain-arrow {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  user-select: none;
}

.library-ia-r2-zone-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

.library-ia-r2-zone-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg, #fff);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.library-ia-r2-zone-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.library-ia-r2-zone-card--reserved {
  opacity: 0.85;
  background: #f8fafc;
}

.library-ia-r2-zone-card-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.library-ia-r2-zone-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.library-ia-r2-zone {
  margin-bottom: 1rem;
}

.library-ia-r2-zone--reserved {
  border-style: dashed;
}

.library-ia-r2-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}

.library-ia-r2-health-grid dt {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  margin: 0;
}

.library-ia-r2-health-grid dd {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.library-ia-r2-advanced-filters {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-subtle, #f8fafc);
}

.library-ia-r2-advanced-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  user-select: none;
}

.library-ia-r2-catalog-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.library-ia-r2-catalog-inner {
  margin-bottom: 0;
  box-shadow: none;
  border: none;
  padding: 0;
}

.library-ia-r2-zone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.library-ia-r2-empty-state {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.library-ia-r2-pending-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.library-ia-r2-pending-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--bg, #fff);
  font-size: 0.875rem;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.library-ia-r2-pending-btn span {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.library-ia-r2-pending-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

/* Strategy library — R8B detail view (strategy_library_detail DTO) */
.strategy-library-detail-view {
  margin-top: 0.5rem;
}

.strategy-library-detail-toolbar {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.strategy-library-detail-nav-back,
.strategy-ledger-nav-back {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.strategy-library-detail-nav-back a,
.strategy-ledger-nav-back a {
  text-decoration: none;
  color: inherit;
}

.strategy-library-detail-nav-back a:hover,
.strategy-ledger-nav-back a:hover {
  text-decoration: underline;
}

.strategy-library-detail-status.is-error {
  color: #dc2626;
}

.strategy-library-detail-status.is-loading {
  color: #2563eb;
}

.strategy-library-detail-header {
  margin-bottom: 1rem;
}

.strategy-library-detail-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.strategy-library-detail-meta,
.strategy-library-detail-dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.strategy-library-detail-meta > div,
.strategy-library-detail-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.strategy-library-detail-meta dt,
.strategy-library-detail-dl dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: rgba(51, 65, 85, 0.9);
}

.strategy-library-detail-meta dd,
.strategy-library-detail-dl dd {
  margin: 0;
  font-size: 0.875rem;
}

.strategy-library-detail-section {
  margin: 0 0 1.35rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.strategy-library-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.strategy-library-detail-section-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 600;
}

.strategy-library-detail-ledger-link {
  color: var(--ctrm-link-color, #2563eb);
  text-decoration: none;
  font-size: 0.875rem;
}

.strategy-library-detail-ledger-link:hover {
  text-decoration: underline;
}

.strategy-library-detail-note {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.strategy-library-detail-empty {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
}

.strategy-library-detail-legs-table,
.strategy-library-detail-ledger-table {
  font-size: 0.8125rem;
}

.strategy-library-index-table .strategy-library-col-actions .btn {
  margin-right: 0.2rem;
  margin-bottom: 0.15rem;
}

/* Strategy library — grouped list (P4-10M: summary row + folded detail) */
.strategy-library-grouped-table {
  table-layout: auto;
}

.strategy-library-grouped-table .strategy-library-col-actions {
  width: 5.5rem;
  white-space: nowrap;
}

.strategy-library-empty-cell {
  padding: 2rem 1rem !important;
  text-align: center;
}

.strategy-group-row.strategy-library-group-row td {
  font-weight: 600;
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  white-space: nowrap;
  vertical-align: middle;
}

.strategy-library-group-count {
  color: rgba(51, 65, 85, 0.85);
  font-weight: 500;
  white-space: nowrap;
}

.strategy-group-detail-row.strategy-library-group-detail-row td {
  padding: 0 !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(248, 250, 252, 0.65);
}

.strategy-library-group-detail-cell {
  padding: 0.5rem 0.65rem 0.75rem !important;
}

.strategy-library-detail-wrap {
  margin: 0;
  border-left: 3px solid rgba(34, 197, 94, 0.35);
  padding-left: 0.65rem;
}

.strategy-model-detail-table.strategy-library-detail-table {
  width: 100%;
  font-size: 0.82rem;
}

.strategy-model-detail-table.strategy-library-detail-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.95);
  background: rgba(241, 245, 249, 0.95);
  white-space: nowrap;
}

.strategy-model-detail-table.strategy-library-detail-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.strategy-model-detail-table.strategy-library-detail-table th.strategy-col-num,
.strategy-model-detail-table.strategy-library-detail-table td.strategy-col-num {
  text-align: right;
  white-space: nowrap;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-status {
  white-space: nowrap;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-actions {
  white-space: nowrap;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-actions .btn {
  margin-right: 0.25rem;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-actions .btn:last-child {
  margin-right: 0;
}

.strategy-library-edit-panel #lib-field-param-date.is-invalid {
  color: #f87171;
}

.strategy-model-param-date-hint {
  margin: 0 0 0.75rem;
  color: #f87171;
}

.strategy-model-leg-ref-hint {
  margin: 0 0 0.75rem;
  color: #fbbf24;
}

.strategy-library-detail-table {
  font-size: 0.82rem;
}

.strategy-library-volatility-cell {
  white-space: nowrap;
  min-width: 4.5rem;
}

.strategy-metric-history-tabs {
  margin-bottom: 12px;
}

.strategy-metric-history-tab-panel[hidden] {
  display: none !important;
}

.strategy-volatility-tab-panel {
  padding-top: 4px;
}

.strategy-volatility-status {
  font-size: 13px;
  margin: 0 0 12px;
}

.strategy-volatility-status.is-error {
  color: #f87171;
}

.strategy-volatility-status.is-loading {
  color: #60a5fa;
}

.strategy-volatility-chart-wrap {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg-subtle, #0f172a);
  border: 1px solid var(--border, #334155);
  border-radius: var(--radius, 8px);
}

.strategy-volatility-chart-body {
  min-height: 220px;
}

.strategy-volatility-empty {
  margin: 0;
  padding: 40px 16px;
  text-align: center;
  width: 100%;
}

.strategy-volatility-notes {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #334155);
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.55;
}

.strategy-volatility-notes p {
  margin: 0 0 6px;
}

.strategy-volatility-notes p:last-child {
  margin-bottom: 0;
}

/* Strategy library — batch generate modal */
.strategy-library-batch-panel,
.batch-model-modal .batch-model-panel {
  max-width: 52rem;
  width: min(96vw, 52rem);
  max-height: 94vh;
  overflow: auto;
  background: rgba(10, 15, 28, 0.98);
  color: #e2e8f0;
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: var(--radius, 8px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(148, 163, 184, 0.1);
  padding: 1.25rem 1.5rem 1.35rem;
}

.batch-model-modal .batch-model-header {
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.38);
}

.batch-model-modal .batch-model-header .strategy-library-modal-title {
  color: #f8fafc;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.batch-model-modal .batch-model-subtitle {
  margin-top: 0.5rem;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.8rem;
  line-height: 1.5;
}

.batch-model-section {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(100, 116, 139, 0.42);
  border-radius: 6px;
  padding: 1rem 1.1rem 1.05rem;
  margin-bottom: 0.85rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

.batch-model-section--mode {
  border-color: rgba(99, 102, 241, 0.42);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: inset 0 1px 0 rgba(129, 140, 248, 0.08);
}

.strategy-model-grid--batch-base {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}

.strategy-model-grid--batch-mode {
  grid-template-columns: 1fr 2fr;
  gap: 0.75rem 0.85rem;
}

.batch-model-modal .strategy-model-field label {
  color: rgba(241, 245, 249, 0.94);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.batch-model-modal .strategy-library-modal-form .strategy-model-field input,
.batch-model-modal .strategy-library-modal-form .strategy-model-field select,
.batch-model-modal .strategy-library-modal-form .strategy-model-field textarea {
  background: rgba(15, 23, 42, 0.97);
  color: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(100, 116, 139, 0.62);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.batch-model-modal .strategy-library-modal-form .strategy-model-field input::placeholder,
.batch-model-modal .strategy-library-modal-form .strategy-model-field textarea::placeholder {
  color: rgba(148, 163, 184, 0.78);
}

.batch-model-modal .strategy-library-modal-form .strategy-model-field input:focus,
.batch-model-modal .strategy-library-modal-form .strategy-model-field select:focus,
.batch-model-modal .strategy-library-modal-form .strategy-model-field textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.88);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28), inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.batch-model-modal .strategy-model-field-hint {
  color: rgba(203, 213, 225, 0.82);
}

.batch-model-option select {
  border-color: rgba(129, 140, 248, 0.58) !important;
  background: rgba(30, 27, 75, 0.52) !important;
  color: #f1f5f9 !important;
  font-weight: 600;
}

.batch-model-option select:focus {
  border-color: rgba(165, 180, 252, 0.92) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.32), inset 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.batch-model-option select option {
  background: #0f172a;
  color: #f8fafc;
}

.strategy-library-batch-toolbar,
.batch-model-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.85rem 0 0.65rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
}

.batch-model-btn-preview {
  border-color: rgba(100, 116, 139, 0.55) !important;
  color: rgba(248, 250, 252, 0.92) !important;
  background: rgba(30, 41, 59, 0.85) !important;
  font-weight: 600;
}

.batch-model-btn-preview:hover {
  border-color: rgba(56, 189, 248, 0.65) !important;
  background: rgba(30, 58, 95, 0.75) !important;
}

.strategy-library-batch-skip,
.batch-model-skip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
}

.batch-model-skip input[type="checkbox"] {
  accent-color: #6366f1;
  width: 0.95rem;
  height: 0.95rem;
}

.strategy-library-batch-preview-wrap,
.batch-model-preview {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  padding-top: 0.95rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 6px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  padding-bottom: 0.85rem;
}

.batch-model-preview-header .strategy-model-section-title {
  color: #f8fafc;
  font-weight: 700;
}

.batch-model-preview-header .strategy-model-section-hint {
  color: rgba(203, 213, 225, 0.86);
}

.batch-model-preview-table-wrap {
  border: 1px solid rgba(71, 85, 105, 0.65);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.05);
}

.strategy-library-batch-preview-table,
.batch-model-preview-table {
  font-size: 0.82rem;
  margin: 0;
}

.batch-model-preview-table thead th {
  background: rgba(30, 41, 59, 0.98);
  color: rgba(248, 250, 252, 0.96);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(100, 116, 139, 0.5);
  padding: 0.55rem 0.65rem;
}

.batch-model-preview-table tbody td {
  color: rgba(226, 232, 240, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  padding: 0.5rem 0.65rem;
}

.batch-model-preview-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.1);
}

.strategy-library-batch-row-exists td {
  opacity: 0.88;
}

.strategy-library-batch-exists,
.batch-model-badge--exists {
  display: inline-block;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.52);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.strategy-library-batch-new,
.batch-model-badge--new {
  display: inline-block;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.48);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.strategy-library-batch-row-error td {
  color: #fca5a5;
  font-weight: 600;
}

.batch-model-actions {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.batch-model-btn-generate {
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.28);
}

.batch-model-btn-generate:not(:disabled):hover {
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.38);
}

.batch-model-btn-generate:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: grayscale(0.15);
  box-shadow: none;
}

.batch-model-btn-cancel {
  border-color: rgba(100, 116, 139, 0.55) !important;
  color: rgba(226, 232, 240, 0.9) !important;
  background: rgba(30, 41, 59, 0.72) !important;
}

.batch-model-btn-cancel:hover {
  border-color: rgba(148, 163, 184, 0.65) !important;
  background: rgba(51, 65, 85, 0.75) !important;
}

@media (max-width: 900px) {
  .strategy-model-grid--batch-base {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strategy-model-grid--batch-mode {
    grid-template-columns: 1fr;
  }
}

/* P4-6B — Strategy Library field UX */
.strategy-model-section--input {
  border-color: rgba(56, 189, 248, 0.28);
}

.strategy-model-section--computed {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(15, 23, 42, 0.82);
}

.strategy-model-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.72);
  line-height: 1.4;
}

.strategy-model-field-hint--formula {
  margin: 0;
}

/* Strategy library modal — compact two-row input/computed grids (see input-r1 override after .strategy-model-grid) */
.strategy-model-grid--input-r2 {
  grid-template-columns: 1.2fr 1.8fr;
  margin-top: 0.75rem;
}

.strategy-model-grid--input-r2-hints {
  grid-template-columns: 1.2fr 1.8fr;
  gap: 0.35rem 0.85rem;
  margin-top: 0.35rem;
  align-items: start;
}

.strategy-model-grid--input-r2-hints .strategy-naming-hint-wrap {
  margin-top: 0;
}

.strategy-model-field--narrow input {
  min-width: 0;
}

.strategy-model-grid--computed-r1 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.strategy-model-grid--computed-r2 {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 0.75rem;
}

.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--computed-core {
  display: grid;
  align-items: end;
  gap: 10px;
  width: 100%;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--computed-core .strategy-model-field {
  min-width: 0;
}

@media (max-width: 960px) {
  .strategy-model-grid--input-r2,
  .strategy-model-grid--input-r2-hints {
    grid-template-columns: 1fr 1fr;
  }

  .strategy-model-grid--computed-r1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-model-grid--computed-r2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .strategy-library-modal-form .strategy-model-grid.strategy-model-grid--computed-core {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.strategy-model-grid--computed {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.strategy-model-computed {
  background: rgba(30, 41, 59, 0.65) !important;
  color: rgba(226, 232, 240, 0.88) !important;
  border-color: rgba(100, 116, 139, 0.35) !important;
  cursor: not-allowed;
}

.strategy-model-computed.strategy-model-tbd {
  color: rgba(148, 163, 184, 0.85) !important;
  font-style: italic;
}

.strategy-model-computed.strategy-model-formula-error {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
}

.strategy-model-advanced {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(100, 116, 139, 0.35);
}

.strategy-model-advanced summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: rgba(203, 213, 225, 0.85);
  user-select: none;
  margin-bottom: 0.65rem;
}

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

.strategy-leg-letter-cell {
  text-align: center;
  width: 2.5rem;
}

.strategy-leg-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(56, 189, 248, 0.95);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.strategy-legs-table--compact {
  min-width: 980px;
}

.strategy-legs-table--compact thead th {
  font-size: 0.72rem;
}

.strategy-library-edit-panel {
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  overflow: auto;
}

/* P4-6A — Strategy Library Model Modal UX */
.strategy-library-modal-body.strategy-library-edit-panel {
  max-width: min(98vw, 1320px);
  width: min(98vw, 1320px);
  max-height: 94vh;
  background: rgba(10, 15, 28, 0.98);
  color: #e2e8f0;
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: var(--radius, 8px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.08);
  padding: 1.25rem 1.5rem 1.25rem;
}

.strategy-library-modal-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.strategy-library-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.strategy-model-section {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: 6px;
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1rem;
}

.strategy-model-section--legs {
  margin-bottom: 0.75rem;
}

.strategy-model-section-header {
  margin-bottom: 0.85rem;
}

.strategy-model-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
  letter-spacing: 0.03em;
}

.strategy-model-section-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.strategy-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}

@media (max-width: 960px) {
  .strategy-model-grid:not(.strategy-model-grid--input-r1):not(.strategy-model-grid--computed-core) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .strategy-model-grid:not(.strategy-model-grid--input-r1):not(.strategy-model-grid--computed-core) {
    grid-template-columns: 1fr;
  }

  .strategy-model-field--wide,
  .strategy-model-field--full {
    grid-column: 1 / -1;
  }
}

/* input-r1: must follow .strategy-model-grid — equal specificity otherwise later rule wins (4→2 cols) */
.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 {
  display: grid;
  align-items: end;
  gap: 10px;
  width: 100%;
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    96px
    96px;
}

.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 .strategy-model-field {
  min-width: 0;
}

.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 .strategy-model-field label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 .strategy-model-field input,
.strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 .strategy-model-field select {
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .strategy-library-modal-form .strategy-model-grid.strategy-model-grid--input-r1 {
    grid-template-columns: 1fr;
  }
}

.strategy-model-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.92);
  letter-spacing: 0.02em;
}

.strategy-model-field--wide {
  grid-column: span 2;
}

.strategy-model-field--full {
  grid-column: 1 / -1;
}

.strategy-library-modal-form .strategy-model-field input,
.strategy-library-modal-form .strategy-model-field select,
.strategy-library-modal-form .strategy-model-field textarea,
.strategy-legs-table input,
.strategy-legs-table select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.95);
  color: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 4px;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.strategy-library-modal-form .strategy-model-field textarea {
  min-height: 2.75rem;
  resize: vertical;
}

.strategy-library-modal-form .strategy-model-field input::placeholder,
.strategy-library-modal-form .strategy-model-field textarea::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.strategy-library-modal-form .strategy-model-field input:focus,
.strategy-library-modal-form .strategy-model-field select:focus,
.strategy-library-modal-form .strategy-model-field textarea:focus,
.strategy-legs-table input:focus,
.strategy-legs-table select:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

.strategy-legs-table input.strategy-leg-readonly {
  background: rgba(30, 41, 59, 0.55) !important;
  color: rgba(203, 213, 225, 0.88) !important;
  border-color: rgba(100, 116, 139, 0.28) !important;
  cursor: default;
}

.strategy-model-legs-toolbar {
  margin-bottom: 0.5rem;
}

.strategy-legs-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.35);
}

.strategy-legs-table {
  min-width: 1100px;
  font-size: 0.78rem;
}

.strategy-legs-table thead th {
  color: rgba(248, 250, 252, 0.92);
  font-weight: 600;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  white-space: nowrap;
  padding: 0.45rem 0.35rem;
}

.strategy-legs-table tbody td {
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
  padding: 0.35rem 0.3rem;
  vertical-align: middle;
}

.strategy-legs-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.35);
}

.strategy-legs-aux-cell {
  text-align: center;
}

/* R6H two-stage manual modeling POC (SF-only) */
.strategy-model-section--r6h-step1 {
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
}

.library-r6h-readiness-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.library-r6h-readiness-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.library-r6h-readiness-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.library-r6h-readiness-badge--ready {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.library-r6h-readiness-badge--partial {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.45);
}

.library-r6h-readiness-badge--reserved {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.library-r6h-readiness-badge--blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.library-r6h-warning--partial {
  color: #fde047;
}

.library-r6h-warning--blocked {
  color: #fca5a5;
  font-weight: 600;
}

.library-r6h-readiness-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1rem;
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.library-r6h-readiness-dl dt {
  font-weight: 600;
  color: var(--ctrm-muted, #94a3b8);
}

.library-r6h-readiness-dl dd {
  margin: 0 0 0.35rem;
}

.library-logic-template-area {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(100, 116, 139, 0.25);
}

.library-logic-template-area-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.library-logic-template-area-lead,
.library-logic-template-area-reserved {
  margin: 0.35rem 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.library-logic-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.library-logic-template-card {
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  background: rgba(15, 23, 42, 0.35);
}

.library-logic-template-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.library-logic-template-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.library-logic-template-card-meta {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}

.library-logic-template-card-step1 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}

.library-logic-template-card-dl {
  margin-top: 0.25rem;
}

.library-logic-template-card-warning {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.library-r6l-variant-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.library-r6l-template-key-note {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.78rem;
}

.library-r6l-readiness-banner {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.library-r6l-readiness-banner--ready {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.library-r6l-readiness-banner--partial {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
}

.library-r6l-readiness-banner--reserved,
.library-r6l-readiness-banner--blocked {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

.strategy-model-grid--input-r1-inline {
  display: contents;
}

.strategy-library-edit-panel .strategy-library-edit-actions {
  position: sticky;
  bottom: 0;
  background: rgba(10, 15, 28, 0.98);
  border-top: 1px solid rgba(100, 116, 139, 0.35);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
  z-index: 2;
}

.strategy-library-legs-wrap {
  margin-top: 0.5rem;
  overflow-x: auto;
}

.strategy-library-legs-table input,
.strategy-library-legs-table select {
  width: 100%;
  min-width: 4rem;
  font-size: 0.78rem;
}

.strategy-library-legs-table .strategy-library-leg-no {
  width: 3rem;
  min-width: 3rem;
}

.strategy-library-edit-actions {
  position: sticky;
  bottom: 0;
  background: var(--surface, #fff);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
  margin-top: 0.5rem;
}

/* strategy-library-edit-panel dark modal overrides edit-actions above */

.ctrm-error-msg {
  color: #b91c1c;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.strategy-daily-metric-panel,
.strategy-position-panel,
.strategy-library-page .strategy-library-panel {
  margin-bottom: 1rem;
}

.metric-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

/* Master commodity grouped form */
.master-commodity-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.master-commodity-group {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.master-commodity-group legend {
  padding: 0 0.35rem;
  font-weight: 600;
  color: var(--text);
}

.master-commodity-group--placeholder {
  background: var(--bg);
}

.master-commodity-placeholder {
  margin: 0;
  line-height: 1.5;
}

.master-commodity-group input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.master-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.master-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.master-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.master-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.master-panel-note {
  margin: 0 0 0.85rem;
}

.master-futures-history-entry {
  margin: 0 0 0.65rem;
  font-size: 13px;
}

.ctrm-input-readonly {
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-muted, #64748b);
  cursor: default;
}

#panel-futures-parameters .master-futures-quick-actions {
  justify-content: flex-end;
}

.master-list-header .ctrm-panel-title {
  margin: 0;
}

.master-commodity-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.master-commodity-list-empty {
  margin: 0;
  padding: 1rem 0;
}

.master-commodity-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  padding: 0.75rem 1rem 0.85rem;
}

.master-commodity-card.is-editing {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.master-commodity-card-layer + .master-commodity-card-layer {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.master-commodity-card-layer-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.45rem;
}

.master-commodity-card-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
}

.master-commodity-card-field {
  min-width: 0;
}

.master-commodity-card-field dt {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-card-field dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  word-break: break-word;
}

.master-commodity-card-reserved {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-card-actions {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  align-items: center;
}

.master-commodity-card-base {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.master-commodity-card-maf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
}

.master-commodity-maf-label {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-maf-badge {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted, #64748b);
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid var(--border);
}

.master-commodity-card-collapse {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

.master-commodity-card-collapse[hidden] {
  display: none !important;
}

.master-commodity-card.is-expanded {
  border-color: rgba(37, 99, 235, 0.35);
}

.master-commodity-maf-reserved-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.master-commodity-maf-reserved {
  border-style: dashed;
  background: rgba(100, 116, 139, 0.06);
}

.master-commodity-ssot-note,
.master-maf-ssot-boundary-note {
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-left: 3px solid var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.04);
  font-size: 0.85rem;
}

.master-commodity-maf-products-readonly {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.master-commodity-maf-products-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.master-commodity-maf-products-note {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.master-commodity-maf-products-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-maf-products-summary strong {
  color: var(--text, inherit);
}

.master-commodity-maf-filter-toolbar {
  margin: 0 0 0.65rem;
}

.master-commodity-maf-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}

.master-commodity-maf-filter-btn {
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg, #fff);
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  cursor: pointer;
}

.master-commodity-maf-filter-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--text, inherit);
}

.master-commodity-maf-filter-btn.is-active {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.master-commodity-maf-filter-caption {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-maf-filter-caption strong {
  color: var(--text, inherit);
}

.master-commodity-maf-products-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-maf-products-error {
  margin: 0;
  color: var(--danger, #b91c1c);
}

.master-commodity-maf-products-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-commodity-maf-badge--readonly {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
}

.master-commodity-maf-badge-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.master-commodity-maf-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.master-commodity-maf-name-chip {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #1e40af;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.master-commodity-maf-name-more {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-maf-editor-empty {
  margin: 0;
}

.master-commodity-maf-status {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.master-commodity-maf-status--mapped {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.master-commodity-maf-status--unmapped {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
  border-color: rgba(107, 114, 128, 0.25);
}

.master-commodity-maf-status--inactive {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.master-commodity-maf-alias-editor-note {
  margin: 0 0 0.75rem;
}

.master-commodity-maf-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.master-commodity-maf-editor-toolbar .ctrm-input {
  min-width: 220px;
  flex: 1 1 220px;
}

.master-commodity-maf-editor-summary {
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted, #6b7280);
}

.master-commodity-maf-transfer-warnings {
  margin-bottom: 0.65rem;
}

.master-commodity-maf-transfer-warning {
  margin: 0.25rem 0;
  color: #b45309;
  font-size: 0.85rem;
}

.master-commodity-maf-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  background: var(--bg-elevated, #fafafa);
}

.master-commodity-maf-editor-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.5rem;
  align-items: start;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px dashed var(--border);
}

.master-commodity-maf-editor-item:last-child {
  border-bottom: none;
}

.master-commodity-maf-editor-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.master-commodity-maf-editor-item-status,
.master-commodity-maf-editor-item-suggest {
  grid-column: 2;
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
}

.master-commodity-maf-editor-item-suggest {
  color: #1d4ed8;
}

.master-commodity-maf-alias-table-ok {
  color: #047857;
}

.master-futures-specs-hint {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
}

.master-futures-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.master-futures-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.master-futures-manual-label {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

#futures-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  justify-content: flex-end;
}

.master-commodity-card-layer--specs {
  background: rgba(37, 99, 235, 0.03);
}

.master-commodity-specs-heading {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.master-commodity-editor-specs {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.master-commodity-specs-boundary {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.master-commodity-field-hint {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.master-commodity-specs-summary-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.35rem 1rem;
  margin: 0 0 0.65rem;
}

.master-commodity-specs-summary-field dt {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.master-commodity-specs-summary-field dd {
  margin: 0;
  font-weight: 500;
}

.master-futures-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.master-futures-filter-field {
  min-width: 8rem;
  margin: 0;
}

.master-futures-filter-field label {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.master-futures-filter-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

.master-futures-specs-table {
  width: 100%;
}

/* P4-10J + Chart Layout R1: 期货合约行情参数表 — 铺满 panel、列宽均衡、横向滚动兜底 */
.futures-param-table-wrap,
.master-futures-param-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
}

.ctrm-futures-risk-panel .futures-param-table-wrap,
.ctrm-futures-risk-panel .master-futures-param-table-wrap {
  width: 100%;
}

table.ctrm-futures-param-table {
  table-layout: fixed;
  width: 100%;
  min-width: 960px;
  font-size: 13px;
}

table.ctrm-futures-param-table col.col-exchange { width: 7%; }
table.ctrm-futures-param-table col.col-commodity { width: 10%; }
table.ctrm-futures-param-table col.col-contract { width: 7%; }
table.ctrm-futures-param-table col.col-date { width: 9%; }
table.ctrm-futures-param-table col.col-num { width: 7%; }
table.ctrm-futures-param-table col.col-source { width: 8%; }
table.ctrm-futures-param-table col.col-status { width: 10%; }
table.ctrm-futures-param-table col.col-action { width: 8%; }

.ctrm-futures-param-table th.col-exchange,
.ctrm-futures-param-table td.col-exchange {
  text-align: center;
  white-space: nowrap;
}

.ctrm-futures-param-table th,
.ctrm-futures-param-table td {
  white-space: nowrap;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.ctrm-futures-param-table th.col-num,
.ctrm-futures-param-table td.col-num {
  text-align: right;
}

.ctrm-futures-param-table th.col-date,
.ctrm-futures-param-table td.col-date {
  text-align: center;
}

.ctrm-futures-param-table th.col-status,
.ctrm-futures-param-table td.col-status {
  text-align: center;
  white-space: nowrap;
}

.ctrm-futures-param-table th.col-action,
.ctrm-futures-param-table td.col-action {
  text-align: center;
  white-space: nowrap;
}

.ctrm-futures-param-table .futures-specs-row-edit {
  min-width: 44px;
  white-space: nowrap;
}

.master-futures-specs-row.is-editing {
  background: rgba(37, 99, 235, 0.06);
}

/* P4-10L: 期货合约行情参数 — 按品种折叠 */
.master-futures-specs-row.is-default-contract {
  background: rgba(37, 99, 235, 0.04);
}

.master-futures-specs-row.is-folded-hidden {
  display: none;
}

.master-futures-specs-row.is-folded-child td.futures-specs-commodity-cell.is-child {
  padding-left: 18px;
}

.master-futures-specs-row.is-search-match {
  background: rgba(234, 179, 8, 0.12);
}

.futures-specs-commodity-cell {
  white-space: normal;
  line-height: 1.25;
  vertical-align: middle;
}

.futures-specs-commodity-code {
  display: block;
  white-space: nowrap;
}

.futures-specs-commodity-actions {
  margin-top: 2px;
}

.ctrm-futures-param-table .futures-specs-expand-toggle {
  display: block;
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-futures-form-boundary {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

.master-commodity-list-hint {
  margin: 0 0 0.75rem;
}

.master-futures-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 6px;
}

.master-futures-filter-label {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
}

.master-futures-boundary-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

.master-futures-status-wrap {
  margin-top: 0.5rem;
}

.master-futures-status-missing {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 6px;
}

.master-futures-status-missing-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.master-futures-status-missing-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 0 0 0.35rem;
}

.master-futures-status-missing-field dt {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.master-futures-status-missing-field dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.master-futures-status-missing-hint {
  margin: 0;
  font-size: 0.82rem;
}

.master-futures-status-table .master-futures-status-commodity-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link, #2563eb);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.master-futures-status-table .master-futures-status-commodity-link:hover {
  color: #1d4ed8;
}

.master-futures-complete {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.master-futures-complete--100 {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.master-futures-complete--partial {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.master-futures-complete--0 {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.master-commodity-specs-tree {
  margin: 0.35rem 0 0.65rem;
}

.master-commodity-specs-tree-root {
  font-weight: 600;
  font-size: 0.9rem;
}

.master-commodity-specs-tree-code {
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.master-commodity-specs-contract-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  list-style: none;
}

.master-commodity-specs-contract-item::before {
  content: '└ ';
  color: var(--text-muted, #64748b);
}

.master-commodity-specs-table-wrap {
  max-height: 280px;
  overflow: auto;
}

.master-commodity-specs-empty {
  margin: 0.35rem 0;
}

.master-commodity-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.master-futures-specs-sop {
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, #2563eb);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.05);
}

.master-futures-specs-sop-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.master-futures-specs-sop-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.88rem;
  color: var(--text);
}

.master-futures-specs-sop-steps li + li {
  margin-top: 0.35rem;
}

.master-list-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.master-batch-modal-panel {
  max-width: 880px;
  width: min(96vw, 880px);
}

.master-futures-batch-gen-panel {
  max-width: 920px;
}

.master-futures-batch-context {
  margin: 0.65rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.master-futures-batch-context-title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.master-futures-batch-context-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
}

.master-futures-batch-context-field {
  display: flex;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.master-futures-batch-context-field dt {
  margin: 0;
  color: var(--text-muted);
  min-width: 4.5rem;
}

.master-futures-batch-context-field dd {
  margin: 0;
  font-weight: 500;
}

.master-batch-textarea {
  width: 100%;
  min-height: 8rem;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  resize: vertical;
}

.master-batch-actions {
  margin: 0.65rem 0;
}

.master-batch-preview-wrap {
  max-height: 280px;
  overflow: auto;
  margin-top: 0.5rem;
}

.master-batch-row--new td:last-child { color: #2563eb; font-weight: 600; }
.master-batch-row--skip td:last-child { color: #64748b; }
.master-batch-row--error td { color: #dc2626; }

.master-futures-batch-month-range {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.master-futures-batch-month-range input {
  flex: 1 1 0;
  min-width: 0;
}

.master-futures-specs-form .master-futures-specs-field-wide {
  grid-column: 1 / -1;
}

.ctrm-readonly-input {
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
  cursor: default;
}

.master-futures-specs-tree {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.master-futures-tree-empty {
  margin: 0;
  padding: 1rem 0;
}

.master-futures-tree-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.master-futures-tree-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.master-futures-tree-summary::-webkit-details-marker {
  display: none;
}

.master-futures-tree-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--text-muted, #64748b);
  transition: transform 0.15s ease;
}

.master-futures-tree-group[open] > .master-futures-tree-summary::before {
  transform: rotate(90deg);
}

.master-futures-tree-commodity {
  font-size: 0.92rem;
}

.master-futures-tree-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.master-futures-tree-contracts {
  padding: 0 0.75rem 0.75rem;
  border-top: 1px dashed var(--border);
}

.master-futures-tree-table {
  margin-top: 0.5rem;
}

.master-futures-tree-contract.is-editing {
  background: rgba(37, 99, 235, 0.06);
}

.master-futures-batch-commodity-field select {
  width: 100%;
}

.master-futures-specs-subtabs {
  margin: 0 0 0.75rem;
}

.master-futures-params-summary {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}

.master-futures-ingest-notice,
.master-futures-settle-notice {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.master-futures-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.master-futures-action-group--maint {
  margin-left: auto;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border, #e2e8f0);
}

.master-futures-quick-actions .btn-muted-action {
  opacity: 0.88;
}

.master-futures-history-hint {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.master-futures-history-settle-notice {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

/* History panel visual tune R1: compact module, chart + detail side-by-side */
.master-futures-history-panel {
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.7rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.master-futures-history-panel .strategy-metric-history-chart-header {
  margin-bottom: 0.15rem;
}

.master-futures-history-panel .strategy-metric-history-chart-title {
  margin: 0;
  font-size: 0.95rem;
}

.master-futures-history-chart-body.is-populated {
  margin-top: 0.15rem;
}

.master-futures-inline-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(210px, 3fr);
  gap: 0.65rem 0.85rem;
  align-items: stretch;
}

.master-futures-inline-history-chart-col {
  min-width: 0;
}

.master-futures-inline-history-detail-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.master-futures-inline-history-chart-canvas {
  width: 100%;
  max-width: 100%;
  margin: 0;
  max-height: 260px;
}

.master-futures-inline-history-chart-canvas svg.master-futures-inline-history-svg {
  display: block;
  width: 100%;
  height: 248px;
  max-width: 100%;
  overflow: visible;
}

.master-futures-inline-history-meta-block {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}

.master-futures-inline-history-meta-line + .master-futures-inline-history-meta-line {
  margin-top: 0.12rem;
}

.master-futures-inline-history-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--surface, #fff);
}

table.master-futures-inline-history-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.78rem;
  border-collapse: collapse;
}

.master-futures-inline-history-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  box-shadow: 0 1px 0 var(--border, #e2e8f0);
  padding: 6px 8px;
  font-weight: 600;
  white-space: nowrap;
}

.master-futures-inline-history-table tbody td {
  padding: 5px 8px;
  border-top: 1px solid var(--border, #e2e8f0);
  vertical-align: middle;
}

.master-futures-inline-history-table th.col-date,
.master-futures-inline-history-table td.col-date {
  width: 38%;
  text-align: left;
  white-space: nowrap;
}

.master-futures-inline-history-table th.col-num,
.master-futures-inline-history-table td.col-num {
  width: 31%;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .master-futures-inline-history-layout {
    grid-template-columns: 1fr;
  }

  .master-futures-inline-history-table-wrap {
    max-height: 200px;
  }
}

.master-futures-status-badge {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}

.master-futures-status--ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.master-futures-status--ok-missing-settle {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.master-futures-status--issue {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
}

.master-futures-specs-row.is-history-selected {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: -2px;
}

.master-futures-specs-table .col-action {
  white-space: nowrap;
}

.master-futures-specs-table .col-action .btn + .btn {
  margin-left: 0.25rem;
}

.master-futures-import-wrap {
  margin-top: 0.25rem;
}

.master-futures-import-detail {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.master-futures-import-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.master-futures-import-actions {
  margin: 0;
}

.master-futures-batch-id {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  max-width: 14rem;
  word-break: break-all;
}

.master-futures-ai-check-panel {
  max-width: 920px;
  width: min(96vw, 920px);
}

.master-futures-ai-check-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.master-futures-ai-check-summary-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2, #f8fafc);
}

.master-futures-ai-check-summary-card strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

.master-futures-ai-check-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.master-futures-ai-check-table .severity-error {
  color: #dc2626;
  font-weight: 600;
}

.master-futures-ai-check-table .severity-warning {
  color: #d97706;
  font-weight: 600;
}

.master-futures-ai-check-table .severity-info {
  color: #2563eb;
  font-weight: 600;
}

.master-futures-compare-panel {
  max-width: 920px;
  width: min(96vw, 920px);
}

.master-futures-cleanup-panel {
  max-width: 980px;
  width: min(96vw, 980px);
}

.master-futures-cleanup-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.master-futures-cleanup-table-wrap {
  max-height: 420px;
  overflow: auto;
  margin-bottom: 0.75rem;
}

.master-futures-cleanup-actions {
  justify-content: flex-end;
  gap: 0.5rem;
}

.master-futures-compare-block {
  margin-bottom: 1rem;
}

.master-futures-compare-block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.master-futures-compare-status {
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 0.35rem;
}

.master-futures-compare-status--new { color: #2563eb; }
.master-futures-compare-status--same { color: #16a34a; }
.master-futures-compare-status--different { color: #d97706; }

.master-futures-diff-row td:nth-child(2) {
  background: rgba(37, 99, 235, 0.06);
}

.master-futures-diff-row td:nth-child(3) {
  background: rgba(22, 163, 74, 0.06);
}

.ctrm-input-suffix {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.ctrm-input-suffix input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.ctrm-input-suffix-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  white-space: nowrap;
}

/* P4-6C — Strategy taxonomy rule center */
.strategy-taxonomy-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .strategy-taxonomy-layout {
    grid-template-columns: 1fr;
  }
}

.strategy-taxonomy-panel {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  background: rgba(248, 250, 252, 0.6);
}

.strategy-taxonomy-subtitle {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.strategy-taxonomy-table-wrap {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 0.75rem;
}

.strategy-taxonomy-table tbody tr {
  cursor: pointer;
}

.strategy-taxonomy-table tbody tr.is-editing {
  background: rgba(56, 189, 248, 0.12);
}

.strategy-taxonomy-form-block,
.strategy-taxonomy-naming-block,
.strategy-taxonomy-nav-block,
.strategy-taxonomy-logic-rules-block {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.strategy-taxonomy-nav-block .strategy-taxonomy-subtitle,
.strategy-taxonomy-logic-rules-block .strategy-taxonomy-subtitle {
  margin-top: 0;
}

.stax-textarea {
  width: 100%;
  min-height: 2.5rem;
  resize: vertical;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.45;
}

.ctrm-field-canonical {
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(148, 163, 184, 0.9);
  margin-left: 0.25rem;
}

/* R26 — Taxonomy completeness badges (data_rules strategy rules) */
.stax-edit-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.stax-completeness-wrap {
  display: inline-flex;
  align-items: center;
}

.stax-completeness-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.stax-completeness-badge--complete {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.stax-completeness-badge--partial {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.stax-completeness-badge--empty {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(100, 116, 139, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.stax-completeness-count {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.9;
}

.stax-row-name {
  margin-right: 0.25rem;
}

.stax-logic-missing-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.stax-logic-missing-hint--complete {
  color: #15803d;
}

.stax-logic-missing-hint--partial {
  color: rgba(180, 83, 9, 0.95);
}

.strategy-naming-hint-wrap {
  margin-top: 0.35rem;
}

.strategy-naming-hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.85);
  line-height: 1.45;
}

.strategy-naming-hint--empty {
  color: rgba(148, 163, 184, 0.85);
  font-style: italic;
}

.strategy-naming-examples {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.76rem;
  color: rgba(203, 213, 225, 0.78);
}

.strategy-library-modal-form select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* P4-MASTER-SPOT-BASIS-UI-REFLOW */
.master-spot-basis-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1.25rem 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

@media (max-width: 1100px) {
  .master-spot-basis-edit-layout {
    grid-template-columns: 1fr;
  }
}

.master-spot-basis-form-section {
  margin-bottom: 1.1rem;
}

.master-spot-basis-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.master-spot-basis-formula-hint {
  margin: -0.25rem 0 0.75rem;
  font-size: 12px;
}

.master-spot-basis-form-grid--spot,
.master-spot-basis-form-grid--futures {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
}

.master-spot-basis-form-grid--futures .master-spot-basis-remark-field {
  grid-column: 1 / -1;
}

.master-spot-basis-edit-main .master-spot-basis-form-actions {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.master-spot-basis-premium-ref {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--bg-subtle, #f8fafc);
  position: sticky;
  top: 0.5rem;
}

.master-spot-basis-premium-ref--compact {
  padding: 0.55rem 0.65rem;
}

.master-spot-basis-premium-ref--compact .master-spot-basis-section-title {
  font-size: 13px;
}

.master-spot-basis-premium-ref-subtitle {
  margin: 0 0 0.35rem;
  font-size: 11px;
  line-height: 1.3;
}

.master-spot-basis-premium-ref--compact .master-spot-basis-premium-ref-note {
  margin: 0 0 0.35rem;
  font-size: 10px;
  line-height: 1.35;
}

.master-spot-basis-premium-ref-table--compact {
  font-size: 11px;
}

.master-spot-basis-premium-ref-table--compact th,
.master-spot-basis-premium-ref-table--compact td {
  padding: 0.2rem 0.35rem;
  line-height: 1.25;
}

.master-spot-basis-premium-ref-table--compact .master-spot-basis-premium-ref-premium {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.master-spot-basis-premium-ref-footer {
  margin: 0.35rem 0 0;
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-muted, #64748b);
}

.master-ep-row-non-official td {
  background: rgba(254, 226, 226, 0.35);
}

.master-ep-non-official-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.25rem;
  font-size: 10px;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 3px;
}

.ep-non-official-hint {
  color: #b91c1c;
}

.master-spot-basis-premium-ref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.master-spot-basis-premium-ref-header .master-spot-basis-section-title {
  margin: 0;
}

.master-spot-basis-premium-ref-note {
  margin: 0 0 0.5rem;
  font-size: 12px;
}

#spot-basis-premium-ref-status {
  margin: 0 0 0.65rem;
  font-size: 12px;
}

.master-spot-basis-premium-ref-table-wrap {
  max-height: 280px;
  overflow: auto;
}

.master-spot-basis-premium-ref-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-spot-basis-premium-ref-empty td {
  text-align: center;
  color: var(--text-muted, #64748b);
}

.master-spot-basis-premium-source-config {
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.master-spot-basis-premium-source-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.master-spot-basis-premium-source-config-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

#premium-source-config-status {
  margin: 0 0 0.5rem;
  font-size: 12px;
}

.master-spot-basis-premium-source-config-table-wrap {
  max-height: 180px;
  overflow: auto;
}

.master-spot-basis-premium-source-config-empty td {
  text-align: center;
  color: var(--text-muted, #64748b);
}

.master-ep-mgmt-link {
  margin-left: 0.35rem;
  white-space: nowrap;
}

.master-ep-span2 {
  grid-column: span 2;
}

.master-ep-span3 {
  grid-column: 1 / -1;
}

.master-ep-fetch-job-section {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.master-ep-fetch-job-title {
  margin: 0 0 0.35rem;
  font-size: 14px;
  font-weight: 600;
}

.master-ep-fetch-job-note {
  margin: 0 0 0.5rem;
  font-size: 12px;
}

.master-ep-fetch-job-table {
  font-size: 12px;
}

.master-ep-fetch-job-error {
  max-width: 220px;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  word-break: break-word;
}

.master-ep-fetch-raw-preview {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  background: var(--bg-subtle, #f8fafc);
}

.master-ep-fetch-raw-preview summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.master-ep-fetch-raw-meta {
  margin: 0.4rem 0 0.35rem;
  font-size: 11px;
  color: var(--text-muted, #64748b);
}

.master-ep-fetch-raw-textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  resize: vertical;
}

.master-ep-fetch-parse-preview {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}

.master-ep-fetch-parse-preview summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.master-ep-fetch-parse-note {
  margin: 0.35rem 0 0.5rem;
  font-size: 11px;
}

.master-ep-fetch-parse-meta {
  margin: 0 0 0.4rem;
  font-size: 11px;
  color: var(--text-muted, #64748b);
}

.master-ep-fetch-parse-table {
  font-size: 11px;
}

.master-ep-fetch-parse-table .col-num {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.master-ep-fetch-parse-errors {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 11px;
  color: #b45309;
}

.master-ep-fetch-parse-actions {
  margin-top: 0.5rem;
}

.master-ep-fetch-commit-result {
  margin: 0.45rem 0 0;
  font-size: 11px;
  color: #166534;
}

.master-ep-committed-badge {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0 0.25rem;
  font-size: 10px;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 3px;
}

.master-ep-filter-bar {
  margin: 0.75rem 0 0.5rem;
}

.master-ep-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.master-ep-table-wrap .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-ep-url-pending {
  color: var(--text-muted, #64748b);
  font-style: italic;
}

#panel-exchange-premium .ctrm-tabs {
  margin-bottom: 0.75rem;
}

.master-spot-basis-premium-import {
  margin: 0 0 0.75rem;
  border: 1px dashed var(--border-subtle, #cbd5e1);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  background: var(--bg-panel, #fff);
}

.master-spot-basis-premium-import-title {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary, #0f172a);
  list-style: none;
}

.master-spot-basis-premium-import-title::-webkit-details-marker {
  display: none;
}

.master-spot-basis-premium-import-note {
  margin: 0.5rem 0 0.65rem;
  font-size: 12px;
}

.master-spot-basis-premium-official-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-subtle, #f8fafc);
  font-size: 12px;
}

.master-spot-basis-premium-official-link-label {
  margin: 0;
}

.master-spot-basis-premium-official-link-url {
  word-break: break-all;
}

.master-spot-basis-premium-import-unrecognized {
  margin: 0 0 0.5rem;
  font-size: 12px;
}

.master-spot-basis-premium-import-unrecognized-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted, #64748b);
}

.master-spot-basis-premium-import-source-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  word-break: break-all;
}

.master-spot-basis-premium-import-commit-result {
  margin: 0.35rem 0 0.5rem;
  font-size: 12px;
}

.master-spot-basis-premium-import-grid {
  margin-bottom: 0.5rem;
}

.master-spot-basis-premium-import-span2 {
  grid-column: 1 / -1;
}

.master-spot-basis-premium-import-textarea {
  width: 100%;
  min-height: 4.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.master-spot-basis-premium-import-actions {
  margin: 0.35rem 0 0.5rem;
  gap: 0.5rem;
}

#premium-import-preview-status {
  margin: 0 0 0.5rem;
  font-size: 12px;
}

.master-spot-basis-premium-import-preview-wrap {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 0.5rem;
}

.master-spot-basis-premium-import-preview-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-spot-basis-premium-import-row-error td {
  background: rgba(239, 68, 68, 0.06);
}

.master-spot-basis-premium-import-row-warn td {
  background: rgba(245, 158, 11, 0.06);
}

#spot-basis-display-ex-vat,
#spot-basis-display-basis-tax,
#spot-basis-display-full-basis-tax,
#spot-basis-display-basis-ex-vat {
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-primary, #0f172a);
  cursor: default;
}

.master-spot-basis-preview-compact {
  margin-top: 0.35rem;
  font-size: 12px;
}

/* CTRM-SPOT-BASIS-DUAL-ANCHOR-UI-R1 */
.master-spot-basis-page-subtitle {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.master-spot-basis-page-intro {
  margin: 0 0 1rem;
}

.master-spot-basis-context-bar {
  margin-bottom: 1rem;
}

.master-spot-basis-context-grid,
.master-spot-basis-realtime-contract-grid {
  align-items: end;
}

.master-spot-basis-realtime-quote-dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.master-spot-basis-realtime-quote-dl dt {
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.master-spot-basis-realtime-quote-dl dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.master-spot-basis-realtime-contract-hint {
  margin: 0.65rem 0 0;
}

/* CTRM-SPOT-BASIS-PIPELINE-UI-R1 */
.master-spot-basis-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.master-spot-basis-corridor {
  margin-bottom: 0.25rem;
}

.master-spot-basis-corridor-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.5rem;
}

.master-spot-basis-corridor-node {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 4.5rem;
}

.master-spot-basis-corridor-label {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.master-spot-basis-corridor-node strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.master-spot-basis-corridor-wr-badge {
  margin-left: auto;
}

.master-spot-basis-pipeline-section {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-elevated, #fff);
  padding: 0.85rem 1rem;
}

.master-spot-basis-pipeline-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.master-spot-basis-pipeline-section-header .master-spot-basis-section-title {
  margin: 0;
  flex: 1 1 auto;
}

.master-spot-basis-pipeline-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.master-spot-basis-gate {
  border-left: 3px solid var(--border, #cbd5e1);
  padding: 0.85rem 1rem;
}

.master-spot-basis-gate--registration {
  border-left-color: #0ea5e9;
}

.master-spot-basis-gate--cancellation {
  border-left-color: #f59e0b;
}

.master-spot-basis-gate-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.master-spot-basis-gate-header .master-spot-basis-section-title {
  margin: 0;
}

.master-spot-basis-gate-status {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--border-subtle, #e2e8f0);
}

.master-spot-basis-gate-profit {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
}

.master-spot-basis-gate-holding {
  margin-bottom: 0.65rem;
  max-width: 12rem;
}

.master-spot-basis-gate-params-dl {
  margin-bottom: 0.5rem;
}

.master-spot-basis-gate-note {
  margin: 0.35rem 0 0;
  font-size: 12px;
}

.master-spot-basis-form-panel {
  margin: 1rem 0;
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  background: var(--surface-2, #f8fafc);
}

.master-spot-basis-form-panel-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .master-spot-basis-corridor-track {
    flex-direction: column;
    align-items: flex-start;
  }
  .master-spot-basis-corridor-wr-badge {
    margin-left: 0;
  }
  .master-spot-basis-realtime-quote-dl {
    grid-template-columns: 1fr;
  }
}

.master-spot-basis-context-futures-placeholder {
  margin: 0.35rem 0 0;
  min-height: 1.25rem;
}

.master-spot-basis-core-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .master-spot-basis-core-cards {
    grid-template-columns: 1fr;
  }
}

.master-spot-basis-core-card {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-elevated, #fff);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.master-spot-basis-core-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.master-spot-basis-core-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.master-spot-basis-core-card-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 12px;
}

.master-spot-basis-core-card-body dt {
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.master-spot-basis-core-card-body dd {
  margin: 0;
}

.master-spot-basis-core-empty {
  margin: 0;
}

.master-spot-basis-core-live-hint {
  margin: 0.75rem 0 0;
  font-size: 11px;
}

.master-spot-basis-derived-section {
  margin-top: 1rem;
}

.master-spot-basis-derived-intro {
  margin: 0.35rem 0 0.75rem;
}

.master-spot-basis-derived-controls {
  margin-bottom: 0.75rem;
}

.master-spot-basis-derived-summary-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.88rem;
}

.master-spot-basis-derived-summary-dl dt {
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.master-spot-basis-derived-summary-dl dd {
  margin: 0;
}

.master-spot-basis-derived-warning {
  color: var(--text-warning, #b45309);
  margin: 0 0 0.5rem;
}

.master-spot-basis-derived-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.master-spot-basis-derived-manual-result {
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.master-spot-basis-derived-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-spot-basis-economics-section {
  margin-top: 1rem;
}

.master-spot-basis-economics-intro {
  margin: 0.35rem 0 0.75rem;
}

.master-spot-basis-economics-controls {
  margin-bottom: 0.75rem;
}

.master-spot-basis-economics-summary-line {
  margin: 0.25rem 0;
}

.master-spot-basis-economics-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.master-spot-basis-core-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.master-spot-basis-core-current-hint {
  grid-column: 1 / -1;
  margin: -0.25rem 0 0;
  font-size: 11px;
}

.master-spot-basis-ref-panel {
  min-width: 0;
}

.master-spot-basis-ref-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.master-spot-basis-ref-tab {
  border: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--bg-subtle, #f8fafc);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 11px;
  cursor: pointer;
}

.master-spot-basis-ref-tab.active {
  background: var(--primary-soft, #e0f2fe);
  border-color: var(--primary, #0284c7);
  color: var(--primary, #0284c7);
  font-weight: 600;
}

.master-spot-basis-ref-pane[hidden] {
  display: none !important;
}

.master-spot-basis-wrc-ref-body {
  font-size: 12px;
}

.master-spot-basis-wrc-ref-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.75rem;
}

.master-spot-basis-wrc-ref-body dt {
  color: var(--text-muted, #64748b);
}

.master-spot-basis-wrc-ref-body dd {
  margin: 0;
}

.master-spot-basis-history {
  margin-top: 1rem;
}

.master-spot-basis-history-summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* MAF 转换规则 — R1 迁移提示 / 列表状态 */
.master-maf-migrate-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  background: var(--bg-elevated, #fff);
  max-width: 42rem;
}

.master-maf-migrate-note {
  margin: 0.75rem 0 1rem;
}

.master-maf-spot-config-note {
  margin: 0.5rem 0 0.75rem;
}

.master-maf-state {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--text-muted, #64748b);
}

.master-maf-state--loading {
  font-style: italic;
}

.master-maf-state--empty {
  color: var(--text-muted, #64748b);
}

.master-maf-state--error {
  color: var(--danger, #b91c1c);
}

/* —— UI Data Layer Visibility (R1) —— */
.ctrm-data-layer-governance {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.ctrm-data-layer-governance-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.ctrm-data-layer-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem 0.35rem;
}

.ctrm-data-layer-card {
  flex: 1 1 140px;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
}

.ctrm-data-layer-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.35rem;
}

.ctrm-data-layer-card-en {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  line-height: 1.3;
}

.ctrm-data-layer-card-zh {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.ctrm-data-layer-card-label {
  display: inline-block;
  min-width: 2em;
  margin-right: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.ctrm-data-layer-card-module,
.ctrm-layer-status {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.ctrm-data-layer-card-module code,
.ctrm-layer-status code,
.ctrm-layer-note code {
  font-size: 0.9em;
}

.ctrm-data-layer-arrow {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.85rem;
  color: var(--placeholder);
  padding: 0 0.1rem;
}

.ctrm-layer-badge-wrap {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
}

.ctrm-layer-badge-wrap--fact {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  border-left-color: var(--warning);
  background: #fffbeb;
}

.ctrm-layer-badge {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-hover);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-muted);
  border-radius: 4px;
}

.ctrm-layer-badge-wrap--fact .ctrm-layer-badge {
  color: var(--warning);
  border-color: #fcd34d;
}

.ctrm-layer-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
}

.ctrm-data-layer-governance-ref {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .ctrm-data-layer-arrow {
    display: none;
  }

  .ctrm-data-layer-card {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (max-width: 520px) {
  .ctrm-data-layer-card {
    flex: 1 1 100%;
  }
}

/* Master — Data Architecture read-only panel (R1 impl) */
.master-data-architecture-panel {
  margin-top: 0.5rem;
}

.master-data-architecture-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 1.25rem;
}

.master-data-architecture-overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.05);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.master-data-architecture-overview-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}

.master-data-architecture-overview-en {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.master-data-architecture-overview-zh {
  font-size: 0.9375rem;
  font-weight: 600;
}

.master-data-architecture-section {
  margin: 0 0 1.35rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.master-data-architecture-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.master-data-architecture-section-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 600;
}

.master-data-architecture-dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.master-data-architecture-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.master-data-architecture-dl dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.875rem;
}

.master-data-architecture-dl dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(51, 65, 85, 0.92);
}

.master-data-architecture-list {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.master-data-architecture-list--forbidden li {
  color: #b45309;
}

.master-data-architecture-flow {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
}

.master-data-architecture-table {
  font-size: 0.875rem;
}

.master-data-architecture-sop {
  margin: 0.35rem 0 0;
  padding-left: 1.35rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.master-data-architecture-forbidden {
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* Master — CTRM System Architecture read-only panel (R1) */
.master-system-architecture-panel,
.system-architecture-panel {
  margin-top: 0.5rem;
}

.master-system-architecture-lead {
  margin: 0 0 1rem;
  max-width: 52rem;
  line-height: 1.55;
}

.master-system-architecture-layer {
  margin: 0 0 2rem;
  padding: 0 0 1.5rem;
  border-bottom: 2px solid var(--border, #cbd5e1);
}

.master-system-architecture-layer:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.master-system-architecture-layer-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.master-system-architecture-layer-lead {
  margin: 0 0 1rem;
  max-width: 52rem;
  line-height: 1.55;
}

.master-system-architecture-layer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

/* System architecture page — UI refactor (layout · TOC · cards · product map) */
.ctrm-architecture-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  --sa-scroll-offset: 5.5rem;
}

#system-architecture-content [id^="sa-"] {
  scroll-margin-top: var(--sa-scroll-offset, 5.5rem);
}

/* Graph-driven architecture explorer — highlight classes only */
#system-architecture-content .sa-graph-active {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 3px;
  border-radius: 12px;
  opacity: 1;
  transition: opacity 0.18s ease, outline-color 0.18s ease;
}

#system-architecture-content .sa-graph-neighbor {
  opacity: 0.8;
  outline: 1px dashed rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
  border-radius: 12px;
  transition: opacity 0.18s ease;
}

#system-architecture-content .sa-graph-faded {
  opacity: 0.3;
  transition: opacity 0.18s ease;
}

.ctrm-sticky-toc-link.sa-graph-active {
  outline: none;
  background: rgba(59, 130, 246, 0.12);
}

.ctrm-sticky-toc-link.sa-graph-neighbor {
  outline: none;
  opacity: 0.85;
}

.ctrm-sticky-toc-link.sa-graph-faded {
  outline: none;
  opacity: 0.45;
}

.ctrm-architecture-main {
  min-width: 0;
}

.ctrm-sticky-toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 1rem 0.85rem;
  border-radius: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.ctrm-sticky-toc-heading {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.ctrm-sticky-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ctrm-sticky-toc-list li + li {
  margin-top: 0.15rem;
}

.ctrm-sticky-toc-link {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text, #334155);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ctrm-sticky-toc-link:hover {
  background: rgba(59, 130, 246, 0.06);
  color: var(--primary, #2563eb);
}

.ctrm-sticky-toc-link.is-active {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
  font-weight: 600;
}

.ctrm-architecture-section-card {
  margin: 0 0 1.75rem;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8edf3);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ctrm-architecture-section-card:last-child {
  margin-bottom: 0;
}

.ctrm-architecture-section-card.master-system-architecture-layer {
  border-bottom: none;
  padding-bottom: 1.35rem;
}

.ctrm-section-chip-group,
.section-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.ctrm-section-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted, #475569);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ctrm-architecture-collapsible {
  margin-top: 0.5rem;
  border: 1px solid var(--border, #e8edf3);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.65);
  overflow: hidden;
}

.ctrm-architecture-collapsible--nested {
  margin: 1rem 0;
  background: rgba(248, 250, 252, 0.4);
}

.ctrm-architecture-collapsible-summary {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ctrm-architecture-collapsible-summary::-webkit-details-marker {
  display: none;
}

.ctrm-architecture-collapsible-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--muted, #64748b);
}

.ctrm-architecture-collapsible[open] > .ctrm-architecture-collapsible-summary::before {
  transform: rotate(90deg);
}

.ctrm-architecture-collapsible-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border, #eef2f6);
}

.ctrm-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.ctrm-product-card {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8edf3);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.ctrm-product-card-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.ctrm-product-card-purpose {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ctrm-product-card-dl {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ctrm-product-card-dl > div + div {
  margin-top: 0.55rem;
}

.ctrm-product-card-dl dt {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.ctrm-product-card-dl dd {
  margin: 0;
}

.ctrm-architecture-insight-block {
  margin-top: 0.5rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.ctrm-architecture-insight-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.ctrm-architecture-layout .master-system-architecture-section {
  border-bottom: 1px solid var(--border, #eef2f6);
}

.ctrm-architecture-layout .master-system-architecture-layer {
  border-bottom: none;
}

@media (max-width: 960px) {
  .ctrm-architecture-layout {
    grid-template-columns: 1fr;
  }

  .ctrm-sticky-toc {
    position: static;
    max-height: none;
  }

  .ctrm-sticky-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .ctrm-sticky-toc-list li + li {
    margin-top: 0;
  }

  .ctrm-product-grid {
    grid-template-columns: 1fr;
  }
}

.master-system-architecture-section {
  margin: 0 0 1.5rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.master-system-architecture-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.master-system-architecture-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.master-system-architecture-intro {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 52rem;
}

.master-system-architecture-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.65rem;
  margin: 0.5rem 0 0;
}

.master-system-architecture-overview-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.05);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.master-system-architecture-overview-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}

.master-system-architecture-overview-card--pending {
  opacity: 0.92;
  cursor: default;
  background: #f8fafc;
  border-color: var(--border, #e2e8f0);
}

.master-system-architecture-overview-card--pending:hover {
  border-color: var(--border, #e2e8f0);
  background: #f8fafc;
}

.master-system-architecture-overview-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.master-system-architecture-tier-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0.65rem 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 0.875rem;
  font-weight: 600;
}

.master-system-architecture-tier-flow--data {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.28);
}

.master-system-architecture-tier-arrow {
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 400;
}

.master-system-architecture-tier-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.master-system-architecture-tier-card {
  padding: 0.85rem 1rem;
  min-width: 0;
}

.master-system-architecture-tier-card::before {
  display: none;
}

.master-system-architecture-tier-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.master-system-architecture-tier-subtitle {
  margin: -0.2rem 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.master-system-architecture-tier-flow--four {
  gap: 0.35rem 0.45rem;
}


.master-system-architecture-plan-driven-txn {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid #3d5a4c;
  background: linear-gradient(90deg, rgba(61,90,76,0.06), transparent);
}
.master-system-architecture-plan-driven-txn .master-system-architecture-list {
  margin-bottom: 0;
}

.master-system-architecture-si-bsi-fork {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.master-system-architecture-si-bsi-fork__si {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 0.875rem;
}

.master-system-architecture-si-bsi-fork__branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(34, 197, 94, 0.35);
}

.master-system-architecture-si-bsi-fork__bsi {
  margin: 0;
}

.master-system-architecture-si-bsi-methodology {
  margin: 0.5rem 0 0.85rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px dashed rgba(100, 116, 139, 0.45);
  background: rgba(148, 163, 184, 0.06);
}

.master-system-architecture-dl {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.master-system-architecture-dl > div {
  display: grid;
  grid-template-columns: minmax(4.5rem, 6rem) 1fr;
  gap: 0.35rem 0.65rem;
  align-items: start;
}

.master-system-architecture-dl dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.8125rem;
}

.master-system-architecture-dl dd {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(51, 65, 85, 0.92);
}

.master-system-architecture-subhead {
  margin: 0.65rem 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.master-system-architecture-list {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.master-system-architecture-details {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
}

.master-system-architecture-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #4f46e5;
}

.master-system-architecture-example {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.master-system-architecture-example p {
  margin: 0.25rem 0 0;
}

.master-system-architecture-summary {
  padding-top: 0.25rem;
}

.master-system-architecture-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.master-system-architecture-lifecycle-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-system-architecture-lifecycle-card {
  min-height: 0;
}

.master-system-architecture-lifecycle-flow {
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.45;
}

.master-system-architecture-subsection-title {
  margin: 1.1rem 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.master-system-architecture-subsection-title:first-of-type {
  margin-top: 0.75rem;
}

.master-system-architecture-role-grid,
.master-system-architecture-audit-level-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.master-system-architecture-permission-flow {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.28);
}

.master-system-architecture-permission-principle-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.master-system-architecture-permission-principle-grid .master-system-architecture-tier-card {
  padding: 0.65rem 0.75rem;
}

.master-system-architecture-permission-principle-grid h5 {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.master-system-architecture-matrix-wrap {
  margin-top: 0.5rem;
}

.master-system-architecture-permission-matrix {
  font-size: 0.8125rem;
}

.master-system-architecture-table th,
.master-system-architecture-table td {
  vertical-align: top;
}

.ctrm-system-architecture-visual-figure {
  margin: 0.75rem 0 1rem;
  padding: 0;
  border: 0;
}

.ctrm-system-architecture-visual-caption {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ctrm-system-architecture-visual-layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.ctrm-system-architecture-visual-layer-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 0.375rem;
}

.ctrm-system-architecture-visual-layer-id {
  font-weight: 700;
  min-width: 2rem;
}

.ctrm-system-architecture-visual-layer-name {
  font-weight: 600;
  white-space: nowrap;
}

.ctrm-system-architecture-visual-layer-item p {
  grid-column: 1 / -1;
  margin: 0;
}

.ctrm-system-architecture-visual-status-reserved {
  font-weight: 600;
}

.ctrm-system-architecture-visual-flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem 0.5rem;
}

.ctrm-system-architecture-visual-flow-step {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 8rem;
  max-width: 12rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 0.375rem;
}

.ctrm-system-architecture-visual-flow-step--join,
.ctrm-system-architecture-visual-flow-step--arrow {
  min-width: auto;
  max-width: none;
  border: 0;
  padding: 0.25rem;
  align-self: center;
  justify-content: center;
}

.ctrm-system-architecture-visual-flow-label {
  font-weight: 600;
  font-size: 0.8125rem;
}

.ctrm-system-architecture-visual-flow-connector {
  font-weight: 700;
  color: var(--ctrm-muted, #64748b);
}

@media (max-width: 768px) {
  .ctrm-system-architecture-visual-flow-list {
    flex-direction: column;
  }

  .ctrm-system-architecture-visual-flow-step--join,
  .ctrm-system-architecture-visual-flow-step--arrow {
    align-self: flex-start;
  }
}

.master-system-architecture-exchange-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-system-architecture-exchange-module-flow {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.28);
}

.master-system-architecture-exchange-total-flow {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.35);
}

.master-system-architecture-ops-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-system-architecture-ops-total-flow {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  background: rgba(107, 114, 128, 0.1);
  border-color: rgba(107, 114, 128, 0.35);
}

.master-system-architecture-page-tier-flow {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.master-system-architecture-page-cockpit-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-system-architecture-page-ops-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.master-system-architecture-page-support-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-system-architecture-page-total-flow {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
}

.master-system-architecture-summary-card {
  padding: 0.85rem 1rem;
}

.master-system-architecture-summary-card::before {
  display: none;
}

.master-system-architecture-flow-line {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}

@media (max-width: 640px) {
  .master-system-architecture-tier-grid,
  .master-system-architecture-summary-grid {
    grid-template-columns: 1fr;
  }

  .master-system-architecture-dl > div {
    grid-template-columns: 1fr;
  }
}

.master-system-architecture-redirect-card {
  padding: 1rem 1.15rem;
  max-width: 40rem;
}

.master-system-architecture-redirect-card::before {
  display: none;
}

.ctrm-page-boundary-note {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.92rem;
  line-height: 1.55;
}
.ctrm-page-boundary-note strong { color: var(--text); }
.ctrm-page-boundary-note ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}
.ctrm-flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}
.ctrm-flow-strip .ctrm-flow-step {
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.ctrm-flow-strip .ctrm-flow-arrow { color: var(--muted); user-select: none; }
.ctrm-action-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 1.25rem;
}
.ctrm-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.ctrm-action-card:hover {
  border-color: var(--accent, #3b82f6);
  background: var(--surface-2);
}
.ctrm-action-card.is-current {
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #3b82f6) 25%, transparent);
}
.ctrm-action-card-title { font-weight: 600; font-size: 0.95rem; }
.ctrm-action-card-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.45; margin: 0; }
.ctrm-action-card-meta { font-size: 0.78rem; color: var(--muted); }
.ctrm-section-help {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent, #3b82f6);
  background: var(--surface-2);
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  line-height: 1.5;
}
.ctrm-section-help dl { margin: 0.35rem 0 0; display: grid; gap: 0.25rem; }
.ctrm-section-help dt { font-weight: 600; font-size: 0.82rem; color: var(--muted); }
.ctrm-section-help dd { margin: 0 0 0.35rem; font-size: 0.88rem; }
.ctrm-form-panel {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.ctrm-form-panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.ctrm-list-panel {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.ctrm-list-panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.ctrm-legacy-muted {
  opacity: 0.88;
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-2) 80%, var(--surface));
}
.ctrm-field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.ctrm-status-pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ctrm-status-pill--mapped { border-color: #86efac; background: #14532d33; color: #86efac; }
.ctrm-status-pill--pending_master { border-color: #fcd34d; background: #78350f33; color: #fcd34d; }
.ctrm-status-pill--unresolved { border-color: #fca5a5; background: #7f1d1d33; color: #fca5a5; }
.ctrm-status-pill--disabled { border-color: var(--border); color: var(--muted); }
.ctrm-status-pill--active { border-color: #86efac; color: #86efac; }
.ctrm-status-pill--inactive { border-color: var(--border); color: var(--muted); }
.ctrm-empty-state {
  margin: 0.75rem 0;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}
.master-primary-card-meta {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}
.master-primary-card-impact {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  margin-top: 2px;
}

/* Market price center migrate R1 */
.ctrm-migrated-notice {
  border: 1px dashed var(--border, #d8dee6);
  background: var(--surface-2, #f8fafc);
  padding: 12px 14px;
  border-radius: 8px;
}
.ctrm-futures-risk-panel .master-futures-specs-table th,
.ctrm-futures-risk-panel .master-futures-specs-table td {
  white-space: nowrap;
}

/* data_rules MAF data rules sections (R2 migrate) */
.data-rules-maf-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border, #d8dee6);
}
.data-rules-maf-section-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.master-rules-migrate-note {
  margin: 0 0 16px;
}

/* Front Office strategy instruction panel (strategy_ledger.html) */
.strategy-instruction-workflow-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary, #2563eb);
  background: #f8fafc;
}
.strategy-instruction-steps {
  margin: 0 0 12px 1.2rem;
  padding: 0;
  color: var(--text-muted, #64748b);
}
.strategy-instruction-steps li {
  margin: 4px 0;
}
.strategy-daily-trades-hint {
  margin-bottom: 12px;
}
.strategy-instruction-panel .strategy-instruction-subtitle {
  margin: 0 0 12px;
}
.strategy-instruction-toolbar {
  align-items: flex-end;
  margin-bottom: 8px;
}
.strategy-instruction-table .strategy-instruction-actions {
  white-space: nowrap;
}
.strategy-instruction-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.strategy-instruction-badge--draft { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }
.strategy-instruction-badge--issued { color: #1d4ed8; background: #eff6ff; border-color: #93c5fd; }
.strategy-instruction-badge--cancelled { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.strategy-instruction-badge--expired { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.strategy-instruction-badge--not_ledgered { color: #64748b; background: #f8fafc; border-color: #e2e8f0; }
.strategy-instruction-badge--partially_ledgered { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.strategy-instruction-badge--fully_ledgered { color: #166534; background: #f0fdf4; border-color: #86efac; }
.strategy-instruction-badge--over_ledgered { color: #c2410c; background: #fff7ed; border-color: #fdba74; }
.strategy-instruction-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.strategy-instruction-risk-hint {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
  background: #fffbeb;
}
.strategy-instruction-modal .ctrm-actions {
  margin-top: 12px;
}
.fo-plan-first-admin-bar {
  margin: 8px 0 12px;
}
.fo-plan-first-admin-gate {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-plan-first-admin-notice {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
  margin-bottom: 10px;
}
.fo-first-real-close-note {
  border-left: 3px solid #3b82f6;
  padding: 8px 10px;
  margin: 0 0 10px;
  border-radius: 0 6px 6px 0;
  background: #eff6ff;
  font-size: 0.92rem;
  line-height: 1.45;
}
.fo-plan-first-admin-actions {
  gap: 8px;
}
.fo-movement-origin--manual {
  color: #b45309;
  font-weight: 600;
}
.fo-movement-origin--legacy {
  color: #64748b;
}
.fo-plan-pnl-preview-panel {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-position-pnl-panel {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f1f5f9;
}
.fo-position-pnl-disclaimer {
  border-left: 3px solid #0ea5e9;
  padding-left: 10px;
  margin-bottom: 10px;
}
.fo-position-pnl-stage-note,
.fo-position-pnl-cumulative-note,
.fo-position-pnl-cumulative-eod {
  margin-bottom: 8px;
}
.fo-position-pnl-cumulative-note {
  border-left: 3px solid #6366f1;
  padding-left: 10px;
  color: #4338ca;
}
.fo-position-pnl-grid {
  gap: 10px 16px;
  margin-bottom: 10px;
}
.fo-workbench-root {
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.fo-workbench-disclaimer {
  border-left: 3px solid #0ea5e9;
  padding-left: 10px;
  margin-bottom: 12px;
}
.fo-workbench-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.fo-workbench-title-row .ctrm-panel-title {
  margin-bottom: 0;
}
.fo-workbench-title-group {
  flex: 1 1 240px;
  min-width: 0;
}
.fo-workbench-title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}
.fo-workbench-margin-term-details {
  margin: 0 0 12px;
}
.fo-workbench-margin-term-details > summary {
  cursor: pointer;
  user-select: none;
}
.fo-advanced-tech-summary-section {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-advanced-tech-summary-section > summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}
.fo-workbench-summary-intro {
  margin: 8px 0 0;
}
.fo-workbench-summary-card {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-workbench-summary-head {
  margin-bottom: 10px;
}
.fo-workbench-summary-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
}
.fo-workbench-summary-grid {
  gap: 10px 16px;
}
.fo-workbench-summary-primary .fo-plan-readonly {
  font-weight: 600;
  color: #0f172a;
}
.fo-today-workflow-guide {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-today-workflow-title {
  margin-bottom: 4px;
  font-size: 15px;
}
.fo-today-workflow-steps {
  margin: 8px 0 0;
  padding-left: 1.35rem;
  color: #334155;
}
.fo-today-workflow-steps li {
  margin: 4px 0;
}
.fo-today-workflow-footnote {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.fo-daily-tab-notice {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}
.fo-ledger-workspace-tabs {
  margin-top: 8px;
}
.fo-ledger-tab-panel {
  padding-top: 12px;
}
.fo-ledger-tab-panel--advanced {
  opacity: 1;
}
.fo-ledger-tab-section {
  margin-bottom: 16px;
}
.fo-plan-tab-section {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-plan-tab-summary-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.fo-plan-tab-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-plan-tab-summary-title {
  margin: 0;
  font-size: 16px;
}
.fo-plan-tab-summary-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fo-plan-tab-summary-group {
  min-width: 0;
}
.fo-plan-tab-risk-disclaimer {
  margin: 8px 0 0;
}
.fo-plan-tab-plan-only-note {
  margin: 10px 0 0;
}
.fo-plan-risk-technical-details {
  margin: 0;
}
.fo-plan-risk-technical-details > summary {
  cursor: pointer;
  list-style: none;
}
.fo-plan-risk-technical-details > summary::-webkit-details-marker {
  display: none;
}
.fo-plan-risk-technical-details[open] > summary {
  margin-bottom: 10px;
}
.fo-plan-tab-lines-col-execution {
  color: #94a3b8;
  font-size: 0.92em;
}

/* R11E: unified summary strip (plan maintenance + executions tab) */
.fo-summary-strip-section {
  margin: 14px 0 18px;
}
.fo-summary-strip-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f2742;
  margin-bottom: 8px;
}
.fo-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  overflow-x: visible;
  padding: 10px 12px 12px;
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.92);
  border-bottom: 1px solid rgba(210, 220, 235, 0.9);
  max-width: 100%;
}
.fo-summary-strip-metric {
  flex: 0 0 auto;
  min-width: 96px;
}
.fo-summary-strip-metric--wide {
  min-width: 180px;
}
.fo-summary-strip-metric--xwide {
  min-width: 240px;
}
.fo-summary-strip-label {
  font-size: 12px;
  color: #5d7190;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
}
.fo-summary-strip-value {
  font-size: 15px;
  font-weight: 700;
  color: #071b33;
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fo-summary-strip-value--long {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fo-summary-strip-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #6c7f99;
}
.fo-summary-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #d9eaff;
  color: #0f3d73;
  font-size: 13px;
  font-weight: 700;
}
.fo-summary-strip-value.fo-net-position-primary {
  color: #0f3d73;
}
.fo-summary-strip-value.fo-plan-readonly--placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.fo-summary-strip-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.fo-overview-summary-card {
  margin-bottom: 4px;
}
.fo-overview-status-notice {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 248, 229, 0.8);
  border-left: 3px solid #d89b28;
}
.fo-overview-status-notice--info {
  background: rgba(240, 249, 255, 0.85);
  border-left-color: #0ea5e9;
}
.fo-overview-status-notice--warning {
  background: rgba(255, 248, 229, 0.8);
  border-left-color: #d89b28;
}
.fo-overview-status-notice--error {
  background: rgba(254, 242, 242, 0.9);
  border-left-color: #dc2626;
}
.fo-overview-status-notice-title {
  font-size: 13px;
  font-weight: 700;
  color: #5c3a00;
  margin-bottom: 4px;
}
.fo-overview-status-notice--info .fo-overview-status-notice-title {
  color: #0c4a6e;
}
.fo-overview-status-notice--error .fo-overview-status-notice-title {
  color: #7f1d1d;
}
.fo-overview-status-notice-body {
  font-size: 12.5px;
  color: #5f4a25;
  line-height: 1.5;
  margin: 0;
}
.fo-overview-status-notice--info .fo-overview-status-notice-body {
  color: #334155;
}
.fo-overview-status-details {
  margin-top: 6px;
  font-size: 12px;
}
.fo-overview-status-details summary {
  cursor: pointer;
  color: #285a9a;
}
.fo-overview-status-details .fo-missing-reason-list {
  margin-top: 8px;
}
.fo-overview-status-secondary-action {
  margin-top: 4px;
  padding-left: 0;
  font-size: 12px;
}
.fo-direct-execution-show-completed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
}
.fo-direct-execution-plan-line-filter-hint {
  margin-top: 4px;
  font-size: 12px;
}
.fo-direct-execution-plan-line-context {
  margin-top: 6px;
  font-size: 12px;
}
.fo-plan-line-register-exec {
  padding-left: 0;
  padding-right: 0;
  font-size: 12px;
}
.fo-plan-line-status-note {
  font-size: 12px;
}
.fo-overview-progress-strip-section,
.fo-overview-pnl-risk-strip-section {
  margin-top: 0;
}
.fo-overview-pnl-risk-details {
  margin-top: 8px;
}
.fo-overview-pnl-legacy-panel {
  display: none !important;
}

.fo-summary-block,
.fo-exec-summary-block {
  min-width: 0;
  padding: 8px 10px;
}
.fo-summary-title,
.fo-exec-summary-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.fo-summary-items,
.fo-exec-summary-items {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.fo-summary-item-stack,
.fo-exec-summary-item-stack {
  min-width: 96px;
  max-width: 180px;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e2e8f0;
}
.fo-summary-item-label,
.fo-exec-summary-item-label {
  font-size: 11px;
  line-height: 1.2;
  color: #64748b;
  font-weight: 400;
  margin-bottom: 3px;
  white-space: nowrap;
}
.fo-summary-item-value,
.fo-exec-summary-item-value {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fo-summary-item-value.fo-plan-readonly--placeholder,
.fo-exec-summary-item-value.fo-plan-readonly--placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.fo-plan-tab-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
}
.fo-plan-tab-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin: 0;
}
.fo-plan-tab-summary-item {
  margin: 0;
}
.fo-plan-tab-summary-item dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
}
.fo-plan-tab-summary-item dd {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.fo-plan-tab-summary-item--primary dd {
  font-weight: 600;
  font-size: 16px;
}
.fo-plan-tab-maintenance-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}
.fo-plan-tab-exec-warning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
}
.fo-plan-tab-exec-warning-text {
  margin: 0;
  color: #92400e;
  line-height: 1.5;
}
.fo-plan-tab-lines-section {
  margin-bottom: 14px;
}
.fo-plan-tab-lines-hint {
  margin-bottom: 8px;
}
.ctrm-plan-foot-pending-caliber-d150 {
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.fo-plan-tab-leg-split-d149 {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-plan-tab-leg-split-d149 .ctrm-badge {
  margin-left: 8px;
  vertical-align: middle;
}
.fo-plan-tab-leg-split-table-d149 {
  margin-top: 6px;
}
.fo-plan-tab-meta-section {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
}
.fo-plan-tab-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 14px;
  margin: 0 0 10px;
}
.fo-plan-tab-meta-grid div {
  margin: 0;
}
.fo-plan-tab-meta-grid dt {
  font-size: 12px;
  color: #64748b;
}
.fo-plan-tab-meta-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
}
.fo-plan-model-logic-link {
  font-size: 14px;
  text-decoration: none;
}
.fo-plan-model-logic-link:hover {
  text-decoration: underline;
}
.fo-plan-tab-actions {
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-plan-tab-actions-lead {
  margin: 0 0 10px;
}
.fo-plan-tab-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fo-plan-edit-btn--caution {
  border-color: #f59e0b;
  color: #92400e;
}
.fo-executions-tab-summary-card {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.fo-executions-tab-summary-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fo-executions-tab-summary-groups--compact {
  gap: 6px;
}
.fo-executions-tab-summary-group {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-exec-summary-block {
  min-width: 0;
  padding: 8px 10px;
}
.fo-exec-summary-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.fo-exec-summary-items {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.fo-exec-summary-item-stack {
  min-width: 96px;
  max-width: 180px;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e2e8f0;
}
.fo-exec-summary-item-stack--wide {
  min-width: 180px;
  max-width: 260px;
}
.fo-exec-summary-item-stack--ref {
  background: rgba(241, 245, 249, 0.85);
  border-color: #e2e8f0;
}
.fo-exec-summary-item-stack--quality {
  background: rgba(255, 251, 235, 0.5);
  border-color: #fde68a;
}
.fo-exec-summary-item-label {
  font-size: 11px;
  line-height: 1.2;
  color: #64748b;
  font-weight: 400;
  margin-bottom: 3px;
  white-space: nowrap;
}
.fo-exec-summary-item-stack--ref .fo-exec-summary-item-label {
  color: #94a3b8;
}
.fo-exec-summary-item-stack--quality .fo-exec-summary-item-label {
  color: #475569;
}
.fo-exec-summary-item-value {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fo-exec-summary-item-value--primary {
  font-size: 12.5px;
  font-weight: 700;
}
.fo-exec-summary-item-value--long {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fo-exec-summary-item-value.fo-net-position-primary {
  font-weight: 700;
}
.fo-exec-summary-item-value.fo-plan-readonly--placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.fo-executions-tab-summary-group-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fo-executions-tab-summary-group--risk .fo-executions-tab-summary-group-row {
  margin-bottom: 0;
}
.fo-executions-tab-summary-group--risk {
  background: #fff;
  border-style: dashed;
  padding: 6px 8px;
}
.fo-executions-tab-summary-group-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}
.fo-executions-tab-summary-group-row .fo-executions-tab-summary-group-title {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12.5px;
  white-space: nowrap;
}
.fo-executions-tab-risk-hint {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.3;
}
.fo-executions-tab-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-executions-tab-summary-title {
  margin: 0;
  font-size: 16px;
}
.fo-executions-tab-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-executions-tab-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 14px;
  margin: 0;
}
.fo-executions-tab-summary-grid--compact {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fo-executions-tab-summary-item {
  margin: 0;
}
.fo-executions-tab-summary-item--compact {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
  padding: 2px 4px;
}
.fo-executions-tab-summary-item--compact + .fo-executions-tab-summary-item--compact::before {
  content: '｜';
  color: #cbd5e1;
  margin-right: 2px;
  font-weight: 400;
  flex: 0 0 auto;
}
.fo-executions-tab-summary-item--compact dt {
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 400;
}
.fo-executions-tab-summary-item--compact dd {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
}
.fo-executions-tab-summary-item--compact.fo-executions-tab-summary-item--primary dd {
  font-size: 12.5px;
  font-weight: 600;
}
.fo-executions-tab-summary-item--compact.fo-executions-tab-summary-item--ref dt,
.fo-executions-tab-summary-item--compact.fo-executions-tab-summary-item--ref dd {
  color: #64748b;
}
.fo-executions-tab-summary-item--compact.fo-executions-tab-summary-item--quality dt {
  color: #475569;
}
.fo-money-positive {
  font-variant-numeric: tabular-nums;
}
.fo-money-negative {
  font-variant-numeric: tabular-nums;
}
.fo-money-zero {
  font-variant-numeric: tabular-nums;
  color: #64748b;
}
.fo-executions-tab-summary-item dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
}
.fo-executions-tab-summary-item dd {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.fo-executions-tab-summary-item--primary dd {
  font-weight: 600;
  font-size: 16px;
}
.fo-executions-tab-guide {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}
.fo-executions-empty-state {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafafa;
}
.fo-executions-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fo-executions-tab-table {
  min-width: 880px;
}
.fo-exec-source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #e2e8f0;
  color: #334155;
}
.fo-exec-source-badge--direct {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-exec-source-badge--manual {
  background: #fef3c7;
  color: #92400e;
}
.fo-exec-source-badge--close {
  background: #fce7f3;
  color: #9d174d;
}
.fo-exec-source-badge--reversal {
  background: #ede9fe;
  color: #5b21b6;
}
.fo-exec-source-badge--correction-replacement {
  background: #ecfdf5;
  color: #047857;
}
.fo-movement-correction-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.fo-movement-correction-badge--superseded {
  background: #f1f5f9;
  color: #64748b;
}
.fo-movement-correction-badge--reversal {
  background: #fef3c7;
  color: #92400e;
}
.fo-movement-correction-badge--replacement {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-movement-correction-disclaimer {
  margin-bottom: 12px;
}
.fo-movement-adjustment-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.fo-movement-adjustment-badge--adjusted,
.fo-movement-adjustment-badge--cancelled {
  background: #f1f5f9;
  color: #64748b;
}
.fo-movement-adjustment-badge--reversal,
.fo-movement-adjustment-badge--cancel-reversal {
  background: #fef3c7;
  color: #92400e;
}
.fo-movement-adjustment-badge--replacement {
  background: #ecfdf5;
  color: #047857;
}
.fo-movement-adjustment-disclaimer {
  margin-bottom: 12px;
}
.fo-movement-adjustment-action-choice label.fo-movement-adjustment-action-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-top: 8px;
}
.fo-movement-adjustment-action-choice .ctrm-hint {
  margin-left: 24px;
}

/* CTRM-STRATEGY-LEDGER-EXECUTION-CORRECTION-ENTRY-R1B — detail preflight (no-write) */
.fo-execution-detail-correction-actions-r1b {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--ctrm-border-muted, #e2e8f0);
}
.fo-execution-correction-preflight-panel-r1b .fo-execution-correction-preflight-disclaimer-r1b {
  margin-bottom: 12px;
}
.fo-execution-correction-preflight-no-write-r1b {
  margin-top: 8px;
}
.fo-execution-correction-preflight-action-r1c {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fo-execution-correction-preflight-action-option-r1c {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fo-execution-correction-preflight-correct-panel-r1c {
  margin-top: 4px;
}
.fo-execution-correction-preflight-ticket-hint-r1c {
  color: #b45309;
  min-height: 1.2em;
}
.fo-movement-adjustment-deprecated-r1c {
  color: #b45309;
  font-weight: 600;
}

.fo-plan-field-error-hint-r1 {
  color: #b45309;
  font-weight: 600;
  margin: 0 0 8px;
}
#plan-scope-hint-r1 {
  margin-bottom: 8px;
}

.fo-movement-qty-guardrail {
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #475569;
}
.fo-movement-qty-guardrail code {
  font-size: 0.8em;
}
.fo-movement-effect-col {
  min-width: 9rem;
  max-width: 14rem;
  vertical-align: top;
}
.fo-movement-effect-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
}
.fo-movement-effect-badge--flip {
  background: #ffedd5;
  color: #c2410c;
}
.fo-movement-effect-detail,
.fo-movement-effect-compat {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}
.fo-movement-effect-hint {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #b45309;
}
.fo-exec-source-badge--other {
  background: #f1f5f9;
  color: #475569;
}
.fo-executions-tab-actions {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-executions-tab-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fo-executions-legacy-daily-trades {
  margin-top: 16px;
}
@media (max-width: 768px) {
  .fo-executions-tab-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
.fo-plan-tab-daily-link {
  margin-left: auto;
}
@media (max-width: 768px) {
  .fo-plan-tab-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .fo-plan-tab-daily-link {
    margin-left: 0;
  }
}
.fo-plan-edit-risk-warning {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
}
.fo-risk-tab-disclaimer,
.fo-advanced-tab-notice {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}
.fo-risk-tab-header {
  margin-bottom: 16px;
}
.fo-risk-tab-header-intro {
  margin: 6px 0 0;
}
.fo-risk-tab-section {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.fo-risk-tab-section + .fo-risk-tab-section {
  margin-top: 4px;
}
.fo-risk-section-anchor {
  display: block;
  height: 0;
  overflow: hidden;
}
.fo-risk-legacy-section {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-risk-legacy-summary {
  cursor: pointer;
  margin: 0;
}
.fo-overview-pnl-section {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.fo-overview-position-risk-section {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.fo-advanced-legacy-snapshot-section {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-risk-position-redirect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.fo-risk-position-redirect-note {
  margin: 0;
}
.fo-risk-pnl-redirect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.fo-risk-pnl-redirect-note {
  margin: 0;
}
.fo-risk-plan-redirect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.fo-risk-plan-redirect-note {
  margin: 0;
}
.fo-plan-tab-plan-risk-section {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.fo-plan-tab-plan-risk-intro {
  margin: 6px 0 14px;
}
.fo-position-pnl-legacy-grid {
  margin-top: 12px;
}
.fo-advanced-tab-summary-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.fo-advanced-tab-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-advanced-tab-summary-title {
  margin: 0;
  font-size: 16px;
}
.fo-advanced-tab-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}
.fo-advanced-tab-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
  margin: 12px 0 0;
}
.fo-advanced-tab-summary-item {
  margin: 0;
}
.fo-advanced-tab-summary-item dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
}
.fo-advanced-tab-summary-item dd {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.fo-advanced-tab-summary-item--primary dd {
  font-weight: 600;
  font-size: 16px;
}
.fo-advanced-tab-actions {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-advanced-tab-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fo-advanced-section-group {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
}
.fo-advanced-section-head {
  margin-bottom: 10px;
}
.fo-advanced-section-title {
  margin: 0 0 6px;
}
.fo-advanced-section-guide {
  margin: 0;
}
.fo-advanced-section-badge {
  vertical-align: middle;
}
.fo-advanced-audit-legacy {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-advanced-audit-legacy-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.fo-advanced-audit-legacy-summary::-webkit-details-marker {
  display: none;
}
.fo-advanced-audit-guide,
.fo-advanced-legacy-index {
  margin: 8px 0 10px;
}
.fo-advanced-legacy-daily-trades {
  margin: 10px 0;
}
.fo-advanced-legacy-index-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.fo-advanced-legacy-index-title {
  margin: 0 0 8px;
}
.fo-advanced-legacy-index-list {
  margin: 0 0 10px;
  padding-left: 18px;
}
.fo-advanced-legacy-index-list li {
  margin: 4px 0;
}
.fo-advanced-legacy-index-link {
  padding: 0;
  text-align: left;
}
.fo-legacy-compatibility-note,
.fo-legacy-alias-note,
.fo-legacy-compat-intro {
  margin: 6px 0 0;
}
.fo-legacy-badge {
  vertical-align: middle;
}
.fo-advanced-legacy-compat {
  margin-top: 12px;
}
.fo-advanced-legacy-compat-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.fo-advanced-legacy-compat-summary::-webkit-details-marker {
  display: none;
}
.fo-advanced-legacy-compat-mount {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}
.fo-advanced-legacy-mounted-panel {
  margin: 0;
}
.fo-advanced-audit-meta {
  margin-top: 12px;
}
@media (max-width: 768px) {
  .fo-advanced-tab-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
.fo-risk-tab-root {
  margin-top: 4px;
}
.fo-risk-tab-summary-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.fo-risk-tab-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-risk-tab-summary-title {
  margin: 0;
  font-size: 16px;
}
.fo-risk-tab-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-risk-tab-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin: 0;
}
.fo-risk-tab-summary-item {
  margin: 0;
}
.fo-risk-tab-summary-item dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
}
.fo-risk-tab-summary-item dd {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.fo-risk-tab-summary-item--primary dd {
  font-weight: 600;
  font-size: 16px;
}
.fo-risk-core-metrics {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.fo-risk-metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.fo-risk-metric-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.fo-risk-metric-card--profit {
  border-color: #86efac;
  background: #f0fdf4;
}
.fo-risk-metric-card--loss {
  border-color: #fca5a5;
  background: #fef2f2;
}
.fo-risk-metric-card--rr {
  border-color: #93c5fd;
  background: #eff6ff;
}
.fo-risk-metric-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.fo-risk-metric-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.fo-risk-metric-card--loss .fo-risk-metric-value {
  color: #b91c1c;
}
.fo-risk-metric-card--profit .fo-risk-metric-value {
  color: #15803d;
}
.fo-risk-scenario-detail-section {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafafa;
}
.fo-risk-scenario-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.fo-risk-scenario-detail-item {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.fo-risk-scenario-label {
  display: block;
  font-size: 12px;
  color: #64748b;
}
.fo-risk-scenario-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}
.fo-risk-methodology-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 3px solid #6366f1;
  background: #f5f3ff;
}
.fo-risk-methodology-list {
  margin: 8px 0 0;
  padding-left: 1.25rem;
  color: #334155;
  line-height: 1.55;
}
.fo-risk-methodology-list li {
  margin: 4px 0;
}
.fo-risk-lot-alignment-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.fo-risk-lot-alignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 14px;
  margin: 8px 0 0;
}
.fo-risk-lot-alignment-grid dt {
  font-size: 12px;
  color: #64748b;
}
.fo-risk-lot-alignment-grid dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.fo-risk-lot-status--aligned {
  color: #15803d;
}
.fo-risk-lot-status--misaligned {
  color: #b45309;
}
.fo-risk-lot-warning {
  margin-top: 8px;
  color: #b45309;
}
.fo-risk-model-ref-details {
  margin-bottom: 12px;
}
.fo-risk-biz-pnl-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.fo-recent-movements-hint {
  margin-bottom: 8px;
}
.fo-overview-panel-section {
  margin-top: 8px;
}
.fo-overview-summary-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.fo-overview-status-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-overview-status-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 16px;
}
.fo-overview-status-bar-item--net dd {
  font-weight: 600;
  color: #0f172a;
}
.fo-overview-status-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.fo-overview-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
/* D166① overview overflow ⋯ — reuse plan-list overflow visual density */
.ctrm-overview-overflow-d166 {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ctrm-overview-overflow-menu-d166 {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 10.5rem;
  padding: 6px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ctrm-overview-overflow-menu-d166[hidden] {
  display: none !important;
}
.ctrm-overview-overflow-item-d166 {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  white-space: nowrap;
}
.ctrm-overview-overflow-item-d166:hover:not(:disabled) {
  background: #f1f5f9;
}
.ctrm-overview-overflow-item-d166:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* D166④: workbench mode must not layout-show group list panel (W13 harden) */
body.ctrm-ledger-mode-workbench-r2 [data-ledger-page-panel="group-dashboard"],
body.ctrm-ledger-mode-workbench-r2 #fo-ledger-page-panel-group-dashboard,
body.ctrm-ledger-mode-workbench-r2 #fo-group-strategy-list-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.fo-overview-pnl-risk-section {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-overview-pnl-risk-title {
  margin: 0 0 12px;
  font-size: 16px;
}
.fo-overview-pnl-subtitle {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}
.fo-overview-pnl-section--slim .fo-overview-pnl-slim-hidden {
  display: none !important;
}
.fo-overview-pnl-section--slim .fo-position-pnl-grid--slim {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
}
.fo-exec-progress-metrics--slim {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
.fo-execution-progress-section {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-execution-movements-table--slim th,
.fo-execution-movements-table--slim td {
  font-size: 13px;
}
.fo-overview-recent-movements {
  margin-top: 12px;
}
.fo-overview-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fo-overview-summary-title {
  margin: 0;
  font-size: 16px;
}
.fo-overview-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-overview-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin: 0;
}
.fo-overview-summary-item {
  margin: 0;
}
.fo-overview-summary-item dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
}
.fo-overview-summary-item dd {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.fo-overview-summary-item--primary dd {
  font-size: 17px;
  font-weight: 600;
}
.fo-overview-context-hint {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #3b82f6;
  background: #eff6ff;
  color: #1e3a8a;
}
.fo-overview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-overview-primary-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 200px;
}
.fo-executions-biz-pnl-note {
  margin: 8px 0 0;
}
.fo-overview-cta-primary {
  min-width: 140px;
}
.fo-overview-secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fo-overview-next-action {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-overview-next-action-text {
  margin: 6px 0 0;
  color: #334155;
  line-height: 1.5;
}
.fo-execution-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
.fo-exec-metric {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.fo-exec-metric-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}
.fo-exec-metric-value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}
.fo-exec-metric--status .fo-exec-metric-value {
  color: #1d4ed8;
}
.fo-exec-metric--net-primary {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  grid-column: span 2;
}
.fo-exec-metric--net-primary .fo-exec-metric-label {
  color: #1d4ed8;
  font-weight: 600;
}
.fo-exec-metric--net-primary .fo-exec-metric-value,
.fo-net-position-primary {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.fo-exec-metric--ref {
  opacity: 0.92;
}
.fo-exec-metric--ref .fo-exec-metric-label {
  color: #94a3b8;
}
.fo-exec-metric--ref .fo-exec-metric-value {
  font-weight: 500;
  color: #64748b;
}
.fo-net-position-progress-note,
.fo-plan-tab-net-position-note,
.fo-executions-net-position-note,
.fo-risk-net-position-note,
.fo-risk-exposure-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #3b82f6;
  background: #eff6ff;
  color: #1e3a8a;
}
.fo-risk-net-position-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.fo-risk-metric-card--net {
  border-color: #3b82f6;
  background: #fff;
}
.fo-risk-metric-card--net .fo-risk-metric-value.fo-net-position-primary {
  color: #1d4ed8;
}
.fo-risk-metric-card--net-ref {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.fo-risk-metric-card--net-ref .fo-risk-metric-value {
  font-size: 18px;
  font-weight: 600;
  color: #64748b;
}
.fo-plan-tab-summary-item--ref dt,
.fo-executions-tab-summary-item--ref dt {
  color: #94a3b8;
}
.fo-plan-tab-summary-item--ref dd,
.fo-executions-tab-summary-item--ref dd {
  color: #64748b;
  font-weight: 500;
}
.fo-executions-tab-summary-item--quality dt {
  color: #0f766e;
}
.fo-executions-tab-summary-item--quality dd {
  color: #0f172a;
  font-weight: 600;
}
.fo-position-pnl-field--primary label {
  color: #1d4ed8;
  font-weight: 600;
}
.fo-position-pnl-field--ref label {
  color: #94a3b8;
}
.fo-position-pnl-field--ref .fo-plan-readonly {
  color: #64748b;
  font-weight: 500;
}
.fo-recent-movements-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.fo-overview-link-btn {
  padding: 0;
  font-size: 13px;
}
.fo-workbench-summary-grid--selectors {
  margin-bottom: 0;
}
.fo-workbench-summary-details {
  margin-top: 8px;
}
.fo-btn-secondary-action {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .fo-overview-actions {
    flex-direction: column;
  }
  .fo-overview-secondary-links {
    width: 100%;
  }
  .fo-overview-secondary-links .btn {
    flex: 1 1 auto;
  }
}
@media (max-width: 768px) {
  .fo-ledger-workspace-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .fo-ledger-workspace-tabs .fo-workbench-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
.fo-workbench-ledger-field select {
  min-width: 220px;
}
.fo-workbench-cta-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin: 12px 0 8px;
  padding: 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.fo-workbench-cta-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-width: 260px;
}
.fo-workbench-cta-step .fo-cta-disable-reason {
  flex-basis: 100%;
  margin-left: 30px;
}
.fo-workbench-cta-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.fo-workbench-cta-hint {
  margin-bottom: 12px;
}
.fo-status-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.fo-status-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.fo-status-card-title {
  font-weight: 700;
  font-size: 15px;
}
.fo-status-card-label {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.fo-status-card-message {
  margin: 0 0 6px;
  color: #334155;
}
.fo-status-card--success {
  border-color: #86efac;
  background: #f0fdf4;
}
.fo-status-card--success .fo-status-card-label {
  background: #dcfce7;
  color: #166534;
}
.fo-status-card--info {
  border-color: #bae6fd;
  background: #f0f9ff;
}
.fo-status-card--info .fo-status-card-label {
  background: #e0f2fe;
  color: #0369a1;
}
.fo-status-card--warning {
  border-color: #fcd34d;
  background: #fffbeb;
}
.fo-status-card--warning .fo-status-card-label {
  background: #fef3c7;
  color: #92400e;
}
.fo-status-card--error {
  border-color: #fca5a5;
  background: #fef2f2;
}
.fo-status-card--error .fo-status-card-label {
  background: #fee2e2;
  color: #991b1b;
}
.fo-next-action {
  margin: 0;
  font-size: 13px;
  color: #475569;
}
.fo-missing-reason-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.fo-missing-reason-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}
.fo-missing-reason-item strong {
  display: block;
  margin-bottom: 4px;
}
.fo-missing-reason-item--success { border-color: #86efac; background: #f0fdf4; }
.fo-missing-reason-item--info { border-color: #bae6fd; background: #f0f9ff; }
.fo-missing-reason-item--warning { border-color: #fcd34d; background: #fffbeb; }
.fo-missing-reason-item--error { border-color: #fca5a5; background: #fef2f2; }
.fo-section-status {
  margin: 6px 0 8px;
  padding: 6px 10px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
}
.fo-section-status--success { border-left-color: #22c55e; background: #f0fdf4; }
.fo-section-status--info { border-left-color: #0ea5e9; background: #f0f9ff; }
.fo-section-status--warning { border-left-color: #f59e0b; background: #fffbeb; }
.fo-section-status--error { border-left-color: #ef4444; background: #fef2f2; }
.fo-cta-disable-reason {
  margin: 4px 0 0;
  font-size: 12px;
  max-width: 220px;
}
.fo-role-ux-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.fo-role-badge--viewer {
  background: #e2e8f0;
  color: #475569;
}
.fo-role-badge--operator {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-role-badge--admin {
  background: #fef3c7;
  color: #92400e;
}
.fo-permission-hint {
  margin: 0;
  font-size: 13px;
  color: #475569;
  flex: 1 1 200px;
}
.fo-permission-denied {
  margin: 0;
  font-size: 12px;
  color: #b45309;
  flex: 1 1 100%;
}
.fo-disabled-reason {
  color: #64748b;
}
.fo-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.fo-workbench-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.fo-workbench-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.fo-workbench-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.fo-workbench-tab--admin {
  margin-left: auto;
  border-color: #fcd34d;
  color: #92400e;
}
.fo-workbench-tab--admin.is-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}
.fo-workbench-tab-panels {
  margin-top: 8px;
}
.fo-workbench-tab-panel {
  margin-bottom: 16px;
}
.fo-plan-model-readonly-card,
.fo-plan-risk-summary-card,
.fo-plan-risk-scenario-section,
.fo-biz-snapshot-status-card {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.fo-plan-risk-disclaimer {
  margin: 4px 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.fo-plan-risk-scenario-note,
.fo-plan-lot-warning {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.fo-plan-lot-warning {
  color: #b45309;
}
.fo-plan-scenario-detail-card {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}
.fo-execution-progress-section {
  margin-top: 12px;
}
.fo-execution-progress-disclaimer {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
}
.fo-execution-overview-card,
.fo-plan-execution-lines-card,
.fo-execution-movements-card {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.fo-exec-progress-bar-wrap {
  margin: 12px 0 4px;
  max-width: 420px;
}
.fo-exec-progress-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted, #64748b);
}
.fo-exec-progress-rate {
  font-weight: 600;
  color: var(--text, #0f172a);
}
.fo-exec-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.fo-exec-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.25s ease;
}
.fo-exec-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
}
.fo-exec-status--done .fo-exec-status-badge {
  background: #dcfce7;
  color: #166534;
}
.fo-exec-status--partial .fo-exec-status-badge {
  background: #fef9c3;
  color: #854d0e;
}
.fo-exec-status--pending .fo-exec-status-badge {
  background: #f1f5f9;
  color: #64748b;
}
.fo-exec-status--over .fo-exec-status-badge {
  background: #ffedd5;
  color: #c2410c;
}
.fo-exec-status--overfill-confirmed .fo-exec-status-badge {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-close-flip-preview {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.fo-close-flip-preview__effect {
  color: #c2410c;
  font-weight: 500;
}
.fo-exec-status--cancelled .fo-exec-status-badge {
  background: #f3f4f6;
  color: #6b7280;
  text-decoration: line-through;
}
.fo-plan-tab-lines-footer {
  margin-top: 10px;
}
.fo-plan-tab-adjust-hints-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
}
.fo-plan-over-completed-hint {
  font-size: 12px;
  color: #c2410c;
}
.fo-plan-line-actions .btn + .btn {
  margin-left: 4px;
}
.fo-direct-execution-disclaimer {
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.45;
}
.fo-instruction-advanced-panel .ctrm-panel-toggle-title {
  font-weight: 600;
}
.fo-workbench-admin-panel {
  border: 2px dashed #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  background: #fffbeb;
}
.fo-workbench-admin-summary {
  cursor: pointer;
  color: #92400e;
}
.fo-instruction-list-title {
  margin: 16px 0 8px;
  font-size: 15px;
}
@media (max-width: 768px) {
  .fo-workbench-cta-flow {
    flex-direction: column;
    align-items: stretch;
  }
  .fo-workbench-cta-step {
    width: 100%;
  }
  .fo-workbench-cta-step .btn {
    flex: 1;
  }
  .fo-workbench-tab--admin {
    margin-left: 0;
  }
  .fo-workbench-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.fo-plan-pnl-preview-disclaimer {
  border-left: 3px solid #3b82f6;
  padding-left: 10px;
  margin-bottom: 12px;
}
.fo-plan-pnl-preview-grid,
.fo-plan-pnl-preview-calc-grid {
  gap: 10px 16px;
  margin-bottom: 10px;
}
.fo-plan-readonly {
  display: inline-block;
  min-height: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ctrm-text-main, #111827);
}
.fo-plan-readonly--placeholder {
  color: var(--ctrm-text-muted, #6b7280);
  font-weight: 500;
}
.ctrm-modal-panel.strategy-ledger-form .fo-plan-readonly,
.ctrm-modal-panel.ctrm-modal-panel--readable .fo-plan-readonly {
  color: var(--ctrm-text-main, #111827);
}
.ctrm-modal-panel.strategy-ledger-form .fo-plan-readonly--placeholder,
.ctrm-modal-panel.ctrm-modal-panel--readable .fo-plan-readonly--placeholder {
  color: var(--ctrm-text-muted, #6b7280);
}
.fo-plan-pnl-advanced summary {
  cursor: pointer;
  color: #475569;
  margin-bottom: 8px;
}
.fo-plan-boundary-warning {
  color: #b45309;
  font-weight: 600;
}
.fo-plan-pnl-modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 8px 0 12px;
}
.fo-plan-pnl-modal-summary dt {
  color: #64748b;
  font-size: 12px;
}
.fo-plan-pnl-modal-summary dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.fo-instruction-optional-fields summary {
  cursor: pointer;
  color: #475569;
}

/* Front Office — Field Simplification R1 */
.fo-instruction-form-intro {
  margin-bottom: 0.75rem;
  line-height: 1.55;
  color: var(--ctrm-text-secondary, #374151);
}
.fo-instruction-draft-notice {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: var(--ctrm-text-secondary, #374151);
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
}
.ctrm-modal-form-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.ctrm-modal-form-header .ctrm-panel-title {
  margin-bottom: 0;
}
.fo-instruction-modal-summary {
  margin-bottom: 0.75rem;
  border: 1px solid var(--ctrm-border-normal, #d1d5db);
  border-radius: 8px;
  background: var(--ctrm-field-readonly-bg, #f3f4f6);
  padding: 0.75rem 1rem;
}
.fo-instruction-modal-summary .fo-plan-pnl-subtitle {
  color: var(--ctrm-text-secondary, #374151);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.fo-instruction-modal-summary-grid {
  gap: 0.35rem 0.75rem;
}
.fo-instruction-primary-inputs {
  padding: 0.85rem 1rem;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  margin-bottom: 0.5rem;
}
.fo-field-primary label {
  font-weight: 600;
  color: var(--ctrm-text-main, #111827);
}
.fo-field-primary input,
.fo-field-primary textarea {
  font-size: 1.05rem;
}
.fo-field-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--ctrm-text-muted, #6b7280);
}
.fo-instruction-advanced-fields {
  border-top: 1px dashed var(--ctrm-border-normal, #d1d5db);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}
.fo-instruction-advanced-fields summary {
  cursor: pointer;
  color: var(--ctrm-text-secondary, #374151);
  font-size: 0.92rem;
  font-weight: 600;
}
.fo-instruction-advanced-hint {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .fo-instruction-primary-inputs {
    padding: 0.65rem 0.75rem;
  }
  .fo-instruction-modal-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .fo-field-primary input,
  .fo-field-primary textarea {
    font-size: 1rem;
  }
}

/* Front Office Instruction Audit R1 */
.fo-audit-trail-panel {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}
.fo-audit-trail-disclaimer {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.88rem;
  border-left: 3px solid #64748b;
  padding-left: 10px;
}
.fo-audit-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}
.fo-audit-status-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.fo-audit-missing {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.fo-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.fo-audit-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}
.fo-audit-block-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: #334155;
}
.fo-audit-dl {
  margin: 0;
  font-size: 0.85rem;
}
.fo-audit-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}
.fo-audit-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}
.fo-audit-dl dd {
  margin: 0;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

/* CTRM-BUSINESS-LEDGER-UI-CLARITY-R2 */
.fo-business-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.fo-business-flow-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--bg-subtle, #f8fafc);
  font-size: 0.92rem;
  font-weight: 600;
}
.fo-business-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.fo-empty-state-guide {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
}
.fo-empty-state-block {
  margin: 8px 0 12px;
}
.fo-empty-state-block .btn {
  margin-top: 8px;
}
.fo-register-plan-row .fo-register-plan-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fo-register-plan-row select {
  flex: 1 1 220px;
  min-width: 180px;
}
.fo-direction-hint {
  margin: 4px 0 12px;
}
.fo-strategy-plan-panel {
  max-width: 820px;
}
.fo-plan-auto-status-display {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 1rem;
}
.fo-plan-auto-status-hint {
  margin-top: 4px;
}
.fo-auto-status-label {
  cursor: help;
  border-bottom: 1px dotted rgba(100, 116, 139, 0.55);
}
.fo-strategy-plan-subtitle {
  margin: 12px 0 6px;
  font-size: 0.95rem;
}
.fo-plan-lines-table-wrap {
  margin: 8px 0;
}
.fo-plan-lines-head,
.fo-plan-line-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}
.fo-plan-lines-head {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 6px;
}
.fo-plan-line-row {
  margin-bottom: 8px;
}
.fo-plan-line-row input {
  width: 100%;
}
.fo-plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 8px 0 12px;
}
.fo-plan-summary-grid dt {
  font-size: 0.82rem;
  color: #64748b;
}
.fo-plan-summary-grid dd {
  margin: 0;
  font-weight: 600;
}
.fo-plan-exists-hint {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 3px solid #d97706;
  background: #fffbeb;
  color: #92400e;
}
.strategy-owner-group-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}
.fo-technical-dl {
  margin: 8px 0 0;
  font-size: 0.88rem;
}
.fo-technical-dl > div {
  display: grid;
  grid-template-columns: minmax(6rem, 30%) 1fr;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}
.fo-technical-dl dt { margin: 0; color: #64748b; }
.fo-technical-dl dd { margin: 0; font-variant-numeric: tabular-nums; }

/*
 * CTRM Modal Form Contrast UX R1 — site-wide rules for new modals
 * 1. Do not use opacity < 0.85 on entire form containers.
 * 2. Do not use #aaa or lighter as primary text on white panels.
 * 3. Do not style readonly business fields as disabled (use --ctrm-field-readonly-bg).
 * 4. Hints use --ctrm-text-muted; labels use --ctrm-text-secondary + font-weight 600.
 * 5. Apply class ctrm-modal-panel--readable on new modal panels (white bg, dark text).
 */
.ctrm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid var(--ctrm-border-normal, #d1d5db);
  color: var(--ctrm-text-secondary, #374151);
  background: #f3f4f6;
  vertical-align: middle;
}
.ctrm-badge--primary { color: #1d4ed8; background: #eff6ff; border-color: #93c5fd; }
.ctrm-badge--muted { color: var(--ctrm-text-muted, #6b7280); background: #f9fafb; }
.ctrm-badge--warn { color: #92400e; background: #fffbeb; border-color: #fcd34d; }
.ctrm-badge--ok { color: #166534; background: #f0fdf4; border-color: #86efac; }
/* D174 freshness three-state (semantic color via D173 registry; spacing only) */
.ctrm-ledger-freshness-d174 { margin-left: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctrm-position-updated-compact-r1 .ctrm-ledger-freshness-d174,
.ctrm-book-unrealized-cell-r1 .ctrm-ledger-freshness-d174,
.ctrm-ledger-price-trust-meta-d115 .ctrm-ledger-freshness-d174 { vertical-align: middle; }
.ctrm-modal-panel.strategy-instruction-modal .strategy-instruction-badge {
  font-size: 12px;
  padding: 3px 10px;
}
.strategy-instruction-badge--draft {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
  font-weight: 600;
}
.fo-plan-pnl-modal-summary dt {
  color: var(--ctrm-text-muted, #6b7280);
}
.fo-plan-pnl-modal-summary dd {
  color: var(--ctrm-text-main, #111827);
}
.fo-plan-pnl-preview-disclaimer {
  color: var(--ctrm-text-muted, #6b7280);
}

/* Business Group Dashboard shell (GROUP-DASHBOARD-SHELL-R1) */
.fo-ledger-top-action-bar {
  margin-bottom: 12px;
  padding: 12px 16px;
}
.fo-ledger-top-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.fo-ledger-top-action-field {
  flex: 1 1 180px;
  min-width: 160px;
  margin: 0;
}
.fo-ledger-top-action-field select {
  width: 100%;
}
.fo-ledger-top-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.fo-workbench-root {
  margin-bottom: 16px;
  border: 1px solid var(--border, #e5e7eb);
}
.fo-group-dashboard-root {
  margin-top: 8px;
  padding-top: 4px;
}
.fo-group-dashboard-scope-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  margin: 12px 0 16px;
}
.fo-group-dashboard-scope-layout.fo-scope-sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.fo-group-dashboard-scope-layout.fo-scope-sidebar-collapsed .fo-group-dashboard-scope-selector {
  display: none;
}
.fo-group-dashboard-scope-kpi-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.fo-group-scope-sidebar-toggle {
  margin-left: auto;
  padding: 0 6px;
  font-size: 13px;
  flex-shrink: 0;
}
.fo-group-dashboard-scope-layout.fo-scope-sidebar-collapsed .fo-group-dashboard-scope-kpi {
  max-width: 100%;
}
.fo-group-dashboard-scope-selector {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 6px);
  background: var(--bg-subtle, #f9fafb);
  box-sizing: border-box;
}
.fo-group-dashboard-scope-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
}
.fo-group-dashboard-scope-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 6px);
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.fo-group-dashboard-scope-item.is-active {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #6366f1;
}
.fo-group-dashboard-scope-item-title {
  font-weight: 600;
  color: #111827;
}
.fo-group-dashboard-scope-item-meta {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
}
.fo-group-dashboard-scope-kpi {
  min-width: 0;
  height: auto;
  overflow: visible;
  margin: 0;
  box-sizing: border-box;
}
.fo-group-dashboard-summary-strip {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-subtle, #f9fafb);
}
.fo-group-dashboard-summary-strip-head {
  margin-bottom: 8px;
}
.fo-group-dashboard-summary-strip-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.fo-group-dashboard-summary-strip-note {
  margin: 0;
  font-size: 12px;
}
.fo-group-dashboard-summary-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
}
.fo-group-dashboard-summary-strip-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fo-group-dashboard-summary-strip-label {
  font-size: 11px;
  color: #6b7280;
}
.fo-group-dashboard-summary-strip-value {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.fo-group-dashboard-summary-strip-metric--muted .fo-group-dashboard-summary-strip-value {
  font-weight: 500;
  color: #9ca3af;
}
.fo-group-dashboard-summary-strip-metric--warning .fo-group-dashboard-summary-strip-value {
  color: #b45309;
}
.fo-group-dashboard-summary-strip-gap {
  margin: 8px 0 0;
  font-size: 12px;
}
.fo-group-dashboard-summary-strip-actions {
  margin-top: 8px;
}
.fo-group-dashboard-severity-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}
.fo-group-dashboard-severity-badge--critical {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.fo-group-dashboard-severity-badge--warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.fo-group-dashboard-severity-badge--info {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}
.fo-group-dashboard-severity-inbox-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fo-group-dashboard-severity-inbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.fo-group-dashboard-severity-inbox-text {
  color: #4b5563;
  font-size: 12px;
}
.fo-group-dashboard-severity-inbox-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fo-group-dashboard-severity-inbox-info-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.fo-group-dashboard-inbox-detail-hint {
  margin: 0 0 8px;
  font-size: 12px;
}
.fo-group-cockpit-layer {
  margin: 10px 0 12px;
}
.fo-group-cockpit-layer-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.fo-group-dashboard-today-status-root {
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
}
.fo-group-dashboard-today-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
}
@media (max-width: 1100px) {
  .fo-group-dashboard-today-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .fo-group-dashboard-today-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.fo-group-dashboard-today-status-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fo-group-dashboard-today-status-label {
  font-size: 11px;
  color: #6b7280;
}
.fo-group-dashboard-today-status-value {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.fo-group-dashboard-today-status-metric--muted .fo-group-dashboard-today-status-value {
  font-weight: 500;
  color: #9ca3af;
}
.fo-group-dashboard-today-status-metric--warning .fo-group-dashboard-today-status-value {
  color: #b45309;
}
.fo-group-dashboard-today-status-gap {
  margin: 8px 0 0;
  font-size: 12px;
}
.fo-group-dashboard-today-todo .fo-group-dashboard-attention-card-title {
  display: inline;
}
.fo-group-dashboard-close-review {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-subtle, #f9fafb);
}
.fo-group-dashboard-close-review-summary {
  cursor: pointer;
  list-style: none;
}
.fo-group-dashboard-close-review-summary::-webkit-details-marker {
  display: none;
}
.fo-group-dashboard-close-review-body {
  margin-top: 10px;
}
.fo-group-dashboard-close-review-note {
  margin: 0 0 8px;
  font-size: 12px;
}
.fo-group-dashboard-close-review-kpi .fo-group-dashboard-kpi-panels {
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 900px) {
  .fo-group-dashboard-close-review-kpi .fo-group-dashboard-kpi-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.fo-group-dashboard-close-review-actions {
  margin-top: 8px;
}
.fo-group-strategy-workspace {
  margin-top: 4px;
}
.fo-group-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.fo-group-workspace-tab {
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.fo-group-workspace-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.fo-group-workspace-panel[hidden] {
  display: none !important;
}
.fo-mgmt-analysis-workbench {
  margin-top: 4px;
}
.fo-mgmt-analysis-boundary-note {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-mgmt-analysis-disclaimer-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.fo-mgmt-analysis-disclaimer-list {
  margin: 0;
  padding-left: 18px;
}
.fo-mgmt-analysis-disclaimer-list li {
  margin: 4px 0;
}
.fo-mgmt-analysis-toolbar {
  margin: 10px 0;
}
.fo-mgmt-analysis-section {
  margin: 16px 0 20px;
}
.fo-mgmt-analysis-section-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.fo-mgmt-analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.fo-mgmt-analysis-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.fo-mgmt-analysis-summary-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-bottom: 4px;
}
.fo-mgmt-analysis-summary-value {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fo-mgmt-analysis-source-cell {
  font-size: 12px;
  color: var(--text-muted, #64748b);
}
.fo-group-dashboard-close-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
  margin: 8px 0 12px;
  padding-bottom: 4px;
}
.fo-group-dashboard-kpi-group-row--daily-core {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.fo-group-dashboard-kpi-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}
.fo-group-dashboard-kpi-panel-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.fo-group-dashboard-kpi-summary-card {
  min-height: 148px;
}
.fo-group-dashboard-kpi-primary {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.fo-group-dashboard-kpi-primary-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  margin-bottom: 4px;
}
.fo-group-dashboard-kpi-primary-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text, #1e293b);
}
.fo-group-dashboard-kpi-primary-value--risk {
  color: #b91c1c;
}
.fo-group-dashboard-kpi-primary-sub {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  text-align: right;
}
.fo-group-dashboard-kpi-secondary-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
}
.fo-group-dashboard-kpi-secondary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  padding: 1px 0;
}
.fo-group-dashboard-kpi-secondary-row--risk .fo-group-dashboard-kpi-secondary-value {
  color: #dc2626;
  font-weight: 600;
}
.fo-group-dashboard-kpi-secondary-row--muted .fo-group-dashboard-kpi-secondary-label,
.fo-group-dashboard-kpi-secondary-row--muted .fo-group-dashboard-kpi-secondary-value {
  color: var(--text-muted, #94a3b8);
}
.fo-group-dashboard-kpi-secondary-label {
  flex: 1 1 auto;
  color: var(--text-muted, #64748b);
  min-width: 0;
}
.fo-group-dashboard-kpi-secondary-value {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #334155);
}
.fo-group-dashboard-kpi-secondary-foot {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  text-align: right;
}
.fo-group-dashboard-kpi-date-foot {
  display: block;
}
.fo-group-dashboard-kpi-panel-card-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1e293b);
}
.fo-group-dashboard-kpi-panel-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fo-group-dashboard-kpi-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
}
.fo-group-dashboard-kpi-row--clickable {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.fo-group-dashboard-kpi-row--clickable:hover {
  background: rgba(37, 99, 235, 0.06);
}
.fo-group-dashboard-kpi-row--warning .fo-group-dashboard-kpi-value {
  color: #b45309;
  font-weight: 600;
}
.fo-group-dashboard-kpi-label {
  flex: 1 1 auto;
  color: var(--text-muted, #64748b);
  min-width: 0;
}
.fo-group-dashboard-kpi-value {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fo-group-dashboard-kpi-row-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}
.fo-group-dashboard-kpi-window-line {
  display: block;
  white-space: nowrap;
}
.fo-group-dashboard-kpi-window-label {
  color: var(--text-muted, #64748b);
  font-weight: 500;
  margin-right: 4px;
}
.fo-group-dashboard-attention-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fafbfc;
}
.fo-group-dashboard-attention-card-header {
  margin-bottom: 8px;
}
.fo-group-dashboard-attention-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.fo-group-dashboard-attention-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
}
.fo-group-dashboard-attention-summary-wrap {
  margin: 8px 0 6px;
}
.fo-group-dashboard-attention-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.fo-group-dashboard-attention-summary-row {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
}
.fo-group-dashboard-attention-summary-label {
  color: var(--text-muted, #64748b);
  font-weight: 500;
  white-space: nowrap;
}
.fo-group-dashboard-attention-summary-value {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fo-group-dashboard-attention-summary-value.fo-group-dashboard-attention-value--risk {
  color: #b91c1c;
}
.fo-group-dashboard-attention-details {
  margin-top: 4px;
}
.fo-group-dashboard-attention-details-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--ctrm-primary, #2563eb);
  list-style: none;
}
.fo-group-dashboard-attention-details-summary::-webkit-details-marker {
  display: none;
}
.fo-group-dashboard-attention-body {
  margin-top: 10px;
}
.fo-group-dashboard-attention-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.fo-group-dashboard-attention-stat-block,
.fo-group-dashboard-attention-observe-metric-block {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(226, 232, 240, 0.85);
}
.fo-group-dashboard-attention-stat-block:last-child,
.fo-group-dashboard-attention-observe-metric-block:last-child {
  margin-bottom: 0;
}
.fo-group-dashboard-attention-stat-block-title,
.fo-group-dashboard-attention-observe-metric-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.fo-group-dashboard-attention-ranked-row {
  display: grid;
  grid-template-columns: 1.8em minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
}
.fo-group-dashboard-attention-rank {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums;
}
.fo-group-dashboard-attention-value--risk {
  color: #b91c1c;
}
.fo-group-dashboard-valuation-edge-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  margin-right: 2px;
}
.fo-group-dashboard-attention-section + .fo-group-dashboard-attention-section {
  margin-top: 12px;
}
.fo-group-dashboard-attention-kind {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: none;
}
.fo-group-dashboard-attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fo-group-dashboard-attention-list .fo-group-dashboard-attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 0.9fr) auto;
  gap: 6px 8px;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 12px;
}
.fo-group-dashboard-attention-list .fo-group-dashboard-attention-item:last-child {
  border-bottom: none;
}
.fo-group-dashboard-attention-category-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}
.fo-group-dashboard-attention-category-tag--empty {
  opacity: 0.6;
}
.fo-group-dashboard-attention-name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fo-group-dashboard-attention-reason {
  color: var(--text-muted, #64748b);
  font-size: 11px;
}
.fo-group-dashboard-attention-value {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fo-group-dashboard-attention-metric-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.4;
}
.fo-group-dashboard-attention-metric-label {
  flex: 0 0 7.5em;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}
.fo-group-dashboard-attention-metric-items {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}
.fo-group-dashboard-attention-metric-item {
  display: inline;
  white-space: nowrap;
}
.fo-group-dashboard-attention-metric-sep {
  margin: 0 4px;
  color: var(--text-muted, #94a3b8);
}
.fo-group-dashboard-attention-strategy-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text, #334155);
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fo-group-dashboard-attention-strategy-link:hover {
  color: var(--ctrm-primary, #2563eb);
  text-decoration: underline;
}
.fo-group-dashboard-attention-strategy-link:focus-visible {
  outline: 2px solid var(--ctrm-primary, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}
.fo-group-dashboard-attention-category-group {
  margin-bottom: 10px;
}
.fo-group-dashboard-attention-category-group:last-child {
  margin-bottom: 0;
}
.fo-group-dashboard-attention-category-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #334155);
}
.fo-group-dashboard-valuation-level--upper {
  color: #64748b;
}
.fo-group-dashboard-valuation-level--lower {
  color: #64748b;
}
@media (max-width: 960px) {
  .fo-group-dashboard-kpi-panels {
    grid-template-columns: 1fr;
  }
  .fo-group-dashboard-attention-detail-columns {
    grid-template-columns: 1fr;
  }
  .fo-group-dashboard-attention-summary-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .fo-group-dashboard-attention-summary-value {
    text-align: left;
  }
  .fo-group-dashboard-attention-list .fo-group-dashboard-attention-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .fo-group-dashboard-attention-value {
    text-align: left;
  }
}
.fo-group-dashboard-inbox-wrap,
.fo-group-dashboard-focus-wrap {
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fafbfc;
}
.fo-group-dashboard-inbox-summary,
.fo-group-dashboard-focus-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.fo-group-dashboard-inbox-count {
  color: var(--ctrm-primary, #2563eb);
}
.fo-group-dashboard-inbox-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.fo-group-dashboard-inbox-item + .fo-group-dashboard-inbox-item {
  margin-top: 6px;
}
.fo-group-dashboard-inbox-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 4px 0;
}
.fo-group-dashboard-inbox-label {
  font-weight: 600;
}
.fo-group-dashboard-inbox-text {
  font-size: 12px;
  color: var(--muted, #64748b);
}
.fo-group-dashboard-focus-list {
  margin-top: 8px;
}
.fo-group-tab-section {
  display: block;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.fo-group-tab-section + .fo-group-tab-section {
  margin-top: 14px;
}
.fo-group-tab-section-plan {
  border-left: 4px solid #2563eb;
  background: rgba(37, 99, 235, 0.03);
}
.fo-group-tab-section-execution {
  border-left: 4px solid #16a34a;
  background: rgba(22, 163, 74, 0.03);
}
.fo-group-tab-section-audit {
  border-left: 4px solid #64748b;
  background: rgba(100, 116, 139, 0.04);
}
.fo-group-tab-section-manual {
  border-left: 4px solid #d97706;
  background: rgba(217, 119, 6, 0.04);
}
.fo-group-section-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.fo-group-plan-panel-header {
  margin-bottom: 0;
}
.fo-group-plan-panel-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
}
.fo-group-plan-panel-count {
  font-weight: 500;
  color: var(--text-muted, #64748b);
  font-size: 14px;
}
.fo-group-plan-panel-toggle {
  margin-left: auto;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
}
.fo-group-plan-panel.is-collapsed .fo-group-plan-panel-body {
  display: none;
}
.fo-group-plan-panel.is-collapsed {
  padding-bottom: 10px;
}
.fo-group-plan-panel:not(.is-collapsed) .fo-group-plan-panel-body {
  margin-top: 8px;
}
.fo-group-section-note {
  margin: 0 0 10px;
  font-size: 13px;
}
.fo-group-tab-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
#fo-group-dashboard-split-section.fo-group-dashboard-split-section {
  display: none !important;
}
.fo-group-dashboard-split-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.fo-group-dashboard-split-title p {
  margin: 0 0 8px;
  font-size: 13px;
}
.fo-group-dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.fo-group-dashboard-split-panel {
  display: block;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}
.fo-group-dashboard-split-panel-heading {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.fo-group-dashboard-split-panel-grid {
  min-width: 0;
}
.fo-group-dashboard-split-panel.fo-group-dashboard-panel-plan {
  border-left: 4px solid #2563eb;
  background: rgba(37, 99, 235, 0.04);
}
.fo-group-dashboard-split-panel.fo-group-dashboard-panel-execution {
  border-left: 4px solid #16a34a;
  background: rgba(22, 163, 74, 0.04);
}
.fo-group-dashboard-kpi-group-row--plan-stats .fo-group-dashboard-kpi-stat--compact {
  background: rgba(59, 130, 246, 0.03);
}
.fo-group-dashboard-kpi-group-row--risk-stats .fo-group-dashboard-kpi-stat--compact {
  background: rgba(16, 185, 129, 0.03);
}
.fo-group-strategy-list-colgroup--plan {
  text-align: center;
  background: rgba(59, 130, 246, 0.06);
}
.fo-group-strategy-list-colgroup--execution {
  text-align: center;
  background: rgba(16, 185, 129, 0.06);
}
@media (max-width: 900px) {
  .fo-group-dashboard-split {
    grid-template-columns: 1fr;
  }
}
.fo-group-kpi-label-hint {
  cursor: help;
  border-bottom: 1px dotted var(--border, #d1d5db);
}
@media (max-width: 768px) {
  .fo-group-dashboard-scope-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .fo-group-dashboard-scope-selector {
    width: 100%;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  .fo-group-dashboard-scope-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .fo-group-dashboard-scope-kpi {
    min-height: 0;
    height: auto;
    overflow: visible;
  }
  .fo-group-dashboard-scope-item {
    flex: 0 0 auto;
    min-width: 200px;
  }
}
.fo-group-dashboard-intro {
  margin-bottom: 8px;
}
.fo-group-dashboard-disclaimer {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-left: 3px solid #6366f1;
  background: var(--bg-subtle, #f9fafb);
}
.fo-group-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding-bottom: 8px;
}
.fo-group-dashboard-tab {
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-subtle, #f9fafb);
  border-radius: var(--radius, 6px);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.fo-group-dashboard-tab.is-active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #3730a3;
  font-weight: 600;
}
.fo-group-dashboard-panels {
  margin-top: 8px;
}
.fo-group-dashboard-panels > .fo-group-dashboard-panel {
  display: none;
}
.fo-group-dashboard-panels > .fo-group-dashboard-panel.is-active {
  display: block;
}
.fo-group-dashboard-panel .fo-business-group-overview {
  box-shadow: none;
  border: none;
  padding: 0;
  margin: 0;
}
.fo-group-dash-placeholder-card,
.fo-group-dash-current-group-card {
  padding: 12px 0;
}
.fo-group-dash-placeholder-body {
  min-height: 48px;
  padding: 12px;
  border: 1px dashed var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  background: var(--bg-subtle, #f9fafb);
}
.fo-group-dash-current-group-dl {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}
.fo-group-dash-pnl-secondary {
  margin-top: 20px;
  padding-top: 4px;
  border-top: 1px dashed #e2e8f0;
}
.fo-strategy-subtitle,
.fo-muted-meta {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ctrm-muted, #64748b);
  margin-top: 2px;
}
.fo-group-dash-strategy-cell .fo-group-dash-strategy-name {
  font-weight: 500;
}
.fo-group-scope-tag {
  display: inline-block;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--ctrm-muted, #64748b);
  margin-left: 4px;
  vertical-align: middle;
}
.fo-ledger-scope-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.fo-ledger-scope-chip-host {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fo-ledger-scope-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  line-height: 1.4;
}
.fo-ledger-scope-chip--all {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  cursor: pointer;
}
.fo-ledger-scope-chip--group {
  background: rgba(100, 116, 139, 0.14);
  color: var(--ctrm-muted, #475569);
}
.fo-ledger-detail-guidance-r1,
.mov-bgd-default-note-r1,
.bgd-cockpit-scope-note-r1 {
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.65rem;
  border-left: 3px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
  font-size: 13px;
}
.fo-scope-switch-all {
  font-size: 12px;
}
.fo-group-dash-group-summary-header {
  margin: 12px 0 8px;
}
.fo-group-dash-group-summary-note {
  margin: 4px 0 0;
}
.fo-group-dashboard-perf-observe {
  margin-top: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}
.fo-group-dashboard-perf-intro {
  margin: 0 0 8px;
  font-size: 12px;
}
.fo-group-dashboard-perf-body {
  overflow-x: auto;
}
.fo-group-dashboard-perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fo-group-dashboard-perf-table th,
.fo-group-dashboard-perf-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}
.fo-group-dashboard-perf-table th {
  width: 42%;
  color: #64748b;
  font-weight: 500;
}
.fo-group-dashboard-perf-hints {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #b45309;
}
.fo-workbench-margin-term-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #93c5fd;
  background: #f0f9ff;
  font-size: 13px;
  line-height: 1.45;
}
.fo-group-dash-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.fo-group-dash-risk-pnl-table {
  font-size: 13px;
}
.fo-group-dash-risk-pnl-table th,
.fo-group-dash-risk-pnl-table td {
  white-space: nowrap;
}
.fo-group-dash-notice {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius, 6px);
  border: 1px solid #fcd34d;
  background: #fffbeb;
}
.fo-group-dash-notice-text {
  margin: 0;
  font-size: 13px;
  color: #92400e;
}
.fo-group-dash-empty {
  margin-top: 12px;
}
.fo-dash-val-negative {
  color: #b91c1c;
  font-weight: 600;
}
.fo-dash-val-risk {
  color: #b45309;
  font-weight: 600;
}
.fo-group-dash-risk-pnl-note {
  margin: 4px 0 12px;
  font-size: 12px;
}
.fo-group-dashboard-kpi-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fo-group-dashboard-kpi-group {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 6px);
  background: var(--bg-subtle, #f9fafb);
}
.fo-group-dashboard-kpi-group--compact {
  padding: 6px 8px;
}
.fo-group-dashboard-kpi-group-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: none;
  letter-spacing: 0.02em;
}
.fo-group-dashboard-kpi-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 6px 8px;
}
.fo-group-dashboard-kpi-group-row--plan-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px 6px;
}
.fo-group-dashboard-kpi-group-row--risk-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px 5px;
}
.fo-group-dashboard-kpi-stat--compact {
  padding: 2px 4px;
  min-width: 0;
}
.fo-group-dashboard-kpi-stat--compact .label {
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fo-group-dashboard-kpi-stat--compact .value {
  font-size: clamp(11px, 0.95vw, 13px);
  line-height: 1.3;
  white-space: nowrap;
}
.fo-group-kpi-value-hint {
  cursor: help;
  border-bottom: 1px dotted var(--border, #cbd5e1);
}
.fo-group-kpi-value--loss,
.fo-group-kpi-stat--loss .value {
  color: #b91c1c;
  font-weight: 600;
}
.fo-group-kpi-value--profit,
.fo-group-kpi-stat--profit .value {
  color: #047857;
  font-weight: 600;
}
.fo-dash-val-loss {
  color: #b91c1c;
  font-weight: 600;
}
@media (max-width: 1023px) {
  .fo-group-dashboard-kpi-group-row--plan-stats {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
  .fo-group-dashboard-kpi-group-row--risk-stats {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }
  .fo-group-dashboard-kpi-stat--compact .label,
  .fo-group-dashboard-kpi-stat--compact .value {
    white-space: normal;
  }
}
@media (max-width: 768px) {
  .fo-group-dashboard-kpi-group-row--plan-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fo-group-dashboard-kpi-group-row--risk-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.fo-group-kpi-stat--primary .value {
  color: #1e40af;
  font-weight: 700;
}
.fo-group-kpi-stat--muted .label,
.fo-group-kpi-stat--muted .value {
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}
.fo-group-kpi-asof {
  margin: 4px 0 0;
  font-size: 11px;
}
.fo-group-dash-scope-summary {
  margin: 0 0 12px;
}
.fo-group-dash-scope-summary-title {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
}
.fo-group-dash-summary-cards--compact {
  margin-top: 8px;
}
.fo-group-dash-margin-source-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 3px;
  background: var(--surface-muted, #eef2ff);
  color: var(--text-muted, #4338ca);
  vertical-align: middle;
}
.fo-group-dash-extreme-pending-note {
  margin-top: 6px;
}
@media (max-width: 768px) {
  .fo-ledger-top-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .fo-ledger-top-action-buttons {
    width: 100%;
  }
  .fo-ledger-top-action-buttons .btn {
    flex: 1 1 auto;
  }
}

/* Page top-level tabs (TOP-LEVEL-TABS-R1) */
.fo-ledger-page-top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--border, #e5e7eb);
}
.fo-ledger-page-top-tab {
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-subtle, #f9fafb);
  border-radius: var(--radius, 6px) var(--radius, 6px) 0 0;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fo-ledger-page-top-tab.is-active {
  background: #fff;
  border-color: #6366f1;
  border-bottom-color: #fff;
  color: #3730a3;
  margin-bottom: -2px;
  box-shadow: 0 -1px 0 #6366f1 inset;
}
.fo-ledger-page-top-panels {
  margin-bottom: 16px;
}
.fo-ledger-page-top-panel {
  display: none;
}
.fo-ledger-page-top-panel.is-active {
  display: block;
}
@media (max-width: 768px) {
  .fo-ledger-page-top-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Group strategy list (GROUP-STRATEGY-LIST-R1) */
.fo-group-strategy-list-panel {
  margin-bottom: 16px;
}
.fo-group-list-subtitle {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.fo-group-strategy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.fo-group-strategy-actions .btn-link {
  padding-left: 0;
  padding-right: 0;
}
.fo-group-position-ended-hint {
  font-size: 12px;
}
.fo-plan-view-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.fo-plan-view-badge--executing {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-plan-view-badge--observing {
  background: #f3f4f6;
  color: #4b5563;
}
.fo-plan-view-badge--overfill {
  background: #ffedd5;
  color: #c2410c;
}
.fo-plan-view-badge--ended {
  background: #ecfdf5;
  color: #047857;
}
.fo-plan-view-badge--void {
  background: #f3f4f6;
  color: #9ca3af;
}
.fo-net-exposure-hint {
  font-size: 12px;
}
.fo-group-strategy-completion-bar-fill--overfill {
  background: #f97316;
}
.fo-group-strategy-action-muted[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Group dashboard linked KPI (R1.2) */
.fo-group-dashboard-linked-kpi {
  margin-bottom: 12px;
}
.fo-group-dashboard-kpi-group--linked {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-bg, #fafafa);
}
.fo-group-linked-kpi-scope {
  margin: 8px 0 0;
  font-size: 12px;
}
.fo-group-dashboard-kpi-stat--clickable {
  cursor: pointer;
}
.fo-group-dashboard-kpi-stat--clickable:hover {
  background: rgba(59, 130, 246, 0.06);
  border-radius: 6px;
}
.fo-group-kpi-stat--warning .label,
.fo-group-kpi-stat--warning .value {
  color: #c2410c;
}

/* R8 — group dashboard KPI (R9: merged into daily workbench; panel styles retained for compat) */
.fo-group-dashboard-kpi-panel {
  display: none !important;
}
.fo-group-dashboard-workbench-section {
  margin-bottom: 8px;
}
.fo-group-dashboard-workbench-section-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.fo-group-kpi-reserved {
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  font-size: 11px;
}
.fo-group-kpi-stat--muted .label,
.fo-group-kpi-stat--muted .value {
  color: var(--text-muted, #64748b);
}
.fo-group-org-stats-note {
  margin: 0 0 8px;
  font-size: 11px;
}
.fo-group-dashboard-org-stats {
  margin-bottom: 8px;
}
.fo-group-dashboard-inbox-section {
  margin-bottom: 10px;
}
.fo-group-dashboard-inbox-section-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.fo-group-dashboard-attention-inbox-list .fo-group-dashboard-attention-item {
  display: block;
  padding: 4px 0;
}
.fo-group-dashboard-kpi-panel--legacy-hidden {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--panel-bg, #fafafa);
}
.fo-group-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.fo-group-dashboard-kpi-section {
  min-width: 0;
}
.fo-group-dashboard-kpi-section-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.02em;
}
.fo-group-dashboard-kpi-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fo-group-dashboard-kpi-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.35;
}
.fo-group-dashboard-kpi-card--clickable {
  cursor: pointer;
}
.fo-group-dashboard-kpi-card--clickable:hover {
  background: rgba(59, 130, 246, 0.06);
}
.fo-group-dashboard-kpi-card-label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-muted, #64748b);
}
.fo-group-dashboard-kpi-card-value {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}
.fo-group-dashboard-kpi-card-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted, #94a3b8);
}
.fo-group-dashboard-kpi-loading,
.fo-group-dashboard-kpi-empty {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  padding: 4px 0;
}
.fo-group-dashboard-attention-block {
  margin-top: 6px;
}
.fo-group-dashboard-attention-block-title {
  margin: 0 0 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.fo-group-dashboard-attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fo-group-dashboard-attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 3px 0;
  font-size: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.fo-group-dashboard-attention-item:first-child {
  border-top: none;
}
.fo-group-dashboard-attention-item--clickable {
  cursor: pointer;
  border-radius: 4px;
}
.fo-group-dashboard-attention-item--clickable:hover {
  background: rgba(59, 130, 246, 0.06);
}
.fo-group-dashboard-attention-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fo-group-dashboard-attention-reason {
  grid-column: 1 / -1;
  color: var(--text-muted, #94a3b8);
  font-size: 9px;
}
.fo-group-dashboard-attention-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.fo-group-dashboard-attention-category {
  font-size: 9px;
  color: var(--text-muted, #94a3b8);
}
@media (max-width: 1200px) {
  .fo-group-dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .fo-group-dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.fo-group-list-row--attention {
  background: rgba(251, 191, 36, 0.12);
}
.fo-group-list-row--attention-overfill {
  box-shadow: inset 3px 0 0 #f97316;
}
.fo-group-list-row--attention-net {
  box-shadow: inset 3px 0 0 #2563eb;
}

.fo-strategy-focus-row.fo-cross-tab-focus {
  background: rgba(59, 130, 246, 0.14);
  box-shadow: inset 3px 0 0 #2563eb;
}
.fo-focus-pulse {
  animation: fo-focus-pulse 0.9s ease-in-out 2;
}
@keyframes fo-focus-pulse {
  0%, 100% { background-color: rgba(59, 130, 246, 0.14); }
  50% { background-color: rgba(59, 130, 246, 0.28); }
}
.fo-group-strategy-code-link {
  padding: 0;
  font-size: inherit;
  vertical-align: baseline;
}
.fo-group-read-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
}
.fo-group-read-action-btn {
  padding: 2px 4px;
  font-size: 11px;
  white-space: nowrap;
  line-height: 1.3;
}
.fo-group-row-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 72px;
}
.fo-group-row-actions__read {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fo-group-row-actions__read .fo-group-read-actions {
  margin-top: 0;
}
.fo-group-row-actions__write {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
  padding-top: 3px;
  border-top: 1px solid #e5e7eb;
}
.fo-group-row-actions > .fo-group-row-actions__write:only-child {
  border-top: none;
  padding-top: 0;
}
.fo-group-row-actions__write .btn-secondary,
.fo-group-row-actions__write .btn-link {
  font-size: 11px;
  padding: 2px 6px;
  line-height: 1.3;
}
.fo-group-write-action-btn {
  white-space: nowrap;
  font-size: 11px;
}
/* R5: strategy-list compact inline action row (plan / position only) */
.fo-group-row-actions--compact-inline {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.fo-group-row-actions--compact-inline .fo-group-row-action-btn {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.15;
  padding: 1px 4px;
  white-space: nowrap;
}
.fo-group-strategy-actions--plan.fo-group-row-actions--compact-inline,
.fo-group-strategy-actions--position.fo-group-row-actions--compact-inline {
  min-width: 0;
}
.fo-group-action-target-highlight {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  background-color: #eff6ff;
  transition: background-color 0.2s ease;
}

.ctrm-ledger-row-focused {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
  background-color: #f0fdfa;
  transition: background-color 0.25s ease, outline-color 0.25s ease;
}

.fo-group-list-status-cell {
  min-width: 108px;
}
.fo-attention-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 220px;
}
.fo-attention-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  background: #f3f4f6;
  color: #4b5563;
}
.fo-attention-tag-warning {
  background: #ffedd5;
  color: #c2410c;
}
.fo-attention-tag-risk {
  background: #fee2e2;
  color: #b91c1c;
}
.fo-attention-tag-info {
  background: #eff6ff;
  color: #1d4ed8;
}
.fo-attention-tag-more {
  background: #e5e7eb;
  color: #374151;
  cursor: help;
}

.fo-risk-pnl-capital-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fo-risk-pnl-capital-table {
  min-width: 960px;
}
.fo-capital-risk-row,
.fo-pnl-row,
.fo-risk-pnl-capital-table-row {
  vertical-align: top;
}
.fo-risk-pnl-capital-table .fo-unified-model-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fo-risk-pnl-capital-table .fo-unified-status-cell {
  min-width: 96px;
  max-width: 200px;
}
.fo-risk-pnl-capital-table .fo-attention-reasons {
  max-width: 190px;
  margin-top: 3px;
}

.fo-group-strategy-list-panel .fo-group-tab-section + .fo-group-tab-section {
  margin-top: 20px;
}
.fo-group-plan-list-wrap,
.fo-group-position-list-wrap {
  margin-top: 8px;
}
.ctrm-group-position-table {
  min-width: 1880px;
}
.ctrm-group-position-table th.ctrm-group-position-cell-num,
.ctrm-group-position-table td.ctrm-group-position-cell-num,
.ctrm-group-position-table th.ctrm-group-position-cell-money,
.ctrm-group-position-table td.ctrm-group-position-cell-money,
.ctrm-group-position-table th.ctrm-group-position-cell-price,
.ctrm-group-position-table td.ctrm-group-position-cell-price,
.ctrm-group-position-table th.ctrm-group-position-cell-boundary,
.ctrm-group-position-table td.ctrm-group-position-cell-boundary,
.ctrm-group-position-table th.ctrm-group-position-cell-dynamic-risk,
.ctrm-group-position-table td.ctrm-group-position-cell-dynamic-risk {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-group-position-table .ctrm-group-position-cell-qty,
.ctrm-group-position-table .ctrm-group-position-cell-net {
  font-size: inherit;
  line-height: inherit;
}
.ctrm-group-position-table .ctrm-group-position-cell-net {
  font-weight: 600;
}
.ctrm-group-position-table .ctrm-group-position-cell-net .fo-net-exposure-hint {
  display: none;
}
.ctrm-group-position-cell-action,
.fo-group-position-actions-col {
  white-space: nowrap;
}
.ctrm-group-position-table .ctrm-group-position-action-btn {
  font-size: 11px;
  line-height: 1.3;
  padding: 0 4px;
  white-space: nowrap;
}
.ctrm-group-position-boundary-action {
  margin-left: 2px;
}

/* CTRM-STRATEGY-LEDGER-POSITION-PNL-GRAIN-SEPARATION-R15E */
.ctrm-ledger-position-pnl-split-r15e .ctrm-ledger-position-table-r15e.ctrm-group-position-table {
  min-width: 1480px;
}
.ctrm-ledger-position-grain-note-r15e {
  max-width: 72rem;
  line-height: 1.55;
}
.ctrm-ledger-position-pnl-split-r15e .ctrm-ledger-position-pnl-moved-r15e,
.ctrm-ledger-position-pnl-split-r15e th[data-ledger-pnl-moved-r15e="true"],
.ctrm-ledger-position-pnl-split-r15e td[data-ledger-pnl-moved-r15e="true"] {
  display: none !important;
}
.ctrm-ledger-pnl-drill-link-r15e {
  font-weight: 500;
  opacity: 0.92;
}
.ctrm-ledger-position-pnl-split-r15e .fo-group-position-actions-col .ctrm-ledger-pnl-drill-link-r15e {
  margin-left: 2px;
}

.ctrm-dynamic-boundary-modal .ctrm-dynamic-boundary-modal-panel {
  max-width: 640px;
}
.ctrm-dynamic-boundary-grid {
  gap: 12px 16px;
}
.ctrm-dynamic-boundary-help {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}
.ctrm-dynamic-boundary-history {
  margin: 12px 0 8px;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
  padding-top: 10px;
}
.ctrm-dynamic-boundary-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ctrm-dynamic-boundary-history-title::-webkit-details-marker {
  display: none;
}
.ctrm-dynamic-boundary-history-body {
  margin-top: 8px;
}
.ctrm-dynamic-boundary-history-scroll {
  overflow-x: auto;
  max-height: 220px;
  overflow-y: auto;
}
.ctrm-dynamic-boundary-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.35;
}
.ctrm-dynamic-boundary-history-table th,
.ctrm-dynamic-boundary-history-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
  vertical-align: top;
  white-space: nowrap;
}
.ctrm-dynamic-boundary-history-table th {
  font-weight: 600;
  color: var(--ctrm-text-muted, #64748b);
  background: var(--ctrm-surface-muted, #f8fafc);
  position: sticky;
  top: 0;
  z-index: 1;
}
.ctrm-dynamic-boundary-history-reason {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctrm-dynamic-boundary-history-empty {
  margin: 0;
  font-size: 12px;
}
.ctrm-dynamic-boundary-history-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.4;
  background: var(--ctrm-surface-muted, #f1f5f9);
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-dynamic-boundary-history-status--active {
  background: #dcfce7;
  color: #166534;
}
.ctrm-dynamic-boundary-history-status--superseded {
  background: #f1f5f9;
  color: #64748b;
}
.ctrm-group-position-total-row td {
  font-weight: 600;
  background: var(--ctrm-surface-muted, #f8fafc);
  border-top: 2px solid var(--ctrm-border, #cbd5e1);
}
.ctrm-group-position-total-label {
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-group-position-total-money {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ctrm-group-position-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 6px 0 8px;
  padding: 6px 10px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 12px;
}
.ctrm-group-position-filters-label {
  font-weight: 600;
  white-space: nowrap;
}
.ctrm-group-position-filter-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ctrm-group-position-filter-field select {
  font-size: 12px;
  padding: 2px 6px;
  max-width: 140px;
}
.ctrm-group-position-filter-count {
  margin-left: auto;
  color: var(--ctrm-text-muted, #64748b);
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-group-position-filter-active-hint {
  color: var(--ctrm-text-muted, #64748b);
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-dynamic-boundary-history-review-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--ctrm-surface-muted, #f1f5f9);
  color: var(--ctrm-text-muted, #64748b);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.ctrm-official-execution-detail-modal .ctrm-official-execution-detail-panel {
  max-width: 960px;
}
.ctrm-official-execution-summary {
  margin-bottom: 12px;
}
.ctrm-official-execution-detail-body {
  margin-top: 8px;
}
.ctrm-official-execution-detail-scroll {
  overflow-x: auto;
}
.ctrm-official-execution-detail-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}
.ctrm-official-execution-detail-table th,
.ctrm-official-execution-detail-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
  vertical-align: top;
}
.ctrm-official-execution-detail-table th {
  text-align: left;
  white-space: nowrap;
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 500;
}
.ctrm-official-execution-effect {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.ctrm-official-execution-effect--official {
  background: #ecfdf5;
  color: #047857;
}
.ctrm-official-execution-effect--excluded {
  background: var(--ctrm-surface-muted, #f1f5f9);
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-official-execution-excluded td {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-official-execution-reason {
  max-width: 180px;
  font-size: 11px;
  line-height: 1.4;
}
.ctrm-official-execution-notes {
  max-width: 160px;
  font-size: 11px;
  line-height: 1.4;
}
.ctrm-group-position-detail-action {
  white-space: nowrap;
}
.ctrm-group-position-empty-filtered {
  margin: 8px 0;
}

.ctrm-group-position-list-empty.ctrm-group-position-empty-unrecognized {
  border-left: 3px solid #c9a227;
  padding-left: 0.75rem;
}
.ctrm-group-position-cell-updated {
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.fo-group-plan-list-table {
  min-width: 1480px;
}
.fo-group-plan-list-table.fo-plan-quality-cols-hidden {
  min-width: 1180px;
}

/* R4 — Strategy Ledger core list UI contract alignment */
.ctrm-ledger-list-r4 .strategy-col-num,
.ctrm-ledger-list-r4 .ctrm-group-position-cell-num,
.ctrm-ledger-list-r4 .ctrm-group-position-cell-money,
.ctrm-ledger-list-r4 .ctrm-plan-number-cell-r5b,
.ctrm-ledger-list-r4 .ctrm-plan-money-cell-r5b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-ledger-list-r4 .ctrm-plan-action-nowrap-r5b,
.ctrm-ledger-list-r4 .strategy-ledger-col-actions,
.ctrm-ledger-list-r4 .fo-group-plan-actions-col,
.ctrm-ledger-list-r4 .fo-group-position-actions-col {
  white-space: nowrap;
}
.ctrm-ledger-list-detail-row td {
  background: rgba(248, 250, 252, 0.85);
  border-top: none;
  padding: 0 8px 8px;
}
.ctrm-ledger-list-detail-panel {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}
.ctrm-ledger-list-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}
.ctrm-ledger-list-detail-section-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-ledger-list-detail-section--provisional .ctrm-ledger-list-detail-section-title::after {
  content: ' · provisional';
  font-weight: 500;
  color: #b45309;
}
.ctrm-ledger-list-detail-note {
  margin: 0 0 6px;
  font-size: 11px;
}
.ctrm-ledger-list-detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin: 0;
  font-size: 12px;
}
.ctrm-ledger-list-detail-dl dt {
  margin: 0;
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.ctrm-ledger-list-detail-dl dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-ledger-detail-provisional {
  color: #92400e;
}
.ctrm-ledger-detail-conditional-stable {
  color: #166534;
}
.ctrm-deeplink-placeholder-r5b {
  font-size: 0.92em;
}
  min-width: 1600px;
}
.fo-group-execution-movements-wrap .ctrm-ledger-list-r4 {
  min-width: 1100px;
}

/* R5B — Plan View density + cell hints (ctrm-plan-field metadata) */
.ctrm-plan-view-density-r5b [data-plan-field],
.ctrm-plan-field-r5b {
  box-sizing: border-box;
}
  font-size: 13px;
}
.ctrm-plan-view-density-r5b .fo-group-plan-list-table th,
.ctrm-plan-view-density-r5b .fo-group-plan-list-table td {
  padding: 6px 8px;
  vertical-align: top;
}
.ctrm-plan-field-core-r5b[data-plan-field-group="core"],
td.ctrm-plan-field-core-r5b[data-plan-field-group="core"] {
  background: rgba(248, 250, 252, 0.6);
}
.ctrm-plan-field-risk-r5b[data-plan-field-group="risk"],
td.ctrm-plan-field-risk-r5b[data-plan-field-group="risk"] {
  border-left: 2px solid rgba(251, 191, 36, 0.35);
}
.ctrm-plan-field-capital-r5b[data-plan-field-group="capital"],
td.ctrm-plan-field-capital-r5b[data-plan-field-group="capital"] {
  border-left: 2px solid rgba(59, 130, 246, 0.25);
  font-size: 12px;
}
.ctrm-plan-field-execution-r5b[data-plan-field-group="execution"],
td.ctrm-plan-field-execution-r5b[data-plan-field-group="execution"] {
  border-left: 2px solid rgba(16, 185, 129, 0.3);
}
.ctrm-plan-field-action-r5b[data-plan-field-group="action"],
td.ctrm-plan-field-action-r5b[data-plan-field-group="action"] {
  border-left: 2px solid rgba(148, 163, 184, 0.35);
}
.ctrm-plan-group-marker-r5b {
  display: inline-block;
  margin-right: 4px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ctrm-text-muted, #64748b);
  background: rgba(148, 163, 184, 0.15);
  vertical-align: middle;
}
.ctrm-plan-money-cell-r5b {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ctrm-plan-number-cell-r5b {
  font-variant-numeric: tabular-nums;
}
.ctrm-plan-action-nowrap-r5b {
  white-space: nowrap;
}
.ctrm-plan-execution-block-r5b {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.ctrm-plan-execution-meta-r5b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-plan-execution-meta-sep-r5b {
  opacity: 0.6;
}
.ctrm-plan-cell-hints-r5b {
  display: block;
  margin-top: 2px;
}

/* R13C — Ledger Plan tiers + Overview KPI dedup */
.ctrm-plan-tier-r13c[data-plan-tier="core"],
td.ctrm-plan-tier-core-r13c {
  font-weight: 500;
}
.ctrm-plan-tier-secondary-r13c,
td.ctrm-plan-tier-secondary-r13c {
  opacity: 0.94;
  font-size: 12px;
}
.ctrm-ledger-strip-zone-r13c {
  margin: 8px 0 12px;
}
.ctrm-ledger-overview-kpi-dedup-r13c {
  margin-bottom: 12px;
}
.ctrm-ledger-overview-kpi-dl-r13c {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
  margin: 8px 0 0;
}
.ctrm-ledger-overview-kpi-dl-r13c dt {
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-ledger-overview-kpi-dl-r13c dd {
  margin: 2px 0 0;
  font-size: 13px;
}
.ctrm-ledger-overview-detail-fold-r13c {
  margin-top: 8px;
}
.ctrm-ledger-overview-detail-fold-r13c > summary {
  cursor: pointer;
}

/* R13D — fixed status zone + legacy cleanup */
.ctrm-ledger-status-zone-r13d {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.85);
}
.ctrm-ledger-status-zone-r13d__item + .ctrm-ledger-status-zone-r13d__item,
.ctrm-ledger-status-zone-r13d__item + .ctrm-ledger-strip-zone-r13c {
  margin-top: 8px;
}
.ctrm-ledger-legacy-folded-r13d > summary {
  cursor: pointer;
  font-size: 13px;
}
.ctrm-ledger-legacy-note-r13d {
  margin: 6px 0 0;
}
.ctrm-ledger-header-context-r13d {
  margin-bottom: 6px;
}
.ctrm-ledger-tab-canonical-r13d.is-active,
.ctrm-ledger-tab-canonical-r13d[data-ledger-tab-owner="canonical"] {
  font-weight: 600;
}

.ctrm-cell-hint-r5b {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
.ctrm-cell-hint-fallback-r5b {
  color: #92400e;
  background: rgba(251, 191, 36, 0.2);
}
.ctrm-cell-hint-degraded-r5b {
  color: #475569;
  background: rgba(148, 163, 184, 0.2);
}
.ctrm-cell-hint-dto-r5b {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
}
.ctrm-cell-value-muted-r5b {
  color: var(--ctrm-text-muted, #94a3b8);
}

/* R5D — FIRST_REAL_CLOSE post-event verification strip */
.ctrm-first-real-close-verification-r5d {
  margin: 8px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-first-real-close-verification-r5d[data-first-real-close-status="pass"] {
  border-color: #86efac;
  background: rgba(34, 197, 94, 0.08);
}
.ctrm-first-real-close-verification-r5d[data-first-real-close-status="warn"] {
  border-color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
}
.ctrm-first-real-close-verification-r5d[data-first-real-close-status="degraded"] {
  border-color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
}
.ctrm-first-real-close-verification-r5d[data-first-real-close-status="fail"] {
  border-color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}
.ctrm-first-real-close-verification-r5d.ctrm-first-real-close-verification-r8g,
.ctrm-first-real-close-verification-r5d[data-first-real-close-source="readonly_list_dto_r8g"] {
  border-color: #93c5fd;
  background: rgba(59, 130, 246, 0.08);
}
.ctrm-first-real-close-verification-r5d__paths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.ctrm-first-real-close-path-r5d,
.ctrm-first-real-close-badge-r5d {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.fo-group-plan-quality-cols-toggle {
  margin-left: 4px;
  padding: 0 4px;
  font-size: 13px;
}
.fo-execution-progress-section {
  margin: 8px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.fo-execution-progress-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.fo-overview-exec-progress-toggle {
  margin-left: auto;
  padding: 0 4px;
  font-size: 13px;
}
.fo-overview-close-review-link {
  margin-left: 4px;
  padding: 0 6px;
  font-size: 13px;
}
.fo-execution-progress-section.fo-exec-progress-collapsed .fo-execution-progress-body {
  display: none;
}
.fo-exec-progress-mini-d178 {
  margin-top: 8px;
}
.fo-overview-progress-strip--mini-d178 {
  gap: 8px 16px;
}
.fo-execution-progress-section:not(.fo-exec-progress-collapsed) .fo-execution-progress-collapsed-hint {
  display: none;
}
.fo-execution-progress-collapsed-hint {
  margin: 4px 0 0;
  font-size: 12px;
}
.fo-execution-progress-body {
  margin-top: 8px;
}
.fo-group-plan-list-table td.fo-plan-view-money,
.fo-group-plan-list-table td.fo-text-right,
.fo-group-plan-list-table th.fo-text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-plan-toolbar-compact {
  margin: 6px 0 8px;
  padding: 6px 10px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 13px;
}
.ctrm-plan-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.ctrm-plan-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.ctrm-plan-toolbar-label {
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
  font-size: 12px;
}
.ctrm-plan-toolbar-summary {
  margin-left: auto;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.ctrm-plan-toolbar-end-r1b {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ctrm-plan-toolbar-end-r1b .ctrm-plan-toolbar-summary {
  margin-left: 0;
}
.ctrm-plan-empty-r1b {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
}
.ctrm-plan-toolbar-note {
  margin: 4px 0 0;
  font-size: 11px;
}
.ctrm-plan-quality-toolbar {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 13px;
}
.ctrm-plan-quality-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}
.ctrm-plan-quality-toolbar-row:last-child {
  margin-bottom: 0;
}
.ctrm-plan-quality-toolbar-label {
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.ctrm-plan-quality-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ctrm-plan-quality-filter-btn {
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: #fff;
  color: var(--ctrm-text, #334155);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.ctrm-plan-quality-filter-btn:hover {
  border-color: var(--ctrm-primary, #2563eb);
  color: var(--ctrm-primary, #2563eb);
}
.ctrm-plan-quality-filter-btn.is-active {
  border-color: var(--ctrm-primary, #2563eb);
  background: var(--ctrm-primary-soft, #eff6ff);
  color: var(--ctrm-primary, #2563eb);
  font-weight: 600;
}
.ctrm-plan-quality-sort {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: #fff;
  max-width: 220px;
}
.ctrm-plan-summary-filter-r2a .ctrm-plan-filter-field-r2a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
  margin-left: 4px;
}
.ctrm-plan-filter-select-r2a {
  min-width: 100px;
  max-width: 180px;
}
.ctrm-plan-summary-bar-wrap-r2a {
  margin: 8px 0 4px;
  padding: 0 2px;
}
.ctrm-plan-summary-bar-r2a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-plan-summary-row-r2a {
  /* R2A summary row marker — combined with .ctrm-plan-summary-bar-r2a */
}
.ctrm-plan-summary-bar-prefix-r2a {
  font-weight: 600;
  color: var(--ctrm-text, #334155);
}
.ctrm-plan-summary-metric-r2a {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.ctrm-plan-summary-metric-label-r2a {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-plan-summary-metric-value-r2a {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ctrm-text, #1e293b);
}
.ctrm-plan-summary-sep-r2a {
  color: var(--ctrm-border, #cbd5e1);
  user-select: none;
}
.ctrm-plan-quality-summary {
  margin-left: auto;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.ctrm-plan-quality-filter-note {
  margin: 6px 0 0;
  font-size: 11px;
}
.ctrm-plan-lifecycle-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ctrm-plan-lifecycle-filter-btn {
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: #fff;
  color: var(--ctrm-text, #334155);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.ctrm-plan-lifecycle-filter-btn:hover {
  border-color: var(--ctrm-primary, #2563eb);
  color: var(--ctrm-primary, #2563eb);
}
.ctrm-plan-lifecycle-filter-btn.is-active {
  border-color: var(--ctrm-primary, #2563eb);
  background: var(--ctrm-primary-soft, #eff6ff);
  color: var(--ctrm-primary, #2563eb);
  font-weight: 600;
}
.ctrm-plan-status-col {
  min-width: 72px;
  white-space: nowrap;
}
.ctrm-plan-status-cell {
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-plan-status-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
}
.ctrm-plan-status-watching {
  color: var(--ctrm-info, #0369a1);
  background: rgba(3, 105, 161, 0.08);
}
.ctrm-plan-status-executing {
  color: var(--ctrm-success, #15803d);
  background: rgba(21, 128, 61, 0.08);
}
.ctrm-plan-status-ended {
  color: var(--ctrm-text-muted, #64748b);
  background: rgba(100, 116, 139, 0.1);
}
.ctrm-plan-status-void {
  color: var(--ctrm-text-muted, #94a3b8);
  background: rgba(148, 163, 184, 0.12);
}
.ctrm-plan-quality-empty {
  margin: 8px 0;
}
.fo-group-plan-list-table th.ctrm-plan-col-compact-rate {
  font-size: 10px;
  line-height: 1.1;
  white-space: normal;
  vertical-align: bottom;
  text-align: right;
}
.fo-group-plan-list-table th.ctrm-plan-col-compact-rate span {
  display: block;
}
.fo-group-plan-list-table td.ctrm-plan-cell-rate {
  font-variant-numeric: tabular-nums;
}
.fo-group-plan-list-table td.ctrm-plan-cell-valuation-level {
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-plan-valuation-zone {
  display: inline-block;
  line-height: 1.2;
}
.ctrm-plan-valuation-zone-low {
  color: var(--ctrm-info, #0369a1);
}
.ctrm-plan-valuation-zone-mid {
  color: var(--ctrm-text, #334155);
}
.ctrm-plan-valuation-zone-high {
  color: var(--ctrm-warning, #b45309);
}
.ctrm-plan-valuation-zone-outside {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-plan-valuation-zone-unknown {
  color: var(--ctrm-text-muted, #94a3b8);
}
.fo-group-plan-strategy-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fo-group-plan-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}
.fo-group-plan-actions .btn,
.fo-group-plan-actions button {
  font-size: 12px;
  padding: 3px 6px;
  line-height: 1.2;
  white-space: nowrap;
}
.fo-group-plan-actions-col {
  min-width: 220px;
}
.fo-dash-val-profit {
  color: var(--ctrm-success, #15803d);
}
.fo-group-strategy-list-hint {
  margin-bottom: 8px;
}
.fo-group-strategy-list-wrap {
  overflow-x: auto;
}
.fo-group-strategy-list-table {
  min-width: 1200px;
  font-size: 13px;
}
.fo-group-strategy-list-table th,
.fo-group-strategy-list-table td {
  white-space: nowrap;
}
.fo-group-strategy-list-col-completion {
  min-width: 108px;
}
.fo-group-strategy-completion-text {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.fo-group-strategy-completion-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--border, #e5e7eb);
  overflow: hidden;
}
.fo-group-strategy-completion-bar-fill {
  display: block;
  height: 100%;
  background: #6366f1;
}
.fo-group-strategy-metric-profit {
  color: #059669;
}
.fo-group-strategy-metric-loss {
  color: #dc2626;
}
.fo-group-strategy-list-empty {
  margin: 12px 0;
}
.fo-legacy-strategy-list-note {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
}
.fo-lifecycle-status-label {
  color: #64748b;
  font-style: italic;
}

.strategy-ledger-header-intro {
  margin-bottom: 8px;
  max-width: 72rem;
}
.strategy-ledger-header-disclaimer {
  margin-bottom: 12px;
  max-width: 72rem;
  padding-left: 10px;
  border-left: 3px solid #6366f1;
}

.strategy-library-sort-hint-cell {
  padding: 8px 12px;
  font-size: 12px;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-name {
  min-width: 8rem;
  max-width: 14rem;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-bounds,
.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-settlement {
  white-space: nowrap;
  max-width: 7rem;
}

.strategy-model-detail-table.strategy-library-detail-table .strategy-library-col-status {
  text-align: center;
  white-space: nowrap;
}

/* strategy_ledger UI-CLEANUP-R1 */
.fo-business-disclaimer {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.fo-valuation-source-row {
  margin: 12px 0 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.fo-valuation-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px 12px;
}
.fo-source-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.fo-source-chip--fallback {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.fo-source-chip--warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}
.fo-valuation-fallback-note {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
}
.fo-operator-admin-notice {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #fcd34d;
  background: #fffbeb;
}
body.fo-role-admin .fo-operator-admin-notice {
  display: none;
}
body.fo-role-operator .fo-admin-only,
body.fo-role-viewer .fo-admin-only {
  display: none !important;
}
body.fo-role-operator .fo-legacy-tools,
body.fo-role-viewer .fo-legacy-tools {
  display: none !important;
}
.fo-legacy-tools-title {
  cursor: pointer;
}
.fo-legacy-tools-intro,
.fo-warning-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}
.fo-direct-execution-effect-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  font-size: 13px;
  line-height: 1.45;
}
.fo-ledger-top-action-close {
  margin-left: 8px;
}
.btn.btn-link.fo-quick-close-entry,
button.fo-quick-close-entry {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ctrm-link, #2563eb);
  text-decoration: none;
  cursor: pointer;
}
.btn.btn-link.fo-quick-close-entry:hover:not(:disabled),
button.fo-quick-close-entry:hover:not(:disabled) {
  text-decoration: underline;
  color: var(--ctrm-link-hover, #1d4ed8);
}
.btn.btn-link.fo-quick-close-entry:disabled,
button.fo-quick-close-entry:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}
.fo-exec-tab-close-hint {
  margin: 6px 0 0;
  font-size: 12px;
}
.fo-pnl-multiplier-note {
  margin-top: 4px;
  font-size: 12px;
}
@media (max-width: 720px) {
  .fo-ledger-top-action-buttons {
    flex-wrap: wrap;
  }
}

/* R9B Capital Management Tab */
.ctrm-capital-management .ctrm-capital-disclaimer {
  margin-bottom: 12px;
}
.ctrm-capital-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ctrm-border, #e5e7eb);
}
.ctrm-capital-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.ctrm-capital-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.ctrm-capital-summary-grid--secondary {
  margin-top: 0;
}
.ctrm-capital-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.ctrm-capital-subsection-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.ctrm-capital-table-wrap {
  overflow-x: auto;
}
.ctrm-capital-table .strategy-col-num,
.ctrm-capital-table td.strategy-col-num,
.ctrm-capital-table th.strategy-col-num {
  text-align: right;
  white-space: nowrap;
}
.ctrm-capital-number {
  font-variant-numeric: tabular-nums;
}
.ctrm-capital-status {
  display: inline-block;
  font-size: 11px;
  line-height: 1.3;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ctrm-bg-muted, #f3f4f6);
  color: var(--ctrm-text-muted, #6b7280);
  white-space: nowrap;
}
.ctrm-capital-status-warning {
  background: #fef3c7;
  color: #92400e;
}
.ctrm-capital-status-muted {
  opacity: 0.85;
}
.ctrm-capital-window-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
}
.ctrm-capital-card .fo-group-kpi-stat--primary {
  font-weight: 600;
}

/* R9B1 Capital & Risk Management Tab consolidation */
.ctrm-capital-risk-management .ctrm-capital-disclaimer {
  margin-bottom: 16px;
}
.fo-group-dash-major-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ctrm-text, #111827);
}
.fo-capital-risk-group-hint {
  margin: 0 0 12px;
  font-size: 13px;
}
.ctrm-risk-placeholder-intro {
  margin-bottom: 16px;
}
.ctrm-risk-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.ctrm-risk-placeholder-card {
  padding: 16px;
  border: 1px dashed var(--ctrm-border, #d1d5db);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f9fafb);
}
.ctrm-risk-placeholder-card .fo-group-section-title {
  margin-top: 0;
  font-size: 0.95rem;
}
.ctrm-risk-placeholder-fields {
  margin: 12px 0;
  padding-left: 1.2em;
  font-size: 13px;
}
.ctrm-risk-placeholder-fields code {
  font-size: 12px;
}
.ctrm-risk-placeholder-status {
  display: inline-block;
  margin-top: 8px;
}
.fo-group-dashboard-panel--legacy-hidden {
  display: none !important;
}

/* R9C Capital & Risk list workbench */
.ctrm-crm-workbench .ctrm-crm-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ctrm-border, #e5e7eb);
}
.ctrm-crm-toolbar {
  margin: 10px 0 8px;
}
.ctrm-crm-filter-row,
.ctrm-crm-sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.ctrm-crm-filter-row label,
.ctrm-crm-sort-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.ctrm-crm-filter-check input {
  margin-right: 4px;
}
.ctrm-crm-summary-line {
  margin: 8px 0 10px;
  font-size: 13px;
}
.ctrm-crm-table-wrap {
  overflow-x: auto;
}
.ctrm-crm-table .strategy-col-num,
.ctrm-crm-table td.strategy-col-num,
.ctrm-crm-table th.strategy-col-num {
  text-align: right;
  white-space: nowrap;
}
.ctrm-crm-status {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #374151;
}
.ctrm-crm-status-warning {
  background: #fef3c7;
  color: #92400e;
}
.ctrm-crm-status-muted {
  opacity: 0.85;
}
.ctrm-crm-boundary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
/* R3C float-pnl demote */
.ctrm-crm-col-secondary {
  color: var(--color-text-secondary);
  font-style: italic;
}
.ctrm-col-hint-icon {
  font-size: 11px;
  opacity: 0.55;
  cursor: help;
  font-style: normal;
}

/* R10E1: 盈亏分析 · 月度资源效率工作台 */
.ctrm-pnl-analysis-workbench {
  margin-bottom: 16px;
}
.fo-pnl-analysis-intro {
  margin-bottom: 12px;
}
.fo-pnl-analysis-freshness {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #d1d5db);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
}
.fo-pnl-analysis-freshness--ok {
  border-color: #86efac;
  background: #f0fdf4;
}
.fo-pnl-analysis-freshness--warn {
  border-color: #fcd34d;
  background: #fffbeb;
}
.fo-pnl-analysis-freshness--stale {
  border-color: #fca5a5;
  background: #fef2f2;
}
.fo-pnl-analysis-freshness--empty {
  border-color: var(--ctrm-border, #d1d5db);
  background: #f1f5f9;
}
.fo-pnl-analysis-freshness-stale-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
  font-weight: 500;
}
.fo-pnl-analysis-freshness-details {
  margin: 0 0 8px;
  padding-left: 1.2em;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.fo-pnl-analysis-freshness-details li + li {
  margin-top: 2px;
}
.fo-pnl-analysis-freshness-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fo-pnl-analysis-freshness-row,
.fo-pnl-analysis-freshness-daily {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.fo-pnl-analysis-freshness-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.fo-pnl-analysis-freshness-badge-ok {
  background: #dcfce7;
  color: #166534;
}
.fo-pnl-analysis-freshness-badge-warn {
  background: #fef3c7;
  color: #92400e;
}
.fo-pnl-analysis-freshness-badge-stale {
  background: #fee2e2;
  color: #991b1b;
}
.fo-pnl-analysis-freshness-badge-none {
  background: #e2e8f0;
  color: #64748b;
}
.fo-pnl-analysis-freshness-label {
  color: #64748b;
}
.fo-pnl-analysis-freshness-sep {
  color: #cbd5e1;
}
.fo-pnl-analysis-freshness-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.fo-pnl-analysis-freshness-warn {
  background: #fef3c7;
  color: #92400e;
}
.fo-pnl-analysis-freshness-reserved {
  background: #e0e7ff;
  color: #3730a3;
}
.fo-pnl-analysis-freshness-unknown {
  color: #94a3b8;
  font-style: italic;
}
.fo-pnl-analysis-freshness-ops-hint {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
}
.fo-pnl-analysis-freshness--stale .fo-pnl-analysis-freshness-ops-hint {
  background: #fef2f2;
  border-color: #fecaca;
}
.fo-pnl-analysis-freshness-ops-intro {
  margin: 0 0 6px;
}
.fo-pnl-analysis-freshness-ops-label {
  margin: 0 0 4px;
  font-size: 12px;
}
.fo-pnl-analysis-freshness-ops-cmd {
  margin: 4px 0 0;
  padding: 8px 10px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.fo-pnl-analysis-freshness-ops-cmd code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.fo-pnl-analysis-freshness-empty {
  margin: 0;
}
.fo-pnl-analysis-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.fo-pnl-analysis-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.fo-pnl-analysis-month-input {
  min-width: 140px;
}
.fo-pnl-analysis-scope-hint {
  margin-bottom: 8px;
}
.fo-pnl-analysis-table-wrap {
  margin-top: 8px;
}
.fo-pnl-analysis-table th,
.fo-pnl-analysis-table td {
  font-size: 13px;
}
.fo-pnl-analysis-summary-row td {
  background: #f8fafc;
  border-top: 2px solid var(--ctrm-border, #d1d5db);
}
.fo-pnl-analysis-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.fo-pnl-analysis-status-ok {
  background: #ecfdf5;
  color: #047857;
}
.fo-pnl-analysis-status-warn {
  background: #fff7ed;
  color: #c2410c;
}
.fo-pnl-analysis-credit-reserved,
.fo-pnl-analysis-credit-tag {
  color: #64748b;
  font-size: 12px;
}
.fo-pnl-analysis-credit-tag {
  margin-left: 4px;
}
.fo-pnl-analysis-credit-note {
  margin-top: 12px;
}

/* R10E2: 盈亏分析 · 日度明细下钻 */
.fo-pnl-analysis-daily-panel {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ctrm-border, #d1d5db);
}
.fo-pnl-analysis-daily-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.fo-pnl-analysis-daily-title {
  font-size: 15px;
  margin: 0;
}
.fo-pnl-analysis-daily-hint {
  margin-bottom: 8px;
}
.fo-pnl-analysis-monthly-row {
  cursor: pointer;
}
.fo-pnl-analysis-monthly-row:hover {
  background: #f8fafc;
}
.fo-pnl-analysis-row-selected {
  background: #eff6ff !important;
  outline: 1px solid #93c5fd;
}
.fo-pnl-analysis-daily-table th,
.fo-pnl-analysis-daily-table td {
  font-size: 13px;
}
.fo-pnl-analysis-daily-summary-row td {
  background: #f8fafc;
  border-top: 2px solid var(--ctrm-border, #d1d5db);
}
.fo-pnl-analysis-prev-missing {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #fef3c7;
  color: #92400e;
}
.fo-dash-val-positive {
  color: #047857;
}

/* STRATEGY-PNL-EXPLANATION-LIGHT-R2: 盈亏解释面板 */
.fo-pnl-explanation-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--ctrm-border, #d1d5db);
  border-radius: 8px;
  background: #fafbfc;
}
.fo-pnl-explanation-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ctrm-border, #d1d5db);
}
.fo-pnl-explanation-title {
  font-size: 16px;
  margin: 0 0 4px;
}
.fo-pnl-explanation-subtitle {
  margin: 0;
  font-size: 13px;
}
.fo-pnl-explanation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fo-pnl-explanation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.fo-pnl-explanation-card {
  padding: 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}
.fo-pnl-explanation-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.fo-pnl-explanation-card dl {
  margin: 0;
  font-size: 13px;
}
.fo-pnl-explanation-card dt {
  color: #64748b;
  font-weight: normal;
  margin-top: 6px;
}
.fo-pnl-explanation-card dt:first-child {
  margin-top: 0;
}
.fo-pnl-explanation-card dd {
  margin: 2px 0 0;
  font-weight: 500;
}
.fo-pnl-explanation-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}
.fo-pnl-explanation-note--warn {
  background: #fff7ed;
  color: #9a3412;
}
.fo-pnl-explanation-note--info {
  background: #eff6ff;
  color: #1e40af;
}
.fo-pnl-explanation-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fo-pnl-explanation-day-list li {
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 8px;
  font-size: 13px;
}
.fo-pnl-explanation-day-list li:last-child {
  margin-bottom: 0;
}
.fo-pnl-explanation-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}
.fo-pnl-explanation-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
}
.fo-pnl-explanation-tag--realized {
  background: #fef3c7;
  color: #92400e;
}
.fo-pnl-explanation-tag--unrealized {
  background: #dbeafe;
  color: #1d4ed8;
}
.fo-pnl-explanation-tag--mixed {
  background: #f3e8ff;
  color: #6b21a8;
}
.fo-pnl-explanation-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #1e293b;
}
.fo-pnl-explanation-empty {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}
.fo-pnl-analysis-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fo-pnl-analysis-explanation-selected {
  background: #f0fdf4 !important;
  outline: 1px solid #86efac;
}
.fo-pnl-analysis-explanation-selected.fo-pnl-analysis-row-selected {
  outline: 2px solid #4ade80;
}

/* R5: explanation template tags */
.fo-pnl-explanation-templates {
  margin-bottom: 16px;
}
.fo-pnl-explanation-template-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fo-pnl-explanation-template-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  line-height: 1.45;
}
.fo-pnl-explanation-template-item:last-child {
  margin-bottom: 0;
}
.fo-pnl-explanation-template-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  white-space: nowrap;
}
.fo-pnl-explanation-template-text {
  color: #334155;
  flex: 1 1 200px;
}

/* P7 current-margin summary bold */
.ctrm-crm-summary-line strong {
  font-weight: 600;
}

/* DATA-INTEGRATION-CENTER-STATIC-R1 */
.ctrm-tabs--data-integrations {
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.data-integration-tabs-layer-hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
}
.data-integration-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.data-integration-kpi-card {
  padding: 14px 16px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}
.data-integration-kpi-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent, #2563eb);
}
.data-integration-kpi-label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}
.data-integration-kpi-hint {
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.35;
}
.data-integration-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.data-integration-source-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafbfc;
}
.data-integration-source-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.data-integration-source-card-header h3 {
  margin: 0;
  font-size: 15px;
}
.data-integration-source-dl {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.data-integration-source-dl dt {
  font-weight: 600;
  color: var(--ctrm-text-muted, #6b7280);
  margin-top: 8px;
}
.data-integration-source-dl dt:first-child {
  margin-top: 0;
}
.data-integration-source-dl dd {
  margin: 2px 0 0;
}
.data-integration-risk {
  color: #92400e;
}
.data-integration-registry-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.data-integration-registry-table {
  font-size: 11px;
  min-width: 1100px;
}
.data-integration-cell-entry,
.data-integration-cell-next {
  max-width: 180px;
  word-break: break-word;
}
.data-integration-mapping-principle {
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #2563eb);
  background: #eff6ff;
  border-radius: 0 6px 6px 0;
}
.data-integration-gap-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.data-integration-gap-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
}
.data-integration-gap-item:last-child {
  border-bottom: none;
}
.data-integration-gap-item p {
  margin: 6px 0 0;
  font-size: 13px;
}
.data-integration-boundary {
  margin-top: 24px;
}
.data-integration-boundary-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.data-integration-boundary-list li {
  margin-bottom: 6px;
}
.data-integration-registry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}
.data-integration-load-status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.data-integration-load-status--warn {
  background: #fffbeb;
}
.data-integration-health-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #f0fdf4;
  font-size: 13px;
}
.data-integration-health-bar strong {
  font-weight: 600;
}
.data-integration-jobs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #eff6ff;
  font-size: 13px;
}
#data-integration-error-banner:not([hidden]) {
  display: block;
  margin-top: 8px;
}
.data-integration-akshare-panel {
  margin-top: 12px;
}
.data-integration-akshare-status-grid {
  font-size: 13px;
}
.data-integration-akshare-dl {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 6px 12px;
  margin: 0 0 8px;
}
.data-integration-akshare-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
}
.data-integration-akshare-dl dd {
  margin: 0;
}
.data-integration-exchange-panel {
  margin-top: 12px;
}
.data-integration-exchange-status-grid {
  font-size: 13px;
}
.data-integration-exchange-dl {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  gap: 6px 12px;
  margin: 0 0 8px;
}
.data-integration-exchange-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
}
.data-integration-exchange-dl dd {
  margin: 0;
}
.data-integration-maf-panel {
  margin-top: 12px;
}
.data-integration-maf-status-grid {
  font-size: 13px;
}
.data-integration-maf-dl {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  gap: 6px 12px;
  margin: 0 0 8px;
}
.data-integration-maf-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
}
.data-integration-maf-dl dd {
  margin: 0;
}
.ctrm-ingest-di-notice {
  margin: 8px 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ctrm-muted, #475569);
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
}
.ctrm-ingest-di-notice a {
  font-weight: 600;
}
.data-integration-gap-meta {
  margin: 4px 0 0;
  font-size: 12px;
}
.data-integration-ingest-method-panel {
  margin: 16px 0;
}
.data-integration-ingest-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.data-integration-ingest-method-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.data-integration-ingest-method-card.is-planned {
  background: #f8fafc;
  border-style: dashed;
}
.data-integration-ingest-method-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.data-integration-ingest-method-card-header h3 {
  margin: 0;
  font-size: 15px;
}
.data-integration-ingest-method-type {
  font-size: 11px;
  color: var(--ctrm-muted, #64748b);
}
.data-integration-ingest-method-dl {
  margin: 0;
  font-size: 12px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 8px;
}
.data-integration-ingest-method-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
}
.data-integration-ingest-method-dl dd {
  margin: 0;
}
.data-integration-ingest-method-note {
  font-size: 11px;
  color: var(--ctrm-muted, #64748b);
}

/* DATA-INTEGRATION-UI-STRUCTURE-OVERVIEW-R1 */
.di-boundary-banner {
  margin: 12px 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ctrm-muted, #475569);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.di-boundary-banner strong {
  color: #92400e;
}
.data-integration-today-summary {
  margin-bottom: 16px;
}
.data-integration-health-bar--compact {
  margin: 8px 0 12px;
  padding: 8px 12px;
  font-size: 12px;
  gap: 6px;
}
.di-today-summary-body {
  font-size: 13px;
}
.di-today-summary-dl {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 8px 16px;
  margin: 0;
}
.di-today-summary-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
  margin: 0;
}
.di-today-summary-dl dd {
  margin: 0;
}
.data-integration-chain-quick-section {
  margin: 0 0 20px;
}
.data-integration-chain-quick-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.data-integration-chain-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.data-integration-chain-quick-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.data-integration-chain-quick-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.data-integration-chain-quick-card-header h3 {
  margin: 0;
  font-size: 14px;
}
.data-integration-chain-quick-meta {
  margin: 0 0 6px;
  font-size: 12px;
}
.data-integration-chain-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.data-integration-chain-quick-original {
  margin: 0;
  font-size: 11px;
  color: var(--ctrm-muted, #64748b);
}
.data-integration-health-chains {
  margin: 0 0 16px;
}
.data-integration-health-chains-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

/* UI-STRUCTURE-LINKS-PANEL-R1 */
.ctrm-hash-anchor {
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}
.data-integration-original-page-section {
  margin: 0 0 20px;
}
.data-integration-original-page-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.data-integration-original-page-body {
  margin-top: 10px;
}
.data-integration-original-page-category {
  margin-bottom: 16px;
}
.data-integration-original-page-category-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ctrm-muted, #475569);
}
.data-integration-original-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.data-integration-original-page-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafafa;
  font-size: 12px;
}
.data-integration-original-page-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.data-integration-original-page-card-header h4 {
  margin: 0;
  font-size: 14px;
}
.data-integration-original-page-href {
  font-size: 10px;
  color: var(--ctrm-muted, #64748b);
}
.data-integration-original-page-purpose {
  margin: 0 0 8px;
  line-height: 1.45;
}
.data-integration-original-page-dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 8px;
  margin: 0 0 8px;
}
.data-integration-original-page-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
  margin: 0;
}
.data-integration-original-page-dl dd {
  margin: 0;
}
.data-integration-original-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.di-original-page-tag {
  font-size: 10px;
}

/* OPERATOR-DASHBOARD-OVERVIEW-R1 */
.di-operator-today-tasks {
  margin-bottom: 16px;
  border-color: #fde68a;
  background: #fffbeb;
}
.di-operator-today-tasks-body {
  font-size: 12px;
}
.di-operator-tasks-meta {
  margin: 0 0 8px;
  font-size: 12px;
}
.di-operator-tasks-table-wrap {
  max-height: 320px;
  overflow: auto;
}
.di-operator-tasks-table th {
  font-size: 11px;
  white-space: nowrap;
}
.di-operator-task-owner,
.di-operator-task-confirm {
  font-size: 11px;
  max-width: 200px;
}

/* OPERATOR-DASHBOARD-TASKS-R1 */
.di-panel-tasks {
  border-color: #fde68a;
  background: #fffbeb;
}
.di-panel-tasks-body {
  font-size: 12px;
}
.di-operator-tasks-table-wrap--full {
  max-height: none;
  overflow: visible;
}
.di-panel-health-summary-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 4px 10px;
  margin: 0 0 12px;
  font-size: 12px;
}
.di-panel-health-summary-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
  margin: 0;
}
.di-panel-health-summary-dl dd {
  margin: 0;
}
.di-panel-health-chain-grid {
  margin-bottom: 10px;
}
.di-panel-health-anchors {
  margin-top: 8px;
}
.di-governance-intro {
  margin: 0 0 12px;
}
.di-governance-section {
  margin-bottom: 14px;
}
.di-panel-links .data-integration-original-page-grid {
  margin-bottom: 8px;
}

/* OPERATOR-DASHBOARD-COMPACT-R1 */
.di-compact-hero {
  margin-bottom: 8px;
}
.di-compact-hero-lead {
  margin: 0 0 8px;
  font-size: 13px;
}
.di-compact-registry-meta[hidden] {
  display: none !important;
}
.di-boundary-banner--compact {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 6px;
}
.di-compact-section-title {
  font-size: 14px;
  margin-bottom: 6px;
}
.di-operator-today-tasks--compact {
  margin-bottom: 10px;
  padding: 10px 12px;
}
.di-operator-today-tasks--compact .di-operator-tasks-table-wrap {
  max-height: 220px;
}
.di-chain-quick-section--compact {
  margin-bottom: 8px;
}
.data-integration-chain-quick-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .data-integration-chain-quick-grid--compact {
    grid-template-columns: 1fr;
  }
}
.data-integration-chain-quick-card--compact {
  padding: 8px 10px;
}
.data-integration-chain-quick-card--compact .data-integration-chain-quick-card-header h3 {
  font-size: 13px;
}
.di-chain-compact-head {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.di-chain-compact-count {
  font-size: 11px;
  color: var(--ctrm-muted, #64748b);
  margin-left: auto;
}
.di-chain-compact-action {
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ctrm-muted, #475569);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.di-chain-compact-links {
  margin: 0;
}
.di-chain-compact-links .btn-sm {
  padding: 2px 8px;
  font-size: 11px;
}
.di-original-page-quick-links {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
}
.di-original-page-quick-links a {
  margin: 0 2px;
}
.di-compact-empty {
  margin: 0;
  font-size: 12px;
}
.data-center-primary-path-hint {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}
.data-integration-today-summary--below-kpi {
  margin: 10px 0 12px;
  padding: 8px 12px;
  opacity: 0.92;
}
.data-integration-today-summary--below-kpi .ctrm-panel-title {
  font-size: 13px;
}
.data-integration-today-summary--below-kpi .di-today-summary-dl {
  grid-template-columns: 72px 1fr;
  gap: 2px 8px;
  font-size: 11px;
}
.di-health-chains--tab {
  margin-top: 12px;
}
.di-health-chains--tab .data-integration-health-chains-title {
  font-size: 14px;
  margin-bottom: 8px;
}

/* OPERATOR-TASK-CARD-R1 */
.operator-task-compact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.operator-task-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.operator-task-card--compact {
  padding: 8px 10px;
}
.operator-task-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.operator-task-card-title {
  font-size: 13px;
  font-weight: 600;
}
.operator-task-card-chain {
  font-size: 11px;
}
.operator-task-card-meta,
.operator-task-card-action {
  margin: 0 0 6px;
  font-size: 11px;
  line-height: 1.4;
}
.operator-task-card-action {
  color: var(--ctrm-muted, #475569);
}
.operator-task-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}
.operator-task-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.operator-task-card--detail {
  padding: 0;
}
.operator-task-card-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
}
.operator-task-card-summary::-webkit-details-marker {
  display: none;
}
.operator-task-detail {
  padding: 0 12px 10px;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
}
.operator-task-detail-dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 8px;
  margin: 8px 0;
  font-size: 11px;
}
.operator-task-detail-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
  margin: 0;
}
.operator-task-detail-dl dd {
  margin: 0;
}
.operator-task-section h4 {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ctrm-muted, #64748b);
}
.operator-task-checklist,
.operator-task-confirm {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 11px;
  line-height: 1.45;
}
.operator-task-checklist li,
.operator-task-confirm li {
  margin-bottom: 2px;
}
.operator-task-boundary {
  margin: 8px 0 0;
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--ctrm-muted, #64748b);
  background: #f8fafc;
  border-radius: 4px;
}
.di-operator-today-tasks--compact .operator-task-compact-list {
  max-height: 280px;
  overflow: auto;
}
@media (max-width: 640px) {
  .operator-task-links .btn-sm {
    font-size: 10px;
    padding: 2px 6px;
  }
  .operator-task-card-summary {
    font-size: 11px;
  }
}
.di-chain-quick-stats-dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2px 8px;
  margin: 0 0 8px;
  font-size: 11px;
}
.di-chain-quick-stats-dl dt {
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
  margin: 0;
}
.di-chain-quick-stats-dl dd {
  margin: 0;
}
.di-chain-quick-confirm {
  font-size: 10px;
  line-height: 1.35;
}
.data-integration-chain-quick-primary {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--ctrm-muted, #475569);
}
.data-integration-today-summary--secondary {
  opacity: 0.95;
  margin-bottom: 12px;
}
.data-integration-today-summary--secondary .ctrm-panel-title {
  font-size: 14px;
}
.data-integration-original-page-section--secondary .data-integration-original-page-title {
  font-size: 14px;
}
.data-integration-original-page-section--secondary {
  margin-bottom: 14px;
}

/* Manual Data Center — STATIC R1 */
.mdc-page .mdc-header {
  margin-bottom: 12px;
}
.mdc-lead {
  max-width: 52rem;
}
.mdc-boundary-banner {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.mdc-sections-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mdc-section-hint {
  margin: 0 0 10px;
  font-size: 12px;
}
.mdc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.mdc-entry-card {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.mdc-entry-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.mdc-entry-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.mdc-entry-card-dl {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}
.mdc-entry-card-dl > div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 4px 8px;
  margin-bottom: 4px;
}
.mdc-entry-card-dl dt {
  margin: 0;
  color: var(--ctrm-muted, #64748b);
  font-weight: 600;
}
.mdc-entry-card-dl dd {
  margin: 0;
  word-break: break-word;
}
.mdc-code {
  font-size: 10px;
}
.mdc-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.mdc-status--linked {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.mdc-status--todo {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}
.mdc-status--pending {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.mdc-entry-card-links {
  margin-top: auto;
  padding-top: 4px;
}
.mdc-card-link--disabled {
  font-size: 11px;
  color: var(--ctrm-muted, #64748b);
}
.mdc-boundary-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 12px;
  line-height: 1.55;
}
.mdc-boundary-list li + li {
  margin-top: 6px;
}
.mdc-responsibility-matrix-root {
  margin-top: 12px;
}
.mdc-responsibility-matrix {
  margin-bottom: 0;
}
.mdc-responsibility-table {
  font-size: 12px;
}
.mdc-responsibility-table th,
.mdc-responsibility-table td {
  vertical-align: top;
}
.mdc-todo-dashboard-root {
  margin-top: 12px;
}
.mdc-todo-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.mdc-todo-column {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}
.mdc-todo-column-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.mdc-todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mdc-todo-item {
  font-size: 11px;
  line-height: 1.45;
  padding: 6px 0;
  border-bottom: 1px solid var(--ctrm-border, #f1f5f9);
}
.mdc-todo-item:last-child {
  border-bottom: none;
}
.mdc-todo-item-meta {
  display: block;
  color: var(--ctrm-muted, #64748b);
  margin-top: 2px;
}
.mdc-update-status-root {
  margin-top: 12px;
}
.mdc-update-status-table {
  font-size: 12px;
}
.mdc-footer-boundary {
  margin-top: 14px;
}
@media (max-width: 640px) {
  .mdc-card-grid {
    grid-template-columns: 1fr;
  }
  .mdc-entry-card-dl > div {
    grid-template-columns: 1fr;
  }
}

/* Data Standardization Center — STATIC R1 */
.dsc-page .dsc-lead {
  max-width: 52rem;
}
.dsc-boundary-banner {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.dsc-sections-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dsc-section-hint {
  margin: 0 0 8px;
  font-size: 12px;
}
.dsc-table {
  font-size: 12px;
}

/* Manual Data Center — Style Align R1 (layout; typography from DI cockpit) */
.mdc-cockpit-hero {
  margin-bottom: 8px;
}
.mdc-kpi-root {
  margin-bottom: 12px;
}
.mdc-cockpit .mdc-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}
.mdc-workbench-root {
  margin-bottom: 12px;
}
.mdc-workbench-grid {
  margin-top: 4px;
}
.mdc-workbench-col-title {
  margin-bottom: 6px;
}
.mdc-entry-groups-root {
  margin-bottom: 12px;
}
.mdc-entry-groups-heading {
  margin: 0 0 10px;
}
.mdc-entry-group {
  padding: 14px 16px;
}
.mdc-group-more {
  margin-top: 8px;
}
.mdc-group-more-summary {
  cursor: pointer;
  list-style: none;
}
.mdc-group-more-summary::-webkit-details-marker {
  display: none;
}
.mdc-governance-root {
  margin-top: 8px;
}
.mdc-governance-summary {
  cursor: pointer;
  list-style: none;
}
.mdc-governance-summary::-webkit-details-marker {
  display: none;
}
@media (max-width: 900px) {
  .mdc-cockpit .mdc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .mdc-cockpit .mdc-kpi-grid {
    grid-template-columns: 1fr;
  }
}
.mdc-dynamic-status-root {
  margin-bottom: 8px;
}
.mdc-dynamic-status {
  margin: 0;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
}
.mdc-dynamic-status--ok {
  background: #f0fdf4;
  color: #166534;
}
.mdc-dynamic-status--warn {
  background: #fffbeb;
  color: #92400e;
}

/* Data Standardization Center — Dashboard UI R1 (layout; typography from DI cockpit) */
.dsc-cockpit-hero {
  margin-bottom: 8px;
}
.dsc-kpi-root {
  margin-bottom: 12px;
}
.dsc-cockpit .dsc-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}
.dsc-workbench-root {
  margin-bottom: 12px;
}
.dsc-workbench-grid {
  margin-top: 4px;
}
.dsc-workbench-col-title {
  margin-bottom: 6px;
}
.dsc-entry-groups-root {
  margin-bottom: 12px;
}
.dsc-entry-groups-heading {
  margin: 0 0 10px;
}
.dsc-entry-group {
  padding: 14px 16px;
}
.dsc-group-more {
  margin-top: 8px;
}
.dsc-group-more-summary {
  cursor: pointer;
  list-style: none;
}
.dsc-group-more-summary::-webkit-details-marker {
  display: none;
}
.dsc-governance-root {
  margin-top: 8px;
}
.dsc-governance-summary {
  cursor: pointer;
  list-style: none;
}
.dsc-governance-summary::-webkit-details-marker {
  display: none;
}
@media (max-width: 900px) {
  .dsc-cockpit .dsc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .dsc-cockpit .dsc-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Cockpit R13 — unified seven-section layout */
.admin-cockpit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-cockpit__section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ctrm-text, #1e293b);
}
.admin-cockpit__hero {
  margin-bottom: 4px;
}
.admin-cockpit__status-todo,
.admin-cockpit__quick-actions,
.admin-cockpit__function-groups,
.admin-cockpit__legacy-links,
.admin-cockpit__recent-records,
.admin-cockpit__boundary {
  margin-bottom: 0;
}
.admin-cockpit__status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.admin-cockpit__quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.data-card--status,
.data-card--todo,
.data-card--quick-action,
.data-card--function-group,
.data-card--legacy-link,
.data-card--recent-record,
.data-card--boundary-note {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: var(--ctrm-panel-bg, #fff);
  padding: 12px 14px;
}
.data-card--status h3,
.data-card--todo h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.data-card--quick-action a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}
.data-card--quick-action a:hover {
  background: var(--ctrm-surface-hover, #f1f5f9);
}
.data-card--legacy-link .operator-task-compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-cockpit__function-groups .mdc-entry-group,
.admin-cockpit__function-groups .dsc-entry-group {
  margin-bottom: 0;
}
.admin-cockpit__cockpit-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  margin-left: 8px;
  vertical-align: middle;
}
.dsc-status-todo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

/* R21A — Data center cockpit height compact */
.compact_status_card,
.data-card--compact-status {
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}
.summary_count_strip,
.data-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.severity_badge,
.data-badge--severity {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.data-badge--severity-warn {
  background: #fef3c7;
  color: #92400e;
}
.data-badge--severity-ok {
  background: #d1fae5;
  color: #065f46;
}
.data-badge--severity-muted {
  background: #f1f5f9;
  color: #64748b;
}
.data-badge--severity-critical {
  background: #fee2e2;
  color: #991b1b;
}
.data-badge--severity-warning {
  background: #fef3c7;
  color: #92400e;
}
.data-badge--severity-info {
  background: #e0f2fe;
  color: #0369a1;
}
.admin-cockpit__governance-cockpit {
  margin-bottom: 12px;
}
.admin-cockpit__aggregate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-cockpit__subsection-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.ctrm-badge--ok {
  background: #d1fae5;
  color: #065f46;
}
.ctrm-badge--warn {
  background: #fef3c7;
  color: #92400e;
}
.ctrm-badge--primary {
  background: #e0f2fe;
  color: #0369a1;
}
.ctrm-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}
.collapsible_todo_list,
.data-list--collapsible {
  margin: 0;
}
.dropdown_detail_list,
.data-list--dropdown {
  margin-top: 6px;
}
.dropdown_detail_list summary,
.collapsible_todo_list summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: #0369a1;
}
.view_more_link {
  margin: 4px 0 0;
  font-size: 0.8125rem;
}
.view_more_link a[data-action="view-more"] {
  color: #0369a1;
}
.admin-cockpit__kpi-collapse {
  margin-top: 8px;
}
.dsc-status-todo-compact-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.dsc-status-todo-compact-item {
  font-size: 0.8125rem;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}
.mdc-entry-facts-wrap {
  margin-top: 8px;
}

/* R21B — market_prices compat maintenance sub-page */
.market-compat-notice {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
}
.market-compat-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.market-compat-lead {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.market-compat-ownership {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.market-compat-ownership dt {
  font-weight: 600;
  margin-top: 6px;
}
.market-compat-ownership dd {
  margin: 2px 0 0;
  color: var(--muted, #64748b);
}
.market-module-ownership-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.market-module-ownership-badge--native {
  background: #dcfce7;
  color: #166534;
}
.market-module-ownership-badge--mdc {
  background: #e0f2fe;
  color: #0369a1;
}
.market-module-ownership-badge--di {
  background: #fef3c7;
  color: #92400e;
}
.market-module-ownership-badge--dsc {
  background: #ede9fe;
  color: #5b21b6;
}
.market-module-ownership-badge--hub {
  background: #f3e8ff;
  color: #7c3aed;
  text-decoration: none;
}
.legacy-compat-backlinks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #bae6fd;
}
.legacy-compat-backlinks-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.legacy-compat-backlinks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.8125rem;
}
.legacy-compat-backlink--primary {
  font-weight: 600;
  color: #0369a1;
}

/* R22 — legacy page physical split */
body.legacy-redirect-mode .legacy-maintain-only {
  display: none !important;
}
body.legacy-redirect-mode .market-compat-notice,
body.legacy-redirect-mode .legacy-compat-notice,
body.legacy-redirect-mode .legacy-deprecated-banner--full {
  display: none !important;
}
body.legacy-redirect-mode .ctrm-header {
  display: none !important;
}
body.legacy-redirect-mode .legacy-emergency-maintain-notice {
  display: none !important;
}
body.legacy-redirect-mode .legacy-redirect-only {
  display: block !important;
}
body.legacy-redirect-mode .ctrm-main {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 24px;
}
.legacy-compat-minimal-hero {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}
.legacy-compat-minimal-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e3a8a;
}
.legacy-compat-minimal-lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #334155;
}
/* R4 — legacy data page deprecated / compat entry banner */
.legacy-deprecated-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
}
.legacy-deprecated-banner__badge {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
}
.legacy-deprecated-banner__lead {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #78350f;
}
.legacy-deprecated-banner__actions {
  margin: 0;
}
.legacy-deprecated-banner__note {
  margin: 8px 0 0;
  font-size: 0.8125rem;
}
.legacy-deprecated-banner--redirect {
  margin-bottom: 12px;
}
body.legacy-maintain-mode .legacy-redirect-only {
  display: none !important;
}
body.legacy-embed-mode .legacy-compat-notice,
body.legacy-embed-mode .market-compat-notice,
body.legacy-embed-mode .legacy-deprecated-banner,
body.legacy-embed-mode .legacy-redirect-only,
body.legacy-embed-mode .ctrm-header,
body.legacy-embed-mode .legacy-emergency-maintain-notice {
  display: none !important;
}
body.legacy-embed-mode .legacy-maintain-only {
  display: block !important;
}
body.legacy-embed-mode .ctrm-main {
  padding: 0;
  max-width: none;
}
.legacy-form-embed-wrap {
  margin: 12px 0;
}
.legacy-form-embed-host {
  min-height: 520px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.legacy-form-embed-iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  height: 72vh;
  border: 0;
}
.cockpit-tab-embed-panel {
  margin-top: 8px;
}
.cockpit-tab-embed-title {
  font-size: 1rem;
  margin: 0 0 8px;
}
.legacy-form-embed-strip {
  margin-bottom: 8px;
}
.native-mount-panel {
  margin-top: 8px;
}
.native-mount-shell {
  margin-bottom: 12px;
}
.native-operation-panel {
  margin-top: 8px;
}
.native-operation-body {
  margin-bottom: 12px;
}
.native-op-table-wrap {
  margin: 8px 0 12px;
  max-height: 280px;
  overflow: auto;
}
.native-op-table {
  font-size: 0.875rem;
}
.native-op-form {
  margin-top: 8px;
  gap: 8px;
}
.native-op-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
}
/* DSC MAF Alias / Mapping native (R11A) */
.dsc-maf-alias-native-table-wrap {
  max-height: 520px;
}
.dsc-maf-alias-native-search-wrap {
  margin: 8px 0 10px;
}
.dsc-maf-alias-native-search-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 420px;
  font-size: 0.8125rem;
}
.dsc-maf-alias-native-field-wide {
  grid-column: 1 / -1;
}
.dsc-maf-alias-native-form-panel {
  margin: 10px 0;
}
.dsc-maf-alias-native-error-wrap:not([hidden]) {
  margin-bottom: 8px;
}
.native-shell-dl {
  margin: 8px 0;
}
.legacy-embed-fallback {
  margin-top: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fafc;
}
.legacy-embed-fallback-summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}
.legacy-embed-fallback:not([open]) .legacy-form-embed-host {
  display: none;
}
.legacy-embed-fallback-body {
  margin-top: 8px;
}
.legacy-embed-switch-nav {
  margin-bottom: 10px;
}
.legacy-embed-switch-panel[hidden] {
  display: none;
}
.di-access-monitor-section,
.di-access-inner-links,
.di-access-update-status-section,
.mdc-reconcile-summary,
.mdc-reconcile-embed-section {
  margin-bottom: 16px;
}
.legacy-emergency-maintain-notice {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  border-radius: 8px;
}
.legacy-split-ops {
  margin: 16px 0;
}
.legacy-split-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.legacy-split-op-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
}
.legacy-split-op-card h3 {
  font-size: 0.875rem;
  margin: 0 0 6px;
}
.legacy-split-op-card p {
  margin: 0 0 8px;
  color: #64748b;
  line-height: 1.45;
}
.legacy-split-op-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.legacy-redirect-panel {
  margin: 12px 0 16px;
}
.legacy-redirect-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.legacy-redirect-card {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.legacy-redirect-card h3 {
  margin: 0 0 6px;
  font-size: 0.9375rem;
}
.legacy-redirect-card p {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: #64748b;
}

/* R23 — split module cockpit UI unification */
.split-module-section-root {
  margin-top: 8px;
}
.split-module-cockpit-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.split-module-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.split-module-summary {
  margin: 0 0 4px;
}
.split-module-quick-grid {
  margin: 8px 0 4px;
}
.split-module-details {
  margin-top: 8px;
  font-size: 0.8125rem;
}
.split-module-details-body {
  padding: 6px 0 0;
}
.split-module-legacy-wrap {
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.split-module-legacy-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.split-module-boundary {
  font-size: 0.8125rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
}
.split-module-boundary-body {
  padding: 8px 0 0;
}
.split-module-cross-links {
  margin: 4px 0;
}
.compact_status_card.split-module-compact-status {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

/* R24 — cockpit-level Tab embed */
.admin-cockpit__cockpit-tabs {
  margin: 12px 0 16px;
}
.ctrm-tabs--dsc-cockpit,
.ctrm-tabs--mdc-cockpit,
.ctrm-tabs--di-cockpit {
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.cockpit-tabs-hint {
  margin: 0 0 10px;
  font-size: 0.8125rem;
}
.cockpit-tab-panel {
  padding-top: 4px;
}
.cockpit-tab-panel[hidden] {
  display: none !important;
}

/* Capital Management Center R76 */
.cmc-cockpit .cmc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.cmc-dual-metric {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.cmc-metric-row {
  padding: 4px 0;
}
.cmc-distribution-table {
  width: 100%;
  margin-top: 8px;
}
.cmc-distribution-more {
  margin-top: 8px;
}
.cmc-todo-collapse summary {
  cursor: pointer;
}

/* MDC master native maintenance R7 */
.mdc-master-native-panel .mdc-master-native-mount {
  margin-bottom: 12px;
}
.mdc-master-native-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 12px;
}
.mdc-master-fieldset {
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.mdc-master-fieldset legend {
  font-weight: 600;
  font-size: 13px;
  padding: 0 4px;
}
.mdc-master-batch-textarea {
  width: 100%;
  min-height: 120px;
  font-family: inherit;
}
.mdc-master-maf-readonly {
  margin-top: 12px;
}
.native-op-table tr.is-selected td {
  background: #eff6ff;
}

/* DI Runtime Diagnostic R16 — only visible when ?di_debug=1 */
#di-runtime-diag-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10050;
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.35;
  color: #0f172a;
  background: rgba(255, 251, 235, 0.97);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.di-runtime-diag-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.di-runtime-diag-ts {
  font-size: 11px;
  color: #64748b;
}
.di-runtime-diag-list {
  margin: 0;
}
.di-runtime-diag-list dt {
  font-weight: 600;
  margin: 6px 0 2px;
}
.di-runtime-diag-list dd {
  margin: 0;
}
.di-runtime-diag-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 6px;
}

/* Data Admin Dashboard R4 */
.dad-cockpit .dad-health-summary {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}
.dad-lifecycle-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem 0.25rem;
  margin: 0.75rem 0;
}
.dad-lifecycle-node {
  flex: 1 1 8.5rem;
  min-width: 7.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dad-lifecycle-node-label {
  font-weight: 600;
  font-size: 0.82rem;
}
.dad-lifecycle-node-note {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  line-height: 1.35;
}
.dad-lifecycle-arrow {
  align-self: center;
  color: var(--muted, #64748b);
  font-size: 0.85rem;
  padding: 0 0.15rem;
}
.dad-assets-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.dad-asset-card {
  padding: 0.85rem 1rem;
}
.dad-asset-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.dad-asset-list {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}
.dad-asset-links {
  margin: 0;
  font-size: 0.78rem;
}
.dad-quality-table,
.dad-downstream-table {
  font-size: 0.85rem;
}
@media (max-width: 900px) {
  .dad-lifecycle-flow {
    flex-direction: column;
  }
  .dad-lifecycle-arrow {
    transform: rotate(90deg);
    align-self: flex-start;
    margin-left: 1rem;
  }
}

/* Data Admin Dashboard R5 — Quality Task Cards */
.dad-task-cards-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.dad-task-category {
  margin-bottom: 1rem;
}
.dad-task-category-title {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted, #64748b);
}
.dad-task-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
}
.dad-task-card {
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dad-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.dad-task-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}
.dad-task-severity {
  flex-shrink: 0;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dad-task-severity--ok { background: #ecfdf5; color: #059669; }
.dad-task-severity--warning { background: #fffbeb; color: #d97706; }
.dad-task-severity--critical { background: #fef2f2; color: #dc2626; }
.dad-task-severity--pending { background: #f1f5f9; color: #64748b; }
.dad-task-severity--reserved { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-task-severity--info { background: #eff6ff; color: #2563eb; }
.dad-task-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.dad-task-badge-partial,
.dad-task-badge-reserved {
  font-size: 0.58rem;
  text-transform: lowercase;
}
.dad-task-card-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}
.dad-task-card-source {
  margin: 0;
  font-size: 0.72rem;
}
.dad-task-card-action {
  align-self: flex-start;
  margin-top: 0.15rem;
}
.dad-task-card-ownership {
  padding: 0.45rem 0.5rem;
  background: rgba(241, 245, 249, 0.6);
  border-radius: 4px;
  font-size: 0.75rem;
}
.dad-task-card-ownership-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.dad-task-owner {
  font-size: 0.62rem;
  font-weight: 600;
}
.owner-data-admin { background: #eff6ff; color: #2563eb; }
.owner-business { background: #ecfdf5; color: #059669; }
.owner-finance { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.owner-system { background: #f5f3ff; color: #7c3aed; }
.owner-reserved { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-task-owner-dashboard {
  font-size: 0.68rem;
}
.dad-task-owner-hint {
  margin: 0.25rem 0 0.15rem;
  font-size: 0.68rem;
  line-height: 1.35;
}
.dad-task-matrix-link {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--link, #2563eb);
  text-decoration: none;
}
.dad-task-matrix-link:hover {
  text-decoration: underline;
}

/* Data Admin Dashboard R7A — Entry Ownership Matrix */
.dad-ownership-principles {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.dad-ownership-table-wrap {
  overflow-x: auto;
}
.dad-ownership-table {
  font-size: 0.78rem;
}
.dad-ownership-table th,
.dad-ownership-table td {
  vertical-align: top;
  min-width: 5rem;
}
.dad-ownership-table td:nth-child(2) {
  min-width: 8rem;
}
.dad-ownership-code {
  font-size: 0.72rem;
  word-break: break-all;
}
.dad-ownership-src {
  font-size: 0.65rem;
  white-space: nowrap;
  background: #eff6ff;
  color: #2563eb;
}
.dad-ownership-status {
  font-size: 0.62rem;
  text-transform: lowercase;
}
.dad-ownership-status--active { background: #ecfdf5; color: #059669; }
.dad-ownership-status--partial { background: #f1f5f9; color: #64748b; }
.dad-ownership-status--reserved { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-ownership-status--transition { background: #fffbeb; color: #d97706; }
.dad-ownership-status--ok { background: #ecfdf5; color: #059669; }
.dad-ownership-status--warning { background: #fffbeb; color: #d97706; }
.dad-ownership-badge-partial,
.dad-ownership-badge-reserved,
.dad-ownership-badge-no-entry {
  font-size: 0.58rem;
  margin-left: 0.15rem;
}
.dad-ownership-note {
  max-width: 14rem;
  font-size: 0.72rem;
}

/* Data Admin Dashboard R8 — Standard Facts Status Matrix */
.dad-facts-principles {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.dad-facts-overall-partial,
.dad-facts-overall-reserved {
  font-size: 0.65rem;
}
.dad-fact-type {
  font-size: 0.62rem;
  white-space: nowrap;
}
.dad-fact-type--business { background: #ecfdf5; color: #059669; }
.dad-fact-type--market { background: #eff6ff; color: #2563eb; }
.dad-fact-type--reference { background: #f5f3ff; color: #7c3aed; }
.dad-fact-type--quality { background: #f1f5f9; color: #475569; }
.dad-fact-type--finance { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-fact-type--reconcile { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-facts-matrix-table td:nth-child(1) {
  min-width: 9rem;
}
.dad-task-facts-matrix-link {
  margin-left: 0.5rem;
}
.dad-facts-downstream-link {
  margin-left: 0.35rem;
  font-size: 0.85em;
  white-space: nowrap;
}
.dad-facts-coverage-table td:nth-child(1) {
  min-width: 9rem;
}
.dad-coverage-usage {
  font-size: 0.75rem;
  font-weight: 500;
}
.dad-coverage-usage--quality { background: #f1f5f9; color: #475569; }
.dad-coverage-usage--strategy { background: #f5f3ff; color: #7c3aed; }
.dad-coverage-usage--dashboard { background: #eff6ff; color: #2563eb; }
.dad-coverage-usage--ledger { background: #ecfdf5; color: #059669; }
.dad-coverage-usage--risk { background: #fff7ed; color: #ea580c; }
.dad-coverage-usage--mgmt { background: #fef3c7; color: #b45309; }
.dad-coverage-usage--finance { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-coverage-usage--reconcile { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-coverage-finance {
  font-size: 0.75rem;
  font-weight: 500;
}
.dad-coverage-finance--not-finance { background: #f1f5f9; color: #64748b; }
.dad-coverage-finance--business-only { background: #ecfdf5; color: #059669; }
.dad-coverage-finance--finance-reserved { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-coverage-finance--reconcile-reserved { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dad-coverage-finance--partial { background: #f1f5f9; color: #64748b; }
.dad-deeplink-hints a {
  margin-right: 0.35rem;
}
.dad-task-reserved-only {
  display: inline-block;
  font-size: 0.9em;
  margin-top: 0.25rem;
}

/* Business Group Dashboard minimal shell R5 */
.bgd-cockpit .bgd-hero-actions {
  margin-top: 12px;
}
.bgd-cockpit .bgd-drill-note {
  border-left: 3px solid #0ea5e9;
  padding-left: 10px;
}
.bgd-kpi-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 4px 0 6px;
  color: var(--ctrm-text, #1e293b);
}
.bgd-inbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.bgd-inbox-panel--critical h3 { color: #b91c1c; }
.bgd-inbox-panel--warning h3 { color: #b45309; }
.bgd-inbox-panel--info h3 { color: #0369a1; }
.bgd-inbox-list {
  margin: 0;
  padding-left: 1.1rem;
}
.bgd-inbox-placeholder {
  color: var(--ctrm-muted, #64748b);
  font-style: italic;
}
.bgd-inbox-item {
  list-style: none;
  margin-left: -1.1rem;
  padding: 10px 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--ctrm-surface, #fff);
}
.bgd-inbox-stage {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ctrm-muted, #64748b);
  letter-spacing: 0.02em;
}
.bgd-inbox-item-title {
  font-weight: 500;
}
.bgd-inbox-item-meta {
  font-size: 0.82rem;
  color: var(--ctrm-muted, #64748b);
  margin-top: 4px;
}
.bgd-inbox-item-cta {
  margin-top: 8px;
}
.bgd-inbox-action-btn {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: var(--ctrm-surface-muted, #f1f5f9);
  cursor: pointer;
}
.bgd-inbox-action-btn:hover {
  background: var(--ctrm-surface-hover, #e2e8f0);
}
.bgd-inbox-action-btn--blocked {
  cursor: default;
  opacity: 0.85;
  border-style: dashed;
}
.bgd-inbox-owner-hint {
  font-style: italic;
}
.bgd-inbox-item-drill {
  margin-top: 6px;
  font-size: 0.8rem;
}
.bgd-governance-note {
  margin-top: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.bgd-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bgd-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  background: #f0f9ff;
  color: #0369a1;
  text-decoration: none;
  font-size: 0.875rem;
}
.bgd-chip:hover {
  background: #e0f2fe;
}
.bgd-topn-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.bgd-cockpit .bgd-category {
  margin-top: 1rem;
}
.bgd-cockpit .bgd-category-note {
  margin-bottom: 0.75rem;
}
.bgd-cockpit .bgd-category-summary {
  margin-top: 0.75rem;
}
.bgd-cockpit .bgd-section-body {
  font-size: 0.95rem;
  line-height: 1.5;
}
.bgd-cockpit .bgd-field-reason {
  min-height: 1.25rem;
}
.bgd-cockpit .bgd-reserved-list {
  line-height: 1.6;
}
.bgd-chip-count {
  font-size: 0.85em;
  opacity: 0.85;
}
.bgd-cockpit .bgd-inbox-zone-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}
.bgd-cockpit .bgd-chip--pending {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 9rem;
}
.bgd-cockpit .bgd-chip--count {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 9rem;
  border-color: var(--ctrm-accent, #3b82f6);
}
.bgd-cockpit .bgd-chip-scope-note {
  font-size: 0.72rem;
  opacity: 0.85;
  line-height: 1.3;
}
.bgd-cockpit .bgd-chip-meta {
  font-size: 0.78rem;
  opacity: 0.85;
}
.bgd-cockpit .bgd-pnl-reserved-note {
  margin-top: 0.5rem;
}
.bgd-cockpit .bgd-pnl-reserved-inline {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.bgd-cockpit .bgd-entry-hub {
  margin-top: 0.5rem;
}
.bgd-cockpit .bgd-entry-hub-lead {
  margin-bottom: 0.35rem;
}
.bgd-cockpit .bgd-entry-hub-grid {
  margin-top: 0.75rem;
}
.bgd-cockpit .bgd-entry-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-decoration: none;
  min-height: 6.5rem;
}
.bgd-cockpit .bgd-entry-card-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.bgd-cockpit .bgd-entry-hub-detail-links {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

/* R28B — Daily Business Workbench entry cards (deep links only) */
.bgd-cockpit .bgd-daily-workbench-r28b {
  margin-top: 0.5rem;
}
.bgd-cockpit .bgd-workbench-lead {
  margin-bottom: 0.35rem;
}
.bgd-cockpit .bgd-workbench-group {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
}
.bgd-cockpit .bgd-workbench-group:first-of-type {
  border-top: none;
  padding-top: 0;
}
.bgd-cockpit .bgd-workbench-group-title {
  margin-bottom: 0.25rem;
}
.bgd-cockpit .bgd-workbench-group-note {
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}
.bgd-workbench-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.35rem 0 0.65rem;
}
.bgd-workbench-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.45;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  background: #f8fafc;
  color: var(--ctrm-text-secondary, #475569);
}
.bgd-workbench-chip--native {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}
.bgd-workbench-chip--owner {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.bgd-workbench-chip--count {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
}
.bgd-cockpit .bgd-workbench-grid {
  margin-top: 0.5rem;
}
.bgd-cockpit .bgd-workbench-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
  font-size: 0.88rem;
}

/* BGD Flow UI Restructure R2 — Daily Operating Flow · Work Queue · Drilldown */
.bgd-cockpit .bgd-daily-operating-flow {
  border-left: 4px solid var(--accent, #2563eb);
}
.bgd-cockpit .bgd-flow-steps {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
@media (min-width: 900px) {
  .bgd-cockpit .bgd-flow-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.bgd-cockpit .bgd-flow-step {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
}
.bgd-cockpit .bgd-flow-step-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #2563eb);
  text-transform: uppercase;
}
.bgd-cockpit .bgd-flow-step-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.bgd-cockpit .bgd-flow-step-badge {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}
.bgd-cockpit .bgd-flow-step-count {
  font-size: 0.88rem;
  font-weight: 600;
}
.bgd-cockpit .bgd-today-status-strip--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
  font-size: 0.88rem;
}
.bgd-cockpit .bgd-work-queue-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  margin: 0.75rem 0;
}
.bgd-cockpit .bgd-queue-card {
  padding: 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.bgd-cockpit .bgd-queue-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
}
.bgd-cockpit .bgd-queue-card-count {
  font-size: 1.1rem;
  font-weight: 600;
}
.bgd-cockpit .bgd-kpi-groups > .admin-cockpit__section-title {
  margin-bottom: 0.35rem;
}
.bgd-cockpit .bgd-kpi-group-section {
  margin-top: 1rem;
}
.bgd-cockpit .bgd-kpi-linked {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}
.bgd-cockpit .bgd-drilldown-grid {
  margin-top: 0.65rem;
}
.bgd-cockpit .bgd-governance-boundary-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
}
.bgd-cockpit .bgd-secondary-adapters {
  margin-top: 1rem;
}
.bgd-cockpit .bgd-secondary-summary {
  cursor: pointer;
  list-style: none;
}
.bgd-cockpit .bgd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* BGD Flow UAT Polish R3 — BGD_FLOW_UAT_POLISH_R3 */
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-zone-primary {
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.08);
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-daily-operating-flow {
  border-left-width: 5px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, transparent 55%);
  padding-top: 0.25rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-flow-step {
  min-width: 0;
  position: relative;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-flow-step-cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
  white-space: normal;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-flow-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--accent, #2563eb);
  color: #fff;
  font-size: 0.8rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  width: fit-content;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge--todo {
  color: #1d4ed8;
  background: #eff6ff;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge--confirm {
  color: #b45309;
  background: #fffbeb;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge--review {
  color: #0f766e;
  background: #ecfdf5;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge--readonly,
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-role-badge--secondary {
  color: #64748b;
  background: #f1f5f9;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-work-queue {
  border-top: 2px solid var(--border, #e2e8f0);
  padding-top: 0.5rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-queue-card--secondary {
  opacity: 0.92;
  border-style: dashed;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-inbox-details {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
  padding-top: 0.5rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-inbox-details-summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  padding: 0.35rem 0;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-kpi-groups--supporting {
  opacity: 0.98;
  background: #fafafa;
  border-style: dashed;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-kpi-groups--supporting .bgd-kpi-group-section {
  padding: 0.65rem 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-kpi-groups--supporting .bgd-kpi-card {
  padding: 0.5rem 0.65rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-kpi-groups--supporting .bgd-kpi-value {
  font-size: 1rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-zone-muted {
  font-size: 0.85rem;
  opacity: 0.9;
  padding: 0.65rem 0.85rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-governance-boundary-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-secondary-adapters {
  opacity: 0.95;
  border-style: dashed;
  background: #f8fafc;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-secondary-boundary {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
}
.bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-drilldown-label {
  font-weight: 600;
}
@media (max-width: 899px) {
  .bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-flow-steps {
    grid-template-columns: 1fr;
  }
  .bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-work-queue-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  }
  .bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-hero-actions .btn {
    flex: 1 1 auto;
    min-width: 8rem;
  }
}
@media (max-width: 480px) {
  .bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-work-queue-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bgd-cockpit.bgd-flow-uat-polish-r3 .bgd-today-status-strip--inline {
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* BGD-WORK-QUEUE-FIXTURE-UAT-R6 — fixture preview badges · not live data */
.bgd-cockpit .bgd-work-queue-fixture-uat-r6.bgd-work-queue-fixture-banner {
  margin: 0.65rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--warning-border, #f59e0b);
  border-radius: 8px;
  background: var(--warning-bg, #fffbeb);
}
.bgd-cockpit .bgd-work-queue-fixture-banner__title {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.bgd-cockpit .bgd-work-queue-fixture-banner__hint,
.bgd-cockpit .bgd-work-queue-fixture-banner__source,
.bgd-cockpit .bgd-work-queue-fixture-banner__version {
  margin: 0.15rem 0;
  font-size: 0.82rem;
}
.bgd-cockpit .bgd-work-queue--fixture-active .bgd-queue-card--fixture-preview {
  border-color: var(--warning-border, #f59e0b);
  background: rgba(255, 251, 235, 0.35);
}
.bgd-cockpit .bgd-queue-fixture-meta {
  margin-top: 0.25rem;
  font-size: 0.78rem;
}
.bgd-cockpit .bgd-queue-fixture-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.bgd-cockpit .bgd-fixture-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
}
.bgd-cockpit .bgd-fixture-badge--critical {
  background: #fee2e2;
  color: #991b1b;
}
.bgd-cockpit .bgd-fixture-badge--warning {
  background: #fef3c7;
  color: #92400e;
}
.bgd-cockpit .bgd-fixture-badge--info {
  background: #e0f2fe;
  color: #075985;
}
.bgd-cockpit .bgd-fixture-badge--none,
.bgd-cockpit .bgd-fixture-badge--status {
  background: #f1f5f9;
  color: #475569;
}
.bgd-cockpit .bgd-fixture-source-status {
  font-style: italic;
}
.bgd-cockpit .bgd-queue-fixture-preview-list,
.bgd-cockpit .bgd-queue-fixture-routing-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  list-style: disc;
}
.bgd-cockpit .bgd-queue-fixture-preview-item,
.bgd-cockpit .bgd-queue-fixture-routing-item {
  margin: 0.15rem 0;
  word-break: break-word;
}
.bgd-cockpit .bgd-queue-fixture-preview-label {
  font-weight: 500;
}
.bgd-cockpit .bgd-queue-fixture-action {
  margin: 0.2rem 0;
  font-size: 0.75rem;
}
@media (max-width: 480px) {
  .bgd-cockpit .bgd-queue-fixture-badges {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* BGD-WORK-QUEUE-LIVE-ADAPTER-OPTIN-UAT-R11 — live candidate preview · explicit opt-in only */
.bgd-cockpit .bgd-work-queue-live-adapter-optin-uat-r11.bgd-work-queue-live-banner {
  margin: 0.65rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--ctrm-accent-teal, #0d9488);
  background: rgba(13, 148, 136, 0.06);
  border-radius: 4px;
}
.bgd-cockpit .bgd-work-queue-live-banner__title {
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0 0 0.25rem;
}
.bgd-cockpit .bgd-work-queue-live-banner__hint,
.bgd-cockpit .bgd-work-queue-live-banner__source,
.bgd-cockpit .bgd-work-queue-live-banner__version,
.bgd-cockpit .bgd-work-queue-live-banner__conflict {
  font-size: 0.78rem;
  margin: 0.15rem 0;
  word-break: break-word;
}
.bgd-cockpit .bgd-work-queue--live-active .bgd-queue-card--live-preview {
  outline: 1px dashed rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}
.bgd-cockpit .bgd-queue-dto-meta,
.bgd-cockpit .bgd-queue-dto-badges,
.bgd-cockpit .bgd-queue-dto-preview-list,
.bgd-cockpit .bgd-queue-dto-routing-list,
.bgd-cockpit .bgd-queue-dto-metrics-list,
.bgd-cockpit .bgd-queue-dto-extra-list {
  margin-top: 0.35rem;
}
.bgd-cockpit .bgd-queue-dto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.bgd-cockpit .bgd-queue-dto-metrics-item,
.bgd-cockpit .bgd-queue-dto-extra-item {
  font-size: 0.74rem;
  margin: 0.1rem 0;
  word-break: break-word;
}
@media (max-width: 480px) {
  .bgd-cockpit .bgd-queue-dto-badges {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* BGD Quick Entry Drawer R1 — Entry Adapter only · no SSOT compute */
.bgd-quick-entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 0.75rem;
}
.bgd-quick-entry-hint {
  font-size: 0.82rem;
}
.bgd-quick-drawer {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.bgd-quick-drawer:not([hidden]) {
  pointer-events: auto;
}
.bgd-quick-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.bgd-quick-drawer-panel {
  position: relative;
  width: min(420px, 100vw);
  max-height: 100vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.bgd-quick-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.bgd-quick-drawer-header h2 {
  margin: 0;
  font-size: 1.05rem;
}
.bgd-quick-drawer-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.bgd-quick-drawer-status[data-state="blocked"] { color: #b45309; }
.bgd-quick-drawer-status[data-state="failed"] { color: #dc2626; }
.bgd-quick-drawer-status[data-state="success"] { color: #059669; }
.bgd-quick-drawer-status[data-state="submitting"] { color: #2563eb; }
.bgd-quick-drawer-form .bgd-quick-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}
.bgd-quick-drawer-form input,
.bgd-quick-drawer-form select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 4px;
}
.bgd-quick-readonly {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
}
.bgd-quick-drawer-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.bgd-quick-drawer-owner {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}
.bgd-quick-drawer-owner a {
  margin-right: 0.65rem;
}
.bgd-quick-drawer-success {
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.65rem;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 4px;
}

/* L1 business entry redirect R3CD — MDC dual links */
.mdc-cockpit .mdc-r3cd-l1-redirect {
  margin-top: 0.75rem;
}
.mdc-cockpit .data-card--l1-redirect {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.mdc-cockpit .data-card--l1-redirect .mdc-legacy-fallback-link {
  font-size: 0.85rem;
}
.mdc-cockpit .mdc-l1-dual-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.mdc-cockpit .mdc-l1-redirect-hint {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.market-l1-deprecate-notice {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--surface-2, #f8fafc);
}

/* Manual Source Governance Page Cleanup R4 */
.mdc-governance-r4 .mdc-section-positioning {
  margin-bottom: 0.75rem;
}
.mdc-governance-r4 .mdc-positioning-boundary-list {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}
.mdc-governance-r4 .mdc-positioning-actions {
  margin-top: 0.5rem;
}
.mdc-governance-r4 .mdc-section-governance-kpi,
.mdc-governance-r4 .mdc-section-source-catalog,
.mdc-governance-r4 .mdc-section-governance-inbox {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--surface, #fff);
}
.mdc-governance-r4 .mdc-governance-kpi-grid {
  margin-top: 0.5rem;
}
.mdc-governance-r4 .mdc-governance-kpi-mini {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.mdc-governance-r4 .mdc-source-catalog-table-wrap {
  overflow-x: auto;
}
.mdc-governance-r4 .mdc-source-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.mdc-governance-r4 .mdc-source-catalog-table th,
.mdc-governance-r4 .mdc-source-catalog-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  text-align: left;
  vertical-align: top;
}
.mdc-governance-r4 .mdc-source-catalog-table th {
  font-weight: 600;
  background: var(--surface-2, #f8fafc);
}
.mdc-governance-r4 .mdc-catalog-actions {
  white-space: nowrap;
}
.mdc-governance-r4 .mdc-catalog-actions .btn {
  margin-right: 0.25rem;
}
.mdc-governance-r4 .mdc-catalog-modules {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.mdc-governance-r4 .mdc-legacy-fallback-details {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: var(--radius, 8px);
  background: var(--surface-2, #f8fafc);
}
.mdc-governance-r4 .mdc-legacy-fallback-summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.mdc-governance-r4 .mdc-legacy-fallback-body {
  margin-top: 0.75rem;
}
.mdc-governance-r4 .data-card--fallback {
  opacity: 0.92;
  font-size: 0.9rem;
}
.mdc-governance-r4 .mdc-inbox-gap {
  margin-top: 0.75rem;
}

/* Strategy Ledger pure ledger transition R6 */
.fo-ledger-drill-context {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #0ea5e9;
  background: #f0f9ff;
}
.fo-ledger-drill-context-title {
  margin: 0 0 6px;
}
.fo-ledger-drill-context code {
  font-size: 0.9em;
}
.fo-ledger-legacy-dashboard-summary {
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px dashed var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.fo-ledger-legacy-dashboard-summary > summary {
  cursor: pointer;
  font-weight: 600;
}

/* Management Overview minimal shell R7 */
.mov-cockpit .mov-hero-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mov-cockpit .mov-chain-note {
  font-weight: 600;
  color: #5b21b6;
}
.mov-cockpit .mov-drill-note {
  border-left: 3px solid #7c3aed;
  padding-left: 10px;
}
.mov-kpi-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 4px 0 6px;
}
.mov-aggregated-summaries-r4 .mov-group-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.mov-group-summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}
.mov-group-summary-card-head {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}
.mov-group-summary-group-label {
  font-size: 1rem;
  color: #5b21b6;
}
.mov-group-summary-card-body {
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.mov-group-summary-card-body div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.mov-group-summary-card-body dt {
  color: #6b7280;
  font-weight: 400;
}
.mov-group-summary-card-body dd {
  margin: 0;
  font-weight: 600;
}
.mov-group-summary-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mov-r5-flow-note {
  border-left: 3px solid #059669;
  padding-left: 10px;
}
.bgd-standard-flow-r5 {
  border-left: 3px solid #059669;
  padding: 8px 12px;
  margin: 8px 0 12px;
  background: #ecfdf5;
}
.fo-ledger-standard-flow-r5 {
  border-left: 3px solid #059669;
  padding: 6px 10px;
  margin-bottom: 10px;
}
.mov-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.mov-topn-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.mov-cockpit .mov-category {
  border-left: 3px solid #e5e7eb;
  padding-left: 12px;
}
.mov-cockpit .mov-category-note {
  margin-bottom: 8px;
}
.mov-cockpit .mov-category-summary {
  margin-top: 12px;
}
.mov-section-body {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}
.mov-field-reason {
  min-height: 1.2em;
  font-size: 0.85rem;
}
.mov-reserved-list {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  color: #6b7280;
}
.mov-reserved-list li {
  margin: 4px 0;
}

/* Data Admin Dashboard R3 — Parameter governance readonly drilldown */
.dad-parameter-governance-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.dad-parameter-governance-note {
  margin-bottom: 0.5rem;
}
.dad-parameter-governance-root {
  margin-top: 0.5rem;
}
.dad-governance-table {
  width: 100%;
  font-size: 0.88rem;
}
.dad-governance-candidate-row--highlight {
  background: rgba(37, 99, 235, 0.08);
  outline: 1px solid rgba(37, 99, 235, 0.25);
}
.dad-governance-severity {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}
.dad-governance-empty {
  padding: 0.75rem 0;
  color: var(--muted, #64748b);
}
.dad-parameter-governance-block--focused {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  padding: 0.75rem;
}

/* DATA-ADMIN-GOVERNANCE-R4 — strategy_library margin_parameter readonly focus landing */
.strategy-library-governance-margin-focus-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.strategy-library-governance-margin-focus-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.strategy-library-governance-margin-focus-empty {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}
.strategy-library-governance-margin-focus-highlight {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.25);
  border-radius: 6px;
  padding: 0.5rem;
}
.strategy-library-governance-margin-field-highlight {
  background: rgba(37, 99, 235, 0.08);
  border-radius: 4px;
  padding: 0.25rem 0.35rem;
}
.strategy-library-governance-margin-focus-row {
  scroll-margin-top: 4rem;
}

/* STRATEGY-LIBRARY-MARGIN-PARAMETER-MAINTENANCE-UI-R1 */
.library-margin-parameter-maintenance-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.04);
}
.library-margin-parameter-maintenance-form label {
  display: block;
  margin: 0.5rem 0;
}
.library-margin-parameter-maintenance-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.library-margin-parameter-change-history {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

/* DATA-ADMIN-TASK-MODEL-DAD-PANEL-R1 — Future Data Admin Tasks panel */
.dad-data-admin-tasks-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.dad-data-admin-tasks-note {
  margin-bottom: 0.5rem;
}
.dad-data-admin-tasks-root {
  margin-top: 0.5rem;
}
.dad-data-admin-tasks-empty {
  padding: 0.75rem 0;
  color: var(--muted, #64748b);
}
.dad-data-admin-tasks-table {
  width: 100%;
  font-size: 0.88rem;
}
.dad-task-status {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: lowercase;
}
.dad-task-status--open {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.dad-task-status--blocked {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}
.dad-task-status--resolved {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}
.dad-task-actions {
  white-space: nowrap;
}
.dad-task-event-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.dad-task-event-drawer[hidden] {
  display: none !important;
}
.dad-task-event-drawer-inner {
  width: min(720px, 92vw);
  background: var(--surface, #fff);
  padding: 1rem 1.25rem;
  overflow: auto;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
}
.dad-task-event-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.dad-task-action-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.dad-task-action-modal[hidden] {
  display: none !important;
}
.dad-task-action-modal-inner {
  width: min(480px, 96vw);
  background: var(--surface, #fff);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
}
.dad-task-action-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
}
.dad-task-action-input,
.dad-task-action-select {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}
.dad-task-action-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.dad-task-action-error {
  color: #b91c1c;
  margin-top: 0.5rem;
}

/* STRATEGY-LIBRARY-MARGIN-PARAMETER-MAINTENANCE-UI-R1 */
.library-margin-parameter-maintenance-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.04);
}
.library-margin-parameter-maintenance-form label {
  display: block;
  margin: 0.5rem 0;
}
.library-margin-parameter-maintenance-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.library-margin-parameter-change-history {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}
.strategy-library-governance-margin-focus-row {
  scroll-margin-top: 4rem;
  background: rgba(37, 99, 235, 0.08);
  outline: 1px solid rgba(37, 99, 235, 0.25);
}

/* DATA-CENTER-OPTIMIZATION-R1 — DAD hub tabs + readonly tables */
.dad-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
}
.dad-hub-tab {
  font-size: 0.82rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
  color: #334155;
  border: 1px solid transparent;
}
.dad-hub-tab:hover {
  background: rgba(37, 99, 235, 0.08);
}
.dad-hub-tab--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
  font-weight: 600;
}
.dad-readonly-table-root {
  margin-top: 0.5rem;
}
.dad-readonly-table {
  font-size: 0.85rem;
}
.dad-readonly-table th,
.dad-readonly-table td {
  vertical-align: top;
}

/* DATA-CENTER-INTERFACE-MANUAL-SPLIT-R1 */
.dad-center-zone {
  margin: 1rem 0;
  padding: 0.75rem 1rem 1rem;
  border-radius: 10px;
}
.dad-center-zone--interface {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.04);
  border-left: 4px solid rgba(37, 99, 235, 0.55);
}
.dad-center-zone--manual {
  border: 1px solid rgba(5, 150, 105, 0.22);
  background: rgba(5, 150, 105, 0.04);
  border-left: 4px solid rgba(5, 150, 105, 0.55);
}
.dad-center-zone-title {
  margin-top: 0;
}
.dad-center-zone-lead {
  margin-bottom: 0.75rem;
}
.dad-center-zone-nested {
  margin-top: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.65);
}
.dad-center-subsection {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 6px;
}
.dad-center-zone-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.dad-center-zone-stats li {
  margin: 0.25rem 0;
}
.dad-manual-catalog-root {
  margin-top: 0.5rem;
}
.dad-manual-catalog-disclaimer {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: rgba(5, 150, 105, 0.08);
  border: 1px dashed rgba(5, 150, 105, 0.35);
}
.dad-manual-catalog-table {
  font-size: 0.84rem;
}
.dad-manual-catalog-table .dad-manual-catalog-id {
  font-size: 0.75rem;
}
.dad-manual-catalog-table .dad-manual-catalog-role {
  font-weight: 600;
}
.dad-manual-catalog-table .dad-manual-catalog-rec {
  font-weight: 600;
}
.dad-section-nav {
  margin-bottom: 0.75rem;
}
.dad-four-page-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ctrm-surface, #0f1419);
  border-bottom: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  padding: 0.35rem 0;
}
.dad-four-page-nav .dad-four-page-tab {
  font-weight: 600;
}
.dad-four-page-nav .dad-four-page-tab--active,
.dad-four-page-nav .dad-hub-tab--active {
  border-color: var(--ctrm-accent, #3b82f6);
  color: var(--ctrm-accent, #3b82f6);
}
.dad-four-page-zone {
  margin-bottom: 1rem;
  scroll-margin-top: 3.5rem;
}
.dad-center-zone--dashboard {
  border-left: 3px solid rgba(59, 130, 246, 0.45);
}
.dad-center-zone--interface {
  border-left: 3px solid rgba(16, 185, 129, 0.45);
}
.dad-center-zone--manual {
  border-left: 3px solid rgba(245, 158, 11, 0.45);
}
.dad-center-zone--standardization {
  border-left: 3px solid rgba(168, 85, 247, 0.45);
}
.dad-four-page-deferred-note {
  margin-top: 0.5rem;
}
/* DATA-DASHBOARD-PAGE-R1 — data dashboard workspace summaries */
.dad-data-dashboard-workspace {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.06));
}
.dad-dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.dad-dashboard-summary-card {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}
.dad-dashboard-summary-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.dad-dashboard-summary-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}
.dad-dash-status {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
}
.dad-dash-status--ok { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.dad-dash-status--open { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.dad-dash-status--blocked { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.dad-dash-status--attention { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.dad-dash-status--unknown { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.dad-dash-status--deferred { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

/* DATA-CENTER-VERIFICATION-UI-R1 — verification summary / quality / governance / deferred */
.dad-data-verification-summary-block {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
}
.dad-verification-quality-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.dad-verification-quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.85rem;
}
.dad-verification-governance-block { margin: 0.5rem 0; }
.dad-verification-subtitle { font-size: 0.95rem; margin: 0.25rem 0; }
.dad-verification-gap-list { margin: 0.5rem 0; padding-left: 1.25rem; }
.dad-verification-governance-list { margin: 0.35rem 0; padding-left: 1.25rem; }
.dad-verification-fill-path-hint { margin-top: 0.5rem; }
.dad-verification-deep-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.dad-verification-deep-link {
  font-size: 0.9rem;
}
.dad-dashboard-task-summary,
.dad-dashboard-pending {
  margin: 0.75rem 0;
  padding: 0.5rem 0;
}
.dad-dashboard-task-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0.35rem 0;
}
.dad-dashboard-pending-list,
.dad-dashboard-anomaly-list,
.dad-dashboard-recent-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.dad-dashboard-anomaly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.dad-dashboard-anomaly-card {
  padding: 0.55rem 0.65rem;
  border: 1px dashed var(--ctrm-border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
}
.dad-data-dashboard-center-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.35rem;
}
.dad-dashboard-center-link,
.dad-dashboard-quick-link {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.12));
  border-radius: 4px;
  font-size: 0.82rem;
  text-decoration: none;
}
.dad-dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
/* DATA-INTERFACE-CENTER-PAGE-R1 — interface center workspace */
.dad-interface-center-workspace {
  margin: 0.65rem 0;
  padding: 0.65rem 0;
  border-top: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.06));
}
.dad-interface-center-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.dad-interface-summary-card {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.03);
}
.dad-interface-summary-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.dad-iface-status {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
}
.dad-iface-status--ok { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.dad-iface-status--stale { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.dad-iface-status--attention { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.dad-interface-quality-root,
.dad-interface-governance-root,
.dad-interface-downstream-root,
.dad-interface-mapping-summary-root {
  font-size: 0.85rem;
}
.dad-interface-mapping-maint-note {
  margin-top: 0.45rem;
}
[data-entry-policy="link_to_existing_entry"] .dad-manual-catalog-id::after {
  content: ' · external link';
  font-size: 0.7rem;
  color: var(--ctrm-muted, #94a3b8);
}
[data-entry-policy="maintain_standard_rule"] {
  /* maintainable standard/rule rows — future table use */
}
/* MANUAL-DATA-CENTER-PAGE-R1 — manual center workspace */
.dad-manual-center-workspace {
  margin: 0.65rem 0;
  padding: 0.65rem 0;
  border-top: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.06));
}
.dad-manual-center-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.dad-manual-summary-card {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.03);
}
.dad-manual-summary-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.dad-manual-status {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
}
.dad-manual-status--ok { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.dad-manual-status--attention { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.dad-manual-entry-registry-root,
.dad-manual-spot-registry-root,
.dad-manual-finance-registry-root,
.dad-manual-center-governance-root,
.dad-manual-gap-root {
  font-size: 0.85rem;
}
.dad-manual-spot-registry-root .dad-readonly-table td:first-child {
  font-weight: 600;
}
/* DATA-STANDARDIZATION-CENTER-PAGE-R1 — standardization center workspace */
.dad-standardization-center-workspace {
  margin: 0.65rem 0;
  padding: 0.65rem 0;
  border-top: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.06));
}
.dad-standardization-center-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.dad-std-summary-card {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.03);
}
.dad-std-summary-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.dad-std-status {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
}
.dad-std-status--ok { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.dad-std-status--attention { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.dad-std-status--deferred { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.dad-standardization-standards-root,
.dad-standardization-rules-root,
.dad-standardization-mapping-root,
.dad-standardization-parameter-root,
.dad-standardization-audit-root,
.dad-standardization-dsc-root {
  font-size: 0.85rem;
}
.dad-std-dsc-links {
  margin: 0;
  padding-left: 1.1rem;
}
.dad-section-collapsible .admin-cockpit__section-title,
.dad-section-collapsible .admin-cockpit__subsection-title,
.dad-section-collapsible .dad-center-zone-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.dad-section-collapse-toggle {
  margin-left: auto;
  font-size: 0.8125rem;
}
.dad-section-collapsible-body--collapsed {
  display: none;
}
.dad-manual-catalog-toggle-wrap {
  margin-top: 0.5rem;
}
.dad-manual-catalog-summary {
  margin-bottom: 0.35rem;
}

/* DATA-CENTER-DAD-SUMMARY-ONLY-R1 */
.dad-cockpit--summary-only .dad-summary-only-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--ctrm-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
  font-size: 0.875rem;
}
.dad-center-zone--summary-only {
  border-style: dashed;
}
.dad-deep-link-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.5rem;
  margin: 0.65rem 0;
}
.dad-deep-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.12));
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}
.dad-deep-link-card:hover {
  border-color: var(--ctrm-accent, #3b82f6);
}
.dad-summary-only-transition-note {
  margin: 0.35rem 0;
  font-size: 0.8125rem;
}
.dad-embedded-detail-transition {
  opacity: 0.92;
}
.dad-data-dashboard-deep-links-root,
.dad-center-deep-links-root {
  margin: 0.5rem 0;
}

/* DATA-CENTER-EXISTING-PAGE-MERGE-R1 — hub merge on DI / MDC / DSC target pages */
.existing-page-merge-r1 {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
}
.existing-page-merge-deeplinks,
.hub-merge-deeplinks {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.875rem;
}
.hub-merge-module {
  margin: 0.75rem 0 1rem;
}
.hub-merge-root {
  margin-top: 0.35rem;
}
.hub-merge-readonly-table,
.existing-page-merge-registry-table {
  font-size: 0.8125rem;
}
.hub-merge-tag {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}
.hub-merge-tag--linked {
  background: rgba(34, 197, 94, 0.15);
  color: var(--ctrm-ok, #22c55e);
}
.hub-merge-tag--maintainable {
  background: rgba(59, 130, 246, 0.15);
  color: var(--ctrm-accent, #3b82f6);
}
.hub-merge-tag--placeholder,
.hub-merge-tag--deferred {
  background: rgba(148, 163, 184, 0.15);
  color: var(--ctrm-muted, #94a3b8);
}
.hub-merge-tag--fallback {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}
.hub-merge-tag--readonly {
  background: rgba(148, 163, 184, 0.1);
}
.di-polish-health-ssot-note {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
}
/* DATA-INTEGRATIONS-MANAGEMENT-QUALITY-RESHAPE-UI-R1 */
.di-mq-summary {
  margin: 0.65rem 0 1rem;
}
.di-management-section,
.di-quality-section {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.25);
}
.di-management-section-title,
.di-quality-section-title,
.di-ia-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
/* DATA-INTEGRATIONS-CENTER-UI-INFORMATION-ARCHITECTURE-R1 */
.di-ia-main-section {
  margin: 1rem 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.28);
}
.di-ia-section-lead {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ctrm-muted, #94a3b8);
}
.di-ia-secondary-details {
  margin-top: 0.75rem;
}
.di-status-enum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.di-status-enum-card {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
}
.di-next-action-primary {
  margin-bottom: 0.5rem;
}
.di-next-action-candidates {
  margin: 0;
  padding-left: 1.1rem;
}
.data-integration-hub-hydration-status {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
}
.data-integration-hub-hydration-status--loading {
  color: var(--ctrm-muted, #94a3b8);
}
.data-integration-hub-hydration-status--error,
.data-integration-hub-hydration-status--warn {
  color: var(--ctrm-warn, #fbbf24);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}
.di-mgmt-submodule,
.di-quality-submodule {
  margin-bottom: 0.75rem;
}
.di-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}
.di-capability-card {
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  background: rgba(30, 41, 59, 0.35);
}
.di-capability-card h5 {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.di-status-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.di-status-pill--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.di-status-pill--deferred {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}
.di-status-pill--blocked {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
.di-status-pill--attention {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}
.di-status-pill--unknown {
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
}
.di-fallback-pill,
.di-deferred-pill,
.di-blocked-pill {
  font-size: 0.72rem;
}
.di-readonly-note {
  margin-top: 0.45rem;
  font-size: 0.75rem;
}
/* DATA-INTEGRATIONS-LATEST-REFRESH-CAPABILITY-R1 */
.di-refresh-capability-root {
  margin-top: 0.25rem;
}
.di-refresh-capability-grid {
  margin-bottom: 0.75rem;
}
.di-refresh-capability-card {
  min-height: 7.5rem;
}
.di-refresh-capability-meta,
.di-refresh-deferred-reason,
.di-refresh-next-phase {
  margin: 0.2rem 0;
  font-size: 0.72rem;
}
.di-refresh-source-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.di-refresh-boundary-note {
  margin-top: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.2);
}
.di-refresh-capability-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.di-status-available {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.di-status-legacy {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}
.di-status-deferred {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}
.di-status-blocked-auth {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}
.di-status-blocked-config {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
.di-status-blocked-runtime {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}
.di-status-blocked-upstream {
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
}
/* DATA-INTEGRATIONS-PAGE-LIVE-USABILITY-FIX-R1 */
.di-page-live-usability-r1 .di-readonly-banner {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(30, 58, 138, 0.2);
}
.di-readonly-banner-lead {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
}
.di-readonly-banner-boundary {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ctrm-muted, #94a3b8);
}
.di-live-summary,
.di-attention-panel {
  margin-bottom: 0.85rem;
}
.di-live-summary-title,
.di-attention-title,
.di-section-overview-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.di-live-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.45rem;
}
.di-live-summary-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ctrm-muted, #94a3b8);
}
.di-live-summary-card--ok .di-live-summary-value { color: #4ade80; }
.di-live-summary-card--check .di-live-summary-value { color: #fbbf24; }
.di-live-summary-card--config .di-live-summary-value { color: #f87171; }
.di-live-summary-card--deferred .di-live-summary-value { color: #94a3b8; }
.di-live-summary-card--mapping .di-live-summary-value { color: #c4b5fd; }
.di-attention-panel {
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(120, 53, 15, 0.15);
}
.di-attention-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.di-attention-item {
  margin: 0.35rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.di-attention-footnote {
  margin-top: 0.45rem;
  font-size: 0.75rem;
}
.di-section-overview {
  margin: 0.5rem 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-left: 3px solid rgba(96, 165, 250, 0.55);
}
.di-business-status-pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.di-status-readable--ok { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.di-status-readable--partial { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.di-status-readable--legacy { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.di-status-readable--deferred { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.di-status-readable--config { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.di-status-readable--runtime { background: rgba(167, 139, 250, 0.12); color: #c4b5fd; }
.di-status-readable--upstream { background: rgba(244, 114, 182, 0.12); color: #f472b6; }
.di-status-readable--check { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.di-status-readable--auth { background: rgba(251, 191, 36, 0.1); color: #fcd34d; }
.di-status-readable--unknown { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; }
.di-empty-state-readable {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.25);
}
.di-empty-state-readable-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
}
/* DATA-INTEGRATIONS-PAGE-LIVE-USABILITY-FIX-R2 */
.di-page-live-usability-r2.di-section-hub-merge-r1 {
  order: -1;
  margin-bottom: 1rem;
}
.di-cockpit .di-section-hub-merge-r1 {
  margin-top: 0.35rem;
}
.di-legacy-detail-monitor {
  margin: 0.75rem 0 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: rgba(15, 23, 42, 0.18);
}
.di-legacy-detail-summary {
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ctrm-muted, #94a3b8);
  list-style: none;
}
.di-legacy-detail-summary::-webkit-details-marker { display: none; }
.di-legacy-detail-body {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(100, 116, 139, 0.25);
}
.di-legacy-detail-monitor .hub-merge-root .di-polish-loading,
.di-page-live-usability-r2 .hub-merge-root:not(:empty) {
  opacity: 1;
}
.di-status-readable--manual {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}
.di-page-live-usability-r2 .di-management-section,
.di-page-live-usability-r2 .di-quality-section {
  opacity: 1;
}
.di-page-live-usability-r2 .di-polish-loading {
  color: var(--ctrm-muted, #94a3b8);
  font-style: italic;
}
.di-status-missing-config {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
.di-status-runtime-not-ready {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}
.di-status-upstream-blocked {
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
}
/* DATA-INTEGRATIONS-PAGE-LIVE-USABILITY-FIX-R3 — main view white / high-contrast */
.di-hero-readonly-notice {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: var(--ctrm-text, #1e293b);
}
.di-hero-readonly-notice .di-readonly-banner-boundary {
  color: var(--ctrm-text-muted, #64748b);
  font-size: 0.8125rem;
}
.di-page-live-usability-r3.di-section-hub-merge-r1,
.di-page-live-usability-r3.di-page-polish-r1 {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
  opacity: 1;
  filter: none;
}
.di-page-live-usability-r3 .di-management-section,
.di-page-live-usability-r3 .di-quality-section {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  opacity: 1;
}
.di-page-live-usability-r3 .di-polish-module,
.di-page-live-usability-r3 .di-source-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  opacity: 1;
}
.di-page-live-usability-r3 .di-live-summary-card,
.di-page-live-usability-r3 .di-polish-summary-card,
.di-page-live-usability-r3 .di-capability-card,
.di-page-live-usability-r3 .di-refresh-capability-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
  opacity: 1;
  filter: none;
}
.di-page-live-usability-r3 .di-live-summary-card h4,
.di-page-live-usability-r3 .di-polish-summary-card h4 {
  text-transform: none;
  color: var(--ctrm-text-muted, #64748b);
}
.di-page-live-usability-r3 .di-attention-panel {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.di-page-live-usability-r3 .di-empty-state-readable,
.di-page-live-usability-r3 .di-polish-empty-state {
  background: #f8fafc;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
}
.di-page-live-usability-r3 .di-refresh-boundary-note {
  background: #f8fafc;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
}
.di-business-summary-line,
.di-module-summary-static {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ctrm-text, #1e293b);
}
.di-business-summary-placeholder,
.di-module-empty-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ctrm-text-muted, #64748b);
}
.di-technical-fields-details {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
}
.di-technical-fields-details summary {
  cursor: pointer;
  color: var(--ctrm-accent, #0369a1);
  font-weight: 500;
}
.di-technical-fields-body {
  margin-top: 0.45rem;
}
.di-hub-footer-links {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}
#di-legacy-detail-monitor-r2.di-legacy-detail-monitor {
  margin-top: 24px;
  opacity: 0.85;
}
.di-page-live-usability-r3 .di-module-summary-static + .hub-merge-root:empty {
  display: none;
}

/* DATA-INTEGRATIONS-PAGE-LIVE-USABILITY-FIX-R4 — single main block; no duplicate hub title/card */
.di-page-live-usability-r4.di-cockpit .admin-cockpit__hero.di-main-hero-r4 {
  margin-bottom: 0;
}
.di-page-live-usability-r4 .di-main-view-r4.di-section-hub-merge-r1 {
  margin-top: 0;
  padding-top: 0.35rem;
  border: none;
  border-radius: 0;
  background: var(--ctrm-panel-bg, #fff);
  box-shadow: none;
}
.di-page-live-usability-r4 .di-main-view-r4.existing-page-merge-r1 {
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}
#di-section-hub-merge-r1 #di-hub-merge-r1-title,
#di-section-hub-merge-r1 > .di-readonly-banner,
#di-section-hub-merge-r1 .di-page-polish-lead,
#di-section-hub-merge-r1 .di-hub-merge-boundary {
  display: none !important;
}
.di-page-live-usability-r4 .di-hub-footer-links {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
  font-size: 0.8125rem;
}
.external-entry-hint,
.link-to-existing-entry {
  font-size: 0.8125rem;
}
.hub-merge-dsc-links {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0;
}
.hub-merge-dsc-links li {
  margin: 0.35rem 0;
}

/* DATA-INTEGRATIONS-PAGE-POLISH-R1 — interface center readonly hub polish */
.di-page-polish-r1 {
  background: rgba(15, 23, 42, 0.25);
}
.di-page-polish-lead {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.35rem 0 0.5rem;
}
.di-page-polish-boundary-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}
.di-interface-workspace-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 960px) {
  .di-interface-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .di-polish-module--mapping,
  .di-polish-module--downstream {
    grid-column: 1 / -1;
  }
}
.di-polish-module {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}
.di-polish-module-hint {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.75rem;
}
.di-polish-summary-strip {
  margin: 0.65rem 0 0.85rem;
}
.di-polish-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.di-polish-summary-card {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  background: rgba(30, 41, 59, 0.35);
}
.di-polish-summary-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--ctrm-muted, #94a3b8);
}
.di-polish-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.di-polish-summary-note {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}
.di-polish-source-catalog-table td,
.di-polish-ingestion-health-table td {
  vertical-align: top;
}
.di-polish-empty-state {
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--ctrm-border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.2);
}
.di-polish-empty-title {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
}
.di-polish-loading {
  font-size: 0.8125rem;
}
.di-polish-mapping-footer {
  margin-top: 0.5rem;
}
/* freshness / quality / downstream status — data quality semantics only */
.di-polish-module--health .hub-merge-status-badge--stale,
.di-polish-module--health .hub-merge-status-badge--failed,
.di-polish-module--health .hub-merge-status-badge--unavailable {
  font-weight: 600;
}
.di-polish-module--quality .hub-merge-status-badge {
  text-transform: lowercase;
}
.di-polish-downstream-impact-table td:nth-child(3) {
  font-size: 0.8125rem;
}

/* MANUAL-DATA-CENTER-PAGE-POLISH-R1 — manual entry registry polish · readonly · linked · external-entry · registry-only */
.mdc-page-polish-r1 {
  background: rgba(15, 23, 42, 0.25);
}
.mdc-page-polish-lead {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.35rem 0 0.5rem;
}
.mdc-page-polish-boundary-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}
.mdc-manual-workspace-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 960px) {
  .mdc-manual-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mdc-polish-module--gap {
    grid-column: 1 / -1;
  }
}
.mdc-polish-module {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}
.mdc-polish-module--registry {
  border-left: 3px solid rgba(59, 130, 246, 0.35);
}
.mdc-polish-module-hint {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.75rem;
}
.mdc-polish-summary-strip {
  margin: 0.65rem 0 0.85rem;
}
.mdc-polish-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.mdc-polish-summary-card {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  background: rgba(30, 41, 59, 0.35);
}
.mdc-polish-summary-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--ctrm-muted, #94a3b8);
}
.mdc-polish-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.mdc-polish-empty-state {
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--ctrm-border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
}
.hub-merge-tag--registry-only {
  background: rgba(234, 179, 8, 0.15);
  color: var(--ctrm-warn-muted, #eab308);
}
.hub-merge-tag--external-entry {
  background: rgba(59, 130, 246, 0.12);
  color: var(--ctrm-accent, #3b82f6);
}
.mdc-polish-external-hint {
  font-size: 0.8125rem;
}
.mdc-polish-loading {
  font-size: 0.8125rem;
}

/* DATA-STANDARDIZATION-CENTER-PAGE-POLISH-R1 — standardization hub polish · mapping · parameter · deferred · maintainable */
.dsc-page-polish-r1 {
  background: rgba(15, 23, 42, 0.25);
}
.dsc-page-polish-lead,
.dsc-page-polish-spot {
  font-size: 0.875rem;
  line-height: 1.5;
}
.dsc-page-polish-boundary-list {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}
.dsc-standardization-workspace-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 960px) {
  .dsc-standardization-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dsc-polish-module--mapping,
  .dsc-polish-module--audit {
    grid-column: 1 / -1;
  }
}
.dsc-polish-module {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}
.dsc-polish-module--parameter {
  border-left: 3px solid rgba(234, 179, 8, 0.3);
}
.dsc-polish-module-hint {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.75rem;
}
.dsc-polish-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 0.65rem 0 0.85rem;
}
.dsc-polish-summary-card {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, rgba(255, 255, 255, 0.1));
  background: rgba(30, 41, 59, 0.35);
}
.dsc-polish-summary-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--ctrm-muted, #94a3b8);
}
.dsc-polish-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.dsc-polish-empty-state {
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--ctrm-border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
}
.dsc-polish-dsc-list li {
  margin: 0.4rem 0;
}
.dsc-polish-loading {
  font-size: 0.8125rem;
}

/* DATA-INTEGRATIONS-PAGE-POLISH-R2 — catalog sort · freshness · downstream · linked · readonly */
.di-page-polish-r2 .di-polish-r2-hint {
  font-size: 0.75rem;
}
.hub-merge-health-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.hub-merge-health--stale { background: rgba(234, 179, 8, 0.18); color: #eab308; }
.hub-merge-health--failed { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
.hub-merge-health--unavailable { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.hub-merge-health--unknown { background: rgba(100, 116, 139, 0.15); color: #64748b; }
.hub-merge-health--ok { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.di-polish-r2-downstream .di-polish-table td:nth-child(3) {
  font-size: 0.8125rem;
}
.di-polish-r2-mapping-callout {
  margin: 0.65rem 0 0.25rem;
}
.di-polish-r2-mapping-deeplink {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.di-polish-r2-mapping-deeplink:hover {
  background: rgba(59, 130, 246, 0.25);
}
.di-mapping-deferred-note {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}
.di-maf-freshness-note {
  margin: 0.65rem 0 0.25rem;
  font-size: 0.8125rem;
}

/* MAF Connector UI Operability R5F + Compact Layout R5G + Collapsed Light Theme R5H */
.maf-connector-shell {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: var(--ctrm-surface, #fff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  padding: 0;
}
.maf-connector-shell > summary {
  list-style: none;
}
.maf-connector-shell > summary::-webkit-details-marker {
  display: none;
}
.maf-connector-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.maf-connector-summary-main {
  flex: 1;
  min-width: 0;
}
.maf-connector-summary .di-ia-section-title {
  margin: 0;
}
.maf-connector-toggle-label {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  padding-top: 0.15rem;
}
.maf-connector-shell:not([open]) .maf-connector-toggle-label::after {
  content: '展开';
}
.maf-connector-shell[open] .maf-connector-toggle-label::after {
  content: '收起';
}
.maf-connector-shell[open] .maf-connector-expand-hint {
  display: none;
}
.maf-connector-run-summary {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.8125rem;
}
.maf-connector-body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.maf-connector-header {
  margin-bottom: 0.75rem;
}
.maf-connector-subtitle {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.8125rem;
}
.maf-connector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.maf-status-chip {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.35);
  white-space: nowrap;
}
.maf-status-chip.ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: #15803d;
}
.maf-status-chip.warn {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.4);
  color: #a16207;
}
.maf-status-chip.pending {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(148, 163, 184, 0.4);
  color: #64748b;
}
.maf-status-chip.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #b91c1c;
}
.maf-connector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
  align-items: start;
  padding-top: 12px;
}
.maf-status-card {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: var(--ctrm-surface, #fff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.maf-status-card.is-warning,
.maf-status-card.is-pending,
.maf-status-card.is-error {
  background: var(--ctrm-surface, #fff);
}
.maf-status-card-title {
  margin: 0 0 0.55rem;
  font-size: 0.9375rem;
}
.maf-kv-grid {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  row-gap: 6px;
  column-gap: 10px;
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
}
.maf-kv-grid dt {
  margin: 0;
  color: var(--muted, #94a3b8);
}
.maf-kv-grid dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.maf-kv-grid dd code {
  font-size: 0.75rem;
}
.maf-sync-summary-grid {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
}
.maf-sync-summary-grid dt {
  margin: 0;
  color: var(--muted, #94a3b8);
}
.maf-sync-summary-grid dd {
  margin: 0;
}
.maf-sync-summary {
  font-size: 0.8125rem;
}
.maf-sync-summary-line {
  margin: 0.2rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.maf-sync-summary ul {
  margin: 0.25rem 0;
  padding-left: 1rem;
  font-size: 0.8125rem;
}
.maf-sync-summary .ctrm-muted {
  font-size: 0.75rem;
}
.maf-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.35rem;
}
.maf-data-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0.5rem;
}
.maf-data-type-chip {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}
.maf-token-details {
  margin: 0.35rem 0;
}
.maf-token-details summary {
  cursor: pointer;
  font-size: 0.75rem;
}
.maf-health-alert {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.45;
  border-left: 3px solid rgba(234, 179, 8, 0.6);
  background: rgba(234, 179, 8, 0.08);
}
.maf-health-alert--error {
  border-left-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.08);
}
.maf-health-alert--warn {
  border-left-color: rgba(234, 179, 8, 0.65);
}
.maf-empty-success-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
}
.maf-sync-log-collapsed > summary {
  cursor: pointer;
  font-size: 0.8125rem;
}
.maf-logs-compact {
  font-size: 0.8125rem;
}
.maf-logs-compact .maf-sync-run-row {
  margin: 0.3rem 0;
}
.maf-sync-run-row {
  margin: 0.35rem 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
}
.maf-sync-run-row summary {
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1.4;
}
.maf-log-detail-table {
  margin-top: 0.4rem;
  overflow-x: auto;
}
.maf-log-detail-table .ctrm-table {
  table-layout: auto;
  word-break: break-word;
  font-size: 0.72rem;
}
.maf-log-error-cell {
  max-width: 10rem;
}
.maf-log-chunk-cell {
  max-width: 8rem;
  word-break: break-word;
  font-size: 0.72rem;
}
.maf-log-error {
  font-size: 0.72rem;
  word-break: break-word;
}
@media (max-width: 900px) {
  .maf-connector-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .maf-kv-grid {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .maf-kv-grid dd {
    white-space: normal;
  }
}

/* MANUAL-DATA-CENTER-PAGE-POLISH-R2 — catalog sort · registry · owner · external-entry · linked · readonly */
.mdc-page-polish-r2 .mdc-polish-r2-hint {
  font-size: 0.75rem;
}
.mdc-polish-r2-spot-callout,
.mdc-polish-r2-finance-callout {
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  background: rgba(15, 23, 42, 0.35);
  border-left: 3px solid rgba(59, 130, 246, 0.4);
}
.mdc-polish-r2-owner-cell {
  font-size: 0.8125rem;
}

/* DATA-STANDARDIZATION-CENTER-PAGE-POLISH-R2 — mapping · parameter · deferred · maintainable · audit */
.dsc-page-polish-r2 .dsc-polish-r2-strategy-deeplink {
  font-weight: 600;
}
.dsc-polish-r2-parameter-table tr:first-child td {
  background: rgba(234, 179, 8, 0.06);
}
.dsc-polish-r2-dsc-list {
  font-size: 0.875rem;
}
.dsc-polish-r2-summary-note {
  font-size: 0.8125rem;
}
.hub-merge-tag--deferred {
  font-weight: 600;
}

/* DSC-GOVERNANCE-BUCKET-CONSOLIDATION-R1 */
.dsc-governance-bucket-r1 .dsc-five-buckets-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.dsc-bucket-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.35);
}
.dsc-bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.dsc-bucket-title {
  margin: 0;
  font-size: 1.05rem;
}
.dsc-boundary-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.dsc-boundary-badge--maintain {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}
.dsc-boundary-badge--readonly {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}
.dsc-bucket-objects {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}
.dsc-bucket-anchors {
  font-size: 0.8125rem;
  margin: 0.35rem 0 0.65rem;
}
.dsc-hub-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}
.dsc-hub-summary-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  text-align: center;
}
.dsc-hub-summary-value {
  font-size: 1.35rem;
  font-weight: 600;
}
.dsc-hub-summary-label {
  font-size: 0.8125rem;
  color: #94a3b8;
}
.dsc-hub-summary-hint {
  font-size: 0.7rem;
  margin: 0.25rem 0 0;
}

/* CTRM-GOVERNANCE-DRIFT-KPI-BOARD-R1 — read-only secondary KPI strip (Governance View only) */
.dsc-governance-drift-kpi-root {
  margin: 0 0 0.75rem;
}
.dsc-gov-drift-kpi-board {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: rgba(248, 250, 252, 0.65);
}
.dsc-gov-drift-kpi-heading {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #64748b;
}
.dsc-gov-drift-kpi-lead {
  font-size: 0.75rem;
  margin: 0 0 0.5rem;
}
.dsc-gov-drift-kpi-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}
.dsc-gov-drift-kpi-card {
  display: block;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 5px;
  padding: 0.45rem 0.55rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: #fff;
  font-size: 0.8125rem;
}
.dsc-gov-drift-kpi-card:hover {
  border-color: rgba(100, 116, 139, 0.45);
  background: #f8fafc;
}
.dsc-gov-drift-kpi-card--critical .dsc-gov-drift-kpi-value {
  color: #b91c1c;
}
.dsc-gov-drift-kpi-card--moderate .dsc-gov-drift-kpi-value {
  color: #c2410c;
}
.dsc-gov-drift-kpi-card--low .dsc-gov-drift-kpi-value {
  color: #a16207;
}
.dsc-gov-drift-kpi-card--score .dsc-gov-drift-kpi-value {
  color: #0f766e;
}
.dsc-gov-drift-kpi-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}
.dsc-gov-drift-kpi-label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}
.dsc-gov-drift-kpi-drill {
  display: block;
  font-size: 0.65rem;
  margin-top: 0.2rem;
}
.dsc-gov-drift-kpi-band {
  font-size: 0.7rem;
  margin: 0.45rem 0 0;
}
.dsc-governance-inbox-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.dsc-maintain-panels-fallback {
  margin-top: 1rem;
}
.dsc-maintain-panels-summary {
  cursor: pointer;
}
.dsc-bucket-filter-nav a {
  margin-right: 0.35rem;
}
.dsc-section-hub-summary,
.dsc-section-governance-inbox,
.dsc-section-five-buckets {
  margin-bottom: 1.25rem;
}

/* DSC Governance Inbox / Bucket Copy Clarity R1 */
.dsc-bucket-cta-nav {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
}
.dsc-bucket-registry-details {
  margin-top: 0.5rem;
  border-top: 1px dashed var(--ctrm-border-muted, #d8dee6);
  padding-top: 0.5rem;
}
.dsc-bucket-registry-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ctrm-muted, #5c6773);
}
.dsc-bucket-registry-lead {
  font-size: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}
.dsc-bucket-registry-details .hub-merge-table-wrap {
  font-size: 0.8rem;
  opacity: 0.92;
}
.dsc-inbox-positioning {
  margin-top: 0.75rem;
}

/* DSC L2 Maintain Entry Index R1 */
.dsc-maintain-entry-index {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--ctrm-border-muted, #d8dee6);
  background: var(--ctrm-surface-muted, #f8f9fb);
}
.dsc-maintain-entry-index-title {
  font-size: 1rem;
}
.dsc-maintain-entry-index-lead {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.dsc-maintain-entry-index-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.dsc-maintain-entry-group {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 4px;
  background: #fff;
  font-size: 0.85rem;
}
.dsc-maintain-entry-group-title {
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.dsc-maintain-entry-note {
  font-size: 0.75rem;
  margin: 0 0 0.5rem;
}
.dsc-maintain-entry-card {
  line-height: 1.6;
}
.dsc-maintain-entry-link {
  font-size: 0.82rem;
}
.dsc-maintain-entry-index-footer {
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

/* DSC L2 Maintain Broken Entry Fix R3 — maintain_mode CTA badges */
.dsc-entry-state-badge {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  border: 1px solid transparent;
}
.dsc-maintain-status-native {
  color: #0d5c2e;
  background: #e8f5ec;
  border-color: #b8dcc4;
}
.dsc-maintain-status-linked {
  color: #0b4f8a;
  background: #e8f2fb;
  border-color: #b8d4ef;
}
.dsc-maintain-status-registry-only {
  color: #5c4b00;
  background: #f5f0e0;
  border-color: #ddd0a8;
}
.dsc-maintain-status-deferred {
  color: #6b4c00;
  background: #faf3e6;
  border-color: #e8d4a8;
}
.dsc-maintain-status-blocked {
  color: #8a1f1f;
  background: #fce8e8;
  border-color: #e8b4b4;
}
.dsc-disabled-link {
  color: var(--muted, #6b7280);
  font-size: 0.82rem;
}
.dsc-anchor-note {
  border-left: 3px solid var(--ctrm-border-muted, #d8dee6);
  padding-left: 0.75rem;
}
.dsc-standard-objects-list {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.1rem;
}

/* DSC L2 Maintain Panel Consolidation R4 — dual view + four layers */
.dsc-view-switch {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f4f6f8);
}
.dsc-view-tab {
  flex: 1 1 auto;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ctrm-text, #1a1d21);
}
.dsc-view-tab:hover {
  background: #fff;
}
.dsc-view-tab-active {
  background: #fff;
  border-color: var(--ctrm-border-muted, #c8d0d8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dsc-view-panel {
  margin-bottom: 1rem;
  display: block;
}
.dsc-view-panel-active,
.dsc-view-panel-focus {
  display: block;
}
/* CTRM-VIEW-STRUCTURE-REBALANCE-R1 — all views structurally present; focus only */
.dsc-view-panel--structure-present {
  display: block;
}
.dsc-view-panel-focus {
  box-shadow: inset 0 0 0 2px var(--ctrm-accent, #3b6ea5);
  border-radius: 6px;
}
.dsc-view-panel:not(.dsc-view-panel-focus) {
  opacity: 1;
}
.dsc-md-ssot-strategy-logic-summary {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: var(--ctrm-surface-muted, #f4f6f8);
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 4px;
  max-height: 7.5rem;
  overflow: hidden;
}
/* Two-column R1 + THREE-LAYER-GOVERNANCE-R1: create on left toolbar; JS-only permission — no CSS hide */
/* CTRM-COGNITIVE-VIEW-ORDER-LOCK-R1 — governance → master → maintain */
.dsc-cognitive-maintain-shell:not([open]) .dsc-maintain-view-lead,
.dsc-cognitive-maintain-shell:not([open]) .dsc-maintain-relationship-zone,
.dsc-cognitive-maintain-shell:not([open]) .dsc-maintain-layers-root,
.dsc-cognitive-maintain-shell:not([open]) .dsc-maintain-panels-fallback,
.dsc-cognitive-maintain-shell:not([open]) .dsc-maintain-panels-body {
  display: none;
}
.dsc-cognitive-maintain-summary {
  cursor: pointer;
  list-style: none;
}
.dsc-cognitive-maintain-shell[open] .dsc-cognitive-maintain-summary {
  margin-bottom: 0.5rem;
}
/* CTRM-UI-FILTER-LIST-ALIGNMENT-R1 — filter-only top layer */
/* CTRM-FILTER-ULTRA-COMPACT-MODE-A-R1 — single-line semantic segmented layout */
/* CTRM-FILTER-ADAPTIVE-DENSITY-SYSTEM-R1 — comfort / compact / ultra density modes */
.dsc-md-filter-bar.dsc-filter-ultra-compact-mode-a-r1 {
  margin: 0 0 0.75rem;
  transition: margin 200ms ease;
}
.dsc-md-filter-bar.dsc-filter-adaptive-density-r1 .filter-ultra-row {
  transition: gap 200ms ease, padding 200ms ease;
}
.dsc-md-filter-bar.dsc-filter-adaptive-density-r1 .dsc-md-filter-chip,
.dsc-md-filter-bar.dsc-filter-adaptive-density-r1 .filter-ultra-segment-label,
.dsc-md-filter-bar.dsc-filter-adaptive-density-r1 .divider {
  transition: padding 200ms ease, font-size 200ms ease, opacity 200ms ease, max-width 200ms ease;
}
.filter-ultra-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* MODE 1 — COMFORT (≥1400px): default Mode A full segmented layout */
.dsc-md-filter-bar.mode-comfort .filter-ultra-row {
  gap: 16px;
  flex-wrap: wrap;
}
/* MODE 2 — COMPACT (900–1399px): reduced spacing, labels visible */
.dsc-md-filter-bar.mode-compact .filter-ultra-row {
  gap: 10px;
  flex-wrap: wrap;
}
.dsc-md-filter-bar.mode-compact .dsc-md-filter-chip {
  padding: 0.28rem 0.5rem;
  font-size: 0.82rem;
}
.dsc-md-filter-bar.mode-compact .filter-ultra-segment-label {
  font-size: 0.76rem;
}
.dsc-md-filter-bar.mode-compact .divider {
  font-size: 0.78rem;
}
/* MODE 3 — ULTRA (<900px): visual compression only; schema segments preserved in DOM/a11y */
.dsc-md-filter-bar.mode-ultra .filter-ultra-row {
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.15rem;
}
.dsc-md-filter-bar.mode-ultra .filter-ultra-segment-label,
.dsc-md-filter-bar.mode-ultra .divider {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Perception lock: segments remain in DOM + accessibility tree (not display:none) */
.dsc-md-filter-bar.mode-ultra .segment[data-dsc-perception-segment] {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
.dsc-md-filter-bar.mode-ultra .filter-ultra-segment-chips {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
.dsc-md-filter-bar.mode-ultra .dsc-md-filter-chip {
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.dsc-md-filter-bar.mode-ultra .dsc-md-filter-chip + .dsc-md-filter-chip {
  margin-left: 0.15rem;
}
.dsc-md-filter-bar.mode-ultra .dsc-md-filter-chip + .dsc-md-filter-chip::before {
  content: '·';
  margin-right: 0.35rem;
  color: var(--ctrm-text-muted, #9aa3ad);
  font-weight: 400;
  pointer-events: none;
}
.filter-ultra-row .segment {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.filter-ultra-segment-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ctrm-text-muted, #5c6570);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.filter-ultra-segment-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.filter-ultra-row .divider {
  color: var(--ctrm-text-muted, #9aa3ad);
  font-size: 0.82rem;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.dsc-md-filter-chip {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 999px;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ctrm-text, #1a1d21);
}
.dsc-md-filter-chip.is-active {
  border-color: var(--ctrm-accent, #3b6ea5);
  background: var(--ctrm-accent-soft, #e8f0f8);
  color: var(--ctrm-accent, #3b6ea5);
}
.dsc-md-bg-related-entities {
  margin-top: 0.75rem;
}
.dsc-md-bg-related-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
/* CTRM-MASTER-VIEW-FIELD-LAYOUT-R1 — cognitive vertical blocks */
.dsc-md-master-view-layout-r1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dsc-md-master-view-block {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
}
.dsc-md-master-view-field-dl {
  margin: 0;
}
.dsc-md-master-strategy-logic-summary {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-family: var(--ctrm-mono, ui-monospace, monospace);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--ctrm-surface-muted, #f6f8fa);
  border-radius: 4px;
  max-height: 8rem;
  overflow: auto;
}
.dsc-maintain-view-lead {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.dsc-maintain-layers-root {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dsc-maintain-layer {
  padding: 0.85rem 1rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
}
.dsc-maintain-layer-title {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  font-weight: 600;
}
.dsc-maintain-layer-lead {
  font-size: 0.8rem;
  margin: 0 0 0.65rem;
}
.dsc-maintain-layer-entries {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.dsc-maintain-layer-card {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--ctrm-border-muted, #e8eaed);
  border-radius: 4px;
  background: var(--ctrm-surface-muted, #fafbfc);
  font-size: 0.82rem;
}
.dsc-maintain-layer-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.dsc-maintain-layer-entry-name {
  font-size: 0.88rem;
  margin: 0;
  font-weight: 600;
}
.dsc-maintain-layer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.dsc-maintain-mode-badge {
  font-size: 0.65rem;
}
.dsc-owner-badge {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  background: #eef1f4;
  color: #4a5568;
  border: 1px solid #d8dee6;
}
.dsc-maintain-layer-entry-note,
.dsc-maintain-layer-entry-target {
  font-size: 0.72rem;
  margin: 0.25rem 0 0;
}
.dsc-maintain-status-broken {
  color: #7a3e00;
  background: #fff4e6;
  border-color: #e8c99a;
}
.dsc-maintain-status-duplicate {
  color: #4a5568;
  background: #f0f2f5;
  border-color: #d0d5db;
}
.dsc-hero-boundary-details {
  margin-top: 0.5rem;
}
.dsc-section-note {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

/* DSC Master Data Readonly View R12 */
.dsc-readonly-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2d5a27;
  background: #e8f5e6;
  border: 1px solid #b8d4b4;
  border-radius: 4px;
}
.dsc-readonly-badge-inline {
  font-size: 0.75rem;
}
.dsc-master-data-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.dsc-master-data-positioning {
  font-size: 0.85rem;
  margin: 0.35rem 0;
}
.dsc-master-data-lead {
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}
.dsc-master-data-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.65rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8f9fa);
}
.dsc-master-data-summary-item {
  font-size: 0.8rem;
}
.dsc-master-data-summary-label {
  display: block;
  color: var(--ctrm-muted-text, #5c6570);
  font-size: 0.72rem;
}
.dsc-master-data-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.dsc-master-data-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
  font-size: 0.82rem;
}
.dsc-master-data-card-title {
  font-size: 0.92rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.dsc-master-data-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}
.dsc-master-data-readiness {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: #f0f2f5;
  color: #4a5568;
}
.dsc-master-data-card-meta,
.dsc-master-data-card-note {
  font-size: 0.75rem;
  margin: 0.2rem 0;
}
.dsc-master-data-card-summary {
  font-size: 0.76rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}
.dsc-master-data-card-capabilities {
  margin-bottom: 0.4rem;
}
.dsc-master-data-card-cta {
  font-size: 0.78rem;
  font-weight: 600;
}
.dsc-master-data-matrix-wrap {
  margin-bottom: 0.75rem;
}
.dsc-master-data-matrix-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.dsc-master-data-matrix {
  width: 100%;
  font-size: 0.78rem;
}
.dsc-master-data-guardrails {
  margin-top: 0.5rem;
  font-size: 0.78rem;
}
.dsc-master-data-guardrail-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

/* DSC Master Data Editable-Ready UI Skeleton R14 */
.dsc-edit-ready-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1a4d8c;
  background: #e8f2fc;
  border: 1px solid #b8d4e8;
  border-radius: 4px;
}
.dsc-edit-ready-badge-inline {
  font-size: 0.75rem;
}
.dsc-master-data-layout {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
/* DSC Master Data Two-Column Layout R1 — list index + detail split */
.dsc-container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.dsc-list-panel {
  flex: 1.3;
  min-width: 0;
}
.dsc-detail-panel {
  flex: 1;
  min-width: 360px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.dsc-detail-panel .dsc-detail-panel-inner {
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.dsc-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.dsc-detail-header .dsc-md-detail-title,
.dsc-detail-header .dsc-master-data-detail-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}
.dsc-detail-body {
  min-width: 0;
}
.dsc-detail-panel .status-tag .dsc-md-status-badge {
  display: inline-block;
}
.dsc-master-data-nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dsc-md-domain-group {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
}
.dsc-md-domain-group-title {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a365d;
}
.dsc-md-domain-group-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}
.dsc-md-domain-group-cards {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}
.dsc-md-object-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  text-align: center;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.dsc-md-object-card-protected {
  border-color: #c4b5fd;
  background: #faf8ff;
}
.dsc-md-object-card.is-active {
  border-color: #9ab4cc;
  background: var(--ctrm-surface-muted, #f0f4f8);
}
.dsc-md-object-card-title {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
}
.dsc-md-object-card-summary {
  font-size: 0.76rem;
  margin: 0;
  line-height: 1.35;
  width: 100%;
  text-align: center;
}
.dsc-md-object-cap-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}
.dsc-md-object-cap-label {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
}
.dsc-md-object-cap-label-maintain {
  background: #e8f5e9;
  color: #2e7d32;
}
.dsc-md-object-cap-label-readonly {
  background: #f0f2f5;
  color: #5c6570;
}
.dsc-md-object-cap-label-deferred {
  background: #fff8e1;
  color: #8a6d00;
}
.dsc-md-object-cap-label-governance {
  background: #e8eef8;
  color: #3d5a80;
}
.dsc-md-object-cap-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.dsc-md-object-cap-tag {
  font-size: 0.68rem;
  padding: 0.06rem 0.3rem;
  border-radius: 3px;
  background: #f5f7fa;
  color: #4a5568;
  border: 1px solid #e2e6ea;
}
/* R-UI-DSC-ENTRY-SINGLE-ACTION — capsule nav tile: centered status badge; whole card is the only entry */
.dsc-md-capsule-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.2rem;
}
.dsc-md-capsule-card-status {
  flex-shrink: 0;
}
.dsc-md-object-card.dsc-md-capsule-card-active-r7m {
  border-color: #7ba3cc;
  background: #f0f6fc;
  box-shadow: inset 0 0 0 1px rgba(123, 163, 204, 0.2);
}
.dsc-md-object-card.dsc-md-capsule-card-active-r7m .dsc-md-capsule-card-status {
  font-weight: 600;
}
.dsc-md-object-card.dsc-md-object-card-tile:hover:not(.dsc-md-capsule-card-active-r7m) {
  border-color: #9ab4cc;
  background: #f5f9fd;
  box-shadow: 0 1px 3px rgba(58, 110, 165, 0.08);
}
.dsc-md-object-card.dsc-md-object-card-tile:focus-visible {
  outline: 2px solid #7ba3cc;
  outline-offset: 2px;
}
.dsc-md-object-card-meta {
  font-size: 0.72rem;
}
.dsc-md-object-card-desc {
  font-size: 0.72rem;
  line-height: 1.35;
}
.dsc-md-object-status-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
}
.dsc-md-object-status-open {
  background: #e6f4ea;
  color: #1e6b3a;
}
.dsc-md-object-status-protected {
  background: #ede9fe;
  color: #5b21b6;
}
.dsc-md-object-status-readonly {
  background: #e8f0fe;
  color: #1d4ed8;
}
.dsc-md-object-status-deferred {
  background: #f3f4f6;
  color: #6b7280;
}
.dsc-md-source-readonly-section {
  padding: 0.35rem 0;
}
.dsc-md-source-readonly-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #5b21b6;
}
.dsc-md-source-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.4rem 0.65rem;
}
.dsc-md-source-readonly-field {
  font-size: 0.76rem;
}
.dsc-md-source-readonly-label {
  display: block;
  color: #64748b;
  margin-bottom: 0.1rem;
}
.dsc-md-source-readonly-value {
  display: block;
  word-break: break-all;
  color: #334155;
}
.dsc-md-r24b-save-warning {
  margin: 0.5rem 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #f6e05e;
  border-radius: 4px;
  background: #fffff0;
  color: #744210;
}
.dsc-maintain-layer-group {
  padding: 0.85rem 1rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
}
.dsc-master-data-nav-chip {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.dsc-master-data-nav-chip.is-active {
  background: var(--ctrm-surface-muted, #f0f4f8);
  border-color: #9ab4cc;
}
.dsc-master-data-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(min(100%, 16rem), 0.9fr);
  gap: 0.75rem;
  align-items: start;
}
.dsc-master-data-split-r7h {
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  align-items: stretch;
}
.dsc-md-r7k-split {
  grid-template-columns: minmax(720px, 1fr) minmax(360px, 400px);
  gap: 16px;
  align-items: start;
}
.dsc-md-r7k-split .dsc-md-r7h-detail-pane,
.dsc-md-r7k-split .dsc-master-data-detail {
  max-width: 400px;
}
.dsc-md-r7h-list-pane {
  min-width: 0;
}
.dsc-md-r7h-detail-pane {
  position: sticky;
  top: 0.75rem;
  align-self: start;
  max-height: calc(100vh - 1.5rem);
  overflow-y: auto;
  outline: none;
}
.dsc-md-r7h-detail-pane.dsc-md-r7h-panel-active {
  box-shadow: 0 0 0 2px rgba(154, 180, 204, 0.35);
}
.dsc-md-r7h-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.dsc-md-entity-list-primary {
  min-width: 0;
}
.dsc-md-governance-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  border-radius: 999px;
  border: 1px solid rgba(154, 180, 204, 0.45);
  background: rgba(154, 180, 204, 0.12);
  color: var(--ctrm-muted, #6b7280);
  vertical-align: middle;
}
.dsc-md-list-secondary-metadata {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(154, 180, 204, 0.35);
  font-size: 0.78rem;
}
.dsc-md-list-secondary-metadata-block {
  margin: 0.35rem 0 0;
}
.dsc-md-list-secondary-metadata-block.dsc-md-batch3-readiness-r27b {
  border: none;
  background: transparent;
  padding: 0;
}
.dsc-md-list-secondary-metadata-summary {
  cursor: pointer;
  font-size: 0.76rem;
  color: var(--ctrm-muted, #6b7280);
  user-select: none;
}
.dsc-md-list-secondary-metadata-body {
  margin-top: 0.35rem;
  padding-left: 0.25rem;
}
.dsc-md-list-secondary-metadata .dsc-md-batch3-readiness-list {
  margin: 0.25rem 0 0.35rem;
  padding-left: 1.1rem;
}
.dsc-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.dsc-md-primary-action {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.35rem 0.75rem;
  border: 1px solid #2f6fad;
  border-radius: 5px;
  background: #3a7fc1;
  color: #fff;
  cursor: pointer;
}
.dsc-md-primary-action:hover {
  background: #356fa8;
  border-color: #2a6296;
}
.dsc-md-secondary-action {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 5px;
  background: #fff;
  color: var(--ctrm-text, #2c3440);
  cursor: pointer;
}
.dsc-md-secondary-action:hover {
  background: var(--ctrm-surface-muted, #f5f7fa);
  border-color: #b8c4d0;
}
.dsc-md-r7h-list-toolbar .dsc-md-r22-refresh-list,
.dsc-md-toolbar .dsc-md-r22-refresh-list {
  order: 1;
}
.dsc-md-r7h-list-toolbar .dsc-md-r22-new-record,
.dsc-md-toolbar .dsc-md-r22-new-record {
  order: 2;
}
.dsc-md-r7h-panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--ctrm-border-muted, #e2e6ea);
}
.dsc-md-r7h-panel-tab {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.dsc-md-r7h-panel-tab.is-active {
  background: var(--ctrm-surface-muted, #f0f4f8);
  border-color: #9ab4cc;
  font-weight: 600;
}
.dsc-md-r7h-detail-dl {
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr;
  gap: 0.25rem 0.65rem;
  margin: 0;
  font-size: 0.78rem;
}
.dsc-md-r7h-detail-dl dt {
  margin: 0;
  color: var(--ctrm-muted-text, #5c6570);
}
.dsc-md-r7h-detail-dl dd {
  margin: 0;
}
.dsc-md-r7h-tech-fold {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}
.dsc-md-r7h-empty-state {
  padding: 0.5rem 0;
}
.dsc-master-data-list-title,
.dsc-master-data-detail-title,
.dsc-master-data-preconditions-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.dsc-master-data-main-table {
  width: 100%;
  font-size: 0.76rem;
}
.dsc-md-record-table {
  table-layout: fixed;
  border-collapse: collapse;
}
.dsc-md-record-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: left;
  padding: 0.4rem 0.5rem;
  background: var(--ctrm-surface-muted, #f3f6f9);
  border-bottom: 1px solid var(--ctrm-border-muted, #dde3ea);
  white-space: nowrap;
}
.dsc-md-record-table tbody td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #eef1f4;
  vertical-align: middle;
}
.dsc-md-record-table tbody tr:hover {
  background: #fafbfc;
}
.dsc-md-record-table .dsc-md-code-cell {
  width: 32%;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsc-md-record-table .dsc-md-code-cell code {
  font-size: 0.72rem;
}
.dsc-md-record-table .dsc-md-name-cell {
  width: 28%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsc-md-record-table .dsc-md-status-col {
  width: 90px;
  white-space: nowrap;
}
.dsc-md-record-table .dsc-md-time-cell {
  width: 150px;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--ctrm-muted-text, #5c6570);
}
/* Counterparty governance list — column widths from dscMdEntityListColumnsR1 colgroup only */
.dsc-md-counterparty-gov-list col[data-dsc-field-key] {
  min-width: 0;
}
.dsc-md-counterparty-gov-list thead th,
.dsc-md-counterparty-gov-list tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}
.dsc-md-counterparty-gov-list .dsc-md-name-cell-inner,
.dsc-md-counterparty-gov-list .dsc-md-time-cell-inner,
.dsc-md-counterparty-gov-list .dsc-md-cell-inner {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsc-md-counterparty-gov-list tbody td.dsc-md-col-lifecycle_state {
  white-space: nowrap;
  max-width: none;
}
.dsc-md-record-table .dsc-md-actions-col,
.dsc-master-data-action-col.dsc-md-actions-col {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  white-space: nowrap;
}
.dsc-md-selected-row,
.dsc-master-data-list-row.is-selected {
  background: #eef4fa !important;
  box-shadow: inset 3px 0 0 #6a9bc8;
}
.dsc-md-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem;
}
.dsc-md-row-action {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.12rem 0.35rem;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #3a6ea5;
  cursor: pointer;
  white-space: nowrap;
}
.dsc-md-row-action:hover:not([disabled]) {
  background: #eef4fa;
  color: #2a5580;
  text-decoration: underline;
}
.dsc-md-row-action + .dsc-md-row-action::before {
  content: "｜";
  color: #c8d0d8;
  margin-right: 0.15rem;
  font-weight: 400;
  pointer-events: none;
}
.dsc-md-detail-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--ctrm-border-muted, #dde3ea);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dsc-md-detail-header {
  margin-bottom: 0.65rem;
}
.dsc-md-detail-title,
.dsc-md-detail-header .dsc-master-data-detail-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  line-height: 1.35;
}
.dsc-md-detail-subtitle {
  font-size: 0.78rem;
  color: var(--ctrm-muted-text, #5c6570);
  margin: 0 0 0.65rem;
  line-height: 1.45;
}
.dsc-md-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}
.dsc-md-detail-status .dsc-md-status-badge {
  margin-left: 0;
}
.dsc-md-detail-tabs {
  margin-bottom: 0.55rem;
}
.dsc-md-detail-section {
  margin-bottom: 0.65rem;
}
.dsc-md-empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0 0.25rem;
}
.dsc-md-empty-actions {
  margin: 0.25rem 0 0.15rem;
}
.dsc-md-mode-hint {
  font-size: 0.72rem;
  margin: 0.25rem 0 0;
}
.dsc-md-r7h-panel-body,
.dsc-md-detail-body {
  min-height: 8rem;
}
.dsc-md-r7h-new-mode-hint {
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.76rem;
  border-radius: 4px;
  background: #fff8e1;
  border: 1px solid #f0e0a8;
  color: #7a6200;
}
.dsc-master-data-list-row.is-selected {
  background: #eef4fa;
}
.dsc-master-data-action-col {
  min-width: 9rem;
}
.dsc-master-data-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.dsc-master-data-action-link {
  font-size: 0.72rem;
  font-weight: 600;
}
.dsc-disabled-action {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border: 1px dashed #c8d0d8;
  border-radius: 3px;
  background: #f8f9fa;
  color: #6b7280;
  cursor: not-allowed;
}
.dsc-disabled-action-hint {
  font-size: 0.7rem;
  color: #6b7280;
}
.dsc-master-data-detail {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
}
.dsc-master-data-detail-section {
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #eef1f4;
}
.dsc-master-data-detail-section h4 {
  font-size: 0.8rem;
  margin: 0 0 0.25rem;
  font-weight: 600;
}
.dsc-master-data-detail-empty {
  padding: 0.75rem;
  color: var(--ctrm-muted-text, #5c6570);
}
.dsc-master-data-readiness-hero {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8f9fa);
  font-size: 0.82rem;
}
.dsc-md-view-desc-r1 .dsc-md-view-desc-section + .dsc-md-view-desc-section {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--ctrm-border-muted, #e8ecef);
}
.dsc-md-view-desc-heading {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.dsc-md-view-desc-subhead {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.8rem;
}
.dsc-md-view-desc-lead {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
}
.dsc-md-view-desc-priority-list {
  list-style: decimal;
}
.dsc-master-data-readiness-list {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
}
.dsc-precondition-list-items {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
}
.dsc-edit-level-badge {
  font-size: 0.7rem;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  background: #eef2f6;
  border: 1px solid #d8dee6;
}
.dsc-master-data-secondary {
  margin-top: 0.75rem;
  font-size: 0.78rem;
}
@media (max-width: 1180px) {
  .dsc-md-r7k-split {
    grid-template-columns: 1fr;
  }
  .dsc-md-r7k-split .dsc-md-r7h-detail-pane,
  .dsc-md-r7k-split .dsc-master-data-detail {
    max-width: none;
  }
}
@media (max-width: 900px) {
  .dsc-container {
    flex-direction: column;
    gap: 24px;
  }
  .dsc-detail-panel {
    min-width: 0;
    width: 100%;
  }
  .dsc-master-data-main,
  .dsc-master-data-split-r7h {
    grid-template-columns: 1fr;
  }
  .dsc-md-r7h-detail-pane {
    position: static;
    max-height: none;
  }
}

/* DSC Master Data R16B — low-risk save UI integration */
.dsc-md-r16b-schema-banner {
  margin: 0.5rem 0;
}
.dsc-md-r16b-warning-banner {
  padding: 0.65rem 0.75rem;
  border: 1px solid #e8c4c4;
  background: #fff5f5;
  border-radius: 6px;
  font-size: 0.82rem;
}
.dsc-md-r16b-warning-detail {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #6b4a4a;
}
.dsc-md-r17-rejected-hint {
  font-size: 0.78rem;
  color: #9b4a2c;
  background: #fff8f0;
  border-left: 3px solid #e8a87c;
  padding: 0.35rem 0.5rem;
  margin: 0 0 0.5rem;
}
.dsc-disabled-action[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.dsc-md-schema-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.25rem;
}
.dsc-md-schema-applied {
  background: #e6f4ea;
  color: #1e6b3a;
}
.dsc-md-schema-missing {
  background: #fde8e8;
  color: #9b2c2c;
}
.dsc-md-status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-left: 0;
  line-height: 1.3;
  white-space: nowrap;
}
.dsc-md-status-draft { background: #eef2f6; color: #4a5568; border: 1px solid #d8dee6; }
.dsc-md-status-submitted { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.dsc-md-status-approved { background: #e6f4ea; color: #1e6b3a; border: 1px solid #b8dfc4; }
.dsc-md-status-rejected { background: #fde8e8; color: #9b2c2c; border: 1px solid #f0c4c4; }
.dsc-md-status-active { background: #e6f4ea; color: #1e6b3a; border: 1px solid #b8dfc4; }
.dsc-md-status-inactive { background: #eef2f6; color: #5c6570; border: 1px solid #d8dee6; }
.dsc-md-status-deprecated { background: #fde8e8; color: #9b2c2c; border: 1px solid #f0c4c4; }
.dsc-md-mdm-legacy-banner {
  margin: 0.35rem 0 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: #fff8e6;
  border: 1px solid #f0d58a;
  color: #7a5b00;
  font-size: 0.82rem;
}
.dsc-md-mdm-lifecycle-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.dsc-md-mdm-lifecycle-new_from_fact { background: #eef6ff; color: #1a4f8a; border-color: #c5dcf5; }
.dsc-md-mdm-lifecycle-suggested { background: #f3efff; color: #5b3ea8; border-color: #d8ccf5; }
.dsc-md-mdm-lifecycle-draft_created { background: #eef2f6; color: #4a5568; border-color: #d8dee6; }
.dsc-md-mdm-lifecycle-dedup_linked { background: #e8f8f2; color: #1e6b52; border-color: #b8e6d4; }
.dsc-md-mdm-lifecycle-needs_review { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.dsc-md-mdm-lifecycle-confirmed_master { background: #e6f4ea; color: #1e6b3a; border-color: #b8dfc4; }
.dsc-md-mdm-lifecycle-detail {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fafbfc;
}
.dsc-md-mdm-lifecycle-detail h5 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
}
.dsc-md-mdm-governance-actions {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
}
.dsc-md-mdm-review-btn {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #c5dcf5;
  background: #eef6ff;
  color: #1a4f8a;
  cursor: pointer;
}
.dsc-md-mdm-review-btn:hover {
  background: #dcecff;
}
.dsc-md-mdm-save-btn {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #b8dfc4;
  background: #e6f4ea;
  color: #1e6b3a;
  cursor: pointer;
  margin-left: 0.35rem;
}
.dsc-md-mdm-save-btn:hover {
  background: #d4eedc;
}
.dsc-md-mdm-cp-input {
  width: 100%;
  max-width: 16rem;
  font-size: 0.82rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--ctrm-border, #d8dee6);
  border-radius: 4px;
}
.dsc-md-counterparty-governance-fields input.dsc-md-mdm-cp-input {
  box-sizing: border-box;
}
.dsc-md-r16b-edit-btn,
.dsc-md-r16b-new-btn,
.dsc-md-r16b-changelog-btn,
.dsc-md-r16b-btn-save,
.dsc-md-r16b-btn-submit,
.dsc-md-r16b-btn-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  margin: 0.1rem;
  cursor: pointer;
}
.dsc-md-blocked-reason {
  color: #9b2c2c;
  font-size: 0.8rem;
  margin: 0.25rem 0;
}
.dsc-md-r16b-edit-form label {
  display: block;
  font-size: 0.78rem;
  margin: 0.35rem 0;
}
.dsc-md-r16b-edit-form input,
.dsc-md-r16b-edit-form select,
.dsc-md-r16b-edit-form textarea {
  width: 100%;
  max-width: 24rem;
  font-size: 0.78rem;
}
.dsc-md-r16b-form-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.dsc-md-change-log-table {
  font-size: 0.72rem;
  word-break: break-all;
}
.dsc-md-r16b-drawer,
.dsc-md-r16b-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.dsc-md-r16b-drawer[hidden],
.dsc-md-r16b-modal[hidden] {
  display: none;
}
.dsc-md-r16b-drawer-backdrop,
.dsc-md-r16b-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.dsc-md-r16b-drawer-panel {
  position: relative;
  width: min(100%, 28rem);
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
  padding: 0.75rem 1rem;
  overflow-y: auto;
}
.dsc-md-r16b-modal-panel {
  position: relative;
  margin: auto;
  width: min(92%, 32rem);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.dsc-md-r16b-drawer-header,
.dsc-md-r16b-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.dsc-md-r16b-drawer-close,
.dsc-md-r16b-modal-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}
.dsc-md-api-instances {
  font-size: 0.78rem;
  padding-left: 1.1rem;
}
.dsc-md-inline-edit-section {
  border: 1px dashed #c5d0dc;
  padding: 0.5rem;
  border-radius: 6px;
}

/* DATA-CENTER-GREY-STATE-SEMANTIC-UI-FIX-R18B — grey only for disabled/blocked/unavailable */
.ctrm-card-available {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  color: var(--ctrm-text, #1e293b);
}
.ctrm-card-readonly {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  color: var(--ctrm-text, #1e293b);
}
.ctrm-card-linked {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid #93c5fd;
  border-radius: 8px;
}
.ctrm-card-registry {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid #c4b5fd;
  border-radius: 8px;
}
.ctrm-card-deferred {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.ctrm-card-blocked {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-state-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
}
.ctrm-state-badge--readonly {
  background: #e0f2fe;
  color: #0369a1;
}
.ctrm-state-badge--linked {
  background: #dbeafe;
  color: #1d4ed8;
}
.ctrm-state-badge--registry {
  background: #ede9fe;
  color: #6d28d9;
}
.ctrm-state-badge--deferred {
  background: #fef3c7;
  color: #b45309;
}
.ctrm-state-badge--blocked {
  background: #e5e7eb;
  color: #4b5563;
}
.dc-grey-semantic-notice {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: var(--ctrm-text, #1e293b);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Scoped data-center overrides — restore normal-available visuals */
.dc-grey-semantic-r18b .dsc-bucket-card,
.dc-grey-semantic-r18b .dsc-bucket-card.ctrm-card-available {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  color: var(--ctrm-text, #1e293b);
}
.dc-grey-semantic-r18b .dsc-bucket-lead,
.dc-grey-semantic-r18b .dsc-bucket-objects {
  color: var(--ctrm-text-muted, #64748b);
}
.dc-grey-semantic-r18b .dsc-bucket-cta-nav a {
  color: var(--ctrm-accent, #0369a1);
  font-weight: 500;
  text-decoration: none;
}
.dc-grey-semantic-r18b .dsc-bucket-cta-nav a:hover {
  text-decoration: underline;
}
.dc-grey-semantic-r18b .dsc-boundary-badge--readonly {
  background: #e0f2fe;
  color: #0369a1;
}
.dc-grey-semantic-r18b .dsc-boundary-badge--registry {
  background: #ede9fe;
  color: #6d28d9;
}
.dc-grey-semantic-r18b .dsc-hub-summary-card,
.dc-grey-semantic-r18b .dsc-hub-summary-card.ctrm-card-available {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}
.dc-grey-semantic-r18b .dsc-hub-summary-label {
  color: var(--ctrm-text-muted, #64748b);
}
.dc-grey-semantic-r18b .dsc-inbox-item.ctrm-card-available,
.dc-grey-semantic-r18b .dsc-governance-inbox-list .operator-task-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
.dc-grey-semantic-r18b .di-ia-main-section,
.dc-grey-semantic-r18b .di-management-section,
.dc-grey-semantic-r18b .di-quality-section {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
}
.dc-grey-semantic-r18b .di-ia-section-lead {
  color: var(--ctrm-text-muted, #64748b);
}
.dc-grey-semantic-r18b .di-polish-module,
.dc-grey-semantic-r18b .mdc-polish-module,
.dc-grey-semantic-r18b .dsc-polish-module {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
}
.dc-grey-semantic-r18b .di-polish-summary-card,
.dc-grey-semantic-r18b .di-live-summary-card,
.dc-grey-semantic-r18b .di-capability-card,
.dc-grey-semantic-r18b .mdc-polish-summary-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
  opacity: 1;
  filter: none;
}
.dc-grey-semantic-r18b .di-polish-summary-card h4,
.dc-grey-semantic-r18b .di-live-summary-card h4,
.dc-grey-semantic-r18b .mdc-polish-summary-card h4 {
  color: var(--ctrm-text-muted, #64748b);
  text-transform: none;
}
.dc-grey-semantic-r18b .di-page-polish-r1,
.dc-grey-semantic-r18b .mdc-page-polish-r1,
.dc-grey-semantic-r18b .dsc-page-polish-r1,
.dc-grey-semantic-r18b .existing-page-merge-r1 {
  background: transparent;
  border-color: var(--ctrm-border, #e2e8f0);
}
.dc-grey-semantic-r18b .di-polish-empty-state,
.dc-grey-semantic-r18b .di-empty-state-readable {
  background: #f8fafc;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  color: var(--ctrm-text, #1e293b);
}
.dc-grey-semantic-r18b .dad-dashboard-anomaly-card,
.dc-grey-semantic-r18b .dad-dashboard-anomaly-card.ctrm-card-available {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-style: solid;
}
.dc-grey-semantic-r18b .dad-deep-link-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  color: var(--ctrm-text, #1e293b);
}
.dc-grey-semantic-r18b .dad-task-card {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
}
.dc-grey-semantic-r18b .hub-merge-tag--deferred,
.dc-grey-semantic-r18b .hub-merge-tag--placeholder {
  background: #fef3c7;
  color: #b45309;
}
.dc-grey-semantic-r18b .hub-merge-tag--readonly {
  background: #e0f2fe;
  color: #0369a1;
}
.dc-grey-semantic-r18b .hub-merge-tag--linked {
  background: #dbeafe;
  color: #1d4ed8;
}
.dc-grey-semantic-r18b .hub-merge-tag--registry-only {
  background: #ede9fe;
  color: #6d28d9;
}
.dc-grey-semantic-r18b .di-ia-main-section.ctrm-card-available {
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

/* DSC Master Data R22 — Batch 2 UI split panel */
.dsc-md-r22-schema-ready-banner {
  padding: 0.65rem 0.75rem;
  border: 1px solid #b8dcc8;
  background: #f0faf4;
  border-radius: 6px;
  font-size: 0.82rem;
}
.dsc-md-r22-schema-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: #4a6b5a;
}
.dsc-master-data-nav-chip.is-blocked {
  opacity: 0.72;
  border-style: dashed;
}
.dsc-md-r22-nav-blocked {
  font-size: 0.65rem;
  color: #9b4a2c;
  margin-left: 0.2rem;
}
.dsc-md-r22-blocked-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: #fef3c7;
  border: 1px solid #f0d080;
  color: #9b4a2c;
}
.dsc-md-r22-empty-state {
  padding: 1rem;
  border: 1px dashed var(--ctrm-border-muted, #d8dee6);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8f9fa);
  font-size: 0.82rem;
}
.dsc-md-r22-detail-panel {
  max-height: calc(100vh - 12rem);
  overflow: auto;
}
.dsc-md-field-linkage-panel-r7d {
  border: 1px solid var(--ctrm-border, #dee2e6);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  background: var(--ctrm-surface-muted, #f8f9fa);
}
.dsc-md-field-linkage-notice {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}
.dsc-md-field-linkage-block {
  margin: 0.45rem 0;
}
.dsc-md-field-linkage-block h5 {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
}
.dsc-md-field-linkage-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.76rem;
}
.dsc-md-linkage-empty {
  margin: 0;
  font-size: 0.76rem;
}
.dsc-md-linkage-readonly-badge {
  font-size: 0.68rem;
  color: var(--ctrm-muted, #6c757d);
}
.dsc-md-field-linkage-guard {
  color: var(--ctrm-warning-text, #856404);
  font-size: 0.76rem;
}
.dsc-md-field-form-r7b textarea {
  min-height: 2.5rem;
}
.dsc-md-field-pages-col {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsc-md-r22-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.5rem;
}
.dsc-md-r22-form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  gap: 0.15rem;
}
.dsc-md-r22-change-reason {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.78rem;
}
.dsc-md-r22-meta-preview {
  font-size: 0.7rem;
  max-height: 8rem;
  overflow: auto;
  background: #f8f9fa;
  padding: 0.35rem;
  border-radius: 4px;
}
.dsc-md-r22-api-error {
  color: #b42318;
  font-size: 0.78rem;
  margin: 0.35rem 0;
}
.dsc-md-r22-confirm-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.dsc-md-r22b-form-error {
  padding: 0.5rem 0.65rem;
  margin: 0.35rem 0 0.5rem;
  border: 1px solid #e8c4c4;
  background: #fff5f5;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #8b2e2e;
}
.dsc-md-r22b-readonly-banner {
  padding: 0.5rem 0.65rem;
  margin: 0.35rem 0;
  border: 1px solid #d8dee6;
  background: #f5f7fa;
  border-radius: 4px;
  font-size: 0.78rem;
}
.dsc-md-r7n-list-notice {
  padding: 0.5rem 0.65rem;
  margin: 0.35rem 0;
  border: 1px dashed #d8dee6;
  background: #fafbfc;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #57606a;
}
.dsc-md-r22b-downstream-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.76rem;
}

/* R22F — legacy entry deprecated notice (warm amber · not grey disabled) */
.dsc-deprecated-entry-notice {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e8c468;
  border-left: 4px solid #d4a017;
  border-radius: 6px;
  background: #fffbeb;
  color: #5c4a12;
}
.dsc-deprecated-entry-notice-text {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.dsc-deprecated-entry-note {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #7a6520;
}
.dsc-deprecated-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.dsc-deprecated-entry-actions .btn-primary {
  background: #b8860b;
  border-color: #9a7209;
}
.dsc-deprecated-entry-actions .btn-primary:hover {
  background: #9a7209;
}
[data-dsc-legacy-master-blocked] .dsc-biz-native-form-panel,
[data-dsc-legacy-master-blocked] .strategy-taxonomy-form-block {
  opacity: 0.92;
}
[data-dsc-legacy-master-blocked] .dsc-legacy-save-blocked {
  cursor: not-allowed;
  opacity: 0.55;
}
[data-mdc-master-view-only="commodity"] .mdc-legacy-save-blocked,
.mdc-master-deprecated-r24f ~ .native-op-table-wrap ~ #mdc-master-native-form .mdc-legacy-save-blocked {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.15);
}
.mdc-commodity-readonly-dl {
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.mdc-commodity-readonly-dl dt {
  display: inline;
  font-weight: 600;
}
.mdc-commodity-readonly-dl dd {
  display: inline;
  margin: 0 0 0 4px;
}
.mdc-commodity-readonly-dl div + div {
  margin-top: 4px;
}
.mdc-commodity-dsc-link {
  font-weight: 600;
  color: #9a7209;
}
.mdc-contract-shell-operational-notice {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dbeafe;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  background: #f0f9ff;
  color: #1e3a5f;
}

/* R22G — master data form sections: required / optional / system */
.dsc-md-form-section {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.dsc-md-form-section-required {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.dsc-md-form-section-optional {
  border-color: #e2e8f0;
  background: #fefefe;
}
.dsc-md-form-section-system {
  border-color: #dbeafe;
  background: #f8fbff;
}
.dsc-md-form-section-source-readonly {
  border-color: #e9d5ff;
  background: #faf8ff;
}
.dsc-md-form-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a365d;
  cursor: pointer;
}
.dsc-md-form-section-required .dsc-md-form-section-title {
  cursor: default;
}
.dsc-md-form-section-hint {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.dsc-md-required-badge {
  display: inline-block;
  margin-right: 0.2rem;
  color: #c53030;
  font-weight: 700;
}
.dsc-md-system-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem 0.75rem;
}
.dsc-md-system-field {
  font-size: 0.78rem;
}
.dsc-md-system-field-label {
  display: block;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.dsc-md-system-field-value {
  display: block;
  word-break: break-all;
  font-size: 0.76rem;
  color: #334155;
}
.dsc-md-r22g-edit-form .dsc-md-r22-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem 0.75rem;
}
.dsc-md-r22g-edit-form .dsc-md-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.84rem;
}

/* CTRM-DSC-P0-IMPLEMENTATION-R1 — Master grid · workspace · insight rail · governance panel */
/* CTRM-UI-THREE-LAYER-GOVERNANCE-R1 — .dsc-p0-legacy-chrome-hidden: marker only; use HTML hidden + JS, not CSS display */
.dsc-p0-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.dsc-p0-master-grid-zone {
  padding: 0.5rem 0;
}
.dsc-p0-master-grid {
  display: block;
}
.dsc-p0-master-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (min-width: 1100px) {
  .dsc-p0-master-grid-inner {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
.dsc-p0-master-tile {
  min-height: 4.75rem;
  height: 100%;
}
.dsc-p0-body-row {
  display: block;
  margin-top: 0.35rem;
}
.dsc-p0-workspace-col {
  min-width: 0;
}
.dsc-p0-workspace-context-inline {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}
.dsc-p0-workspace-inner {
  margin-bottom: 0;
}
.dsc-p0-workspace-main {
  display: grid;
  grid-template-columns: minmax(12rem, 28%) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.dsc-p0-list-pane {
  min-width: 0;
  max-height: min(70vh, 42rem);
  overflow: auto;
}
.dsc-p0-detail-pane {
  min-width: 0;
}
.dsc-p0-insight-rail {
  display: flex;
  flex-direction: column;
  width: 2.4rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 6px;
  background: #f8fafc;
  transition: width 0.2s ease;
  overflow: hidden;
}
.dsc-p0-insight-rail--collapsed {
  width: 2.4rem;
}
.dsc-p0-insight-rail:not(.dsc-p0-insight-rail--collapsed) {
  width: min(18rem, 28vw);
}
.dsc-p0-insight-toggle {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 0.65rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: #3d5a80;
  cursor: pointer;
  align-self: stretch;
}
.dsc-p0-insight-toggle:hover {
  background: #eef4fb;
}
.dsc-p0-insight-rail:not(.dsc-p0-insight-rail--collapsed) .dsc-p0-insight-toggle {
  writing-mode: horizontal-tb;
  text-align: left;
  border-bottom: 1px solid var(--ctrm-border-muted, #e2e6ea);
}
.dsc-p0-insight-body {
  flex: 1;
  padding: 0.55rem 0.65rem;
  overflow: auto;
  max-height: min(70vh, 42rem);
  font-size: 0.78rem;
}
.dsc-p0-insight-sections {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.dsc-p0-insight-block {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--ctrm-border-muted, #eef1f4);
}
.dsc-p0-insight-block:last-child {
  border-bottom: 0;
}
.dsc-p0-insight-title {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a365d;
}
.dsc-p0-insight-changelog {
  margin: 0;
  padding-left: 1.1rem;
}
.dsc-p0-governance-panel {
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 6px;
  background: #fff;
  padding: 0.35rem 0.65rem;
}
.dsc-p0-governance-panel-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1a365d;
  padding: 0.35rem 0;
}
.dsc-p0-governance-panel-body {
  padding: 0.35rem 0 0.65rem;
}
.dsc-p0-governance-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dsc-p0-governance-section-title {
  margin: 0 0 0.25rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1a365d;
}
.dsc-p0-governance-satellite-nested {
  border: 1px dashed var(--ctrm-border-muted, #e2e6ea);
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
}
.dsc-p0-governance-satellite-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.dsc-p0-governance-tile {
  min-height: 2.4rem;
  font-size: 0.76rem;
}
@media (max-width: 900px) {
  .dsc-p0-workspace-main {
    grid-template-columns: 1fr;
  }
  .dsc-p0-body-row {
    grid-template-columns: 1fr;
  }
  .dsc-p0-insight-rail:not(.dsc-p0-insight-rail--collapsed) {
    width: 100%;
  }
  .dsc-p0-master-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* CTRM-DSC-VIEW-ACCESS-REVEAL-FIX-R1 — header affordances; no layout grid change */
.dsc-p0-view-access-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.78rem;
  line-height: 1.2;
}
.dsc-p0-workspace-context {
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.dsc-p0-view-access-sep {
  color: #94a3b8;
  user-select: none;
}
.dsc-p0-view-access-trigger {
  border: 0;
  background: transparent;
  color: #3d5a80;
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.05rem 0.2rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dsc-p0-view-access-trigger:hover {
  color: #1a365d;
}
.dsc-p0-view-access-trigger:focus-visible {
  outline: 2px solid #7ba3cc;
  outline-offset: 2px;
}
.dsc-p0-view-access-trigger[aria-expanded="true"] {
  color: #1a365d;
}
.dsc-p0-insight-rail--revealed {
  box-shadow: 0 0 0 2px rgba(61, 90, 128, 0.35);
  transition: box-shadow 0.2s ease;
}

/* CTRM-UI-SEMANTIC-EXTRACTION-R1 — maintain view relationship entry */
.dsc-maintain-relationship-zone {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 6px;
  background: #fff;
}
.dsc-maintain-relationship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.dsc-maintain-relationship-card {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ctrm-border-muted, #e2e6ea);
  border-radius: 5px;
  background: #fafbfc;
}
.dsc-maintain-relationship-card-title {
  margin: 0 0 0.2rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.dsc-inbox-status-readonly {
  display: inline-block;
  font-size: 0.76rem;
  margin-top: 0.25rem;
}

/* DATA-CENTER-UI-STRUCTURE-POLISH-R1 */
.dc-home-layered-r1 {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 8px;
  background: var(--ctrm-surface, #fff);
}
.dc-home-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.dc-home-health-strip {
  margin-top: 0.65rem;
}
.dc-entry-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0.85rem;
}
.dc-entry-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--ctrm-border-muted, #c8d0d8);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ctrm-text, #1a1d21);
  background: var(--ctrm-surface-muted, #f4f6f8);
}
.dc-entry-nav-link:hover {
  background: #fff;
}
.dc-entry-nav-link--active {
  border-color: #0ea5e9;
  background: #e0f2fe;
}
.dc-module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dc-module-card {
  display: block;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--ctrm-border-muted, #d8dee6);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: var(--ctrm-surface-muted, #f8fafc);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dc-module-card:hover {
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}
.dc-module-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0369a1;
  margin-bottom: 0.25rem;
}
.dc-module-card-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.dc-module-card-mode {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.dc-status-snapshot {
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ctrm-border-muted, #d8dee6);
}
.dc-deeplink-only-zone {
  display: none;
}
.dc-deeplink-only-zone.dc-deeplink-only-zone--open,
.dc-deeplink-only-zone:target {
  display: block;
}
.dsc-tab-split-r1 .dsc-view-tab {
  flex: 1 1 50%;
}
.dsc-view-panel--governance-stack {
  margin-bottom: 0.75rem;
}
.dsc-view-panel[hidden] {
  display: none !important;
}
.mdc-lineage-table a {
  word-break: break-all;
}
.dc-readonly-reload {
  font-size: 0.82rem;
}

/* DATA-CENTER-UI-DENSITY-R1 — visual-only spacing · no logic */
.dc-density-r1 .ctrm-hint,
.dad-cockpit .ctrm-hint,
.dsc-cockpit .ctrm-hint,
.di-cockpit .ctrm-hint,
.mdc-cockpit .ctrm-hint {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.dc-density-r1 .admin-cockpit__section-title,
.dad-cockpit .admin-cockpit__section-title,
.dsc-cockpit .admin-cockpit__section-title,
.di-cockpit .admin-cockpit__section-title,
.mdc-cockpit .admin-cockpit__section-title {
  margin-bottom: 0.45rem;
}
.dc-density-r1 .admin-cockpit__subsection-title,
.dad-cockpit .admin-cockpit__subsection-title,
.dsc-cockpit .admin-cockpit__subsection-title,
.di-cockpit .admin-cockpit__subsection-title,
.mdc-cockpit .admin-cockpit__subsection-title {
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
}
.dc-home-layered-r1 {
  padding: 0.85rem 1rem;
}
.dc-module-cards {
  gap: 0.6rem;
}
.dc-module-card {
  padding: 0.7rem 0.85rem;
}
.dc-module-card-note {
  margin: 0;
  font-size: 0.78rem;
}
.dc-status-snapshot {
  padding-top: 0.4rem;
}
.dad-dashboard-summary-grid,
.dad-dashboard-anomaly-grid {
  gap: 0.6rem;
}
.dad-dashboard-anomaly-card,
.dad-dashboard-summary-card {
  padding: 0.65rem 0.75rem;
}
.dsc-tab-split-r1 {
  margin-bottom: 0.65rem;
}
.dsc-view-panel--governance-stack {
  margin-bottom: 0.5rem;
}
.di-ia-main-section,
.mdc-section-object-registry,
.mdc-section-lineage-view,
.mdc-section-governance-kpi {
  padding: 0.75rem 0.85rem;
}
.di-live-summary-grid-host,
.di-attention-list-host {
  gap: 0.5rem;
}
.ctrm-table--compact td,
.ctrm-table--compact th,
.mdc-lineage-table td,
.mdc-lineage-table th,
.dad-readonly-table td,
.dad-readonly-table th {
  padding: 0.35rem 0.5rem;
  vertical-align: top;
}
.dc-grey-semantic-notice,
.dad-summary-only-banner,
.di-readonly-banner-lead {
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.5rem;
}

/* DATA-CENTER-DAD-OBSERVABILITY-R1 — visual hierarchy · readonly cockpit */
.dad-cockpit--observability-r1 .dad-system-status-bar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--ctrm-border, #d8dee4);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f6f8fa);
}
.dad-cockpit--observability-r1 .dad-system-status-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dad-cockpit--observability-r1 .dad-architecture-frozen-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  color: #475569;
  background: #fff;
}
.dad-cockpit--observability-r1 .dad-zone-kpi {
  margin-bottom: 1rem;
}
.dad-cockpit--observability-r1 .dad-zone-kpi-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.dad-cockpit--observability-r1 .dad-cron-health-decouple {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ctrm-border, #d8dee4);
  border-radius: 6px;
}
.dad-cockpit--observability-r1 .dad-cron-health-decouple__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.65rem;
}
.dad-cockpit--observability-r1 .dad-cron-health-ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.55rem;
}
.dad-cockpit--observability-r1 .dad-cron-health-ledger-card {
  padding: 0.45rem 0.55rem;
  border: 1px dashed var(--ctrm-border, #d8dee4);
  border-radius: 4px;
}
.dad-cockpit--observability-r1 .dad-cron-health-ledger-card__title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.dad-cockpit--observability-r1 .dad-cron-health-run-rows {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  max-height: 14rem;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}
.dad-cockpit--observability-r1 .dad-kpi-grid-primary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.dad-cockpit--observability-r1 .dad-kpi-card {
  padding: 1rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--ctrm-border, #d8dee4);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.dad-cockpit--observability-r1 .dad-kpi-card-label {
  font-size: 0.82rem;
  margin: 0 0 0.35rem;
  color: #64748b;
}
.dad-cockpit--observability-r1 .dad-kpi-card-status {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.dad-cockpit--observability-r1 .dad-kpi-card-note {
  font-size: 0.78rem;
  margin: 0;
}
.dad-cockpit--observability-r1 .dad-zone-pipeline {
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fafbfc;
}
.dad-cockpit--observability-r1 .dad-zone-pipeline-title {
  font-size: 0.95rem;
}
.dad-cockpit--observability-r1 .dad-zone-anomaly {
  margin-bottom: 0.75rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}
.dad-cockpit--observability-r1 .dad-zone-anomaly-summary {
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dad-cockpit--observability-r1 .dad-zone-anomaly-summary::-webkit-details-marker {
  display: none;
}
.dad-cockpit--observability-r1 .dad-anomaly-count-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.dad-cockpit--observability-r1 .dad-anomaly-count-badge--ok {
  background: #dcfce7;
  color: #166534;
}
.dad-cockpit--observability-r1 .dad-anomaly-count-badge--attention {
  background: #fef3c7;
  color: #92400e;
}
.dad-cockpit--observability-r1 .dad-zone-anomaly-body {
  padding: 0 0.75rem 0.75rem;
}
.dad-cockpit--observability-r1 .dad-zone-event-log {
  padding: 0.55rem 0.75rem;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
  opacity: 0.92;
}
.dad-cockpit--observability-r1 .dad-zone-event-log-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 0.45rem;
}
.dad-cockpit--observability-r1 .dad-zone-event-log .dad-data-admin-tasks-table {
  font-size: 0.82rem;
}
.dad-cockpit--observability-r1 .dad-zone-event-log .ctrm-table-wrap {
  max-height: 14rem;
  overflow: auto;
}
.dad-legacy-residue-archive {
  display: none !important;
}
.dad-legacy-residue-archive.dc-deeplink-only-zone--open,
.dad-legacy-residue-archive:target {
  display: none !important;
}

/* CTRM-PAGE-ARCHITECTURE-SURFACE-ALIGNMENT-R2 — page layer / status banners */
.ctrm-page-status-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #f8fafc);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.ctrm-page-status-banner__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.ctrm-page-status-banner__state {
  font-size: 0.875rem;
  font-weight: 600;
}
.ctrm-page-status-banner__lead {
  margin: 0 0 10px;
  color: var(--text, #334155);
}
.ctrm-page-status-banner__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
  margin: 0;
  font-size: 0.8125rem;
}
.ctrm-page-status-banner__meta dt {
  font-weight: 600;
  color: var(--muted, #64748b);
  margin: 0;
}
.ctrm-page-status-banner__meta dd {
  margin: 2px 0 0;
}
.ctrm-page-status-compat {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
}
.ctrm-page-status-compat .ctrm-page-status-banner__state {
  color: #b45309;
}
.ctrm-page-status-primary {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
}
.ctrm-page-status-primary .ctrm-page-status-banner__state {
  color: #0369a1;
}
.ctrm-page-status-sunset {
  border-color: #94a3b8;
  background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
}
.ctrm-page-status-sunset .ctrm-page-status-banner__state {
  color: #475569;
}

/* CTRM-BUSINESS-LAYER-SIDEBAR-WRONGLAYER-COMPAT-CLEANUP-R11B */
.ctrm-compat-banner-r11b {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #78350f;
}
.ctrm-compat-banner-r11b__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}
.ctrm-compat-banner-r11b__action {
  margin: 0.5rem 0 0;
}
.ctrm-compat-banner-r11b__action a {
  font-weight: 600;
}

.ctrm-page-layer-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
  vertical-align: middle;
}
.ctrm-page-status-primary .ctrm-page-layer-chip {
  background: #bae6fd;
  color: #0c4a6e;
}
.ctrm-page-status-compat .ctrm-page-layer-chip {
  background: #fde68a;
  color: #78350f;
}
.ctrm-page-status-sunset .ctrm-page-layer-chip {
  background: #cbd5e1;
  color: #334155;
}
.ctrm-home-arch-cards .ctrm-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ctrm-home-arch-cards .ctrm-page-layer-chip {
  font-size: 0.625rem;
}

/* CTRM Cognitive Compression R4 */
.ctrm-kpi-compressed-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ctrm-kpi-compressed-primary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ctrm-kpi-compressed-label {
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-kpi-compressed-value {
  font-size: 1.125rem;
  font-weight: 600;
}
.ctrm-kpi-compressed-summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-kpi-compressed-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}
.ctrm-kpi-compressed-diagnostic:not([open]) .ctrm-kpi-compressed-list {
  display: none;
}
.ctrm-kpi-compressed-hidden {
  display: none !important;
}

/* CTRM Decision Layer R5 */
.ctrm-decision-panel {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f9fafb);
  font-size: 0.8125rem;
}
.ctrm-decision-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}
.ctrm-decision-signal {
  font-weight: 600;
}
.ctrm-decision-signal--increase { color: #047857; }
.ctrm-decision-signal--decrease { color: #b45309; }
.ctrm-decision-signal--hold { color: #4b5563; }
.ctrm-decision-confidence {
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-decision-drivers {
  margin: 0.25rem 0 0.35rem;
  padding-left: 1.1rem;
}
.ctrm-decision-risk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--ctrm-muted, #6b7280);
  font-size: 0.75rem;
}
.ctrm-decision-disclaimer {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
}
.ctrm-decision-inline {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
}

/* CTRM Execution Closure Layer R6 */
.ctrm-execution-panel {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 6px;
  background: var(--ctrm-surface, #fff);
  font-size: 0.8125rem;
}
.ctrm-execution-summary {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-execution-section {
  margin-bottom: 0.45rem;
}
.ctrm-execution-section:last-of-type {
  margin-bottom: 0;
}
.ctrm-execution-title {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-execution-intent,
.ctrm-execution-status,
.ctrm-execution-risk,
.ctrm-execution-feedback,
.ctrm-execution-recal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.ctrm-execution-action {
  font-weight: 600;
}
.ctrm-execution-action--increase { color: #047857; }
.ctrm-execution-action--decrease { color: #b45309; }
.ctrm-execution-action--hold { color: #4b5563; }
.ctrm-execution-action--rebalance { color: #1d4ed8; }
.ctrm-execution-blocked {
  color: #b91c1c;
  font-weight: 600;
}
.ctrm-execution-disclaimer {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
}
.ctrm-execution-inline {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-stat-card--execution {
  grid-column: 1 / -1;
}

/* CTRM Application Layer R1 */
.ctrm-app-shell-root {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-app-shell-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.ctrm-app-tab {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
}
.ctrm-app-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  font-weight: 600;
}
.ctrm-app-panel {
  font-size: 0.8125rem;
}
.ctrm-app-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ctrm-app-panel-head h3 {
  margin: 0;
  font-size: 0.9375rem;
}
.ctrm-app-trace,
.ctrm-app-readonly {
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.ctrm-app-trading-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0;
}
.ctrm-app-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
}
.ctrm-app-input {
  min-width: 7rem;
  padding: 0.25rem 0.4rem;
}
.ctrm-app-hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
}
.ctrm-app-empty {
  color: var(--ctrm-muted, #6b7280);
  font-size: 0.8125rem;
}
.ctrm-app-risk-first,
.ctrm-app-risk-gate-first {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-left: 3px solid #2563eb;
  background: #fff;
}
.ctrm-app-risk-section,
.ctrm-app-strategy-section,
.ctrm-app-capital-section {
  margin-bottom: 0.45rem;
}
.ctrm-app-risk-section h4,
.ctrm-app-strategy-section h4,
.ctrm-app-capital-section h4 {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.ctrm-app-alert-list {
  margin: 0;
  padding-left: 1.1rem;
}
.ctrm-app-alert--critical { color: #b91c1c; }
.ctrm-app-alert--warn { color: #b45309; }
.ctrm-app-alert--info { color: #4b5563; }
.ctrm-app-ranking {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.75rem;
}
.ctrm-capital-heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.ctrm-capital-heat-cell {
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  background: #f3f4f6;
}
.ctrm-capital-heat--high { background: #fee2e2; }
.ctrm-capital-heat--medium { background: #fef3c7; }
.ctrm-capital-heat--low { background: #ecfdf5; }

/* Front Office Business Ledger Flow R1 */
.ctrm-business-ledger-flow-mount {
  margin-bottom: 1rem;
}
.ctrm-bl-flow-panel {
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  font-size: 0.8125rem;
}
.ctrm-bl-flow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ctrm-bl-flow-head h3 {
  margin: 0;
  font-size: 0.9375rem;
}
.ctrm-bl-flow-chain {
  font-size: 0.75rem;
  color: var(--ctrm-muted, #6b7280);
  font-family: ui-monospace, monospace;
}
.ctrm-bl-flow-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.ctrm-bl-flow-chip {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 0.6875rem;
  font-weight: 600;
}
.ctrm-bl-flow-stage {
  margin: 0.65rem 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ctrm-border, #e5e7eb);
}
.ctrm-bl-flow-title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.ctrm-bl-flow-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.35rem;
}
.ctrm-bl-flow-dl div {
  display: flex;
  gap: 0.35rem;
  font-size: 0.75rem;
}
.ctrm-bl-flow-dl dt {
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-bl-flow-dl dd {
  margin: 0;
  font-weight: 500;
}
.ctrm-bl-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.ctrm-bl-readonly {
  font-weight: 400;
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #6b7280);
}
.ctrm-bl-hint {
  margin: 0.25rem 0 0;
  font-size: 0.6875rem;
}
.ctrm-bl-chain-errors {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #fef2f2;
  border-radius: 4px;
}
.ctrm-bl-subtitle {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.75rem;
}
.ctrm-bl-pnl-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
}
.ctrm-bl-closure {
  margin: 0.35rem 0;
}
.ctrm-bl-movement-table {
  font-size: 0.75rem;
}

/* Ledger Simplification R1 — L-SMP-04+ owner / diagnostic / KPI dedup */
.fo-ledger-owner-boundary {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 13px;
}
.fo-ledger-diagnostic-zone {
  margin: 12px 0;
  padding: 0 12px 12px;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  border-radius: 8px;
  background: #fafafa;
}
.fo-ledger-bgd-link-strip {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}
.fo-ledger-group-dash-tab--demoted { display: none !important; }
.fo-financial-pnl-reserved-note {
  margin: 8px 0 0;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  border-radius: 6px;
  color: var(--ctrm-muted, #64748b);
}
.fo-ledger-admin-entry-notice { font-size: 12px; color: #92400e; }

/* FO-POLISH-03 — BGD healthy inbox empty state */
.bgd-inbox-workbench-hint { margin: 0 0 10px; }
.bgd-inbox-healthy-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.bgd-inbox-healthy-banner__lead {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 14px;
}
.bgd-inbox-healthy-banner__hint { margin: 8px 0 0; }
.bgd-inbox-stage-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bgd-inbox-stage-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  background: #fff;
  font-size: 12px;
}
.bgd-inbox-stage-status__code {
  font-weight: 700;
  color: var(--ctrm-primary, #0f766e);
}
.bgd-inbox-stage-status__label { color: var(--ctrm-text, #0f172a); }
.bgd-inbox-stage-status__state {
  color: var(--ctrm-success, #15803d);
  font-weight: 600;
}
.bgd-inbox-uat-fixture-note code {
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--ctrm-surface-muted, #f1f5f9);
}

/* FO-UI Final Convergence R1 */
.bgd-today-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 8px 0 4px;
}
.bgd-today-status-item {
  font-size: 13px;
  color: var(--ctrm-text, #0f172a);
}
.bgd-today-status-label {
  color: var(--ctrm-muted, #64748b);
  margin-right: 4px;
}
.bgd-entry-hub-grid--five {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.fo-ledger-multi-model-context,
.library-multi-model-context {
  margin: 4px 0 0;
  font-size: 13px;
}
.library-owner-boundary {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: var(--ctrm-surface-muted, #f8fafc);
}
.library-owner-boundary__lead { margin: 0; }
.hub-owner-boundary { max-width: 720px; }
.fo-movement-origin--legacy {
  color: var(--ctrm-muted, #64748b);
  font-size: 12px;
}

/* ── System Assistant Governance Hub R1 ── */
.ctrm-system-assistant-hub {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 120px);
}

.ctrm-governance-hub-header {
  margin-bottom: 1.25rem;
}

.ctrm-governance-hub-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.ctrm-governance-hub-subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ctrm-muted, #64748b);
  line-height: 1.5;
}

.ctrm-governance-hub-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.ctrm-governance-hub-card {
  display: flex;
  flex-direction: column;
  min-height: 9.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}

.ctrm-governance-hub-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.ctrm-governance-hub-card-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text, #334155);
}

.ctrm-governance-hub-card-list li + li {
  margin-top: 0.25rem;
}

.ctrm-governance-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ctrm-governance-entry-card {
  display: flex;
  flex-direction: column;
  min-height: 7.5rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ctrm-governance-entry-card:hover,
.ctrm-governance-entry-card:focus-visible {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.ctrm-governance-entry-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.ctrm-governance-entry-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
  margin-bottom: 0.25rem;
}

.ctrm-governance-entry-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ctrm-muted, #64748b);
}

/* ── System Assistant Hub R2A primary cards ── */
.ctrm-governance-primary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ctrm-governance-primary-card {
  display: flex;
  flex-direction: column;
  min-height: 14rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}

.ctrm-governance-primary-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.ctrm-governance-primary-card-summary {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ctrm-muted, #64748b);
}

.ctrm-governance-primary-card-points {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text, #334155);
  flex: 1;
}

.ctrm-governance-primary-card-points li + li {
  margin-top: 0.25rem;
}

.ctrm-governance-primary-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: auto;
}

.ctrm-governance-secondary-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.ctrm-governance-secondary-link:hover,
.ctrm-governance-secondary-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.ctrm-governance-admin-tools {
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--ctrm-border, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}

.ctrm-governance-admin-tools-summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text, #334155);
}

.ctrm-governance-admin-tools-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.ctrm-governance-admin-tools-list a {
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.ctrm-governance-admin-tools-list a:hover,
.ctrm-governance-admin-tools-list a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ── System Architecture Reader Mode R2B ── */
.ctrm-system-architecture-reader-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: transparent;
}

.ctrm-system-architecture-reader-tablist .ctrm-sticky-toc-heading,
.ctrm-system-architecture-reader-tablist .ctrm-sticky-toc-list {
  display: none;
}

.ctrm-system-architecture-reader-tab {
  appearance: none;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: var(--text, #334155);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ctrm-system-architecture-reader-tab:hover,
.ctrm-system-architecture-reader-tab:focus-visible {
  border-color: var(--primary, #2563eb);
  outline: 2px solid rgba(37, 99, 235, 0.25);
  outline-offset: 1px;
}

.ctrm-system-architecture-reader-tab[aria-selected="true"] {
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
}

.ctrm-system-architecture-reader-topic[hidden] {
  display: none !important;
}

/* ── System Architecture History Fold R2C-B1 ── */
.ctrm-system-architecture-history-group {
  margin: 0.75rem 0 0.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  border-radius: 0.5rem;
  background: var(--ctrm-surface-muted, #f8fafc);
}

.ctrm-system-architecture-history-summary {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

.ctrm-system-architecture-history-note {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.75rem;
}

.ctrm-system-architecture-history-group .master-system-architecture-details {
  margin-left: 0.35rem;
}

.ctrm-architecture-compact-page .master-system-architecture-layer-nav,
.ctrm-architecture-compact-page #master-system-architecture-overview {
  display: none;
}

.ctrm-architecture-layout {
  display: block;
}

.ctrm-architecture-compact-page .ctrm-sticky-toc {
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
  margin-bottom: 0.75rem;
}

.ctrm-governance-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--ctrm-border, #e2e8f0);
}

.ctrm-governance-section-title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.ctrm-governance-subsection-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ctrm-governance-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.ctrm-governance-rule-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ctrm-governance-rule-card p {
  margin: 0.35rem 0 0;
}

.ctrm-governance-rule-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.ctrm-governance-rule-meta {
  color: var(--ctrm-muted, #64748b);
  font-size: 0.75rem;
}

.ctrm-governance-rule-links {
  font-size: 0.75rem;
}

.ctrm-governance-status-matrix .ctrm-governance-table-wrap,
.ctrm-governance-section .ctrm-governance-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 0;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}

.ctrm-governance-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.ctrm-governance-table th,
.ctrm-governance-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
  text-align: left;
  vertical-align: top;
}

.ctrm-governance-table th {
  background: var(--ctrm-surface-muted, #f8fafc);
  font-weight: 600;
  white-space: nowrap;
}

.ctrm-governance-table tbody tr:last-child td {
  border-bottom: none;
}

.ctrm-governance-contract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.ctrm-governance-type-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.ctrm-governance-ops-panel {
  background: var(--ctrm-surface-muted, #f8fafc);
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
}

.ctrm-governance-ops-details {
  margin: 0.5rem 0;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

.ctrm-governance-ops-details summary {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.ctrm-governance-ops-pre {
  margin: 0;
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
  background: #f8fafc;
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.45;
}

.ctrm-governance-ops-pre code {
  white-space: pre-wrap;
  word-break: break-word;
}

.ctrm-governance-back-top {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
}

.ctrm-governance-back-top a {
  color: var(--primary, #2563eb);
}

.ctrm-governance-dev-note {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #94a3b8);
  font-style: italic;
}

@media (max-width: 720px) {
  .ctrm-system-assistant-hub {
    padding: 1rem;
  }

  .ctrm-governance-entry-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .ctrm-governance-entry-grid {
    grid-template-columns: 1fr;
  }
}

/* ── System Assistant multi-page R1B ── */
.ctrm-system-assistant-page {
  max-width: 1120px;
}

.ctrm-system-assistant-page-header {
  margin-bottom: 1.25rem;
}

.ctrm-system-assistant-breadcrumb {
  font-size: 0.8125rem;
  color: var(--ctrm-muted, #64748b);
  margin-bottom: 0.5rem;
}

.ctrm-system-assistant-breadcrumb a {
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.ctrm-system-assistant-page-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.ctrm-system-assistant-tool-link {
  font-size: 0.8125rem;
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.ctrm-system-assistant-tool-link:hover,
.ctrm-system-assistant-tool-link:focus-visible {
  text-decoration: underline;
}

.ctrm-system-assistant-compat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.ctrm-system-assistant-compat-card {
  padding: 0.75rem 1rem;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.8125rem;
}

.ctrm-system-assistant-compat-card p {
  margin: 0 0 0.5rem;
}

.ctrm-system-assistant-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}

.ctrm-system-assistant-page-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ctrm-border, #e2e8f0);
  font-size: 0.8125rem;
}

.ctrm-system-assistant-page-footer a {
  color: var(--primary, #2563eb);
}

.ctrm-system-assistant-backtop {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--primary, #2563eb);
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.ctrm-system-assistant-backtop:hover,
.ctrm-system-assistant-backtop:focus-visible {
  filter: brightness(1.05);
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: 2px;
}

/* CTRM-SYSTEM-ARCHITECTURE-COMPACT-READING-R1C */
.ctrm-architecture-compact-page {
  scroll-padding-top: 5.5rem;
}

.ctrm-architecture-compact-header {
  margin-bottom: 1rem;
}

.ctrm-architecture-reading-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
  position: sticky;
  top: 0.5rem;
  z-index: 12;
}

.ctrm-architecture-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.ctrm-architecture-collapse {
  margin: 0 0 0.85rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 10px;
  background: var(--ctrm-surface, #fff);
  overflow: hidden;
}

.ctrm-architecture-collapse > summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid transparent;
  user-select: none;
}

.ctrm-architecture-collapse > summary::-webkit-details-marker {
  display: none;
}

.ctrm-architecture-collapse > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
  color: var(--primary, #2563eb);
}

.ctrm-architecture-collapse[open] > summary {
  border-bottom-color: var(--ctrm-border, #e2e8f0);
}

.ctrm-architecture-collapse[open] > summary::before {
  transform: rotate(90deg);
}

.ctrm-architecture-collapse-body {
  padding: 0.75rem 1rem 1rem;
}

.ctrm-architecture-collapse-body > .master-system-architecture-layer,
.ctrm-architecture-collapse-body > section {
  margin-top: 0;
}

.ctrm-architecture-deeplink-highlight {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 4px;
  border-radius: 6px;
  transition: outline-color 0.2s ease;
}

.ctrm-architecture-backtop {
  z-index: 20;
}

@media (max-width: 720px) {
  .ctrm-architecture-reading-tools {
    top: 0;
    border-radius: 0;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .ctrm-architecture-collapse > summary {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
  }
}

/* CTRM-STRATEGY-LEDGER-DETAIL-TABLE-RESTORE-FIX-R2 */
.fo-group-detail-loading-r2 {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--ctrm-muted, #64748b);
}
.fo-group-detail-loading-r2:not([hidden]) + .fo-group-strategy-list-empty {
  display: none !important;
}
.fo-group-execution-movements-wrap,
.fo-group-execution-movements-table {
  width: 100%;
}
.fo-group-workspace-panel[data-group-workspace-panel="executions"].is-active,
.fo-group-workspace-panel[data-group-workspace-panel="position"].is-active {
  display: block;
}

/* CTRM-STRATEGY-LEDGER-DETAIL-TABLE-VISIBLE-LAYOUT-FIX-R4 */
.fo-ledger-detail-primary-r4 {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  min-height: 280px;
}
.fo-ledger-detail-workspace-r4 {
  margin-top: 0;
}
.fo-ledger-detail-tab-bar-r4 {
  margin-bottom: 12px;
}
.fo-ledger-detail-tab-bar-r4 .fo-group-workspace-tab {
  font-size: 14px;
  padding: 8px 16px;
}
.fo-ledger-detail-tab-lead-r4 {
  margin: 0 0 6px;
  font-size: 12px;
}
.fo-ledger-kpi-demoted-r4 {
  margin-top: 12px;
}
.fo-ledger-kpi-demoted-r4:not([open]) {
  opacity: 0.92;
}
.fo-ledger-perf-demoted-r4 {
  margin-top: 16px;
  order: 99;
}
.fo-group-dashboard-scope-kpi .fo-ledger-detail-primary-r4 + .fo-ledger-kpi-demoted-r4 {
  margin-top: 8px;
}
.fo-ledger-detail-primary-r4 .fo-group-workspace-panel.is-active .ctrm-table-wrap {
  display: block;
  visibility: visible;
  min-height: 120px;
}
.fo-ledger-detail-primary-r4 .fo-group-plan-panel:not(.is-collapsed) .fo-group-plan-panel-body {
  display: block;
}
.fo-ledger-group-dash-tabs-hidden-r4 {
  display: none !important;
}
.fo-group-dashboard-scope-kpi.fo-ledger-group-kpi-demoted {
  display: flex;
  flex-direction: column;
}

/* R3 business_group_user scope guard — locked own-group chrome */
body.ctrm-scope-locked #fo-scope-switch-all,
body.ctrm-scope-locked .fo-ledger-scope-chip--all {
  display: none !important;
}
body.ctrm-scope-locked #fo-group-dashboard-scope-list .fo-group-dashboard-scope-item:not(.is-active),
body.ctrm-scope-locked #fo-group-dashboard-scope-selector .fo-group-dashboard-scope-item:not(.is-active) {
  display: none !important;
}
body.ctrm-scope-locked #fo-group-dashboard-scope-list .fo-group-dashboard-scope-item.is-active,
body.ctrm-scope-locked #fo-group-dashboard-scope-selector .fo-group-dashboard-scope-item.is-active {
  cursor: default;
  opacity: 1;
}

/* Business Layer Drilldown Flow R2 */
.ctrm-business-flow-strip {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.8125rem;
}
.ctrm-business-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0 0 0.45rem;
  padding: 0;
}
.ctrm-business-breadcrumb__item:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: #94a3b8;
}
.ctrm-business-breadcrumb__item--current {
  font-weight: 600;
  color: #0f172a;
}
.ctrm-business-flow-strip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-bottom: 0.45rem;
}
.ctrm-business-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
}
.ctrm-business-drilldown-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ctrm-entry-dedup-note {
  font-size: 0.75rem;
  color: #64748b;
}
.ctrm-ledger-context-summary {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #0ea5e9;
  background: #f0f9ff;
  font-size: 0.8125rem;
  color: #334155;
}
.bgd-quick-entry-dedup-r2 .ctrm-business-drilldown-actions {
  margin-top: 0.5rem;
}

/* CTRM Business Layer Inbox SSOT R3 */
.ctrm-inbox-action-canonical {
  border-left: 2px solid #6366f1;
}
.ctrm-inbox-action-target[data-inbox-action-key] {
  scroll-margin-top: 4rem;
}
.ctrm-ledger-inbox-context {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #6366f1;
  background: #eef2ff;
  font-size: 0.8125rem;
  color: #312e81;
}
.ctrm-inbox-fallback-note {
  color: #b45309;
  font-weight: 500;
}
.ctrm-param-governance-link {
  color: #0f766e;
  text-decoration: underline;
}

/* CTRM Strategy Ledger Kernel Availability R3B */
.ctrm-kernel-health-r3b {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #d97706;
  background: #fffbeb;
  font-size: 0.8125rem;
  color: #92400e;
}

/* CTRM BGD Action Path Consolidation R13A */
.ctrm-bgd-action-path-r13a.ctrm-bgd-quick-entry-r13a {
  border-left: 3px solid var(--accent, #2563eb);
}
.ctrm-bgd-dispatcher-note-r13a {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: var(--radius, 6px);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 13px;
}
.ctrm-bgd-delegate-chip-r13a {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.ctrm-bgd-delegate-chip-r13a:hover {
  text-decoration: underline;
}
.ctrm-bgd-legacy-action-folded-r13a {
  margin-top: 12px;
  opacity: 0.92;
}
.ctrm-bgd-legacy-action-folded-r13a .bgd-daily-flow-folded-summary {
  cursor: pointer;
  list-style: none;
}
.bgd-cockpit .bgd-daily-operating-flow-inner .bgd-flow-step-cta.btn-secondary {
  max-width: 12rem;
}

/* CTRM MOV Status Matrix R13B */
.ctrm-mov-readonly-note-r13b {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: var(--radius, 6px);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 13px;
}
.ctrm-mov-status-matrix-r13b__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ctrm-mov-status-matrix-r13b__table th,
.ctrm-mov-status-matrix-r13b__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  text-align: left;
  vertical-align: middle;
}
.ctrm-mov-status-matrix-r13b__table th {
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.ctrm-mov-secondary-drill-r13b {
  margin-top: 12px;
  opacity: 0.92;
}
.ctrm-mov-secondary-drill-r13b summary {
  cursor: pointer;
  font-weight: 600;
}
.ctrm-mov-topn-empty-r13b {
  opacity: 0.85;
}
.ctrm-mov-attention-list-r13b {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ctrm-mov-attention-item-r13b {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border, #e2e8f0);
}
.ctrm-mov-bgd-drill-r13b.btn-primary {
  font-weight: 600;
}

/* R13E — business PnL skeleton / boundary polish (MOV / BGD / Ledger) */
.ctrm-pnl-boundary-r13e {
  font-size: 0.92em;
  line-height: 1.45;
}
.ctrm-pnl-skeleton-r13e {
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}
.ctrm-pnl-badge-business-r13e {
  border-left: 3px solid var(--accent-muted, #94a3b8);
  padding-left: 0.35rem;
}
.ctrm-pnl-badge-finance-reserved-r13e {
  font-size: 0.88em;
  color: var(--text-muted, #64748b);
  border-left: 3px solid var(--border, #cbd5e1);
  padding-left: 0.35rem;
}
.ctrm-pnl-degraded-r13e {
  color: var(--warning-text, #92400e);
  background: var(--warning-bg, #fffbeb);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
}
.ctrm-pnl-empty-note-r13e {
  font-size: 0.88em;
  color: var(--text-muted, #64748b);
  margin-top: 0.25rem;
}

/* R14B — Strategy Ledger full-page visual layout (shell/main/status/tabs) */
.strategy-ledger-workspace[data-ledger-visual-layout-r14b="true"] {
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
}
.strategy-ledger-workspace-header.ctrm-header.strategy-ledger-page-header-r14b {
  display: block;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.strategy-ledger-page-header-stack-r14b {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.strategy-ledger-page-header-stack-r14b > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.strategy-ledger-page-flow-r14b {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.strategy-ledger-page-flow-r14b > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#ctrm-ledger-status-zone-r13d {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.strategy-ledger-workspace .fo-ledger-page-top-tabs,
.strategy-ledger-workspace .fo-ledger-page-top-panels,
.strategy-ledger-workspace #fo-group-dashboard-scope-layout {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.strategy-ledger-workspace .fo-group-dashboard-scope-layout {
  min-width: 0;
}
.strategy-ledger-workspace .fo-group-strategy-workspace {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.strategy-ledger-workspace .fo-group-plan-list-table-wrap,
.strategy-ledger-workspace .ctrm-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.strategy-ledger-workspace .fo-ledger-owner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

/* R6 — market_price_store browse + Ledger price metadata deeplink */
.ctrm-store-fact-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin: 12px 0;
}
.ctrm-store-fact-stale {
  color: #b45309;
  font-weight: 600;
}
.ctrm-deeplink-r6-market-prices,
.ctrm-deeplink-r6-dsc {
  font-size: 12px;
}
.market-store-fact-lead {
  margin-bottom: 8px;
}
.market-prices-bv-note {
  margin-top: 4px;
}

/* R15B — Strategy Ledger detail book UI shell */
.ctrm-ledger-detail-book-r15b .ctrm-ledger-detail-header-r15b {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}
.ctrm-ledger-detail-book-r15b .ctrm-ledger-detail-boundary-r15b {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.ctrm-ledger-detail-book-r15b .ctrm-ledger-detail-link-strip-r15b {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  margin: 0;
}
.ctrm-ledger-detail-book-r15b .ctrm-ledger-detail-link-strip-r15b a {
  color: var(--accent, #2563eb);
  text-decoration: none;
}
.ctrm-ledger-detail-book-r15b .ctrm-ledger-detail-link-strip-r15b a:hover {
  text-decoration: underline;
}
.ctrm-ledger-detail-tabs-r15b {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg, #fff);
  border-bottom: 2px solid var(--border, #e2e8f0);
}
.ctrm-ledger-detail-tab-r15b {
  border: 1px solid var(--border, #e2e8f0);
  border-bottom: none;
  border-radius: var(--radius, 6px) var(--radius, 6px) 0 0;
  background: var(--bg-subtle, #f8fafc);
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text, #0f172a);
}
.ctrm-ledger-detail-tab-r15b:hover {
  background: var(--bg-hover, #f1f5f9);
}
.ctrm-ledger-detail-tab-r15b.is-active {
  background: var(--bg, #fff);
  color: var(--accent, #2563eb);
  box-shadow: inset 0 -3px 0 var(--accent, #2563eb);
}
.ctrm-ledger-detail-tab-r15b__label {
  white-space: nowrap;
}
.ctrm-ledger-owner-tabs-demoted-r15b,
.ctrm-ledger-owner-demoted-r15b,
.ctrm-ledger-internal-owner-map-r15b {
  margin-top: 4px;
}
.ctrm-ledger-owner-tabs-demoted-r15b .fo-ledger-owner-tabs,
.ctrm-ledger-owner-tabs-demoted-r15b summary + .fo-ledger-owner-tabs {
  opacity: 0.85;
  font-size: 12px;
}
.ctrm-ledger-singleton-tab-demoted-r15b.fo-ledger-page-top-tabs,
#fo-ledger-singleton-top-tab-fold-r15b > nav.fo-ledger-page-top-tabs {
  display: none !important;
}
#fo-ledger-singleton-top-tab-fold-r15b > summary {
  font-size: 12px;
  cursor: pointer;
}
.ctrm-ledger-status-fold-r15b {
  margin: 0;
  font-size: 13px;
}
.ctrm-ledger-status-fold-r15b__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.ctrm-ledger-pnl-shell-r15b__boundary {
  padding: 8px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius, 6px);
  background: #fffbeb;
}
.ctrm-ledger-pnl-shell-r15b__compat {
  margin-top: 12px;
}

/* CTRM-STRATEGY-LEDGER-PNL-TAB-MIGRATION-R15C */
.ctrm-ledger-pnl-tab-r15c {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ctrm-ledger-pnl-tab-header-r15c {
  margin-bottom: 4px;
}
.ctrm-ledger-pnl-tab-header-r15c .fo-group-section-title {
  margin-bottom: 6px;
}
.ctrm-ledger-pnl-boundary-r15c {
  padding: 8px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius, 6px);
  background: #fffbeb;
  margin-top: 4px;
}
.ctrm-ledger-pnl-workbench-r15c {
  margin-top: 0;
}
.ctrm-ledger-pnl-workbench-r15c .fo-pnl-analysis-table-wrap,
.ctrm-ledger-pnl-workbench-r15c .fo-pnl-analysis-daily-table-wrap,
.ctrm-ledger-pnl-workbench-r15c .fo-pnl-analysis-ledger-table-wrap {
  overflow-x: auto;
}
.ctrm-ledger-pnl-compat-placeholder-r15c {
  padding: 16px;
  border: 1px dashed var(--border-muted, #cbd5e1);
  border-radius: var(--radius, 6px);
  background: var(--surface-muted, #f8fafc);
}
.strategy-ledger-workspace.ctrm-ledger-detail-book-r15b .strategy-ledger-page-header-stack-r14b {
  gap: 8px;
}
.strategy-ledger-workspace.ctrm-ledger-detail-book-r15b .fo-ledger-page-top-tabs-hint {
  font-size: 13px;
}

/* CTRM-STRATEGY-LEDGER-EXECUTION-ENTRY-DEMOTION-R15D */
.ctrm-ledger-execution-entry-r15d .ctrm-ledger-entry-boundary-r15d {
  padding: 6px 10px;
  border-left: 3px solid #93c5fd;
  background: #f8fafc;
}
.ctrm-ledger-close-entry-demoted-r15d.fo-quick-close-entry,
.ctrm-ledger-close-entry-demoted-r15d[data-ledger-close-entry-r15d="demoted"].fo-quick-close-entry {
  display: none !important;
}
.ctrm-ledger-close-entry-diagnostic-r15d {
  margin: 8px 0 12px;
}
.ctrm-ledger-close-entry-diagnostic-fold-r15d {
  padding: 10px 12px;
  border: 1px dashed var(--border-muted, #cbd5e1);
  border-radius: var(--radius, 6px);
  background: var(--surface-muted, #f8fafc);
}
.ctrm-ledger-close-entry-diagnostic-note-r15d {
  margin: 6px 0 8px;
}
.ctrm-ledger-close-modal-legacy-r15d .ctrm-ledger-close-modal-legacy-note-r15d {
  padding: 8px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius, 6px);
  background: #fffbeb;
  margin-bottom: 8px;
}
.ctrm-ledger-direct-execution-primary-r15d .fo-direct-execution-effect-hint {
  font-weight: 500;
}
.ctrm-ledger-direct-execution-primary-r15d .fo-direct-execution-flip-warning {
  color: #b45309;
}

/* R15G — Strategy Ledger header compact */
.ctrm-ledger-header-compact-r15g .strategy-ledger-page-header-stack-r14b {
  gap: 6px;
}
.ctrm-ledger-header-compact-r15g .strategy-ledger-workspace-header h1 {
  margin-bottom: 4px;
  font-size: 1.35rem;
}
.ctrm-ledger-header-compact-r15g .ctrm-ledger-detail-boundary-r15b,
.ctrm-ledger-header-compact-r15g .ctrm-ledger-detail-header-r15b {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.ctrm-ledger-link-strip-compact-r15g {
  font-size: 12px;
  gap: 6px 12px;
  margin: 4px 0 0;
}
.ctrm-ledger-link-strip-compact-r15g a {
  font-weight: 400;
}
.ctrm-ledger-header-compact-r15g .ctrm-ledger-flow-strip-compact-r15g .ctrm-business-breadcrumb,
.ctrm-ledger-header-compact-r15g .ctrm-ledger-flow-strip-compact-r15g .ctrm-business-drilldown-actions,
.ctrm-ledger-header-compact-r15g #ctrm-business-flow-strip .ctrm-business-breadcrumb,
.ctrm-ledger-header-compact-r15g #ctrm-business-flow-strip .ctrm-business-drilldown-actions {
  display: none !important;
}
.ctrm-ledger-header-compact-r15g #ctrm-business-flow-strip .ctrm-business-flow-strip__meta {
  display: none !important;
}
.ctrm-ledger-context-bar-r15g {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 8px;
  color: var(--text-muted, #64748b);
}
.ctrm-ledger-context-bar-r15g__chip strong {
  color: var(--text, #0f172a);
  font-weight: 600;
}
.ctrm-ledger-context-bar-r15g__sep {
  opacity: 0.5;
}
.fo-ledger-entry-guide-r1 {
  margin: 0.35rem 0 0.65rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--ctrm-border, #d0d7de);
  border-left: 3px solid #3b6d99;
  background: #f4f7fa;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
}
.ctrm-ledger-flow-inline-r15g {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}
.ctrm-ledger-scope-compact-r15g {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  margin: 0 0 10px;
}
.ctrm-ledger-scope-compact-r15g .fo-ledger-scope-chip-row {
  margin: 0 0 6px;
}
.ctrm-ledger-redundant-hidden-r15g[hidden],
.ctrm-ledger-header-compact-r15g .ctrm-ledger-redundant-hidden-r15g {
  display: none !important;
}
.ctrm-ledger-header-compact-r15g .fo-ledger-bgd-link-strip {
  display: none !important;
}
.ctrm-ledger-diagnostic-fold-r15g {
  margin: 0 0 10px;
  font-size: 12px;
  border: 1px dashed var(--border-muted, #cbd5e1);
  border-radius: var(--radius, 6px);
  padding: 6px 10px;
  background: var(--surface-muted, #f8fafc);
}
.ctrm-ledger-diagnostic-fold-r15g__summary,
.ctrm-ledger-diagnostic-fold-r15g .ctrm-ledger-status-fold-r15b__summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  font-size: 12px;
}
.ctrm-ledger-diagnostic-fold-r15g__lead {
  margin: 4px 0 8px;
  font-size: 12px;
}
.ctrm-ledger-diagnostic-fold-r15g__section {
  margin-top: 8px;
}
.ctrm-ledger-drill-context-compact-r15g.data-card--boundary-note,
.ctrm-ledger-header-compact-r15g #fo-ledger-drill-context.ctrm-ledger-drill-context-compact-r15g {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 0;
  margin: 4px 0 0;
}
.ctrm-ledger-header-compact-r15g .fo-group-dashboard-scope-kpi {
  padding-top: 8px;
}
.ctrm-ledger-header-compact-r15g .fo-group-dashboard-root > .ctrm-panel-title {
  display: none !important;
}
.ctrm-ledger-header-compact-r15g .ctrm-ledger-detail-tabs-r15b {
  margin-top: 0;
}
.ctrm-ledger-above-fold-r15g {
  margin-bottom: 8px;
}

/* R1 — Strategy Plan Tab density */
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table {
  min-width: 1180px;
}
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table th,
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table td {
  padding: 5px 8px;
  font-size: 13px;
}
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table .strategy-col-num,
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table td.ctrm-plan-money-cell-r5b,
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table td.ctrm-plan-number-cell-r5b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-plan-column-group-soft-r1 .ctrm-plan-field-capital-r5b[data-plan-field-group="capital"],
.ctrm-plan-column-group-soft-r1 td.ctrm-plan-field-capital-r5b[data-plan-field-group="capital"],
.ctrm-plan-column-group-soft-r1 .ctrm-plan-field-execution-r5b[data-plan-field-group="execution"],
.ctrm-plan-column-group-soft-r1 td.ctrm-plan-field-execution-r5b[data-plan-field-group="execution"] {
  border-left: none;
}
.ctrm-plan-tab-density-r1 .ctrm-plan-dto-source-hidden-r1,
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table .ctrm-plan-cell-hints-r5b {
  display: none !important;
}
.ctrm-plan-row-detail-r1 .ctrm-plan-cell-hints-r5b,
.ctrm-plan-detail-grid-r1 .ctrm-plan-source-chip-r1 {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  vertical-align: middle;
}
.ctrm-plan-source-chip-r1.ctrm-cell-hint-fallback-r5b,
.ctrm-plan-source-chip-r1.fo-source-chip--fallback {
  color: var(--text-muted, #64748b);
  background: rgba(148, 163, 184, 0.12);
  border-radius: 3px;
  padding: 0 4px;
}
.ctrm-plan-action-compact-r1 {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ctrm-plan-action-compact-r1 .btn-primary {
  font-weight: 600;
}
.ctrm-plan-action-compact-r1 .btn-secondary {
  font-weight: 500;
}
.ctrm-plan-action-compact-r1 .ctrm-ledger-list-detail-toggle {
  font-size: 12px;
  padding: 0 4px;
}
.ctrm-plan-status-clean-r1 .fo-attention-reasons {
  display: none !important;
}
.ctrm-plan-detail-grid-r1 .ctrm-ledger-list-detail-section {
  margin-bottom: 10px;
}
.ctrm-plan-toolbar-note-r1 {
  margin: 4px 0 0;
  font-size: 12px;
}
.ctrm-plan-core-execution-rate-r1 {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* R1A — Plan tab action/detail regression fix */
.ctrm-plan-tab-density-r1a .fo-group-plan-list-table {
  table-layout: auto;
}
.ctrm-plan-tab-density-r1a .fo-group-plan-actions-col,
.ctrm-plan-action-compact-r1a {
  white-space: nowrap;
}
.ctrm-plan-action-compact-r1a .btn,
.ctrm-plan-action-compact-r1a .ctrm-ledger-list-detail-toggle {
  flex-shrink: 0;
}
.ctrm-plan-row-detail-r1a {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.ctrm-plan-detail-grid-r1a {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
.ctrm-plan-detail-grid-r1a > *,
.ctrm-plan-detail-card-r1a,
.ctrm-plan-detail-tech-r1a,
.ctrm-plan-detail-tech-body-r1a {
  min-width: 0;
}
.ctrm-plan-detail-card-r1a {
  padding: 8px 10px;
  border: 1px solid var(--ctrm-border-muted, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-plan-detail-card-r1a .ctrm-ledger-list-detail-dl {
  margin: 0;
}
.ctrm-plan-detail-card-r1a dt,
.ctrm-plan-detail-card-r1a dd {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.ctrm-plan-detail-value-r1a {
  display: inline;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ctrm-plan-cell-hints-r1a {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  white-space: normal;
}
.ctrm-plan-detail-source-chip-r1a {
  display: inline-block;
  margin-left: 0;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  background: rgba(148, 163, 184, 0.12);
  border-radius: 3px;
  padding: 0 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ctrm-plan-detail-tech-r1a {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-plan-detail-tech-summary-r1a {
  cursor: pointer;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
  user-select: none;
}
.ctrm-plan-detail-tech-body-r1a .ctrm-ledger-list-detail-section {
  margin-top: 8px;
  font-size: 12px;
}
.ctrm-plan-detail-more-r1a .ctrm-ledger-list-detail-dl dt,
.ctrm-plan-detail-more-r1a .ctrm-ledger-list-detail-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ctrm-plan-tab-density-r1a .ctrm-ledger-list-detail-cell {
  padding: 8px 10px;
}

/* R1B — Plan tab action runtime fix */
.ctrm-plan-action-runtime-r1b .fo-group-plan-actions-col,
.ctrm-plan-tab-action-runtime-r1b .fo-group-plan-actions-col {
  white-space: nowrap;
}
.ctrm-plan-row-detail-r1b {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.ctrm-plan-detail-grid-r1b {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
.ctrm-plan-detail-grid-r1b > *,
.ctrm-plan-detail-card-r1b {
  min-width: 0;
}
.ctrm-plan-detail-card-r1b {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ctrm-plan-detail-grid-r1b dt,
.ctrm-plan-detail-grid-r1b dd,
.ctrm-plan-row-detail-r1b .ctrm-ledger-list-detail-dl dt,
.ctrm-plan-row-detail-r1b .ctrm-ledger-list-detail-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.ctrm-plan-action-debug-r1b {
  display: none !important;
}

/* R1 — DTO alias hint cleanup (business surface vs technical panel) */
.ctrm-dto-alias-hint-cleanup-r1.ctrm-plan-detail-card-r1a .ctrm-plan-cell-hints-r1a,
.ctrm-dto-alias-hint-cleanup-r1 .ctrm-plan-detail-value-r1a + .ctrm-plan-cell-hints-r1a,
.ctrm-dto-alias-hint-cleanup-r1 .ctrm-plan-row-detail-r1 .ctrm-cell-hint-dto-r5b[data-ledger-fallback="dto_missing"] {
  display: none !important;
}
.ctrm-technical-source-note-r1 {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  font-weight: 400;
}
.ctrm-source-metadata-summary-r1 {
  font-size: 12px;
  color: var(--text-muted, #64748b);
}
.ctrm-source-metadata-missing-r1 {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-top: 6px;
}
.ctrm-source-metadata-missing-r1 summary {
  cursor: pointer;
  color: var(--text-muted, #64748b);
}
.ctrm-source-metadata-missing-r1 ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
  max-height: 160px;
  overflow-y: auto;
}

/* R1 — Execution tab density */
.ctrm-execution-tab-density-r1 .fo-group-execution-movements-table {
  min-width: 1080px;
}
.ctrm-execution-tab-density-r1 .fo-group-execution-movements-table th,
.ctrm-execution-tab-density-r1 .fo-group-execution-movements-table td {
  padding: 5px 8px;
  font-size: 13px;
}
.ctrm-execution-tab-density-r1 .strategy-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-execution-action-col-r1,
.ctrm-execution-action-compact-r1 {
  white-space: nowrap;
  min-width: 88px;
}
.ctrm-execution-action-compact-r1 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.ctrm-execution-action-compact-r1 .btn-link {
  padding: 0 4px;
  font-size: 12px;
}
.ctrm-execution-effect-badge-r1 {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  white-space: nowrap;
}
.ctrm-execution-effect-badge-r1--flip {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.ctrm-execution-effect-badge-r1--unknown {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}
.ctrm-execution-source-chip-r1 {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}
.ctrm-execution-status-r1 {
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-execution-status-r1--ok {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-execution-highlight-reason-r1 {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  vertical-align: middle;
}
.ctrm-execution-tab-note-r1 {
  margin: 2px 0;
  font-size: 12px;
}
.ctrm-execution-row-detail-r1 {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.ctrm-execution-detail-grid-r1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
.ctrm-execution-detail-grid-r1 > *,
.ctrm-execution-detail-card-r1,
.ctrm-execution-detail-tech-r1,
.ctrm-execution-detail-tech-body-r1 {
  min-width: 0;
}
.ctrm-execution-detail-card-r1 {
  padding: 8px 10px;
  border: 1px solid var(--ctrm-border-muted, #e2e8f0);
  border-radius: 6px;
  background: var(--ctrm-surface-muted, #f8fafc);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ctrm-execution-detail-card-r1 dt,
.ctrm-execution-detail-card-r1 dd {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.ctrm-execution-detail-tech-r1 {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-execution-detail-tech-summary-r1 {
  cursor: pointer;
  font-size: 12px;
}
.ctrm-execution-tab-density-r1 .ctrm-execution-effect-col-r1 .fo-movement-effect-detail,
.ctrm-execution-tab-density-r1 .ctrm-execution-effect-col-r1 .fo-movement-effect-hint,
.ctrm-execution-tab-density-r1 .ctrm-execution-effect-col-r1 .fo-movement-effect-compat {
  display: none !important;
}

/* R1A — Execution tab name normalize + action runtime */
.ctrm-execution-tab-density-r1a .fo-group-execution-strategy-name {
  min-width: 88px;
  overflow-wrap: anywhere;
}
.ctrm-execution-strategy-name-normalized-r1a {
  white-space: nowrap;
}
.ctrm-execution-action-runtime-r1a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.ctrm-execution-action-runtime-r1a .btn-link {
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-execution-tab-density-r1a .ctrm-execution-action-col-r1 {
  min-width: 92px;
}

/* R1B — Execution table layout fix + date filter */
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table thead,
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table tbody {
  display: table-row-group;
}
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table tr {
  display: table-row;
}
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table th,
.ctrm-execution-table-layout-fix-r1b.fo-group-execution-movements-table td {
  display: table-cell;
  vertical-align: middle;
}
.ctrm-execution-table-layout-fix-r1b col.ctrm-execution-date-first-col-r1b { width: 9%; }
.ctrm-execution-table-layout-fix-r1b col.fo-group-scope-col { width: 9%; }
.ctrm-execution-table-layout-fix-r1b col.strategy-col-num { width: 8%; }
.ctrm-execution-table-layout-fix-r1b col.strategy-ledger-col-actions { width: 10%; }
.ctrm-execution-date-first-col-r1b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ctrm-execution-date-filter-r1b {
  margin: 6px 0 4px;
  font-size: 12px;
}
.ctrm-execution-date-filter-row-r1b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.ctrm-execution-date-filter-field-r1b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.ctrm-execution-date-input-r1b {
  max-width: 132px;
  font-size: 12px;
  padding: 2px 4px;
}
.ctrm-execution-date-filter-summary-r1b {
  margin: 0 0 6px;
  font-size: 12px;
}
.ctrm-execution-date-filter-empty-r1b td {
  text-align: center;
  padding: 12px 8px;
}
.ctrm-execution-table-layout-fix-r1b col.ctrm-execution-strategy-name-col-r1b { width: 14%; }
.ctrm-execution-table-layout-fix-r1b .fo-group-execution-strategy-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctrm-execution-table-layout-fix-r1b .ctrm-execution-detail-grid-r1 {
  max-width: 100%;
}

/* R1C — Execution table browser-measured alignment */
.ctrm-execution-table-align-r1c.fo-group-execution-movements-wrap {
  overflow-x: auto;
}
.ctrm-execution-table-align-r1c.fo-group-execution-movements-table,
table.ctrm-execution-table-align-r1c.fo-group-execution-movements-table {
  table-layout: fixed !important;
  width: var(--ctrm-exec-table-width-r1c, 1160px) !important;
  min-width: var(--ctrm-exec-table-width-r1c, 1160px) !important;
  max-width: var(--ctrm-exec-table-width-r1c, 1160px) !important;
  border-collapse: collapse;
}
.ctrm-execution-table-align-r1c thead,
.ctrm-execution-table-align-r1c tbody {
  display: table-row-group !important;
}
.ctrm-execution-table-align-r1c tr {
  display: table-row !important;
}
/* R1D — detail row [hidden] must beat R1C tr{display:table-row} (audit: EXECUTION-LIST-STRUCTURE-AUDIT-R1D) */
.ctrm-execution-table-align-r1c tr[hidden],
.ctrm-execution-table-align-r1c .ctrm-execution-row-detail-r1d[hidden],
.ctrm-execution-table-align-r1c .ctrm-execution-row-detail-r1[hidden],
.ctrm-execution-table-align-r1c .ctrm-ledger-list-detail-row.ctrm-execution-row-detail-r1[hidden],
.ctrm-execution-table-align-r1c tr.ctrm-ledger-list-detail-row[hidden] {
  display: none !important;
}
.ctrm-execution-table-align-r1c tr.fo-group-execution-movement-row {
  display: table-row !important;
}
.ctrm-execution-table-align-r1c tr.ctrm-ledger-list-detail-row:not([hidden]) {
  display: table-row !important;
}
.ctrm-execution-table-align-r1c th,
.ctrm-execution-table-align-r1c td {
  display: table-cell !important;
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctrm-execution-table-align-r1c .ctrm-exec-col-qty-r1c,
.ctrm-execution-table-align-r1c .ctrm-exec-col-price-r1c,
.ctrm-execution-table-align-r1c .strategy-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-execution-table-align-r1c .ctrm-execution-action-col-r1,
.ctrm-execution-table-align-r1c .strategy-ledger-col-actions {
  min-width: 0 !important;
  white-space: nowrap;
}
.ctrm-execution-table-align-r1c .fo-group-execution-strategy-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctrm-execution-table-align-r1c .ctrm-execution-action-compact-r1 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.ctrm-execution-table-align-r1c .ctrm-execution-effect-col-r1 .fo-movement-effect-detail,
.ctrm-execution-table-align-r1c .ctrm-execution-effect-col-r1 .fo-movement-effect-hint,
.ctrm-execution-table-align-r1c .ctrm-execution-effect-col-r1 .fo-movement-effect-compat {
  display: none !important;
}

/* R1E — Execution list grid (replaces visible table rendering) */
.ctrm-execution-grid-scroll-r1e {
  overflow-x: auto;
  width: 100%;
}
.ctrm-execution-grid-r1e {
  min-width: var(--ctrm-exec-grid-width-r1e, 1200px);
  width: var(--ctrm-exec-grid-width-r1e, 1200px);
}
.ctrm-execution-grid-header-r1e,
.ctrm-execution-grid-row-r1e {
  display: grid;
  grid-template-columns: var(--ctrm-exec-grid-columns-r1e, 120px 110px 120px 170px 110px 110px 130px 130px 90px 110px);
  column-gap: 0;
  align-items: center;
  box-sizing: border-box;
}
.ctrm-execution-grid-header-r1e {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-1, #fff);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  font-weight: 600;
  font-size: 0.92em;
}
.ctrm-execution-grid-cell-r1e {
  padding: 0.45rem 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  min-width: 0;
}
.ctrm-execution-grid-cell-r1e--right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-execution-grid-cell-r1e--nowrap {
  white-space: nowrap;
}
.ctrm-execution-grid-row-r1e {
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}
.ctrm-execution-grid-row-r1e:nth-child(even) {
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.ctrm-execution-grid-item-r1e .ctrm-execution-grid-row-r1e:nth-child(even) {
  background: transparent;
}
.ctrm-execution-grid-item-r1e:nth-child(even) .ctrm-execution-grid-row-r1e {
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.ctrm-execution-grid-detail-r1e {
  padding: 0.5rem 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--surface-2, #f8fafc);
}
.ctrm-execution-grid-detail-r1e[hidden] {
  display: none !important;
}
.ctrm-execution-grid-empty-r1e {
  padding: 1rem 0.75rem;
}
.ctrm-execution-grid-r1e .fo-group-execution-strategy-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctrm-execution-grid-r1e .ctrm-execution-action-compact-r1 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.ctrm-execution-grid-r1e .ctrm-execution-effect-col-r1 .fo-movement-effect-detail,
.ctrm-execution-grid-r1e .ctrm-execution-effect-col-r1 .fo-movement-effect-hint,
.ctrm-execution-grid-r1e .ctrm-execution-effect-col-r1 .fo-movement-effect-compat {
  display: none !important;
}

/* R1 — Position tab density (signed net qty / boundary pair / compact actions) */
.ctrm-position-tab-density-r1 .ctrm-position-core-table-r1 {
  min-width: 1580px;
}
.ctrm-position-floating-pnl-display-r1b .ctrm-group-position-cell-pnl {
  min-width: 6.5rem;
  max-width: 7.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ctrm-missing-valuation-status-r1 {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.82em;
  line-height: 1.35;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.18);
  color: var(--ctrm-muted, #64748b);
}
.ctrm-missing-valuation-status-r1--missing_price,
.ctrm-missing-valuation-status-r1--missing_settlement,
.ctrm-missing-valuation-status-r1--valuation_unavailable {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}
.ctrm-missing-valuation-status-r1--snapshot_pending,
.ctrm-missing-valuation-status-r1--data_stale {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.ctrm-missing-valuation-status-r1--data_unknown,
.ctrm-missing-valuation-status-r1--unknown,
.ctrm-missing-valuation-status-r1--empty {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}
.ctrm-position-tab-density-r1 .ctrm-table th,
.ctrm-position-tab-density-r1 .ctrm-table td {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
  font-size: 0.92em;
}
.ctrm-position-signed-qty-r1 {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ctrm-position-signed-qty-r1--long {
  color: inherit;
}
.ctrm-position-signed-qty-r1--short {
  color: var(--danger-fg, #b45309);
}
.ctrm-position-signed-qty-r1--flat {
  color: var(--muted-fg, #64748b);
}
.ctrm-position-signed-badge-r1 {
  font-size: 0.82em;
  font-weight: 500;
  color: var(--muted-fg, #64748b);
  margin-left: 0.15em;
}
.ctrm-position-boundary-pair-r1 {
  font-size: 0.9em;
  white-space: nowrap;
}
.ctrm-position-updated-compact-r1 {
  font-size: 0.88em;
  color: var(--muted-fg, #64748b);
}
.ctrm-position-action-compact-r1 {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.ctrm-position-action-compact-r1 .btn-link {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-size: 0.88em;
}
.ctrm-position-tab-density-r1 .fo-group-position-actions-col .fo-group-write-action-btn[data-group-write-action="register-exec"] {
  display: none;
}

/* CTRM-STRATEGY-LEDGER-ROW-ACTION-SEMANTIC-CLEANUP-R1 — 操作列 vs 详情下钻 */
.ctrm-row-action-semantic-r1 .fo-group-position-actions-col,
.ctrm-row-action-semantic-r1 .ctrm-execution-grid-actions-r1e {
  white-space: nowrap;
}
.ctrm-row-action-primary-r1 {
  font-weight: 600;
}
.ctrm-row-action-secondary-r1 {
  font-weight: 500;
}
.ctrm-row-action-detail-r1 {
  font-weight: 400;
}
.ctrm-row-related-links-r1 {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-muted, #e2e8f0);
}
.ctrm-row-related-links-r1__title {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--muted-fg, #64748b);
  margin-bottom: 0.25rem;
}
.ctrm-row-related-links-r1__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.ctrm-row-related-link-r1 {
  padding-left: 0;
  padding-right: 0;
  font-size: 0.88em;
  /* D178⑧ / D173②: .btn 绿底 + muted 灰字对比度失效 → 透明底 + lifecycle 语义色可读字 */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--ctrm-lifecycle-fg, #0f766e);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ctrm-row-related-link-r1:hover {
  background: transparent !important;
  color: var(--ctrm-lifecycle-fg-hover, #115e59);
}
.ctrm-row-related-link-r1:disabled,
.ctrm-row-related-link-r1[disabled] {
  color: var(--muted-fg, #94a3b8);
}
.ctrm-row-action-semantic-r1 .ctrm-position-action-compact-r1 .ctrm-row-action-primary-r1 {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}
.ctrm-row-action-semantic-r1 .ctrm-position-action-compact-r1 .ctrm-row-action-secondary-r1 {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  font-size: 0.88em;
}
.ctrm-row-action-semantic-r1 .ctrm-position-action-compact-r1 .ctrm-row-action-detail-r1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-size: 0.88em;
}
.ctrm-row-action-semantic-r1 .ctrm-execution-grid-actions-r1e .ctrm-row-action-detail-r1 {
  font-size: 0.88em;
}
.ctrm-position-detail-grid-r1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
  overflow-wrap: anywhere;
}
.ctrm-position-detail-card-r1 .ctrm-ledger-list-detail-section {
  margin: 0;
}
.ctrm-position-filter-compact-r1 {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.ctrm-position-filter-primary-r1,
.ctrm-position-filter-advanced-r1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.ctrm-position-filter-compact-r1 .ctrm-group-position-filter-field {
  font-size: 0.9em;
}
.ctrm-position-filter-compact-r1 select {
  font-size: 0.9em;
  max-width: 11rem;
}

/* CTRM-STRATEGY-LEDGER-POSITION-DYNAMIC-BOUNDARY-VALUE-DETAIL-R1B */
.ctrm-position-dynamic-boundary-value-r1b .ctrm-position-boundary-value-card-r1b {
  min-width: 0;
}
.ctrm-position-dynamic-boundary-value-r1b .ctrm-position-boundary-value-card-r1b .ctrm-ledger-list-detail-section {
  margin: 0;
}
.ctrm-position-boundary-value-risk-r1b .ctrm-group-position-cell-dynamic-risk {
  color: var(--ctrm-loss-text, #b91c1c);
}
.ctrm-position-boundary-value-profit-r1b .ctrm-group-position-cell-dynamic-risk {
  color: var(--ctrm-profit-text, #15803d);
}
.ctrm-position-boundary-value-ratio-r1b {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-position-boundary-value-note-r1b {
  margin: 0.35rem 0 0;
  font-size: 0.82em;
  line-height: 1.35;
  color: var(--ctrm-text-muted, #64748b);
}

/* CTRM-STRATEGY-LEDGER-POSITION-DYNAMIC-BOUNDARY-VALUE-SUMMARY-R1C */
.ctrm-position-dynamic-boundary-summary-r1c .ctrm-list-summary-bar-inner-r2c {
  flex-wrap: wrap;
}
.ctrm-position-dynamic-boundary-summary-r1c .ctrm-list-summary-sep-r2c {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-position-summary-risk-r1c {
  color: var(--ctrm-loss-text, #b91c1c);
}
.ctrm-position-summary-profit-r1c {
  color: var(--ctrm-profit-text, #15803d);
}
.ctrm-position-summary-missing-r1c {
  text-decoration: dotted underline;
  text-underline-offset: 2px;
}

/* CTRM-STRATEGY-LEDGER-EXECUTION-POSITION-FILTER-SUMMARY-R2C */
.ctrm-execution-position-filter-summary-r2c .ctrm-execution-filter-r2c {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-execution-filter-select-r2c {
  font-size: 0.875rem;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: #fff;
  min-width: 6.5rem;
  max-width: 11rem;
}
.ctrm-position-filter-inline-r2c {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
}
.ctrm-position-filter-inline-r2c .ctrm-group-position-filters-label {
  flex: 0 0 auto;
}
.ctrm-list-summary-bar-r2c {
  margin: 8px 0 4px;
  padding: 0 2px;
}
.ctrm-list-summary-bar-inner-r2c {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  background: var(--ctrm-surface-muted, #f8fafc);
  font-size: 12px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-list-summary-prefix-r2c {
  font-weight: 600;
  color: var(--ctrm-text, #334155);
}
.ctrm-list-summary-metric-r2c {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.ctrm-list-summary-label-r2c {
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-list-summary-value-r2c {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ctrm-text, #1e293b);
}

/* CTRM-STRATEGY-LEDGER-EXECUTION-PROVENANCE-WARNING-R2 */
.ctrm-execution-provenance-warning-r2 {
  /* marker namespace */
}
.ctrm-execution-source-badge-r2 {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}
.ctrm-execution-source-uat-r2 {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 500;
}
.ctrm-execution-source-diagnostic-r2 {
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 500;
}
.ctrm-execution-source-instruction-r2 {
  color: #1e40af;
}
.ctrm-execution-source-direct-r2 {
  color: var(--ctrm-text, #334155);
}
.ctrm-execution-source-unknown-r2 {
  color: #64748b;
  font-style: italic;
}
.ctrm-execution-summary-provenance-note-r2 {
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 400;
  white-space: normal;
}
.ctrm-execution-raw-provenance-r2__details {
  margin-top: 0.35rem;
}
.ctrm-execution-raw-provenance-r2__details summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
}
.ctrm-execution-grid-r1e .ctrm-execution-source-badge-r2 + .ctrm-execution-source-badge-r2 {
  margin-left: 2px;
}

/* CTRM-STRATEGY-LEDGER-EXECUTION-PROVENANCE-FILTER-R3 */
.ctrm-execution-provenance-filter-r3 {
  /* marker namespace */
}
.ctrm-execution-provenance-filter-select-r3 {
  min-width: 6.5rem;
  max-width: 9rem;
}
.ctrm-execution-provenance-filter-note-r3 {
  display: inline-block;
  font-size: 11px;
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 400;
  white-space: normal;
  margin-left: 0.25rem;
}
#fo-group-execution-date-filter-r1b .ctrm-execution-provenance-filter-r3 {
  flex: 0 1 auto;
}

/* CTRM-STRATEGY-LEDGER-BUSINESS-BOOK-TAB-RENAME-R1B — naming namespace only */
.ctrm-business-book-tab-r1b {
  /* marker namespace; no layout change */
}
.ctrm-business-book-boundary-r1b {
  /* boundary subtitle / section notes */
}
.ctrm-business-book-level-title-r1b {
  font-weight: 600;
}

/* CTRM-STRATEGY-LEDGER-BUSINESS-BOOK-DATA-PAGE-FIX-R1D */
.ctrm-business-book-load-state-r1d {
  color: var(--ctrm-muted, #64748b);
}
.ctrm-business-book-status-r1d {
  color: var(--ctrm-muted, #64748b);
  font-size: 0.92em;
}
.ctrm-business-book-empty-r1d {
  margin: 0.75rem 0;
}
.ctrm-business-book-error-r1d {
  margin: 0.75rem 0;
  color: #b45309;
  border-left: 3px solid #f59e0b;
  padding-left: 0.75rem;
}

/* CTRM-STRATEGY-LEDGER-LIST-SURFACE-AUTO-FIT-R2 — shared list skin · schema column roles */
.ctrm-ledger-list-surface-r2 {
  /* marker namespace for four-tab list containers */
}
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-scroll-r2 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 {
  table-layout: fixed;
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2--book-l3 {
  min-width: 72rem;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 thead th,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-header-r2 {
  background: var(--ctrm-table-head-bg, #f1f5f9);
  color: var(--ctrm-text, #1e293b);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.625rem;
  height: 2.25rem;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 tbody td,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-row-r2 {
  padding: 0.4375rem 0.625rem;
  vertical-align: middle;
  line-height: 1.35;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--ctrm-border-light, #f1f5f9);
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 tbody tr:hover,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-grid-r2 .ctrm-execution-grid-row-r1e:hover {
  background: var(--ctrm-row-hover, #f8fafc);
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-cell-num-r2,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 td.strategy-col-num,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-table-r2 th.strategy-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-cell-action-r2,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .fo-group-plan-actions-col,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-group-position-cell-action {
  white-space: nowrap;
  width: 1%;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-cell-ellipsis-r2,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .fo-group-plan-strategy-name,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .fo-group-position-strategy-name,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .fo-group-execution-strategy-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--date { width: 7.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--group { width: 6.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--commodity { width: 6.25rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--category { width: 7rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--name { width: auto; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--qty { width: 6.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--price { width: 6.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--money { width: 7.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--rate { width: 5.75rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--status { width: 5.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--source { width: 7rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--boundary { width: 9rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--action { width: 6.5rem; }
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-col-r2--text { width: auto; }

/* CTRM-STRATEGY-LEDGER-LIST-SURFACE-SSOT-DISPLAY-COMPACT-R2B */
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-list-surface-compact-r2b {
  /* marker namespace */
}
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--group { width: 6.25rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--commodity { width: 7rem; max-width: 8.125rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--category { width: 5.5rem; max-width: 6.25rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--name { width: 8.5rem; max-width: 8.75rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--date { width: 6.875rem; max-width: 7.5rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--qty { width: 6.25rem; max-width: 7.5rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--price { width: 5.75rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--money { width: 7.5rem; max-width: 9.375rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--rate { width: 5.75rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--status { width: 4.75rem; max-width: 5.625rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--source { width: 6.25rem; max-width: 8.125rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--boundary { width: 8.125rem; max-width: 10rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--action { width: 6.875rem; max-width: 8.75rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-col-r2--text { width: 6.25rem; max-width: 8.125rem; }
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-list-table-r2 tbody td.ctrm-ledger-col-strategy-r2b,
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-list-table-r2 tbody td.ctrm-ledger-col-category-r2b,
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-cell-ellipsis-r2b,
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-list-cell-ellipsis-r2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}
.strategy-ledger-workspace[data-list-surface-ssot-display-compact-r2b="true"] .ctrm-ledger-commodity-display-r2b {
  white-space: nowrap;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-detail-r2 {
  background: var(--ctrm-panel-bg, #fff);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0 0.5rem;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-empty-r2,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-loading-r2 {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--ctrm-muted, #64748b);
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-error-r2,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-business-book-error-r1d.ctrm-ledger-list-empty-r2 {
  color: #b45309;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-toolbar-r2 {
  margin-bottom: 0.5rem;
  gap: 0.5rem 0.75rem;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-grid-r2.ctrm-execution-grid-r1e {
  min-width: var(--ctrm-exec-grid-width-r1e, 960px);
  width: 100%;
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-grid-r2 .ctrm-execution-grid-header-r1e,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-grid-r2 .ctrm-execution-grid-row-r1e {
  grid-template-columns: var(--ctrm-exec-grid-columns-r1e);
}

.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] tr[data-ledger-detail-row] td {
  overflow: visible;
  white-space: normal;
}

/* CTRM-STRATEGY-LEDGER-LIST-COLUMN-ALIGNMENT-COMPACT-R2D */
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-column-compact-r2d {
  /* namespace anchor */
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-text-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-num-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-date-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-status-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-action-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-boundary-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-badge-r2d {
  /* role column markers */
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-cell-left-r2d {
  text-align: left;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-cell-right-r2d {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-cell-center-r2d {
  text-align: center;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-cell-ellipsis-r2d {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-action-nowrap-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-action-r2d {
  white-space: nowrap;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-boundary-r2d {
  text-align: left;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-col-boundary-r2d.strategy-col-num {
  text-align: left;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-table-r2 td.ctrm-ledger-cell-right-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-table-r2 th.ctrm-ledger-cell-right-r2d {
  text-align: right;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .fo-pnl-analysis-table td.ctrm-ledger-cell-right-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .fo-pnl-analysis-daily-table td.ctrm-ledger-cell-right-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .fo-pnl-analysis-ledger-table td.ctrm-ledger-cell-right-r2d {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--group { width: 5.5rem; max-width: 5.625rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--commodity { width: 6.5rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--category { width: 4.75rem; max-width: 5rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--name { width: 7rem; max-width: 7.5rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--qty { width: 6.5rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--price { width: 5.75rem; max-width: 6.25rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--money { width: 7.5rem; max-width: 8.75rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--rate { width: 5.75rem; max-width: 7.5rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--status { width: 4.75rem; max-width: 5rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--action { width: 7rem; max-width: 7.5rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--date { width: 5.75rem; max-width: 6.875rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--boundary { width: 7.5rem; max-width: 8.75rem; }
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-colgroup-r2 .ctrm-ledger-col-r2--source { width: 5.75rem; max-width: 6.875rem; }

.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-scroll-r2 {
  overflow-x: auto;
}

/* CTRM-STRATEGY-LEDGER-LIST-COLUMN-ALIGNMENT-COMPACT-FIX-R2D1 */
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-list-column-alignment-fix-r2d1 {
  /* namespace anchor */
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.ctrm-ledger-cell-left-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-ledger-cell-left-r2d {
  text-align: left !important;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.ctrm-ledger-cell-right-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-ledger-cell-right-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.strategy-col-num,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.strategy-col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.ctrm-ledger-cell-center-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-ledger-cell-center-r2d,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-plan-status-cell,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.ctrm-plan-status-col,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.fo-group-plan-actions-col,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th.fo-group-plan-actions-col {
  text-align: center !important;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-ledger-cell-left-r2d:not(.strategy-col-num),
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td.ctrm-ledger-cell-left-r2d:not(.fo-text-right) {
  text-align: left !important;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 .ctrm-ledger-cell-inner-r2d1 {
  display: block;
  width: 100%;
  text-align: inherit;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td[data-plan-field="owner_group"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td[data-plan-field="commodity"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td[data-plan-field="strategy_category"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 td[data-plan-field="strategy_name"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th[data-plan-field="owner_group"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th[data-plan-field="commodity"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th[data-plan-field="strategy_category"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-plan-list-alignment-fix-r2d1 th[data-plan-field="strategy_name"] {
  text-align: left !important;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1.ctrm-execution-grid-r1e {
  min-width: max-content;
  width: max-content;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1.ctrm-execution-grid-scroll-r1e {
  overflow-x: auto;
  overflow-y: visible;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 .ctrm-execution-header-cell-fix-r2d1 {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 .ctrm-execution-grid-header-cell-r2d1.ctrm-execution-header-cell-fix-r2d1,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 .ctrm-execution-grid-header-cell-r1e.ctrm-execution-header-cell-fix-r2d1 {
  overflow: visible;
  text-overflow: clip;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 .ctrm-execution-action-cell-fix-r2d1,
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 [data-exec-grid-col="actions"] {
  overflow: visible;
  min-width: 5.625rem;
  white-space: nowrap;
  text-overflow: clip;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 [data-exec-grid-col="effect"],
.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 [data-exec-grid-col="source"] {
  min-width: 6.5625rem;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 [data-exec-grid-col="status"] {
  min-width: 5rem;
}

.strategy-ledger-workspace[data-list-column-alignment-compact-fix-r2d1="true"] .ctrm-execution-grid-clip-fix-r2d1 .ctrm-execution-action-compact-r1 {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* R7C-1: strategy model library short first screen + five overview cards */
.strategy-library-page .strategy-library-r7c1-hero {
  margin-bottom: 0.75rem;
}

.strategy-library-page .strategy-library-r7c1-hero > h1 {
  margin-bottom: 0.35rem;
}

.strategy-library-page .strategy-library-r7c1-positioning {
  margin-bottom: 0.75rem;
}

.strategy-library-page .strategy-library-r7c1-subtitle {
  margin: 0 0 0.5rem;
  max-width: 52rem;
  line-height: 1.45;
}

.strategy-library-page .strategy-library-r7c1-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.strategy-library-page .strategy-library-r7c1-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.3;
  background: var(--ctrm-surface-muted, #f3f4f6);
  color: var(--ctrm-text, #1f2937);
  border: 1px solid var(--ctrm-border, #e5e7eb);
}

.strategy-library-page .strategy-library-r7c1-chip--reserved {
  opacity: 0.72;
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c1-layer-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7c1-finance-reserved {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.strategy-library-page .strategy-library-r7c1-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.25rem;
}

@media (max-width: 1100px) {
  .strategy-library-page .strategy-library-r7c1-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .strategy-library-page .strategy-library-r7c1-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.strategy-library-page .strategy-library-r7c1-summary-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  min-height: 4.5rem;
  border-radius: 0.45rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  background: var(--ctrm-surface, #fff);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.strategy-library-page button.strategy-library-r7c1-summary-card:hover,
.strategy-library-page button.strategy-library-r7c1-summary-card:focus-visible {
  border-color: var(--ctrm-accent, #2563eb);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ctrm-accent, #2563eb) 25%, transparent);
  outline: none;
}

.strategy-library-page .strategy-library-r7c1-summary-card--finance {
  cursor: default;
  opacity: 0.78;
  background: var(--ctrm-surface-muted, #f9fafb);
}

.strategy-library-page .strategy-library-r7c1-summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ctrm-muted, #6b7280);
  letter-spacing: 0.02em;
}

.strategy-library-page .strategy-library-r7c1-summary-value {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ctrm-text, #111827);
}

.strategy-library-page .strategy-library-r7c1-summary-card--finance .strategy-library-r7c1-summary-value {
  font-weight: 500;
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c1-summary-note {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ctrm-muted, #6b7280);
}

/* R7C-2: strategy model library six-tab IA alignment */
.strategy-library-page .strategy-library-r7c2-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 0.15rem;
  margin-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.strategy-library-page .strategy-library-r7c2-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7c2-tab-panel[hidden] {
  display: none !important;
}

/* R7C-3: finance reference reserved collapse */
.strategy-library-page .strategy-library-r7c3-finance-reserved {
  margin: 0.5rem 0 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed var(--ctrm-border, #e5e7eb);
  border-radius: 0.45rem;
  background: var(--ctrm-surface-muted, #f9fafb);
  opacity: 0.88;
}

.strategy-library-page .strategy-library-r7c3-finance-reserved summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ctrm-muted, #6b7280);
  user-select: none;
}

.strategy-library-page .strategy-library-r7c3-finance-reserved summary::-webkit-details-marker {
  display: none;
}

.strategy-library-page .strategy-library-r7c3-finance-reserved summary::before {
  content: '▸';
  margin-right: 0.35rem;
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.strategy-library-page .strategy-library-r7c3-finance-reserved[open] summary::before {
  transform: rotate(90deg);
}

.strategy-library-page .strategy-library-r7c3-finance-title {
  font-weight: 600;
  color: var(--ctrm-text, #374151);
}

.strategy-library-page .strategy-library-r7c3-finance-status {
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ctrm-muted, #9ca3af);
  text-transform: lowercase;
}

.strategy-library-page .strategy-library-r7c3-finance-body {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--ctrm-border, #e5e7eb);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c3-finance-body p {
  margin: 0 0 0.35rem;
}

.strategy-library-page .strategy-library-r7c3-finance-notes {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.strategy-library-page .strategy-library-r7c3-finance-notes li {
  margin: 0.15rem 0;
}

.strategy-library-page .strategy-library-r7c3-finance-muted {
  max-width: 42rem;
}

/* R7C-4: audit & version three-layer collapse */
.strategy-library-page .strategy-library-r7c4-audit-version {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.45rem;
  background: var(--ctrm-surface, #fff);
}

.strategy-library-page .strategy-library-r7c4-audit-version-header {
  margin-bottom: 0.5rem;
}

.strategy-library-page .strategy-library-r7c4-audit-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.strategy-library-page .strategy-library-r7c4-audit-lead {
  margin: 0;
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7c4-layer-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ctrm-muted, #6b7280);
  letter-spacing: 0.02em;
}

.strategy-library-page .strategy-library-r7c4-version-summary {
  margin-bottom: 0.5rem;
}

.strategy-library-page .strategy-library-r7c4-version-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

@media (min-width: 900px) {
  .strategy-library-page .strategy-library-r7c4-version-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .strategy-library-page .strategy-library-r7c4-version-summary-card--wide {
    grid-column: span 2;
  }
}

.strategy-library-page .strategy-library-r7c4-version-summary-card {
  padding: 0.4rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  background: var(--ctrm-surface-muted, #f9fafb);
}

.strategy-library-page .strategy-library-r7c4-version-summary-card.strategy-library-r7c4-status-ok {
  border-color: color-mix(in srgb, #16a34a 25%, var(--ctrm-border, #e5e7eb));
}

.strategy-library-page .strategy-library-r7c4-version-summary-card.strategy-library-r7c4-status-review {
  border-color: color-mix(in srgb, #d97706 35%, var(--ctrm-border, #e5e7eb));
  background: color-mix(in srgb, #fffbeb 60%, var(--ctrm-surface-muted, #f9fafb));
}

.strategy-library-page .strategy-library-r7c4-summary-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #6b7280);
  margin-bottom: 0.1rem;
}

.strategy-library-page .strategy-library-r7c4-summary-value {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ctrm-text, #111827);
}

.strategy-library-page .strategy-library-r7c4-audit-details {
  margin-top: 0.35rem;
  border-top: 1px dashed var(--ctrm-border, #e5e7eb);
  padding-top: 0.35rem;
}

.strategy-library-page .strategy-library-r7c4-audit-details > summary,
.strategy-library-page .strategy-library-r7c4-technical-details > summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctrm-muted, #6b7280);
  user-select: none;
  list-style: none;
}

.strategy-library-page .strategy-library-r7c4-audit-details > summary::-webkit-details-marker,
.strategy-library-page .strategy-library-r7c4-technical-details > summary::-webkit-details-marker {
  display: none;
}

.strategy-library-page .strategy-library-r7c4-audit-details-body {
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  background: var(--ctrm-surface-muted, #f9fafb);
}

.strategy-library-page .strategy-library-r7c4-audit-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.strategy-library-page .strategy-library-r7c4-audit-dl dt {
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #6b7280);
  margin: 0;
}

.strategy-library-page .strategy-library-r7c4-audit-dl dd {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ctrm-text, #374151);
}

.strategy-library-page .strategy-library-r7c4-technical-details {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px dotted var(--ctrm-border, #e5e7eb);
}

.strategy-library-page .strategy-library-r7c4-raw {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.6875rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ctrm-muted, #6b7280);
  background: var(--ctrm-surface-muted, #f3f4f6);
  border-radius: 0.35rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* R7C-5: parameter health hints dedup — unique main display in parameter-health tab */
.strategy-library-page .strategy-library-r7c5-parameter-health {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.45rem;
  background: var(--ctrm-surface, #fff);
}

.strategy-library-page .strategy-library-r7c5-parameter-health-header {
  margin-bottom: 0.55rem;
}

.strategy-library-page .strategy-library-r7c5-parameter-health-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.strategy-library-page .strategy-library-r7c5-health-muted {
  margin: 0;
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7c5-health-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

@media (min-width: 900px) {
  .strategy-library-page .strategy-library-r7c5-health-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.strategy-library-page .strategy-library-r7c5-health-card {
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  background: var(--ctrm-surface-muted, #f9fafb);
}

.strategy-library-page .strategy-library-r7c5-health-card--ok {
  border-color: color-mix(in srgb, #16a34a 25%, var(--ctrm-border, #e5e7eb));
}

.strategy-library-page .strategy-library-r7c5-health-card--review {
  border-color: color-mix(in srgb, #d97706 35%, var(--ctrm-border, #e5e7eb));
  background: color-mix(in srgb, #fffbeb 60%, var(--ctrm-surface-muted, #f9fafb));
}

.strategy-library-page .strategy-library-r7c5-health-card-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #6b7280);
  margin-bottom: 0.15rem;
}

.strategy-library-page .strategy-library-r7c5-health-card-value {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctrm-text, #374151);
  line-height: 1.35;
}

.strategy-library-page .strategy-library-r7c5-health-hints {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.strategy-library-page .strategy-library-r7c5-health-hint {
  margin: 0;
}

.strategy-library-page .strategy-library-r7c5-health-hint-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.3rem;
  background: var(--ctrm-surface-muted, #f9fafb);
  font-size: 0.8125rem;
  color: var(--ctrm-text, #374151);
  cursor: pointer;
}

.strategy-library-page .strategy-library-r7c5-health-hint-btn:hover {
  background: color-mix(in srgb, var(--ctrm-surface-muted, #f9fafb) 70%, #fff);
}

.strategy-library-page .strategy-library-r7c5-health-hint-text {
  display: block;
  padding: 0.35rem 0.45rem;
  font-size: 0.8125rem;
  color: var(--ctrm-text, #374151);
  border-left: 3px solid var(--ctrm-border, #e5e7eb);
}

.strategy-library-page .library-r7c5-legacy-hidden {
  display: none !important;
}

/* R7C-6: model catalog 10-column slim table + inline detail */
.strategy-library-page .strategy-library-r7c6-model-catalog {
  margin-bottom: 0.35rem;
}

.strategy-library-page .strategy-library-r7c6-model-table-wrap {
  overflow-x: auto;
}

.strategy-library-page .strategy-library-r7c6-model-table {
  min-width: 52rem;
}

.strategy-library-page .strategy-library-r7c6-model-table th,
.strategy-library-page .strategy-library-r7c6-model-table td {
  vertical-align: middle;
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7c6-model-name {
  font-weight: 500;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7c6-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  background: var(--ctrm-surface-muted, #f9fafb);
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7c6-badge--ready {
  border-color: color-mix(in srgb, #16a34a 25%, var(--ctrm-border, #e5e7eb));
  color: #166534;
}

.strategy-library-page .strategy-library-r7c6-badge--review {
  border-color: color-mix(in srgb, #d97706 35%, var(--ctrm-border, #e5e7eb));
  background: color-mix(in srgb, #fffbeb 55%, var(--ctrm-surface-muted, #f9fafb));
  color: #92400e;
}

.strategy-library-page .strategy-library-r7c6-badge--muted {
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c6-actions {
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7c6-actions .btn {
  margin: 0 0.1rem 0.1rem 0;
}

.strategy-library-page .strategy-library-r7c6-model-detail-row td {
  padding: 0.35rem 0.5rem 0.65rem;
  background: var(--ctrm-surface-muted, #f9fafb);
  border-top: none;
}

.strategy-library-page .strategy-library-r7c6-model-detail {
  margin: 0;
}

.strategy-library-page .strategy-library-r7c6-model-detail-summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctrm-text, #374151);
  margin-bottom: 0.35rem;
}

.strategy-library-page .strategy-library-r7c6-model-detail-inner {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 900px) {
  .strategy-library-page .strategy-library-r7c6-model-detail-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.strategy-library-page .strategy-library-r7c6-detail-group {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
  background: var(--ctrm-surface, #fff);
}

.strategy-library-page .strategy-library-r7c6-detail-group-title {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c6-model-detail-grid {
  display: grid;
  gap: 0.25rem 0.5rem;
}

.strategy-library-page .strategy-library-r7c6-detail-item {
  display: grid;
  grid-template-columns: minmax(6rem, 38%) 1fr;
  gap: 0.35rem;
  align-items: baseline;
}

.strategy-library-page .strategy-library-r7c6-detail-label {
  font-size: 0.6875rem;
  color: var(--ctrm-muted, #6b7280);
}

.strategy-library-page .strategy-library-r7c6-detail-value {
  font-size: 0.8125rem;
  color: var(--ctrm-text, #374151);
  word-break: break-word;
}

.strategy-library-page .strategy-library-r7e-hf2-catalog-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
  background: var(--ctrm-surface-muted, #f9fafb);
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7e-hf2-filter-chip {
  color: var(--ctrm-text, #374151);
  font-weight: 500;
}

.strategy-library-page .strategy-library-r7e-hf2-filter-clear {
  margin-left: auto;
}

.strategy-library-page .strategy-library-r7e-hf2-action-muted {
  font-size: 0.75rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-category-compact {
  margin-top: 0.35rem;
}

.strategy-library-page .strategy-library-r7e-hf3-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.strategy-library-page .strategy-library-r7e-hf3-category-table {
  width: 100%;
  table-layout: fixed;
}

.strategy-library-page .strategy-library-r7e-hf3-category-table th,
.strategy-library-page .strategy-library-r7e-hf3-category-table td {
  vertical-align: top;
}

.strategy-library-page .strategy-library-r7e-hf3-col-category {
  width: 7rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-col-summary {
  width: 34%;
}

.strategy-library-page .strategy-library-r7e-hf3-col-coverage {
  width: 14%;
}

.strategy-library-page .strategy-library-r7e-hf3-col-models,
.strategy-library-page .strategy-library-r7e-hf3-count {
  width: 9rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-col-status,
.strategy-library-page .strategy-library-r7e-hf3-status {
  width: 5rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-col-actions,
.strategy-library-page .strategy-library-r7e-hf3-actions {
  width: 11rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-category-summary {
  white-space: normal;
  line-height: 1.45;
  max-width: 520px;
}

.strategy-library-page .strategy-library-r7e-hf3-category-summary > div + div {
  margin-top: 0.2rem;
}

.strategy-library-page .strategy-library-r7e-hf3-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.strategy-library-page .strategy-library-r7e-hf3-actions-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
}

.strategy-library-page .strategy-library-r7e-hf3-action-muted {
  font-size: 0.75rem;
  white-space: nowrap;
}

.strategy-library-page .strategy-library-r7e-hf3-inactive {
  margin-top: 0.75rem;
  padding: 0.35rem 0.45rem;
  border: 1px dashed var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
  background: var(--ctrm-surface-muted, #f9fafb);
}

.strategy-library-page .strategy-library-r7e-hf3-inactive-summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctrm-muted, #6b7280);
  list-style: none;
}

.strategy-library-page .strategy-library-r7e-hf3-inactive[open] .strategy-library-r7e-hf3-inactive-summary {
  margin-bottom: 0.45rem;
}

.strategy-library-page .strategy-library-r7e-hf3-empty {
  margin: 0.25rem 0;
  font-size: 0.8125rem;
}

.strategy-library-page .strategy-library-r7e-hf4-top-coverage-line {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 48rem;
}

.strategy-library-page .strategy-library-r7e-hf4-top-coverage-summary {
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 500;
  word-break: break-word;
}

/* CTRM-STRATEGY-LEDGER-BUSINESS-PNL-READONLY-UI-R10D — scoped plan tab readonly block */
.strategy-ledger-business-pnl-readonly-r10 {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 0.5rem;
  background: var(--surface-1, #fff);
}
.strategy-ledger-business-pnl-readonly-r10__header {
  margin-bottom: 0.65rem;
}
.strategy-ledger-business-pnl-readonly-r10__lead {
  margin: 0.35rem 0 0;
}
.strategy-ledger-business-pnl-readonly-r10__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}
.strategy-ledger-business-pnl-readonly-r10__card {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 0.35rem;
  background: var(--surface-2, #f8fafc);
}
.strategy-ledger-business-pnl-readonly-r10__label {
  font-size: 0.78rem;
  color: var(--ctrm-text-muted, #64748b);
  margin-bottom: 0.2rem;
}
.strategy-ledger-business-pnl-readonly-r10__value {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.strategy-ledger-business-pnl-readonly-r10__status {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}
.strategy-ledger-business-pnl-readonly-r10__status--warn {
  color: #b45309;
}
.strategy-ledger-business-pnl-readonly-r10__muted {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  color: var(--ctrm-text-muted, #64748b);
}
.strategy-ledger-business-pnl-readonly-r10__warning {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8125rem;
}
.strategy-ledger-business-pnl-readonly-r10__negative {
  color: #b91c1c;
}
.strategy-ledger-business-pnl-readonly-r10__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0.55rem 0 0;
  font-size: 0.8125rem;
}
.strategy-ledger-business-pnl-readonly-r10__meta dt {
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 500;
}
.strategy-ledger-business-pnl-readonly-r10__meta dd {
  margin: 0.1rem 0 0;
  word-break: break-word;
}

/* CTRM-STRATEGY-LEDGER-BUSINESS-PNL-FRESHNESS-UI-COPY-R10G — scoped freshness explanation */
.strategy-ledger-business-pnl-readonly-r10__freshness {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 0.35rem;
  background: var(--surface-2, #f8fafc);
}
.strategy-ledger-business-pnl-readonly-r10__freshness-title {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctrm-text-muted, #475569);
}
.strategy-ledger-business-pnl-readonly-r10__freshness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.4rem 0.65rem;
}
.strategy-ledger-business-pnl-readonly-r10__freshness-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8125rem;
}
.strategy-ledger-business-pnl-readonly-r10__freshness-item--wide {
  grid-column: 1 / -1;
}
.strategy-ledger-business-pnl-readonly-r10__freshness-note {
  margin: 0.45rem 0 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
  background: #f0f9ff;
  color: #0369a1;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.strategy-ledger-business-pnl-readonly-r10__calendar-missing {
  border-color: #bae6fd;
  background: #f8fafc;
}
.strategy-ledger-business-pnl-readonly-r10__status--calendar-missing {
  color: #0369a1;
}

/* R18B — dedicated template read-only UI visibility */
.library-dedicated-template-r18b .library-dedicated-r18b-lead {
  margin: 0 0 0.75rem;
}
.library-dedicated-r18b-flag-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.library-dedicated-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.library-dedicated-badge--readonly {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.library-dedicated-badge--template {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.library-dedicated-badge--multileg {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.library-dedicated-r18b-block {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.library-dedicated-r18b-block-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.library-dedicated-r18b-subtitle {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
}
.library-dedicated-summary-dl,
.library-dedicated-trace-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
}
.library-dedicated-summary-dl > div,
.library-dedicated-trace-dl > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.library-dedicated-summary-dl dt,
.library-dedicated-trace-dl dt {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}
.library-dedicated-trace-summary {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}
.library-dedicated-empty {
  margin: 0.5rem 0;
}
.library-dedicated-leg-table th,
.library-dedicated-model-list-table th {
  white-space: nowrap;
}
.library-dedicated-builder-grid,
.library-dedicated-instance-contract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.library-dedicated-field-span2 {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .library-dedicated-field-span2 {
    grid-column: span 1;
  }
}
.library-dedicated-builder-toolbar,
.library-dedicated-builder-actions,
.library-dedicated-ratio-actions,
.library-dedicated-instance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.library-dedicated-dryrun-output {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.library-dedicated-ratio-summary,
.library-dedicated-activate-preconditions {
  font-size: 0.875rem;
  margin: 0.5rem 0;
}
.library-dedicated-builder-form[disabled],
.library-dedicated-builder-form.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}
.library-dedicated-instance-apply-status {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--border-subtle, #cbd5e1);
  font-size: 0.8125rem;
}
.library-dedicated-instance-downstream-blocked {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.75rem;
}
.library-dedicated-boundary-status {
  margin: 0.5rem 0;
  font-size: 0.8125rem;
}
.library-dedicated-r19b-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r19c-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r19d-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r19e-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r20a-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r20b-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r20c-block {
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
  padding-top: 0.75rem;
}
.library-dedicated-r20a-fallback-banner {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 4px;
  background: var(--surface-muted, #f8fafc);
}
.library-dedicated-finance-trace-table th {
  white-space: nowrap;
}
.library-dedicated-wac-preview-table th,
.library-dedicated-pnl-preview-table th {
  white-space: nowrap;
}
.library-dedicated-r22a-block {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface-muted, #f8fafc);
}
.library-r22a-subtitle {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.library-r22a-overview-card {
  margin-top: 0.5rem;
}
.library-r22a-overview-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.35rem 1rem;
}
.library-r22a-timeline {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.library-r22a-timeline-item {
  flex: 1 1 10rem;
  min-width: 9rem;
  border: 1px dashed var(--border-subtle, #cbd5e1);
  border-radius: 4px;
  padding: 0.45rem 0.55rem;
  background: #fff;
  font-size: 0.85rem;
}
.library-r22a-timeline-item strong {
  display: block;
  margin-bottom: 0.15rem;
}
.library-r22a-timeline-arrow {
  align-self: center;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}
.library-r22a-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.library-r22a-ops-list,
.library-r22a-finance-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}
.library-r22a-finance-deferred {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--warning, #d97706);
  background: #fffbeb;
}
.library-r22c-quick-scan {
  margin: 0.5rem 0;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--border-subtle, #cbd5e1);
  font-size: 0.88rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.library-r22c-auth-hint {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
}
.library-r22a-three-leg-table th,
.library-r22a-three-leg-table td {
  min-width: 4.5rem;
  white-space: nowrap;
}
.library-r22a-three-leg-table th:nth-child(5),
.library-r22a-three-leg-table td:nth-child(5) {
  min-width: 5.5rem;
}
.library-r22a-three-leg-table th:nth-child(6),
.library-r22a-three-leg-table td:nth-child(6),
.library-r22a-three-leg-table th:nth-child(7),
.library-r22a-three-leg-table td:nth-child(7) {
  min-width: 8rem;
  white-space: normal;
}

/* R23 — strategy logic unified entry & template source convergence */
.library-r23-badge {
  font-size: 0.72rem;
  vertical-align: middle;
}
.library-r23-logic-workbench {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
}
.library-r23-logic-workbench.library-r23-highlight-dedicated {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.library-r23-workbench-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.library-r23-workbench-lead {
  margin: 0 0 0.5rem;
}
.library-r23-principles {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}
.library-r23-workbench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.library-r23-source-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.library-r23-filter-label {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-right: 0.25rem;
}
.library-r23-source-chip.is-active {
  background: var(--primary, #2563eb);
  color: #fff;
  border-color: var(--primary, #2563eb);
}
.library-r23-generic-empty {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  background: #fff;
  border: 1px dashed var(--border-subtle, #cbd5e1);
}
.library-r23-version-rules {
  margin-top: 0.75rem;
}
.library-r23-version-rules-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}
.library-r23-version-rules-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.library-r23-create-panel,
.library-r23-edit-panel,
.library-r23-generate-panel {
  margin-top: 1rem;
}
.library-r23-create-header,
.library-r23-edit-header,
.library-r23-generate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.library-r23-edit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}
.library-r23-edit-lead {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
}
.library-r23-edit-params {
  display: grid;
  gap: 0.5rem;
}
.library-r23-edit-param-row textarea {
  min-height: 2.25rem;
  resize: vertical;
}
.library-r23-readonly-input {
  background: var(--surface-muted, #f8fafc);
  color: var(--text-muted, #64748b);
}
.library-r23-edit-change-preview {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  border: 1px dashed var(--border-subtle, #cbd5e1);
  border-radius: 6px;
  background: var(--surface-muted, #f8fafc);
}
.library-r23-edit-preview-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}
.library-r23-edit-preview-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.library-r2r3-formula-roles-lead,
.library-r2r3-seven-params-lead,
.library-r2r3-boundary-hint {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.82rem;
}
.library-r2r3-formula-roles-table-wrap {
  margin-top: 0.35rem;
}
.library-r2r3-formula-roles-table {
  font-size: 0.85rem;
}
.library-r2r3-formula-role-status,
.library-r2r3-formula-coverage-badge,
.formula-coverage-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
  border: 1px dashed var(--border-subtle, #cbd5e1);
}
.formula-coverage-badge.formula-coverage-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.formula-coverage-badge.formula-coverage-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}
.formula-coverage-badge.formula-coverage-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.formula-coverage-badge.formula-coverage-muted {
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
  border: 1px dashed var(--border-subtle, #cbd5e1);
}
.library-r2r3-formula-arch-panel {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 6px;
  background: var(--surface-muted, #f8fafc);
}
.library-r2r3-formula-arch-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.library-r2r3-formula-arch-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0.35rem 0;
  font-size: 0.82rem;
}
.library-r2r3-formula-arch-dl dt {
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.library-r2r3-formula-arch-dl dd {
  margin: 0;
}
.library-r2r3-policy-textarea {
  font-size: 0.82rem;
  line-height: 1.35;
}
.library-r2r3-commodity-formula-btn {
  white-space: nowrap;
}
.strategy-logic-editor-shell {
  margin-top: 1rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.strategy-logic-editor-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding: 0.65rem 0.85rem 0.35rem;
}
.strategy-logic-editor-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.strategy-logic-status-banner {
  margin: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
}
.strategy-logic-status-banner--new,
.strategy-logic-status-banner--draft {
  background: #eff6ff;
  color: #1e40af;
}
.strategy-logic-status-banner--published {
  background: #ecfdf5;
  color: #047857;
}
.strategy-logic-status-banner--archived {
  background: #f8fafc;
  color: #64748b;
}
.strategy-logic-sticky-actions {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding: 0.45rem 0.85rem;
}
.strategy-logic-editor-actions {
  margin: 0;
}
.strategy-logic-editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.strategy-logic-editor-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  border-radius: 6px 6px 0 0;
  font-size: 0.84rem;
  cursor: pointer;
  color: var(--text-muted, #64748b);
}
.strategy-logic-editor-tab.is-active {
  color: var(--text-primary, #0f172a);
  border-color: var(--border-subtle, #cbd5e1);
  background: #fff;
  font-weight: 600;
}
.strategy-logic-editor-body {
  padding: 0.85rem;
  max-height: min(70vh, 720px);
  overflow: auto;
}
.strategy-logic-editor-panel {
  display: none;
}
.strategy-logic-editor-panel.is-active {
  display: block;
}
.strategy-logic-editor-grid {
  gap: 0.75rem;
}
.strategy-logic-rule-card {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: var(--surface-muted, #f8fafc);
}
.strategy-logic-rule-card-head {
  margin-bottom: 0.35rem;
}
.strategy-logic-rule-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}
.strategy-logic-rule-card-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
}
.strategy-logic-rule-card textarea {
  width: 100%;
  min-height: 3rem;
  resize: vertical;
}
.strategy-logic-readonly-hint {
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
.strategy-logic-object-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: #fffbeb;
  color: #92400e;
}
.strategy-logic-object-banner--published {
  background: #ecfdf5;
  color: #065f46;
}
.strategy-logic-object-banner--archived {
  background: #f8fafc;
  color: #475569;
}
.strategy-logic-object-banner--draft,
.strategy-logic-object-banner--new {
  background: #eff6ff;
  color: #1e3a8a;
}
.strategy-logic-object-banner-status {
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.9;
}
.strategy-logic-object-banner-warn {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  color: #b45309;
}
.strategy-logic-db-draft-meta {
  font-size: 0.75rem;
}
.strategy-logic-status-banner--saved,
.strategy-logic-status-banner--draft.saved {
  border-color: #86efac;
  background: #f0fdf4;
}
.strategy-logic-applicability-rule-input {
  min-height: 4.5rem;
}
.strategy-logic-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.strategy-logic-control-grid--diagnostic {
  margin-top: 0.5rem;
}
.strategy-logic-control-card {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--surface-muted, #f8fafc);
}
.strategy-logic-control-card-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.strategy-logic-control-table {
  width: 100%;
  font-size: 0.78rem;
  margin-bottom: 0.55rem;
}
.strategy-logic-control-table th,
.strategy-logic-control-table td {
  padding: 0.25rem 0.35rem;
  vertical-align: top;
}
.strategy-logic-control-note {
  font-size: 0.76rem;
  margin-top: 0.25rem;
}
.strategy-logic-diagnostic-collapsed {
  margin: 0.5rem 0;
}
.strategy-logic-diagnostic-collapsed > summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-muted, #64748b);
  padding: 0.35rem 0;
}
.library-r2r3-formula-arch-body {
  padding: 0.35rem 0 0.5rem;
}
.library-r26p3-logic-key {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.strategy-logic-muted-diagnostic,
.strategy-logic-muted-diagnostic th {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}
.strategy-logic-muted-diagnostic-text {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
}
.strategy-logic-muted-diagnostic-badges .library-r26p3-health-badge {
  font-size: 0.68rem;
  opacity: 0.75;
  padding: 0.05rem 0.3rem;
}
.library-r26p3-col-formula-coverage {
  min-width: 7.5rem;
}
.library-r23-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.library-r23-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 4px;
  font-size: 0.88rem;
  background: #fff;
}
.library-r23-generate-formula {
  font-weight: 500;
}
.library-r23-generate-steps {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
}
.library-r23-logic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.library-r23-status--protected {
  background: #fef3c7;
  color: #92400e;
}
.library-r23-row--highlight-dedicated {
  background: #eff6ff;
}
.library-r23-catalog-lead {
  margin: 0 0 0.75rem;
  max-width: 52rem;
}
.library-r23-trace-lead {
  max-width: 52rem;
}
.library-r23-trace-actions {
  margin-bottom: 0.75rem;
}
.library-r23-catalog-meta-actions {
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* R23A blocker fix — logic table layout + write-flag-off buttons */
.library-r23-logic-table-wrap,
.strategy-logic-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.library-r23-logic-table,
.strategy-logic-table {
  min-width: 1280px;
  width: 100%;
}
.library-r23-logic-table th,
.library-r23-logic-table td,
.strategy-logic-table th,
.strategy-logic-table td {
  vertical-align: top;
}
.library-r23-logic-table .library-r23-nowrap,
.strategy-logic-table .library-r23-nowrap {
  white-space: nowrap;
}
.library-r23-logic-table .library-r23-ellipsis,
.strategy-logic-table .library-r23-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}
.library-r23-logic-table .library-r23-col-source-type,
.library-r23-logic-table th.library-r23-col-source-type {
  min-width: 5.5rem;
}
.library-r23-logic-table .library-r23-col-abstraction,
.library-r23-logic-table th.library-r23-col-abstraction {
  min-width: 5rem;
}
.library-r23-logic-table .library-r23-col-actions,
.library-r23-logic-table .library-workbench-l1-l3-col-actions {
  min-width: 18rem;
}
.library-r23-logic-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.library-r23-create-actions .library-r23-write-flag-off,
.library-r23-write-flag-off:disabled,
.library-r23-write-flag-off[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: auto;
  background: var(--ctrm-btn-secondary-bg, #e2e8f0) !important;
  border-color: var(--border-subtle, #cbd5e1) !important;
  color: var(--text-muted, #64748b) !important;
  box-shadow: none !important;
}

/* R26 — logic → model dry-run preview panel */
.library-r26-dryrun-panel {
  margin-top: 1rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface-elevated, #f8fafc);
}
.library-r26-dryrun-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.library-r26-dryrun-title {
  margin: 0;
  font-size: 1.05rem;
}
.library-r26-dryrun-lead {
  margin: 0 0 0.75rem;
}
.library-r26-chain-hints {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: var(--surface-muted, #f1f5f9);
}
.library-r26-chain-hint {
  margin: 0.25rem 0;
  font-size: 0.875rem;
}
.library-r26-step-current {
  font-weight: 600;
}
.library-r26-dryrun-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 960px) {
  .library-r26-dryrun-grid {
    grid-template-columns: 1fr;
  }
}
.library-r26-dryrun-section {
  padding: 0.75rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}
.library-r26-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.library-r26-subtitle {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.library-r26-kv {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
}
.library-r26-kv dt {
  color: var(--text-muted, #64748b);
  margin: 0;
}
.library-r26-kv dd {
  margin: 0;
  word-break: break-word;
}
.library-r26-readonly-input {
  width: 100%;
  background: var(--surface-muted, #f1f5f9);
}
.library-r26-provisional-hint {
  margin: 0.5rem 0;
  font-size: 0.8rem;
}
.library-r26-legs-table {
  font-size: 0.8rem;
}
.library-r26-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.library-r26-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}
.library-r26-badge--pass {
  background: #dcfce7;
  color: #166534;
}
.library-r26-badge--warning {
  background: #fef9c3;
  color: #854d0e;
}
.library-r26-badge--fail {
  background: #fee2e2;
  color: #991b1b;
}
.library-r26-badge--missing {
  background: #e2e8f0;
  color: #475569;
}
.library-r26-no-write-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.library-r26-no-write-list li {
  margin: 0.2rem 0;
}
.library-r26-dryrun-actions {
  margin-top: 1rem;
  flex-wrap: wrap;
}
.library-r26-write-reserved:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* R27C-4-UI-LITE — non-prod draft save from dry-run preview */
.library-r27c4-ui-lite-save-block {
  flex: 1 1 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed var(--border-subtle, #cbd5e1);
  border-radius: 6px;
  background: var(--surface-muted, #f8fafc);
}
.library-r27c4-ui-lite-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.library-r27c4-ui-lite-save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.library-r27c4-ui-lite-save-btn.library-r27c4-ui-lite-save--enabled {
  border-color: var(--accent-trade, #0ea5e9);
}
.library-r27c4-ui-lite-boundary {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.8125rem;
}
.library-r27c4-ui-lite-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
}
.library-r27c4-ui-lite-result {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  font-size: 0.8125rem;
}
.library-r27c4-ui-lite-result-line {
  margin: 0.2rem 0;
}
.library-r27c4-ui-lite-result-line--success {
  color: var(--status-ok, #15803d);
  font-weight: 600;
}
.library-r27c4-ui-lite-result-line--blocked {
  color: var(--status-warn, #b45309);
}
.library-r27c4-ui-lite-result-line--error {
  color: var(--status-error, #b91c1c);
}

.library-r26-multiline {
  white-space: pre-wrap;
  word-break: break-word;
}

/* R26P3 — logic table density + detail drawer */
.library-r26p3-logic-table-wrap {
  position: relative;
}
.library-r26p3-logic-table {
  min-width: 960px;
}
.library-r26p3-sticky-left {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface-elevated, #fff);
  box-shadow: 2px 0 0 rgba(15, 23, 42, 0.06);
}
.library-r26p3-sticky-right {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface-elevated, #fff);
  box-shadow: -2px 0 0 rgba(15, 23, 42, 0.06);
}
.library-r26p3-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.library-r26p3-subline {
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.library-r26p3-logic-name {
  font-weight: 600;
}
.library-r26p3-logic-code {
  font-size: 0.75rem;
}
.library-r26p3-health-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 16rem;
}
.library-r26p3-health-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.68rem;
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}
.library-r26p3-status-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.library-r26p3-status-badge--active { background: #dcfce7; color: #166534; }
.library-r26p3-status-badge--draft { background: #e2e8f0; color: #475569; }
.library-r26p3-status-badge--protected { background: #fef3c7; color: #92400e; }
.library-r26p3-status-badge--readonly { background: #e0e7ff; color: #3730a3; }
.library-r26p3-status-badge--deprecated { background: #fee2e2; color: #991b1b; }
.library-r26p3-status-badge--unknown { background: #f1f5f9; color: #64748b; }
.library-r26p3-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.library-r26p3-primary-action {
  font-weight: 600;
}
.library-r26p3-more-menu {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.library-r26p3-more-portal {
  position: fixed;
  z-index: 1100;
  min-width: 11rem;
  max-width: 16rem;
  padding: 0.4rem;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.library-r26p3-more-dropdown {
  display: none;
}
.library-r26p3-more-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 0;
  background: transparent;
  font-size: 0.8125rem;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 4px;
}
.library-r26p3-more-item:hover:not(:disabled) {
  background: var(--surface-muted, #f1f5f9);
}
.library-r26p3-more-item:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  color: var(--text-muted, #475569);
}
.library-r26p3-more-item--write:disabled {
  color: var(--text-muted, #475569);
}
.library-r26p3-more-item--danger {
  color: #b91c1c;
}
.library-r26p3-more-item--danger:disabled {
  color: #b91c1c;
  opacity: 0.78;
}
.library-r26p3-row--selected {
  background: rgba(59, 130, 246, 0.06) !important;
  box-shadow: inset 4px 0 0 #3b82f6;
}
.library-r23-logic-table .library-r23-row--highlight-dedicated {
  background: rgba(245, 158, 11, 0.06);
  box-shadow: inset 4px 0 0 #f59e0b;
}
.library-r26p3-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1200;
}
.library-r26p3-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(28rem, 92vw);
  height: 100vh;
  z-index: 1201;
  background: #fff;
  border-left: 1px solid var(--border-subtle, #cbd5e1);
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}
.library-r26p3-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}
.library-r26p3-detail-title {
  margin: 0;
  font-size: 1.05rem;
}
.library-r26p3-detail-body {
  padding: 1rem;
  overflow: auto;
  flex: 1;
}
.library-r26p3-detail-section {
  margin-bottom: 1rem;
}
.library-r26p3-detail-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.library-r26p3-detail-kv {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
}
.library-r26p3-detail-kv dt {
  color: var(--text-muted, #64748b);
  margin: 0;
}
.library-r26p3-detail-kv dd {
  margin: 0;
  word-break: break-word;
}
.library-r26p3-col-actions {
  min-width: 18.5rem;
}
.library-r26p3-col-actions.library-r26p3-sticky-right {
  background: var(--surface-elevated, #fff);
}

/* R34-LITE — strategy model chain view readonly productization */
.library-chain-view-r34-lite .library-chain-view-lead {
  margin: 0 0 0.5rem;
}
.library-chain-view-smoke-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}
.library-chain-view-flag-banner,
.library-chain-view-blocked-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.library-chain-view-block-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.library-chain-view-boundary-card,
.library-chain-view-blocked-scopes,
.library-chain-view-chains-wrap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.library-chain-view-boundary-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}
.library-chain-view-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.library-chain-view-badge--readonly {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.library-chain-view-badge--ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.library-chain-view-badge--preview,
.library-chain-view-badge--reserved {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.library-chain-view-badge--blocked {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.library-chain-view-badge--muted {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.library-chain-view-chains-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.library-chain-view-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-elevated, #fff);
}
.library-chain-view-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.library-chain-view-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
}
.library-chain-view-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.library-chain-view-card.is-collapsed .library-chain-view-stepper {
  display: none;
}
.library-chain-view-stage {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.45rem;
  padding: 0.55rem;
  background: #fafafa;
}
.library-chain-view-stage-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.library-chain-view-stage-name {
  font-weight: 600;
  font-size: 0.85rem;
}
.library-chain-view-stage-dl {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}
.library-chain-view-stage-dl > div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem;
}
.library-chain-view-stage-dl dt {
  color: #64748b;
}
.library-chain-view-stage-key {
  word-break: break-all;
}
.library-chain-view-stage-badges,
.library-chain-view-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.library-chain-view-detail-drawer {
  margin-top: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
}
.library-chain-view-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.library-chain-view-detail-dl {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}
.library-chain-view-detail-dl > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.library-chain-view-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* R35-LITE — business strategy ledger model-origin readonly handoff */
.ledger-model-origin-r35-lite {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.ledger-model-origin-r35-lite .ledger-model-origin-lead {
  margin: 0 0 0.5rem;
}
.ledger-model-origin-smoke-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}
.ledger-model-origin-flag-banner,
.ledger-model-origin-blocked-badges,
.ledger-model-origin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  align-items: center;
}
.ledger-model-origin-block-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.ledger-model-origin-boundary-card,
.ledger-model-origin-blocked-scopes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
}
.ledger-model-origin-boundary-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}
.ledger-model-origin-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.ledger-model-origin-badge--readonly {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.ledger-model-origin-badge--ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.ledger-model-origin-badge--preview,
.ledger-model-origin-badge--reserved {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.ledger-model-origin-badge--blocked {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.ledger-model-origin-badge--muted {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.ledger-model-origin-plans-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ledger-model-origin-plan-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-elevated, #fff);
}
.ledger-model-origin-plan-card.is-collapsed .ledger-model-origin-trace-grid {
  display: none;
}
.ledger-model-origin-plan-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ledger-model-origin-plan-title {
  margin: 0;
  font-size: 0.95rem;
}
.ledger-model-origin-plan-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.ledger-model-origin-trace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.5rem;
}
.ledger-model-origin-trace-dl {
  margin: 0;
  font-size: 0.82rem;
}
.ledger-model-origin-trace-dl > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.ledger-model-origin-trace-dl dt {
  color: #64748b;
}
.ledger-model-origin-trace-dl dd {
  margin: 0;
  word-break: break-all;
}
.ledger-model-origin-plan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.ledger-model-origin-detail-drawer {
  margin-top: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
}
.ledger-model-origin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ledger-model-origin-detail-dl {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}
.ledger-model-origin-detail-dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
}

/* R36-LITE — HC multi-model product UAT readability polish */
.hc-r36-uat-banner {
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #bae6fd;
  border-radius: 0.45rem;
  background: #f0f9ff;
  font-size: 0.85rem;
}
.library-chain-view-crosslink-bar,
.hc-r36-crosslink-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.45rem;
  background: #f8fafc;
}
.library-chain-view-crosslink-hint {
  font-size: 0.8rem;
}
.library-chain-view-badge--chain-num,
.ledger-model-origin-badge--chain-num {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}
.library-chain-view-card--hc-1 {
  border-left: 4px solid #047857;
}
.library-chain-view-card--hc-2 {
  border-left: 4px solid #1d4ed8;
}
.ledger-model-origin-plan-card--hc-1 {
  border-left: 4px solid #047857;
}
.ledger-model-origin-plan-card--hc-2 {
  border-left: 4px solid #1d4ed8;
}
.library-chain-view-boundary-card,
.ledger-model-origin-boundary-card {
  padding: 0.65rem;
  border-radius: 0.45rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

/* R40-LITE — readonly DTO UI source switch badges (default static registry) */
.library-r40-source-wrap,
.ledger-r40-source-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}
.library-r40-source-badge,
.ledger-r40-source-badge {
  font-size: 0.82rem;
  font-weight: 600;
}
.library-r40-source-badge--static,
.ledger-r40-source-badge--static {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.library-r40-source-badge--real,
.ledger-r40-source-badge--real {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.library-r40-source-badge--fallback,
.ledger-r40-source-badge--fallback {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.library-r40-source-badge--production-real,
.ledger-r40-source-badge--production-real {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.library-r40-source-badge--production-blocked,
.ledger-r40-source-badge--production-blocked {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.library-r40-source-badge--production-fallback,
.ledger-r40-source-badge--production-fallback {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.library-r40-source-diagnostics,
.ledger-r40-source-diagnostics {
  font-size: 0.78rem;
}

/* STRATEGY-LIB-SF607-CHAIN-CLOSURE-R1 — business landing chain cards */
.library-r1-sf607-chain {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ctrm-border, #e5e7eb);
}
.library-r1-chain-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.library-r1-chain-card {
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--ctrm-panel-bg, #fff);
}
.library-r1-chain-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.library-r1-source-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  text-transform: lowercase;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
}
.library-r1-source-badge[data-status="canonical"] {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.library-r1-source-badge[data-status="derived_readonly"] {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}
.library-r1-source-badge[data-status="missing"] {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.library-r1-derived-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}
.library-r1-chain-dl {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
}
.library-r1-chain-dl dt {
  font-weight: 500;
  color: var(--ctrm-muted, #6b7280);
}
.library-r1-chain-dl dd {
  margin: 0 0 0.35rem;
}
.library-r1-chain-health-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}
.library-r1-chain-health-list .is-ok { color: #047857; }
.library-r1-chain-health-list .is-missing { color: #b91c1c; }
.library-r1-chain-details summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ctrm-muted, #6b7280);
  margin-top: 0.5rem;
}

/* STRATEGY-LIB-BUSINESS-LANDING-MASTER-CONTROL-R2 — workflow queues */
.library-r1-workflow-queues {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}
.library-r1-queue-panel {
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--ctrm-panel-bg, #fff);
}
.library-r1-queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.library-r1-queue-table th,
.library-r1-queue-table td {
  border-bottom: 1px solid var(--ctrm-border, #e5e7eb);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.library-r1-queue-actions .ctrm-btn {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}
.library-r1-published-badge {
  font-size: 0.7rem;
  background: #ecfdf5;
  color: #047857;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}
.library-r1-diff-panel {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 6px;
}
.library-r1-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}
.library-r1-diff-table th,
.library-r1-diff-table td {
  border: 1px solid var(--ctrm-border, #e5e7eb);
  padding: 0.35rem 0.5rem;
}
.library-r1-log-item {
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.library-r1-log-diff {
  margin: 0.25rem 0 0.5rem 1rem;
  padding: 0;
}
.library-r1-finance-boundary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.library-r1-reason-dialog {
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 8px;
  padding: 1rem;
  min-width: 320px;
}
.library-r1-reason-dialog label {
  display: block;
  margin-bottom: 0.75rem;
}
.library-r1-reason-dialog input {
  width: 100%;
  margin-top: 0.25rem;
}

.library-r1-readiness-table-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.library-r1-readiness-table-grid th,
.library-r1-readiness-table-grid td {
  border-bottom: 1px solid var(--ctrm-border, #e5e7eb);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.library-r1-landing-readiness {
  margin-top: 1rem;
}
.library-r1-finance-boundary-banner {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--ctrm-warning, #d97706);
  background: var(--ctrm-surface-muted, #fffbeb);
}
.library-r1-prod-r1-banner {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--ctrm-danger, #dc2626);
  background: var(--ctrm-surface-muted, #fef2f2);
  font-weight: 500;
}
.library-r1-prod-r1-banner.is-blocked {
  border-left-color: var(--ctrm-danger, #dc2626);
}
.library-r1-prod-r1-detail {
  font-size: 0.82rem;
}
.library-r1-prod-r1-console-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}
.library-r1-prod-r1-console-form input,
.library-r1-prod-r1-console-form select,
.library-r1-prod-r1-console-form textarea {
  width: 100%;
  max-width: 32rem;
}
.library-r1-prod-r1-console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.library-r1-prod-r1-console-output {
  max-height: 12rem;
  overflow: auto;
  font-size: 0.75rem;
}

/* CTRM-STRATEGY-LOGIC-TAB-INFORMATION-ARCHITECTURE-CONSOLIDATION-R1 */
.ctrm-strategy-logic-tab-r1 {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.library-logic-tab-boundary-r1 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.ctrm-logic-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.ctrm-logic-summary-card {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-logic-summary-label {
  display: block;
  font-size: 0.72rem;
  color: var(--ctrm-muted, #64748b);
  margin-bottom: 0.15rem;
}
.ctrm-logic-summary-value {
  font-size: 0.88rem;
  font-weight: 600;
}
.ctrm-logic-directory-section {
  flex: 1 1 auto;
}
.ctrm-logic-directory-table .library-r26p3-col-actions,
.ctrm-logic-directory-table .library-r23-col-actions {
  white-space: nowrap;
}
.ctrm-logic-directory-table .library-r26p3-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
}
.ctrm-logic-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ctrm-logic-section {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
  background: var(--ctrm-surface, #fff);
}
.ctrm-logic-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}
.ctrm-logic-detail-kv {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.82rem;
}
.ctrm-logic-detail-kv dt {
  color: var(--ctrm-muted, #64748b);
  margin: 0;
}
.ctrm-logic-detail-kv dd {
  margin: 0;
}
.ctrm-logic-diagnostics {
  margin-top: 0.5rem;
}
.ctrm-logic-diagnostics > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.35rem 0;
}
.ctrm-logic-diagnostics-inner {
  padding: 0.35rem 0 0.5rem;
}
.ctrm-raw-json-block {
  max-height: 14rem;
  overflow: auto;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.5rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.25rem;
  background: var(--ctrm-surface-muted, #f1f5f9);
}
.ctrm-badge--preview { background: #dbeafe; color: #1e40af; }
.ctrm-badge--guarded { background: #fee2e2; color: #991b1b; }
.ctrm-badge--snapshot_ok { background: #dcfce7; color: #166534; }
.ctrm-badge--published { background: #dcfce7; color: #166534; }
.ctrm-badge--draft { background: #e2e8f0; color: #475569; }
.ctrm-logic-type-matrix-fold {
  margin-top: 0.25rem;
}
.library-r26p3-detail-body .ctrm-logic-detail-panel {
  max-height: min(70vh, 36rem);
  overflow: auto;
}
.library-logic-directory-lead-r1 {
  margin: 0.25rem 0;
  font-size: 0.8rem;
}

/* CTRM-STRATEGY-LOGIC-TAB-R2-RIGHT-SIDE-DETAIL-DRAWER */
.ctrm-strategy-logic-tab-r2 .ctrm-strategy-logic-r2-shell {
  flex: 1 1 auto;
}
.ctrm-logic-r2-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.ctrm-logic-r2-main {
  flex: 1 1 auto;
  min-width: 0;
}
.ctrm-logic-r2-drawer {
  display: none;
  flex-direction: column;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.4rem;
  background: var(--ctrm-surface, #fff);
  min-height: 0;
}
.ctrm-logic-r2-drawer-open .ctrm-logic-r2-drawer {
  display: flex;
}
.ctrm-logic-r2-drawer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--ctrm-border, #e5e7eb);
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-logic-r2-drawer-heading {
  flex: 1 1 12rem;
  min-width: 0;
}
.ctrm-logic-r2-drawer-title {
  margin: 0;
  font-size: 0.95rem;
}
.ctrm-logic-r2-drawer-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  word-break: break-all;
}
.ctrm-logic-r2-drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.ctrm-logic-r2-drawer-body {
  padding: 0.65rem 0.75rem;
  overflow: auto;
  max-height: min(70vh, 36rem);
  flex: 1 1 auto;
}
.ctrm-logic-r2-section {
  scroll-margin-top: 0.5rem;
}
.ctrm-logic-r2-section--focused {
  outline: 2px solid var(--ctrm-accent, #2563eb);
  outline-offset: 2px;
}
.ctrm-logic-r2-selected {
  background: rgba(37, 99, 235, 0.06);
}
.ctrm-logic-r2-boundary-footer {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  border-top: 1px dashed var(--ctrm-border, #e5e7eb);
  padding-top: 0.5rem;
}
.ctrm-logic-r2-raw-block,
.ctrm-logic-r2-drawer .ctrm-raw-json-block {
  max-height: 14rem;
  overflow: auto;
}
@media (min-width: 960px) {
  .ctrm-logic-r2-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .ctrm-logic-r2-main {
    flex: 1 1 58%;
  }
  .ctrm-logic-r2-drawer {
    flex: 0 0 min(38%, 22rem);
    position: sticky;
    top: 0.5rem;
    max-height: calc(100vh - 8rem);
  }
  .ctrm-logic-r2-drawer-open .ctrm-logic-r2-drawer {
    display: flex;
  }
  .ctrm-logic-r2-drawer-body {
    max-height: none;
  }
}
@media (max-width: 959px) {
  .ctrm-logic-r2-drawer-open .ctrm-logic-r2-drawer {
    width: 100%;
  }
}
.library-r26p3-detail-drawer--legacy {
  display: none !important;
}

/* CTRM-STRATEGY-LOGIC-TAB-R3-BUSINESS-FILTER-CHIPS-SEARCH */
.ctrm-logic-r3-filterbar {
  margin: 0.75rem 0 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
}
.strategy-logic-filter-simple {
  background: #fff;
}
.strategy-logic-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}
.strategy-logic-filter-search-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}
.strategy-logic-filter-chips {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.strategy-logic-filter-chip-group {
  align-items: flex-start;
}
.strategy-logic-filter-count {
  margin-left: auto;
  font-size: 0.82rem;
}
.strategy-logic-filter-clear {
  white-space: nowrap;
}
.strategy-logic-filter-muted {
  display: none !important;
}
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 8px;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.ctrm-logic-r3-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 10px;
}
.ctrm-logic-r3-search {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 6px;
  font-size: 14px;
}
.ctrm-logic-r3-count {
  font-size: 13px;
  color: var(--ctrm-text-muted, #64748b);
  white-space: nowrap;
}
.ctrm-logic-r3-clear {
  white-space: nowrap;
}
.ctrm-logic-r3-chip-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ctrm-logic-r3-chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
}
.ctrm-logic-r3-chip-label {
  flex: 0 0 auto;
  min-width: 72px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ctrm-text-muted, #64748b);
  padding-top: 4px;
}
.ctrm-logic-r3-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.ctrm-logic-r3-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
}
.ctrm-logic-r3-chip:hover {
  border-color: var(--ctrm-accent, #2563eb);
}
.ctrm-logic-r3-chip-active {
  border-color: var(--ctrm-accent, #2563eb);
  background: var(--ctrm-accent-soft, #eff6ff);
  color: var(--ctrm-accent, #2563eb);
  font-weight: 600;
}

/* CTRM-STRATEGY-LOGIC-AUTHORING-FILTER-CHIP-POLISH-R1 */
.library-logic-commodity-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  max-width: 100%;
}
.library-logic-commodity-chips--empty {
  font-size: 0.82rem;
}
.library-logic-commodity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
button.library-logic-commodity-chip {
  cursor: pointer;
}
.library-logic-commodity-chip--active {
  border-color: var(--ctrm-accent, #2563eb);
  background: var(--ctrm-accent-soft, #eff6ff);
  color: var(--ctrm-accent, #2563eb);
}
.library-logic-commodity-chip-more {
  border-style: dashed;
  background: var(--surface-muted, #f8fafc);
  color: var(--ctrm-text-muted, #64748b);
  font-weight: 500;
  cursor: default;
}
.library-logic-commodity-source-note,
.library-logic-commodity-filter-source-note {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ctrm-text-muted, #64748b);
}
.library-logic-commodity-scope-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  max-width: 100%;
}
.library-r26p3-col-commodity .library-logic-commodity-chips {
  max-width: 14rem;
}
.ctrm-logic-r3-chip-group[data-r3-dimension="commodity"] .library-logic-commodity-chips {
  flex: 1 1 auto;
}

/* CTRM-STRATEGY-LOGIC-AUTHORING-FILTER-CHIP-POLISH-R2 */
.library-logic-commodity-filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  max-width: 100%;
}
.library-logic-commodity-filter-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
}
.library-logic-commodity-filter-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
}
.library-logic-commodity-source-label {
  min-width: 2.5rem;
}
.library-logic-commodity-filter-source-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ctrm-text-muted, #64748b);
}
.library-logic-status-filter-group .library-logic-status-filter,
.library-logic-status-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  max-width: 100%;
}
.library-logic-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.library-logic-status-chip--active {
  border-color: var(--ctrm-accent, #2563eb);
  background: var(--ctrm-accent-soft, #eff6ff);
  color: var(--ctrm-accent, #2563eb);
  font-weight: 600;
}

/* CTRM-STRATEGY-LOGIC-MULTI-LINK-PRICE-IMPACT-R5 */
.library-price-impact-r5-panel {
  margin-top: 0.75rem;
  border: 1px solid var(--ctrm-border, #e2e8f0);
}
.library-price-impact-r5-boundary {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.library-price-impact-r5-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.library-price-impact-r5-status {
  margin: 0.35rem 0;
}
.library-price-impact-r5-error {
  margin: 0.35rem 0;
}
.library-price-impact-r5-logic-options-banner {
  margin: 0.35rem 0;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.84rem;
}
.library-price-impact-r5-logic-options-banner--ok {
  background: #ecfdf5;
  color: #047857;
}
.library-price-impact-r5-logic-options-banner--warn {
  background: #fffbeb;
  color: #b45309;
}
.library-price-impact-r5-logic-options-banner--error {
  background: #fef2f2;
  color: #b91c1c;
}
.library-price-impact-r5-row-actions {
  white-space: nowrap;
}
.library-price-impact-r5-instance-meta,
.library-price-impact-r5-summary {
  margin: 0.5rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: var(--surface-muted, #f8fafc);
  font-size: 0.84rem;
}
.library-price-impact-r5-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}
.library-price-impact-r5-subtitle {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.92rem;
}
.library-price-impact-r5-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.library-price-impact-r5-editor-hint {
  margin: 0.25rem 0 0.45rem;
  font-size: 0.78rem;
}
.library-price-impact-r5-table th,
.library-price-impact-r5-table td {
  font-size: 0.8rem;
  vertical-align: middle;
}
.library-price-impact-r5-table input[type="number"],
.library-price-impact-r5-table input[type="text"],
.library-price-impact-r5-table select {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
}
.library-price-impact-r5-value-positive {
  color: var(--ctrm-success, #15803d);
  font-weight: 600;
}
.library-price-impact-r5-value-negative {
  color: var(--ctrm-danger, #b91c1c);
  font-weight: 600;
}
.library-price-impact-r5-value-zero {
  color: var(--ctrm-text-muted, #64748b);
}
.library-price-impact-r5-row-tag-disabled {
  opacity: 0.72;
}

.ctrm-logic-r3-empty {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px dashed var(--ctrm-border, #cbd5e1);
  color: var(--ctrm-text-muted, #64748b);
  text-align: center;
}
.ctrm-logic-r3-hidden-notice {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--ctrm-border, #cbd5e1);
  background: #fffbeb;
  color: var(--ctrm-text-muted, #64748b);
  font-size: 13px;
  line-height: 1.5;
}
.ctrm-logic-r3-hidden {
  margin: 8px 0 0;
}
.ctrm-logic-r3-boundary {
  margin: 8px 0 0;
  font-size: 12px;
}
.ctrm-logic-r3-table-empty .ctrm-table {
  opacity: 0.45;
}
@media (max-width: 959px) {
  .ctrm-logic-r3-search {
    flex-basis: 100%;
  }
  .ctrm-logic-r3-chip-label {
    flex-basis: 100%;
    min-width: 0;
  }
}
/* MODEL-LIFECYCLE-R12 soft archive badges & filters */
.library-lifecycle-r12-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  background: var(--bg-subtle, #f8fafc);
}
.library-lifecycle-r12-info {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.library-lifecycle-r12-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.library-lifecycle-r12-filter-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: var(--text-muted, #475569);
}
.library-lifecycle-r12-filter-btn.is-active,
.library-lifecycle-r12-filter-btn[aria-selected="true"] {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}
.library-lifecycle-r12-summary {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}
.slc12-summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}
.slc12-drift { color: #dc2626; }
.slc12-badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.slc12-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
}
.slc12-badge--production { background: #dcfce7; color: #166534; }
.slc12-badge--audit { background: #fef3c7; color: #92400e; }
.slc12-badge--uat { background: #e0e7ff; color: #3730a3; }
.slc12-badge--excluded { background: #f1f5f9; color: #475569; }
.slc12-badge--must-keep { background: #fce7f3; color: #9d174d; }
.slc12-badge--delete-candidate { background: #fee2e2; color: #991b1b; }
.slc12-badge--warning-only { background: #fff7ed; color: #c2410c; }
.slc12-badge--registry-source { background: #e0f2fe; color: #0369a1; }
.slc12-badge--registry-missing { background: #fecaca; color: #7f1d1d; }
.slc12-badge--prod-warning { background: #fef9c3; color: #854d0e; }
.slc12-badge--audit-warning { background: #ffedd5; color: #9a3412; }
.slc12-badge--no-delete { background: #f1f5f9; color: #64748b; font-weight: 500; }
.slc12-delete-blocked { font-size: 0.7rem; }

/* CTRM R4D — Market Hub visual IA */
.ctrm-market-hub-mode-banner--global,
.ctrm-market-hub-mode-banner--commodity {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.ctrm-market-hub-mode-banner--commodity .ctrm-market-hub-mode-banner__label {
  color: var(--text);
  font-size: 15px;
}
.ctrm-market-hub-r4d-hero + .ctrm-tabs--market-prices {
  margin-top: 0;
  margin-bottom: 12px;
}
body.ctrm-market-hub--commodity-view .ctrm-market-hub-mode-banner--commodity {
  border-width: 2px;
  border-color: #64748b;
}
body.ctrm-market-hub--commodity-view #spot-basis-maint-zone:not([open]) {
  opacity: 0.92;
}

/* CTRM-STRATEGY-LOGIC-AUTHORING-LAYOUT-PAGINATION-R1 */
.strategy-logic-table-compact-wrap {
  overflow-x: auto;
}
.strategy-logic-table-compact {
  font-size: 12px;
  line-height: 1.35;
}
.strategy-logic-table-compact th {
  font-size: 12px;
  padding: 6px 8px;
  white-space: nowrap;
}
.strategy-logic-table-compact td {
  padding: 6px 8px;
  vertical-align: top;
}
.strategy-logic-table-compact .library-r26p3-logic-name,
.strategy-logic-row-primary {
  font-size: 13px;
  font-weight: 600;
}
.strategy-logic-table-compact .library-r26p3-logic-key,
.strategy-logic-table-compact .library-r26p3-subline,
.strategy-logic-row-muted {
  font-size: 11px;
  color: #64748b;
}
.strategy-logic-table-compact .strategy-logic-muted-diagnostic,
.strategy-logic-table-compact .strategy-logic-muted-diagnostic-text {
  font-size: 11px;
  color: #94a3b8;
}
.strategy-logic-mini-badge,
.strategy-logic-table-compact .ctrm-badge {
  font-size: 10px;
  padding: 0.08rem 0.3rem;
}
.strategy-logic-action-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  width: 100%;
}
.strategy-logic-action-row-primary {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 0.18rem;
  width: 100%;
  min-width: 0;
}
.strategy-logic-action-row-secondary {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 0.18rem;
}
.strategy-logic-action-row-primary .strategy-logic-action-button {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 0.12rem 0.32rem;
  white-space: nowrap;
}
.strategy-logic-action-row-primary .strategy-logic-dryrun-preview-btn {
  font-size: 10px;
  padding: 0.1rem 0.28rem;
}
.strategy-logic-action-row-secondary .strategy-logic-action-button,
.strategy-logic-action-row-secondary .strategy-logic-action-button-muted {
  font-size: 10px;
  padding: 0.08rem 0.42rem;
  white-space: nowrap;
  color: #64748b;
}
.strategy-logic-action-more-row {
  justify-content: flex-end;
  width: 100%;
}
.strategy-logic-action-more-row .strategy-logic-action-button {
  font-size: 10px;
  padding: 0.08rem 0.45rem;
  min-width: 2.6rem;
}
.strategy-logic-action-menu.library-r26p3-more-portal {
  min-width: 10.5rem;
  max-width: 14rem;
  padding: 0.3rem;
}
.strategy-logic-action-menu-item.library-r26p3-more-item {
  font-size: 0.78rem;
  padding: 0.38rem 0.55rem;
}
.strategy-logic-action-row-secondary .btn-secondary.strategy-logic-action-button-muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
.strategy-logic-action-button-muted {
  opacity: 0.92;
}
.strategy-logic-action-compact .btn {
  font-size: 11px;
  padding: 0.15rem 0.35rem;
  white-space: nowrap;
}
.strategy-logic-table-compact .library-r26p3-col-actions.strategy-logic-action-compact,
.strategy-logic-action-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 13rem;
  max-width: 14rem;
  width: 13rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--ctrm-surface, #fff) 12%);
  box-shadow: -4px 0 8px -6px rgba(15, 23, 42, 0.12);
}
.strategy-logic-action-compact .library-r26p3-actions {
  width: 100%;
}
.strategy-logic-pagination-r1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.35rem 0.25rem;
  font-size: 12px;
}
.strategy-logic-pagination-r1-meta,
.strategy-logic-pagination-r1-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.strategy-logic-pagination-r1-size {
  font-size: 12px;
  padding: 0.1rem 0.25rem;
}
.strategy-logic-pagination-r1-page {
  min-width: 5.5rem;
  text-align: center;
  color: #475569;
}
.strategy-logic-authoring-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1190;
}
.strategy-logic-authoring-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 42rem);
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--ctrm-surface, #fff);
  border-left: 1px solid var(--ctrm-border, #e5e7eb);
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.strategy-logic-authoring-layout-open .strategy-logic-authoring-drawer:not([hidden]),
body.strategy-logic-authoring-drawer-open .strategy-logic-authoring-drawer:not([hidden]) {
  transform: translateX(0);
}
.strategy-logic-authoring-drawer-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  max-height: none;
}
.strategy-logic-authoring-drawer-panel .library-r23-edit-body,
.strategy-logic-authoring-drawer-panel .strategy-logic-editor-body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}
body.strategy-logic-authoring-drawer-open {
  overflow: hidden;
}
@media (min-width: 960px) {
  .strategy-logic-authoring-drawer {
    width: min(42rem, 46vw);
  }
}

/* CTRM-STRATEGY-LOGIC-AUTHORING-ACTIONS-R1 */
.strategy-logic-dryrun-object-banner {
  margin: 0.35rem 0 0.25rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.35rem;
}
.strategy-logic-dryrun-object-banner code {
  font-size: 0.78rem;
}
.strategy-logic-dryrun-nowrite-hint {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.78rem;
}
.strategy-logic-dryrun-preview-btn {
  font-size: 11px;
  padding: 0.1rem 0.3rem;
}
.strategy-logic-detail-action-btn,
.strategy-logic-edit-action-btn {
  font-size: 11px;
}
.library-r23-workbench-actions .btn[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

/* CTRM-STRATEGY-LOGIC-MODEL-LINK-R5 */
.strategy-logic-model-link-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.strategy-logic-model-link-lead {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ctrm-muted, #64748b);
  line-height: 1.45;
}
.strategy-logic-model-link-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.strategy-logic-model-link-toolbar input[type="search"] {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.strategy-logic-model-link-result {
  font-size: 0.8rem;
  color: var(--ctrm-muted, #64748b);
}
.strategy-logic-model-link-error {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.35rem;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 0.82rem;
}
.strategy-logic-model-link-success {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  font-size: 0.82rem;
}
.strategy-logic-model-link-success dl {
  margin: 0.35rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  font-size: 0.78rem;
}
.strategy-logic-model-link-table-wrap {
  overflow: auto;
  max-height: min(52vh, 28rem);
  border: 1px solid var(--ctrm-border, #e2e8f0);
  border-radius: 0.35rem;
}
.strategy-logic-model-link-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.strategy-logic-model-link-table th,
.strategy-logic-model-link-table td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--ctrm-border, #e2e8f0);
  vertical-align: top;
  text-align: left;
}
.strategy-logic-model-link-table th {
  position: sticky;
  top: 0;
  background: var(--ctrm-surface, #fff);
  z-index: 1;
  font-weight: 600;
}
.strategy-logic-model-link-readiness {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.72rem;
  white-space: nowrap;
}
.strategy-logic-model-link-readiness--ready {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
.strategy-logic-model-link-readiness--draft {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
.strategy-logic-model-link-readiness--linked {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}
.strategy-logic-model-link-readiness--review {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.strategy-logic-model-link-readiness--blocked {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}
.strategy-logic-model-link-blocking {
  margin: 0.15rem 0 0;
  padding-left: 1rem;
  font-size: 0.72rem;
  color: #b91c1c;
}
.strategy-logic-model-link-action-btn {
  font-size: 0.72rem;
  white-space: nowrap;
}

/* CTRM-STRATEGY-LOGIC-MODEL-LINK-R5B — readonly authoring + link panel errors */
.library-r23-edit-readonly textarea,
.library-r23-edit-readonly input:not([type="button"]):not([type="submit"]),
.library-r23-edit-readonly select {
  opacity: 0.82;
  cursor: not-allowed;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.library-r23-readonly-input[disabled] {
  opacity: 0.82;
  cursor: not-allowed;
  background: var(--ctrm-surface-muted, #f8fafc);
}
.strategy-logic-model-link-error {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Legacy IR final write-freeze R1 — readonly badge */
.library-ir-r1-readonly-badge {
  background: var(--ctrm-field-readonly-bg, #f3f4f6);
  color: var(--ctrm-text-muted, #6b7280);
  border: 1px solid var(--ctrm-border, #e5e7eb);
}
.library-ir-r1-research-chain-panel[data-ir-r1-readonly-mode="READ_ONLY_HISTORY"] .library-ir-r1-edit-details input,
.library-ir-r1-research-chain-panel[data-ir-r1-readonly-mode="READ_ONLY_HISTORY"] .library-ir-r1-edit-details textarea {
  pointer-events: none;
}

/* R3E business traceability R1 — readonly chips */
.ctrm-r3e-traceability-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  background: #f8fafc;
  color: #334155;
}
.ctrm-r3e-traceability-chip--bound {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}
.ctrm-r3e-traceability-chip--unbound {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}
.ctrm-r3e-traceability-chip--historical {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.ctrm-r3e-traceability-chip--ambiguous {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.ctrm-r3e-traceability-status-chip {
  display: inline-flex;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  text-transform: lowercase;
  background: #eef2ff;
  color: #3730a3;
}
.ctrm-r3e-traceability-status-chip--active {
  background: #ecfdf5;
  color: #047857;
}
.ctrm-r3e-traceability-status-chip--archived,
.ctrm-r3e-traceability-status-chip--draft {
  background: #f3f4f6;
  color: #6b7280;
}
.ctrm-r3e-traceability-link {
  font-size: 0.8rem;
  margin-left: 0.35rem;
}
.ctrm-r3e-traceability-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.ctrm-r3e-traceability-inline-meta {
  font-size: 0.78rem;
  color: var(--ctrm-text-muted, #6b7280);
}
.ctrm-r3e-traceability-row-chip {
  display: block;
  margin-top: 0.2rem;
}

/* R3E unbound authoring handoff R1 — readonly source model context */
.strategy-logic-source-model-handoff {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.5rem;
  background: #f8fafc;
}
.strategy-logic-source-model-handoff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.ctrm-r3e-handoff-historical-note {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  color: #9a3412;
}
.strategy-logic-status-banner--handoff-new {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* CTRM_STRATEGY_LOGIC_TAB_PAGE_STRUCTURE_R2BC — unified detail workspace */
.strategy-logic-r2bc-detail-shell {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ctrm-border, #e5e7eb);
  border-radius: 0.4rem;
  background: var(--ctrm-surface, #fff);
}
.strategy-logic-r2bc-detail-shell[hidden] {
  display: none !important;
}
.strategy-logic-r2bc-detail-context-title {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}
.strategy-logic-r2bc-detail-context-meta {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}
.strategy-logic-r2bc-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.strategy-logic-r2bc-detail-tab[aria-selected="true"] {
  font-weight: 600;
}
.strategy-logic-r2bc-detail-panels > section[hidden] {
  display: none !important;
}
.strategy-logic-metric-cost-tree-r1,
.strategy-logic-metric-comparison-r1 {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ctrm-border, #e5e7eb);
}
.strategy-logic-metric-cost-tree-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0.35rem 0 0.5rem;
}
.strategy-logic-metric-cost-tree-table input.strategy-logic-metric-cost-input {
  width: 8rem;
  max-width: 100%;
}
.strategy-logic-metric-entry-hint-r1 {
  margin: 0.5rem 0 0;
}
.strategy-logic-r3c-formula-metric-guide {
  margin: 0.65rem 0 0;
  padding: 0.5rem 0.65rem;
  border: 1px dashed var(--ctrm-border, #d0d7de);
  background: #f8fafc;
}
.ctrm-logic-summary-grid--compact-r2de {
  grid-template-columns: repeat(3, minmax(7rem, 1fr));
}
.strategy-logic-r2de-boundary-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}

/* R3D2 strategy logic category identity + filter polish */
.strategy-logic-filter-r3d2 .strategy-logic-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.strategy-logic-filter-r3d2 .strategy-logic-filter-more {
  margin-left: 0.25rem;
}
.strategy-logic-category-chip {
  display: inline-block;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.1rem 0.45rem;
  border: 1px solid #c5ced6;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.3;
  vertical-align: middle;
  background: #f5f7f9;
}
.strategy-logic-category-chip--fail {
  border-color: #c0392b;
  color: #c0392b;
  background: #fdf2f0;
}
#library-logic-view-table .library-r26p3-col-actions {
  white-space: nowrap;
}
#library-logic-view-table .library-r26p3-col-category {
  white-space: nowrap;
  width: 5.5rem;
}

/* R3H1 plan-driven business strategy UI */
.strategy-instance-r2b-detail-actions {
  margin-bottom: 0.75rem;
}
#library-plan-driven-lines-table-r3h1 input,
#ledger-plan-version-lines-table-r3h1 input {
  width: 100%;
  min-width: 4rem;
}
.fo-execution-admission-hint-r3h1 {
  margin: 0.35rem 0 0.5rem;
  color: var(--ctrm-warn, #b45309);
}

/* R3H2 plan-driven UI polish */
.plan-ui-r3h2-modal .plan-ui-r3h2-panel {
  width: min(1100px, calc(100vw - 32px));
  max-width: min(1100px, calc(100vw - 32px));
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* D101 / D81: light shell aligned with readable modals */
  background: var(--ctrm-panel-bg, #fff);
  color: var(--ctrm-text-main, #1f2937);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}
.plan-ui-r3h2-modal .strategy-library-modal-header,
.plan-ui-r3h2-modal .strategy-library-modal-title {
  color: var(--ctrm-text-main, #1f2937);
}
.plan-ui-r3h2-modal .ctrm-panel-subtitle {
  color: var(--ctrm-text-main, #1f2937);
}
.plan-ui-r3h2-modal .ctrm-field label,
.plan-ui-r3h2-modal .plan-ui-r3h2-boundary-dl dt {
  color: var(--ctrm-text-muted, #64748b);
}
.plan-ui-r3h2-modal input,
.plan-ui-r3h2-modal select,
.plan-ui-r3h2-modal textarea {
  background: #fff;
  color: var(--ctrm-text-main, #1f2937);
  border-color: #d1d5db;
}
.plan-modal-simplify-r1-badge {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.875rem;
  display: inline-block;
}
.plan-modal-simplify-r1-dir-hint {
  margin: 0.25rem 0 0;
  color: var(--ctrm-accent, #2563eb);
  font-weight: 500;
}
.plan-modal-simplify-r1-boundary-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--ctrm-text-main, #1f2937);
}
.plan-modal-simplify-r1-pending-chip {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  font-size: 0.75rem;
}
.plan-modal-simplify-r1-estimate-grid {
  margin-top: 0.5rem;
}
.plan-modal-simplify-r1-qty-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-end;
}
.plan-modal-simplify-r1-lots-hint,
.plan-modal-simplify-r1-override-hint {
  font-size: 0.75rem;
  color: #64748b;
}
.plan-modal-simplify-r1-override-hint {
  color: #b45309;
}
.plan-modal-simplify-r1-diag {
  margin: 0.75rem 0;
}
.plan-ui-r3h2-form {
  overflow: auto;
  padding-bottom: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
}
.plan-ui-r3h2-footer {
  position: sticky;
  bottom: 0;
  background: var(--ctrm-surface, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
  z-index: 2;
  flex: 0 0 auto;
}
.plan-ui-r3h2-error-summary {
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid #b42318;
  background: rgba(180, 35, 24, 0.06);
  color: #7a271a;
}
.plan-ui-r3h2-field-error { margin-top: 0.25rem; }
/* PB-E: missing required control outline (D74 ② next-step inline) */
#library-plan-driven-create-form-r3h1 .plan-ui-r3h2-field-invalid {
  outline: 2px solid #b91c1c;
  outline-offset: 1px;
  border-color: #b91c1c;
}
.plan-ui-r3h2-readonly-cell input[readonly] {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
  cursor: default;
}
.plan-ui-r3h2-contract-input {
  max-width: 9rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.plan-ui-r3h2-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
/* UAT-FIX-R2A: editable qty/price fully visible — avoid forced horizontal scroll */
.plan-ui-r3h2-table-wrap--no-x-scroll {
  overflow-x: visible;
}
.plan-ui-r3h2-lines-table--editable-first {
  table-layout: auto;
  width: 100%;
}
.plan-ui-r3h2-lines-table--editable-first th,
.plan-ui-r3h2-lines-table--editable-first td {
  white-space: nowrap;
}
.plan-ui-r3h2-qty-cell input,
.plan-ui-r3h2-price-cell input {
  min-width: 7.5rem;
  width: 100%;
}
.plan-ui-r3h2-physical-details > summary {
  cursor: pointer;
  list-style: disclosure-closed;
}
.plan-ui-r3h2-physical-details[open] > summary {
  list-style: disclosure-open;
}
/* UAT-FIX-R2B: single form-body column stack — auto-fit previously painted ~3 vertical strips */
.plan-ui-r3h2-modal .plan-ui-r3h2-panel,
.fo-strategy-plan-modal .fo-strategy-plan-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.plan-ui-r3h2-modal .plan-ui-r3h2-form,
.fo-strategy-plan-modal #strategy-plan-form.strategy-ledger-form-sections {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  width: 100%;
  max-width: 100%;
}
.plan-ui-r3h2-modal .plan-ui-r3h2-form > [data-plan-ui-r3h2-section],
.fo-strategy-plan-modal #strategy-plan-form > section,
.fo-strategy-plan-modal #strategy-plan-form > .ctrm-grid,
.fo-strategy-plan-modal #strategy-plan-form > .ctrm-field {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Boundary / summary: 2 label|value cards per row; never auto-fit into vertical glyph columns */
.plan-ui-r3h2-boundary-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.25rem;
}
.plan-ui-r3h2-boundary-dl.strategy-library-detail-dl > div,
.plan-ui-r3h2-readonly-summary.strategy-library-detail-dl > div {
  display: grid;
  grid-template-columns: minmax(4.5rem, 6.5rem) minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  align-items: start;
  min-width: 0;
}
.plan-ui-r3h2-boundary-dl dd,
.plan-ui-r3h2-readonly-summary dd {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
  writing-mode: horizontal-tb;
}
.plan-ui-r3h2-readonly-summary.strategy-library-detail-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
.fo-strategy-plan-modal .fo-plan-pnl-preview-grid,
.fo-strategy-plan-modal .fo-plan-pnl-preview-calc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fo-strategy-plan-modal .fo-plan-pnl-preview-grid .ctrm-field,
.fo-strategy-plan-modal .fo-plan-pnl-preview-calc-grid .ctrm-field {
  min-width: 0;
}
.fo-strategy-plan-modal .fo-plan-pnl-preview-grid .fo-plan-readonly,
.fo-strategy-plan-modal .fo-plan-pnl-preview-calc-grid .fo-plan-readonly {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  writing-mode: horizontal-tb;
  white-space: normal;
}
.plan-ui-r3h2-notes-after {
  margin: 0.75rem 0;
}
.plan-ui-r3h2-legs-ellipsis {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-ui-r3h2-status-banner[data-status="planning"] { color: #92400e; }
.plan-ui-r3h2-status-banner[data-status="ready"],
.plan-ui-r3h2-status-banner[data-status="watching"] { color: #1d4ed8; }
.plan-ui-r3h2-status-banner[data-status="active"] { color: #047857; }
.plan-ui-r3h2-diff-list { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.plan-ui-r3h2-diag-pre {
  max-height: 8rem;
  overflow: auto;
  font-size: 0.75rem;
  white-space: pre-wrap;
}
.plan-ui-r3h2-admin-diag { margin: 0.75rem 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1400px) {
  .plan-ui-r3h2-lines-table th,
  .plan-ui-r3h2-lines-table td { padding: 0.25rem; }
  .plan-ui-r3h2-contract-input { max-width: 7rem; }
}

/* R2B2D1 typed combination accounting UI */
.ctrm-combo-tabbar-sticky-r2b2d1{position:sticky;top:0;z-index:20;background:var(--ctrm-surface,#fff);box-shadow:0 1px 0 rgba(15,23,42,.08)}
.ctrm-combo-panel-r2b2d1{margin:.75rem 0 1rem;padding:.75rem 1rem;border:1px solid rgba(15,23,42,.12);border-radius:.35rem;background:rgba(248,250,252,.9)}
.ctrm-combo-panel-head{display:flex;flex-wrap:wrap;gap:.5rem 1rem;align-items:center;margin-bottom:.5rem}
.ctrm-combo-pin-dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.35rem 1rem;margin:0}
.ctrm-combo-pin-dl>div{display:flex;flex-direction:column;gap:.1rem}
.ctrm-combo-pin-dl dt{font-size:.75rem;color:#64748b;margin:0}
.ctrm-combo-pin-dl dd{margin:0;font-size:.875rem;word-break:break-all}
.ctrm-combo-live-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.4rem .75rem;margin:.5rem 0}
.ctrm-combo-live-grid.is-mismatch{outline:1px solid #b45309;outline-offset:4px}
.ctrm-combo-k{display:block;font-size:.72rem;color:#64748b}
.ctrm-combo-auth{font-weight:600}
.ctrm-combo-legacy-box{margin-top:.75rem;padding:.5rem .75rem;border-left:3px solid #94a3b8;background:#f1f5f9}
.ctrm-combo-legacy-title{font-size:.8rem;font-weight:600;margin-bottom:.35rem}
.ctrm-combo-legacy-grid{display:flex;flex-wrap:wrap;gap:.35rem 1rem;font-size:.8rem;color:#475569}
.ctrm-combo-status{display:inline-block;padding:.1rem .4rem;border-radius:.25rem;background:#e2e8f0;font-size:.75rem}
.ctrm-combo-status--warn{background:#ffedd5;color:#9a3412;font-weight:600}
.ctrm-combo-grain{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;background:#ecfeff;padding:.05rem .35rem;border-radius:.2rem}
.ctrm-combo-pos-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.5rem}
.ctrm-combo-pos-card{padding:.5rem .65rem;border:1px solid rgba(15,23,42,.1);border-radius:.3rem;font-size:.85rem}
.ctrm-combo-pos-card header{font-weight:600;margin-bottom:.25rem}
.ctrm-combo-help-list{margin:.25rem 0 .5rem 1.1rem;padding:0;font-size:.85rem}
.ctrm-combo-valuation-source{font-weight:600;color:#0f766e}
.ctrm-combo-asof-label{display:inline-flex;align-items:center;gap:.35rem;font-size:.8rem}
.ctrm-combo-asof-input{min-width:16rem;font-size:.8rem}
.ctrm-combo-direct-exec-fields{margin:.5rem 0;padding:.5rem .75rem;border:1px dashed rgba(15,23,42,.2);border-radius:.3rem}
.ctrm-combo-dryrun-out{max-height:12rem;overflow:auto;font-size:.75rem;background:#0f172a;color:#e2e8f0;padding:.5rem;border-radius:.3rem}
.ctrm-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;word-break:break-all}
#fo-group-plan-list-table th:nth-child(1),#fo-group-plan-list-table th:nth-child(4),#fo-group-plan-list-table td:nth-child(1),#fo-group-plan-list-table td:nth-child(4){position:sticky;left:0;background:#fff;z-index:1}
#fo-group-plan-list-table th:nth-child(4),#fo-group-plan-list-table td:nth-child(4){left:5.5rem}
.ctrm-ledger-list-scroll-r2{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* CTRM-PLAN-LIST-REFINE-R1 — D96 two-segment plan list (column set superseded by D98) */
/* CTRM-PLAN-LIST-REFINE-R2 — digital polish retained (吨/进度条/操作/overflow) */
/* CTRM-PLAN-LIST-COLUMNS-R1 / D98 — eight-column full split */
/* PLAN-NAME-COL-WIDTH-R1 (Owner 2026-08-03) — 策略名称列 ≈ 原宽 2/3（原 min 240 → 160） */
/* grid-template-columns:
 *   minmax(160px, 1.35fr) 策略名称
 *   minmax(150px, 1.2fr)  计划（组合）
 *   minmax(78px, 0.7fr)   策略收盘价
 *   minmax(112px, 0.9fr)  边界价格
 *   minmax(110px, 1fr)    计划保证金
 *   128px                 达成率
 *   minmax(96px, 0.8fr)   状态
 *   104px                 操作
 */
/* D107 / LEDGER-TABLE-HSCROLL-R1 — supersedes refine squeeze (was overflow-x:hidden + min-width:0 + fixed) */
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-ledger-list-scroll-r2.ctrm-plan-list-refine-r1,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-ledger-list-scroll-r2.ctrm-plan-list-refine-r1,
.ctrm-plan-list-refine-r1.fo-group-plan-list-wrap,
.ctrm-plan-list-refine-r1.ctrm-ledger-list-scroll-r2,
.fo-group-plan-list-wrap.ctrm-plan-list-refine-r1 {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.ctrm-plan-list-refine-r1.fo-group-plan-list-table,
.ctrm-plan-list-refine-r1 .fo-group-plan-list-table,
.ctrm-plan-tab-density-r1 .fo-group-plan-list-table.ctrm-plan-list-refine-r1 {
  min-width: 1280px !important;
  width: max-content;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
}
.ctrm-plan-list-refine-r1 .fo-group-plan-list-table thead th,
.ctrm-plan-list-refine-r1 .fo-group-plan-list-table tbody td {
  padding: 12px 14px;
  border-bottom: 0.5px solid #e5e7eb;
  vertical-align: top;
  box-sizing: border-box;
}
.ctrm-plan-list-refine-r1 .ctrm-plan-col-strategy-r1,
.ctrm-plan-list-refine-r1 th[data-plan-field="strategy"],
.ctrm-plan-list-refine-r1 td[data-plan-field="strategy"],
.ctrm-plan-list-refine-r1 td.ctrm-plan-col-strategy-r1 {
  /* PLAN-NAME-COL-WIDTH-R1: before computed ≈250px → target ≈167px (2/3) */
  width: 167px;
  min-width: 160px;
  max-width: 167px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="plan_combo"],
.ctrm-plan-list-refine-r1 td[data-plan-field="plan_combo"] {
  width: 14%;
  min-width: 150px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="strategy_close_price"] {
  width: 8%;
  min-width: 78px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="boundary_price"],
.ctrm-plan-list-refine-r1 td[data-plan-field="boundary_price"] {
  width: 11%;
  min-width: 112px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="plan_boundary_loss"],
.ctrm-plan-list-refine-r1 td[data-plan-field="plan_boundary_loss"],
.ctrm-plan-list-refine-r1 th[data-plan-field="plan_boundary_profit"],
.ctrm-plan-list-refine-r1 td[data-plan-field="plan_boundary_profit"] {
  width: 9%;
  min-width: 100px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="plan_margin_required"] {
  width: 11%;
  min-width: 110px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="execution_rate"],
.ctrm-plan-list-refine-r1 td[data-plan-field="execution_rate"] {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="status"],
.ctrm-plan-list-refine-r1 td[data-plan-field="status"] {
  width: 10%;
  min-width: 96px;
}
.ctrm-plan-list-refine-r1 th[data-plan-field="actions"],
.ctrm-plan-list-refine-r1 td[data-plan-field="actions"],
.ctrm-plan-list-refine-r1 .fo-group-plan-actions-col {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}
/* PLAN-NAME-COL-WIDTH-R1: cell floor tracks strategy column (~2/3 of prior 220).
 * Class only rendered in plan-list refine cell (ctrm-strategy-ledger-page.js). */
.ctrm-plan-list-strategy-cell-r1 {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ctrm-plan-list-strategy-top-r1 {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}
.ctrm-plan-list-strategy-name-r1 {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctrm-plan-list-strategy-badges-r1 {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  max-width: 46%;
  overflow: hidden;
}
.ctrm-plan-list-strategy-meta-r1 {
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctrm-plan-list-boundary-cell-r1 {
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.ctrm-plan-list-boundary-pair-r1 {
  white-space: nowrap;
  font-weight: 600;
}
.ctrm-plan-list-boundary-source-r1 {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
/* PB-28: 边界来源 · 基准/动态分形（灰字族 + 左边线；不新造组件） */
.ctrm-plan-list-boundary-source-r1--base {
  padding-left: 6px;
  border-left: 2px solid #94a3b8;
}
.ctrm-plan-list-boundary-source-r1--dyn {
  padding-left: 6px;
  border-left: 2px solid #f59e0b;
}
.ctrm-plan-list-boundary-unset-r1 {
  color: #9ca3af;
  font-size: 13px;
}
.ctrm-plan-list-boundary-pending-r1 {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: #eab308;
  vertical-align: middle;
}
.ctrm-plan-list-status-cell-r1 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ctrm-plan-list-status-badges-r1 {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ctrm-plan-list-expiry-warn-r1 {
  font-size: 12px;
  color: #b91c1c;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  margin-top: 2px;
}
.ctrm-plan-list-row--expired-r1 > td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}
.ctrm-plan-list-row--expired-r1 > td {
  background: #fef2f2;
}
.ctrm-plan-list-combo-cell-r1 {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ctrm-plan-list-combo-pending-r1 {
  color: #9ca3af;
}
.ctrm-plan-list-progress-r1 {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.ctrm-plan-list-progress-bar-r1 {
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 6px;
}
.ctrm-plan-list-progress-pct-r1 {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.ctrm-plan-list-actions-r1 {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.ctrm-plan-list-overflow-r1 {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.ctrm-plan-list-overflow-menu-r1 {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 20;
  min-width: 96px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.ctrm-plan-list-overflow-item-r1 {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.ctrm-plan-list-overflow-item-r1:hover {
  background: #f3f4f6;
}
.ctrm-plan-summary-bar-wrap-r2a {
  margin-top: 10px;
  padding-top: 8px;
}
/* D107: sticky first col only (col 4 stays static; dual-sticky was retired in refine) */
.ctrm-plan-list-refine-r1#fo-group-plan-list-table th:nth-child(4),
.ctrm-plan-list-refine-r1#fo-group-plan-list-table td:nth-child(4) {
  position: static;
  left: auto;
}
.ctrm-plan-list-refine-r1#fo-group-plan-list-table th:nth-child(1),
.ctrm-plan-list-refine-r1#fo-group-plan-list-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.08);
}
.ctrm-plan-list-refine-r1#fo-group-plan-list-table th:nth-child(1) {
  z-index: 3;
  background: var(--ctrm-table-head-bg, #f1f5f9);
}
.ctrm-plan-list-refine-r1#fo-group-plan-list-table tbody tr.ctrm-plan-list-row--expired-r1 > td:first-child {
  background: #fef2f2;
}
.ctrm-plan-list-refine-r1#fo-group-plan-list-table tbody tr:hover > td:first-child {
  background: var(--accent-soft, #f8fafc);
}
.ctrm-plan-list-refine-r1#fo-group-plan-list-table tbody tr.ctrm-plan-list-row--expired-r1:hover > td:first-child {
  background: #fee2e2;
}
.ctrm-plan-list-refine-r1 td[data-plan-field="execution_rate"],
.ctrm-plan-list-refine-r1 td[data-plan-field="actions"],
.ctrm-plan-list-refine-r1 td.strategy-col-num,
.ctrm-plan-list-refine-r1 th.strategy-col-num {
  white-space: nowrap;
}
.ctrm-plan-list-refine-r1 td[data-plan-field="status"] .ctrm-badge,
.ctrm-plan-list-refine-r1 td[data-plan-field="status"] .ctrm-plan-list-hist-badge-r1 {
  white-space: nowrap;
}
.ctrm-plan-list-hist-badge-r1 {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  color: #6b7280;
  background: #f9fafb;
}
.ctrm-plan-summary-expired-btn-r1 {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* CTRM-LEDGER-TABLE-HSCROLL-R1 / D107 — reusable wide-table scroll + sticky first */
.ctrm-table-hscroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.fo-group-plan-list-wrap.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 1280px;
}
.fo-group-position-list-wrap.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 1320px;
}
.fo-pnl-analysis-table-wrap.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 960px;
}
.fo-pnl-analysis-daily-table-wrap.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 880px;
}
.fo-pnl-analysis-ledger-table-wrap.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 1152px;
}
.fo-group-execution-grid-wrap-r1e.ctrm-table-hscroll {
  --ctrm-table-hscroll-min: 1200px;
}
.strategy-ledger-workspace .ctrm-table-hscroll > table.ctrm-table-hscroll__table,
.strategy-ledger-workspace[data-ledger-list-surface-auto-fit-r2="true"] .ctrm-table-hscroll > table.ctrm-table-hscroll__table,
.strategy-ledger-workspace[data-list-column-alignment-compact-r2d="true"] .ctrm-table-hscroll > table.ctrm-table-hscroll__table {
  table-layout: auto;
  width: max-content;
  max-width: none;
  min-width: var(--ctrm-table-hscroll-min, 72rem);
}
.ctrm-table-hscroll .strategy-col-num,
.ctrm-table-hscroll .ctrm-group-position-cell-num,
.ctrm-table-hscroll .ctrm-group-position-cell-money,
.ctrm-table-hscroll .ctrm-group-position-cell-action,
.ctrm-table-hscroll .ctrm-plan-action-nowrap-r5b,
.ctrm-table-hscroll .ctrm-badge,
.ctrm-table-hscroll .btn {
  white-space: nowrap;
}
.ctrm-table-sticky-first > table thead th:first-child,
.ctrm-table-sticky-first > table tbody td:first-child,
.ctrm-table-sticky-first > table tfoot td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.08);
}
.ctrm-table-sticky-first > table thead th:first-child {
  z-index: 3;
  background: var(--ctrm-table-head-bg, #f1f5f9);
}
.ctrm-table-sticky-first > table tbody tr:hover > td:first-child {
  background: var(--accent-soft, #f8fafc);
}
.ctrm-table-sticky-first > table tbody tr.ctrm-plan-list-row--expired-r1 > td:first-child {
  background: #fef2f2;
}
.ctrm-table-sticky-first > table tbody tr.ctrm-plan-list-row--expired-r1:hover > td:first-child {
  background: #fee2e2;
}
/* summary bars stay outside .ctrm-table-hscroll wraps — full width */
.ctrm-plan-summary-bar-wrap-r2a,
.ctrm-list-summary-bar-r2c {
  width: 100%;
  max-width: 100%;
}

/* D137 — 业务财务对账第一层双列 */
.biz-fin-recon-l1-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 960px) {
  .biz-fin-recon-l1-cols { grid-template-columns: 1fr; }
}
.biz-fin-recon-l1-finance-placeholder {
  border: 1px dashed #c5c9d0;
  border-radius: 4px;
  padding: 1rem 1.1rem;
  background: transparent;
}
.biz-fin-recon-l1-finance-placeholder .ctrm-panel-title {
  margin-top: 0;
}

/* D138 — delivery schedule calc + alert badges */
.ctrm-delivery-alert-r1--yellow { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.ctrm-delivery-alert-r1--red { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }
.fo-delivery-schedule-calc-r1 { margin: 0.75rem 0; border: 1px solid #d8dde6; border-radius: 4px; padding: 0.35rem 0.6rem; }
.fo-delivery-schedule-calc-r1__summary { cursor: pointer; list-style: none; display: flex; gap: 0.75rem; align-items: baseline; }
.fo-delivery-schedule-calc-r1__summary::-webkit-details-marker { display: none; }
