/* Portfolio operations: preserve each workflow, unify it with the approved Overview system. */
[data-portfolio-ops-review] :is(.app-shell,.workspace,.content,.page){background:var(--ect-canvas)!important;background-image:none!important}
[data-portfolio-ops-review] :is(.page,.content){padding:26px 52px 32px!important}
[data-portfolio-ops-review] :is(.page-head,.ledger-head,.surface-head,.panel-head,.inspector-head,.ledger-toolbar){border-color:var(--ect-line)!important}
[data-portfolio-ops-review] :is(.ledger,.holding-inspector,.portfolio-strip,.health-surface,.priority,.source-line,.panel,.scenario-surface,.exposure-rail,.model-strip,.ledger-panel,.control-rail,.summary-strip,.head-status){border:1px solid var(--ect-line)!important;border-radius:var(--ect-radius)!important;background:var(--ect-surface)!important;box-shadow:none!important;backdrop-filter:none!important}
[data-portfolio-ops-review] :is(button,input,select,textarea,.button,.primary-button,.secondary-button,.quiet-button,.quiet-link,.ledger-search,.filter-group,.scenario-control,.segment){border-radius:var(--ect-control-radius)!important;box-shadow:none!important}
[data-portfolio-ops-review] :is(.page-head h1,.content>.page-head h1){font-size:32px!important;line-height:1.15!important;font-weight:700!important}
[data-portfolio-ops-review] :is(.eyebrow,.mono-label,.page-head small,.heading-copy>.eyebrow){color:var(--ect-muted)!important;font-family:Inter,"Segoe UI",Arial,sans-serif!important;font-weight:600!important;text-transform:none!important}
[data-portfolio-ops-review] :is(.primary-button,.button.primary,.export-submit){background:var(--ect-blue)!important;border-color:var(--ect-blue)!important;color:#fff!important}
[data-portfolio-ops-review] :is(.primary-button,.button.primary,.export-submit):hover{filter:none!important;background:#2439ea!important;transform:none!important}
[data-portfolio-ops-review] :is(tr,button,.source-row,.provider,.provider-card,.format-row){transition:background-color .16s ease,border-color .16s ease,color .16s ease!important;transform:none!important}
[data-portfolio-ops-review] :is(tr,button,.source-row,.provider,.provider-card,.format-row):hover{transform:none!important}

/* Holdings ledger: dense records with a stable inspector, not a card gallery. */
[data-system-route="holdings"] .page{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:24px!important;min-height:calc(100vh - 64px)!important}
[data-system-route="holdings"] .page-head{padding:0 0 22px!important;align-items:end!important}
[data-system-route="holdings"] .workspace{gap:24px!important;grid-template-columns:minmax(0,1fr) 360px!important;background:transparent!important}
[data-system-route="holdings"] .ledger{overflow:hidden!important}
[data-system-route="holdings"] .holding-inspector{overflow:hidden!important}
[data-system-route="holdings"] :is(.value-panel,.brief-number){background:var(--ect-ink-strong)!important}
[data-system-route="holdings"] tbody tr:hover{background:#f7f9ff!important}
[data-system-route="holdings"] tbody tr.is-active,[data-system-route="holdings"] tbody tr.active{background:var(--ect-blue-tint)!important}
[data-system-route="holdings"] .asset-icon{border-radius:6px!important}

/* Diagnostics: one health read, one issue rail, then source evidence. */
[data-system-route="diagnostics"] .content{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:24px!important;min-height:calc(100vh - 64px)!important}
[data-system-route="diagnostics"] .diagnostic-layout{gap:24px!important}
[data-system-route="diagnostics"] .health-surface,[data-system-route="diagnostics"] .priority{overflow:hidden!important}
[data-system-route="diagnostics"] .score-ring{box-shadow:none!important}
[data-system-route="diagnostics"] .scan{display:none!important}
[data-system-route="diagnostics"] .check{border-color:var(--ect-line)!important}
[data-system-route="diagnostics"] .check:hover{background:#f9faff!important}

/* Wallet sync: keep the guided connection journey; reduce promotional treatment. */
[data-system-route="wallet-sync"] .content{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:24px!important;min-height:calc(100vh - 64px)!important}
[data-system-route="wallet-sync"] .manager-layout{gap:24px!important}
[data-system-route="wallet-sync"] :is(.sources-panel,.add-source){overflow:hidden!important}
[data-system-route="wallet-sync"] .source-row:hover,[data-system-route="wallet-sync"] :is(.provider,.provider-card):hover{background:#f9faff!important;border-color:#b9c5f9!important}
[data-system-route="wallet-sync"] :is(.source-row.is-active,.provider.active,.provider-card.active){background:var(--ect-blue-tint)!important;border-color:var(--ect-blue)!important}
[data-system-route="wallet-sync"] .logo-box{border-radius:6px!important}
[data-system-route="wallet-sync"] .trust-strip{background:#f5faf8!important}

/* Stress test: the chart is the primary surface; controls remain compact and deterministic. */
[data-system-route="stress-test"] .content{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:24px!important;min-height:calc(100vh - 64px)!important}
[data-system-route="stress-test"] .stress-layout{gap:24px!important}
[data-system-route="stress-test"] :is(.scenario-surface,.exposure-rail){overflow:hidden!important}
[data-system-route="stress-test"] .scenario-control{background:#f4f6f8!important;border:1px solid var(--ect-line)!important}
[data-system-route="stress-test"] .scenario-control button.active{background:var(--ect-blue)!important;color:#fff!important}
[data-system-route="stress-test"] .plot-canvas{border-color:var(--ect-line)!important;border-radius:var(--ect-radius)!important;background:#fbfcfd!important}
[data-system-route="stress-test"] .plot-tooltip{border-radius:var(--ect-control-radius)!important;box-shadow:none!important}

/* Activity: audit ledger first, export controls second. */
[data-system-route="activity"] .page{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:24px!important;min-height:calc(100vh - 64px)!important}
[data-system-route="activity"] .page-head{padding:0 0 22px!important;align-items:end!important}
[data-system-route="activity"] .desk{gap:24px!important;grid-template-columns:minmax(0,1fr) 344px!important}
[data-system-route="activity"] :is(.ledger-panel,.control-rail){overflow:hidden!important}
[data-system-route="activity"] .pnl-brief{background:var(--ect-ink-strong)!important}
[data-system-route="activity"] .activity-table tbody tr:hover{background:#f7f9ff!important}
[data-system-route="activity"] .format-row:hover{background:#f9faff!important;border-color:#b9c5f9!important}
[data-system-route="activity"] .format-row.active{background:var(--ect-blue-tint)!important;border-color:var(--ect-blue)!important}

@media(max-width:1500px){
  [data-portfolio-ops-review] :is(.page,.content){padding-inline:24px!important}
  [data-system-route="holdings"] .workspace,[data-system-route="activity"] .desk{grid-template-columns:minmax(0,1fr) 320px!important}
}
