:root {
  color-scheme: light;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: #62718a;
  background: #f3f6fa;
  font-synthesis: none;
  --content-top-gap: 20px;
  --surface: #ffffff;
  --muted: #68758c;
  --soft: #45516b;
  --line: #e8edf5;
  --green: #087d68;
  --purple: #7951c2;
  --blue: #4377bc;
  --amber: #94651c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 5px;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #315d97;
}
svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
.app-header {
  min-height: 82px;
  padding: 0 3.3%;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  background: #ffffffcc;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.brand img {
  width: 35px;
  height: 39px;
}
.brand small {
  display: block;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #62718a;
  margin-top: 5px;
}
.app-header nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 6px;
}
.nav-button {
  font-size: 13px;
  color: #62718a;
  padding: 12px 16px;
  border-radius: 12px;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-button.active {
  color: #202a3c;
  background: #eaf0fa;
  box-shadow: inset 0 1px #ffffff0d;
}
.nav-button:hover {
  color: #202a3c;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
#identity {
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--soft);
}
.live-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #62718a;
  font-size: 10px;
}
.live-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px #55c6a144;
}
.live-state.offline i {
  background: var(--amber);
}
.quiet,
.primary {
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid #e6ebf3;
  background: #f3f6fa;
}
.quiet:hover {
  background: #f3f6fa;
}
.primary {
  background: #252e40;
  border-color: #e6ebf3;
  color: #ffffff;
}
.text-button {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
}
.text-button:hover {
  color: var(--green);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e6ebf3;
  background: #f3f6fa;
  flex-shrink: 0;
  color: #62718a;
  font-size: 24px;
}
.icon-button:hover {
  background: #f3f6fa;
}
.app-main {
  max-width: 1740px;
  margin: auto;
  padding: var(--content-top-gap) 3.3% 70px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #62718a;
  font-weight: 500;
}
.page-heading h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
}
.page-tools {
  display: flex;
  align-items: center;
  gap: 17px;
}
.chain-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
select,
input {
  color: #62718a;
  background: #f3f6fa;
  border: 1px solid #e6ebf3;
  border-radius: 9px;
  padding: 10px 12px;
  min-width: 0;
}
.chain-select select {
  min-width: 140px;
}
.page-notice {
  border: 1px solid #e6ebf3;
  background: #f3f6fa;
  padding: 13px 17px;
  border-radius: 12px;
  color: #805e20;
  font-size: 12px;
  margin-bottom: 20px;
}
.cards {
  display: grid;
  gap: 14px;
}
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}
.card {
  background: #ffffffd9;
  border: 1px solid #e6ebf3;
  border-radius: 20px;
  box-shadow: 0 4px 24px #283e6503;
  overflow: hidden;
}
.metric {
  padding: 24px 25px;
  min-height: 136px;
}
.metric-label {
  font-size: 12px;
  color: #62718a;
}
.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.metric strong em {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  margin-left: 7px;
  color: var(--muted);
  letter-spacing: 0;
}
.live-money {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.live-money-final {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  user-select: none;
}
.live-money [data-money-digits] {
  display: inline;
  color: inherit;
  font: inherit;
}
.trend-stats .live-money {
  display: inline-block;
  color: inherit;
  font: inherit;
}
.metric small {
  display: block;
  font-size: 10px;
  color: #62718a;
  margin-top: 8px;
}
.metric.green strong {
  color: #171b28;
}
.metric.purple strong {
  color: #171b28;
}
.metric.amber strong {
  color: #94651c;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  gap: 20px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 26px 0;
}
.card-heading h2 {
  font-size: 16px;
  font-weight: 550;
}
.card-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.chart-select {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.chart-select button,
.segments button {
  padding: 8px 11px;
  border-radius: 8px;
  color: #62718a;
  font-size: 11px;
}
.chart-select button.active,
.segments button.active {
  color: #202a3c;
  background: #f3f6fa;
}
.market-chart {
  height: 330px;
  margin: 8px 8px 0;
}
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--muted);
  font-size: 12px;
}
.chart-foot {
  padding: 0 26px 22px;
  font-size: 10px;
  color: #62718a;
}
.activity-list {
  padding: 12px 25px 21px;
  max-height: 365px;
  overflow: auto;
  scrollbar-width: none;
}
.activity-list::-webkit-scrollbar {
  display: none;
}
.activity-list,
.overview-orders-feed {
  overflow-anchor: none;
  overscroll-behavior: contain;
}
.overview-orders-feed {
  max-height: 650px;
  overflow: auto;
}
.feed-sentinel {
  height: 1px;
}
.feed-new {
  position: sticky;
  top: 8px;
  z-index: 2;
}
.feed-load,
.feed-new {
  display: block;
  margin: 8px auto;
  min-height: 34px;
  padding: 7px 15px;
  font-size: 12px;
  color: #45658c;
  background: #f4f8fcc9;
  border: 1px solid #dce6f2;
  border-radius: 18px;
  backdrop-filter: blur(16px);
}
.feed-load[hidden],
.feed-new[hidden] {
  display: none;
}
.feed-message {
  min-height: 18px;
  margin: 4px 0;
  text-align: center;
  font-size: 11px;
  color: #7b8da7;
}
.fulfillment-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 15px;
  padding: 15px 20px;
  color: #65758e;
  font-size: 13px;
}
.activity {
  padding: 14px 0;
  border-bottom: 1px solid #e6ebf3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}
.activity:last-child {
  border-bottom: 0;
}
.activity time {
  grid-column: 1/-1;
  font-size: 10px;
  color: #62718a;
}
.activity .event-name {
  font-size: 12px;
  color: #62718a;
}
.activity .event-name.green {
  color: var(--green);
}
.activity .event-name.purple {
  color: var(--purple);
}
.activity strong {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.activity small {
  grid-column: 1/-1;
  font-size: 10px;
  color: #62718a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-card {
  margin-top: 20px;
  padding: 26px;
}
.flow-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.flow-heading h2 {
  font-size: 16px;
  font-weight: 550;
}
.flow-heading span {
  font-size: 11px;
  color: var(--muted);
}
.flow-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.flow-step {
  position: relative;
  min-width: 0;
}
.flow-step:not(:last-child):after {
  content: '→';
  position: absolute;
  right: 1px;
  top: 10px;
  color: #62718a;
}
.flow-step .step-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f6fa;
  border: 1px solid #e6ebf3;
  color: #62718a;
  font-size: 10px;
  margin-bottom: 13px;
}
.flow-step strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.flow-step small {
  font-size: 10px;
  color: #62718a;
  display: block;
  margin-top: 7px;
  line-height: 1.7;
  max-width: 80%;
}
.section-gap {
  margin-top: 26px;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-top h2 {
  font-size: 16px;
  font-weight: 550;
}
.section-top p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}
.search-field svg {
  position: absolute;
  left: 12px;
  top: 11px;
  color: #62718a;
  width: 16px;
}
.search-field input {
  padding-left: 36px;
  width: 100%;
  background: #f3f6fa;
  font-size: 12px;
}
.filter-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.table-scroll {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #53635a transparent;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: #62718a;
  font-weight: 400;
  padding: 16px 23px;
  background: #f3f6fa;
  border-bottom: 1px solid #e6ebf3;
}
td {
  font-size: 12px;
  padding: 20px 23px;
  border-bottom: 1px solid #e6ebf3;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: #62718a;
  font-size: 10px;
  margin-top: 6px;
}
.row-link {
  color: #202a3c;
  font-weight: 500;
  text-align: left;
  padding: 0;
}
.row-link:hover {
  color: var(--green);
}
.muted {
  color: var(--muted);
}
.numeric {
  text-align: right;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #eaf7f3;
  font-size: 10px;
  color: #62718a;
  white-space: nowrap;
}
.badge:before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.purple {
  color: #7951c2;
  background: #f2edfa;
}
.badge.amber {
  color: #94651c;
  background: #fbf4e6;
}
.badge.grey {
  color: #62718a;
  background: #f0f3f7;
}
.badge.red {
  color: #c63e5e;
  background: #fcecf0;
}
.tag {
  font-size: 10px;
  color: #62718a;
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid #e6ebf3;
  margin-right: 5px;
}
.link-button {
  color: #62718a;
  font-size: 11px;
  white-space: nowrap;
  padding: 4px 0;
}
.link-button:after {
  content: ' ↗';
  color: #62718a;
}
.empty {
  padding: 64px 26px;
  text-align: center;
}
.empty .empty-icon {
  margin: 0 auto 18px;
  width: 44px;
  height: 44px;
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #62718a;
  background: #f3f6fa;
}
.empty h3 {
  font-size: 14px;
  font-weight: 500;
  color: #62718a;
  margin-bottom: 8px;
}
.empty p {
  color: #62718a;
  font-size: 11px;
  line-height: 1.8;
  max-width: 400px;
  margin: auto;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.plan-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.plan-card .plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-card h3 {
  font-size: 16px;
  font-weight: 550;
  margin-bottom: 6px;
}
.plan-card .plan-id {
  font-size: 10px;
  color: #62718a;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}
.plan-amount strong {
  font-size: 27px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.plan-amount small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 5px;
}
.plan-amount p {
  font-size: 10px;
  color: #62718a;
  margin-top: 6px;
}
.allocation-bar {
  display: flex;
  gap: 3px;
  height: 4px;
  overflow: hidden;
  border-radius: 5px;
  background: #f3f6fa;
  margin-bottom: 12px;
}
.allocation-bar span {
  height: 100%;
  border-radius: 5px;
}
.allocation-bar .available {
  background: #f3f6fa;
}
.allocation-bar .deployed {
  background: #f3f6fa;
}
.allocation-bar .collateral {
  background: #f3f6fa;
}
.plan-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.plan-breakdown small {
  color: #62718a;
  font-size: 10px;
  display: block;
}
.plan-breakdown b {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin-top: 7px;
}
.plan-breakdown .plan-subordinated-amount {
  white-space: nowrap;
}
.plan-breakdown .plan-amount-note {
  margin-left: 3px;
  color: #62718a;
  font-size: 0.75em;
  font-weight: 400;
}
.plan-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.inventory-meta {
  padding: 22px 25px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.inventory-meta strong {
  font-size: 29px;
  font-weight: 550;
}
.inventory-meta small {
  font-size: 11px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #e6ebf3;
  padding: 20px 3.3%;
  color: #62718a;
  font-size: 10px;
}
footer i {
  font-style: normal;
  margin: 0 12px;
}
dialog {
  color: inherit;
  border: 1px solid #e6ebf3;
  background: #fbfcff;
  box-shadow: 0 30px 100px #182f5033;
}
dialog::backdrop {
  background: #24344c40;
  backdrop-filter: blur(7px);
}
.detail-dialog {
  width: min(1220px, calc(100% - 40px));
  max-width: 1220px;
  max-height: 90dvh;
  padding: 10px 32px 32px;
  border-radius: 26px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #4f6156 transparent;
}
.sheet-handle {
  width: 38px;
  height: 4px;
  background: #f3f6fa;
  border-radius: 10px;
  margin: 3px auto 24px;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 26px;
}
.detail-heading h2 {
  font-size: 24px;
  font-weight: 550;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px 0 28px;
}
.detail-summary small {
  display: block;
  font-size: 11px;
  color: #62718a;
  margin-bottom: 9px;
}
.detail-summary strong {
  font-size: 23px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.detail-summary em {
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
  margin-left: 5px;
}
.detail-section {
  margin-top: 28px;
}
.detail-section h3 {
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 17px;
}
.detail-section .card {
  border-radius: 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 25px;
}
.trace-stages {
  display: flex;
  gap: 4px;
  padding: 20px 0 25px;
  overflow: auto;
}
.trace-stage {
  flex: 1;
  min-width: 110px;
  position: relative;
  padding-top: 22px;
}
.trace-stage:before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f3f6fa;
  box-shadow: 0 0 0 4px #55726111;
}
.trace-stage:not(:last-child):after {
  content: '';
  height: 1px;
  background: #f3f6fa;
  position: absolute;
  left: 14px;
  right: 3px;
  top: 6px;
}
.trace-stage.done:before {
  background: #f3f6fa;
  box-shadow: 0 0 0 4px #72bc9311;
}
.trace-stage.active:before {
  background: #f3f6fa;
  box-shadow: 0 0 0 4px #c0a1e119;
}
.trace-stage strong {
  font-size: 11px;
  font-weight: 500;
  color: #62718a;
}
.trace-stage small {
  font-size: 10px;
  display: block;
  color: #62718a;
  margin-top: 8px;
}
.proof-card {
  padding: 22px;
  border: 1px solid #e6ebf3;
  border-radius: 16px;
  background: #f3f6fa;
  align-self: start;
}
.proof-card h3 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}
.proof-card dl {
  margin: 0;
}
.proof-card dt {
  font-size: 10px;
  color: #62718a;
  margin-top: 17px;
}
.proof-card dd {
  margin: 6px 0 0;
  font-size: 11px;
  color: #62718a;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.proof-card a {
  color: #62718a;
}
.privacy-note {
  font-size: 11px;
  color: #62718a;
  line-height: 1.8;
  padding: 15px 0;
}
.key-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.key-values div {
  padding: 16px 0;
}
.key-values small {
  display: block;
  color: #62718a;
  font-size: 10px;
  margin-bottom: 7px;
}
.key-values strong {
  font-size: 12px;
  font-weight: 450;
  overflow-wrap: anywhere;
}
.asset-owner {
  color: #62718a;
  font-size: 12px;
  margin-bottom: 20px;
}
.login-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 30px;
  border-radius: 24px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.dialog-heading h2 {
  font-size: 20px;
  font-weight: 550;
  margin-top: 7px;
}
.segments {
  display: flex;
  gap: 5px;
  background: #f3f6fa;
  border: 1px solid #e6ebf3;
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 22px;
}
.segments button {
  flex: 1;
}
.login-dialog label {
  display: block;
  font-size: 11px;
  color: #62718a;
  margin-bottom: 17px;
}
.login-dialog input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: #f3f6fa;
}
.sms-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sms-field input {
  flex: 1;
}
.sms-field button {
  white-space: nowrap;
  margin-top: 8px;
  font-size: 10px;
  padding: 12px 10px;
}
.login-dialog .primary {
  width: 100%;
  padding: 13px;
}
.form-notice {
  min-height: 20px;
  color: var(--amber);
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.initial-surface {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skeleton {
  height: 145px;
  background: #edf1f7;
  border-radius: 20px;
  border: 1px solid #e6ebf3;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
}
.footnote {
  color: #62718a;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 15px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: #f3f6fa;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  color: #62718a;
  font-size: 12px;
  box-shadow: 0 12px 40px #0005;
  z-index: 100;
}
.proof-json {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.8;
  color: #62718a;
  background: #f3f6fa;
  border-radius: 10px;
  padding: 18px;
  max-height: 350px;
  overflow: auto;
}
@media (min-width: 1600px) {
  .app-main {
    padding-top: var(--content-top-gap);
  }
  .market-chart {
    height: 370px;
  }
  .metric {
    padding: 27px 29px;
  }
  .metric strong {
    font-size: 31px;
  }
}
@media (max-width: 1300px) {
  .app-header {
    gap: 20px;
    padding: 0 24px;
  }
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.4px;
  }
  .nav-button {
    font-size: 12px;
    padding: 11px 10px;
  }
  .header-actions {
    gap: 10px;
  }
  .live-state {
    display: none;
  }
  .app-main {
    padding-left: 24px;
    padding-right: 24px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .card-heading {
    padding: 22px 22px 0;
  }
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-steps {
    gap: 12px;
  }
  .metric {
    padding: 22px 20px;
  }
  .metric strong {
    font-size: 25px;
  }
}
@media (max-width: 1000px) {
  .app-header {
    flex-wrap: wrap;
    gap: 0 20px;
    padding-top: 18px;
  }
  .app-header nav {
    order: 3;
    width: 100%;
    overflow: auto;
    scrollbar-width: none;
    gap: 10px;
    margin: 14px 0;
  }
  .nav-button {
    padding: 10px 13px;
  }
  .header-actions {
    margin-left: auto;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .activity-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 30px;
    max-height: 240px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    min-height: 120px;
  }
  .flow-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .flow-step:nth-child(3):after {
    display: none;
  }
  .dual-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .proof-card {
    order: 2;
  }
  .proof-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .proof-card dt {
    grid-column: 1;
  }
  .proof-card dd {
    grid-column: 2;
  }
  .detail-summary strong {
    font-size: 20px;
  }
  .chart-select {
    gap: 0;
  }
}
@media (max-width: 600px) {
  .app-header {
    padding: 14px 16px 0;
  }
  .brand {
    font-size: 16px;
  }
  .brand img {
    width: 28px;
    height: 32px;
  }
  .brand small {
    font-size: 6px;
  }
  .header-actions {
    gap: 8px;
  }
  #identity {
    display: none;
  }
  .header-actions .quiet {
    padding: 9px 11px;
    font-size: 10px;
  }
  .app-header nav {
    gap: 0;
    margin: 15px 0 10px;
  }
  .nav-button {
    padding: 9px 12px;
    font-size: 11px;
  }
  .app-main {
    padding: var(--content-top-gap) 15px 45px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 14px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .page-heading p {
    font-size: 10px;
    max-width: 190px;
    line-height: 1.8;
  }
  .page-tools {
    gap: 8px;
    padding-top: 20px;
  }
  .chain-select span {
    display: none;
  }
  .chain-select select {
    font-size: 10px;
    min-width: 0;
    max-width: 110px;
    padding: 9px;
  }
  .page-tools .icon-button {
    width: 30px;
    height: 30px;
  }
  .page-tools svg {
    width: 15px;
  }
  .cards {
    gap: 10px;
  }
  .metrics {
    margin-bottom: 15px;
  }
  .card {
    border-radius: 16px;
  }
  .metric {
    padding: 18px 16px;
    min-height: 116px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric strong {
    font-size: 22px;
    margin-top: 13px;
  }
  .metric strong em {
    font-size: 9px;
    margin-left: 4px;
  }
  .metric small {
    font-size: 9px;
    line-height: 1.5;
  }
  .overview-grid {
    gap: 15px;
  }
  .card-heading {
    padding: 20px 18px 0;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .card-heading h2 {
    font-size: 14px;
  }
  .card-heading p {
    font-size: 10px;
  }
  .chart-select {
    width: 100%;
    gap: 4px;
  }
  .chart-select button {
    flex: 1;
    padding: 8px 6px;
    font-size: 10px;
    background: #f3f6fa;
  }
  .market-chart {
    height: 275px;
    margin: 0;
  }
  .chart-foot {
    padding: 0 18px 17px;
    font-size: 9px;
  }
  .activity-list {
    display: block;
    padding: 5px 18px 15px;
    max-height: 265px;
  }
  .flow-card {
    padding: 20px 18px;
    margin-top: 15px;
  }
  .flow-heading h2 {
    font-size: 14px;
  }
  .flow-heading span {
    font-size: 9px;
  }
  .flow-steps {
    gap: 22px 10px;
  }
  .flow-step strong {
    font-size: 10px;
  }
  .flow-step small {
    font-size: 9px;
    max-width: 90%;
  }
  .flow-step:after {
    font-size: 12px;
  }
  .section-top h2 {
    font-size: 14px;
  }
  .section-top p {
    font-size: 10px;
  }
  .section-gap {
    margin-top: 22px;
  }
  th {
    padding: 13px 16px;
    font-size: 9px;
  }
  td {
    padding: 17px 16px;
    font-size: 11px;
  }
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .plan-card {
    padding: 22px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar select {
    max-width: 130px;
    font-size: 11px;
    padding: 10px;
  }
  .search-field {
    min-width: 140px;
  }
  .search-field input {
    font-size: 11px;
  }
  .filter-count {
    font-size: 9px;
  }
  .detail-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    border-radius: 25px 25px 0 0;
    padding: 9px 18px 25px;
    position: fixed;
    inset: auto 0 0;
    margin: 0;
  }
  .sheet-handle {
    margin-bottom: 22px;
  }
  .detail-heading h2 {
    font-size: 19px;
  }
  .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 0 20px;
    gap: 23px 18px;
  }
  .detail-summary small {
    font-size: 10px;
  }
  .detail-summary strong {
    font-size: 23px;
  }
  .detail-section {
    margin-top: 24px;
  }
  .detail-section h3 {
    font-size: 13px;
  }
  .key-values {
    gap: 10px;
  }
  .key-values strong {
    font-size: 11px;
  }
  .proof-card {
    padding: 18px;
  }
  .proof-card dl {
    display: block;
  }
  .proof-card dd {
    font-size: 10px;
  }
  .trace-stages {
    padding-top: 14px;
  }
  .trace-stage {
    min-width: 105px;
  }
  .login-dialog {
    padding: 25px;
  }
  .login-dialog h2 {
    font-size: 18px;
  }
  footer {
    padding: 18px 16px;
    font-size: 9px;
    line-height: 1.7;
    gap: 12px;
  }
  footer span:last-child {
    max-width: 180px;
    text-align: right;
  }
  .initial-surface {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .skeleton {
    height: 115px;
  }
  .skeleton:last-child {
    display: none;
  }
  .empty {
    padding: 45px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.settings-card {
  padding: 26px;
}
.settings-card h3 {
  font-size: 15px;
  font-weight: 550;
}
.settings-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 10px 0 24px;
}
.settings-card label {
  display: block;
  font-size: 11px;
  color: #62718a;
  margin: 16px 0;
}
.settings-card input,
.settings-card textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  background: #f3f6fa;
}
.settings-card .primary {
  margin-top: 5px;
}
.settings-loading {
  padding: 35px;
  color: var(--muted);
  font-size: 12px;
}
.settings-card .form-notice {
  margin-top: 20px;
}
.settings-card button:disabled {
  pointer-events: none;
}
@media (max-width: 800px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-card {
    padding: 22px;
  }
}
.pending-card {
  padding: 23px 25px;
  margin-bottom: 22px;
  border-color: #e6ebf3;
}
.pending-card .section-top {
  margin-bottom: 15px;
}
.task-count {
  font-size: 10px;
  color: #94651c;
  background: #f3f6fa;
  padding: 3px 7px;
  border-radius: 6px;
  margin-left: 8px;
}
.pending-tasks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 30px;
}
.pending-tasks > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #e6ebf3;
  padding-top: 14px;
}
.pending-tasks strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.pending-tasks small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.compact-action {
  font-size: 10px;
  padding: 8px 11px;
  white-space: nowrap;
  color: #62718a;
}
.manage-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.manage-actions .quiet {
  font-size: 12px;
}
.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.action-dialog {
  width: min(560px, calc(100% - 30px));
  max-height: 90dvh;
  padding: 28px;
  border-radius: 24px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #4f6156 transparent;
}
.action-dialog .dialog-heading {
  margin-bottom: 16px;
}
.action-description {
  font-size: 12px;
  color: #62718a;
  line-height: 1.9;
  margin-bottom: 22px;
}
.action-dialog label {
  display: block;
  font-size: 11px;
  color: #62718a;
  margin: 15px 0;
}
.action-dialog input,
.action-dialog select,
.action-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: #f3f6fa;
  color: #202a3c;
  font-size: 12px;
  padding: 11px;
  border: 1px solid #e6ebf3;
  border-radius: 9px;
}
.action-dialog input[type='file'] {
  font-size: 10px;
}
.action-dialog textarea {
  font: inherit;
  resize: vertical;
}
.action-dialog input[readonly] {
  color: #62718a;
}
.action-dialog fieldset {
  padding: 10px 17px;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  margin: 20px 0;
}
.action-dialog legend {
  padding: 0 7px;
  font-size: 11px;
  color: #62718a;
}
.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}
.action-dialog label.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
  font-size: 10px;
  margin: 8px 0;
}
.action-dialog label.check-field input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #719f81;
}
.action-summary {
  padding: 17px 19px;
  border: 1px solid #e6ebf3;
  border-radius: 13px;
  background: #f3f6fa;
  font-size: 12px;
  color: #62718a;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.action-summary strong {
  display: block;
  font-size: 27px;
  font-weight: 550;
  margin-top: 12px;
  color: #202a3c;
}
.action-summary small {
  font-size: 11px;
  font-weight: 400;
  color: #62718a;
  display: block;
  margin-top: 7px;
}
.action-summary strong small {
  display: inline;
}
.action-evidence {
  margin: 22px 0;
}
.action-evidence summary {
  font-size: 11px;
  color: #62718a;
  cursor: pointer;
}
.field-help {
  font-size: 10px;
  color: #62718a;
  line-height: 1.8;
  word-break: break-all;
}
.action-dialog .primary {
  width: 100%;
  margin-top: 8px;
}
.receipt-inputs {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #e6ebf3;
  padding: 10px 0;
}
.receipt-inputs > strong {
  font-size: 12px;
  font-weight: 450;
  overflow-wrap: anywhere;
}
.receipt-inputs small {
  font-size: 10px;
  color: #62718a;
  display: block;
  margin-top: 7px;
}
.credential-secret {
  min-height: 110px;
  font-family: ui-monospace, monospace !important;
  color: #62718a;
  word-break: break-all;
}
.action-dialog .form-notice {
  margin-top: 17px;
}
.detail-dialog .pending-card {
  padding: 18px;
  background: #f3f6fa;
}
.detail-dialog .pending-tasks {
  grid-template-columns: 1fr;
}
@media (max-width: 600px) {
  .pending-card {
    padding: 20px 18px;
    margin-bottom: 17px;
  }
  .pending-tasks {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pending-tasks strong {
    font-size: 11px;
  }
  .pending-tasks small {
    font-size: 9px;
  }
  .action-dialog {
    padding: 23px;
  }
  .action-dialog .dialog-heading h2 {
    font-size: 17px;
  }
  .receipt-inputs {
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
  }
  .receipt-inputs > strong {
    grid-column: 1/-1;
    font-size: 11px;
    margin-top: 10px;
  }
  .action-dialog label {
    font-size: 10px;
  }
  .action-dialog input {
    font-size: 11px;
  }
  .manage-actions {
    gap: 8px;
  }
  .manage-actions .quiet {
    font-size: 11px;
    padding: 10px 12px;
  }
  .role-options {
    gap: 0 8px;
  }
  .action-description {
    font-size: 11px;
  }
}

.detail-grid > * {
  min-width: 0;
}
.detail-summary > div {
  min-width: 0;
}
.detail-summary strong {
  overflow-wrap: anywhere;
}
.detail-summary .detail-text-field strong {
  display: block;
  font-size: 16px;
  line-height: 1.5;
}

/* Fluid silver workspace: layout scales with the viewport, never a centered canvas. */
:root {
  color: #1d1d1f;
  background: #f5f5f7;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui,
    sans-serif;
  --muted: #6e6e73;
  --soft: #42424a;
  --line: #e5e5eb;
  --page-gutter: clamp(24px, 3vw, 92px);
  --chart-height: clamp(300px, 32vh, 540px);
  --panel-radius: 28px;
}
body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  background: #f6faff;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Shared AfB halo material and motion from the agent workspace. */
body::before,
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: -7%;
  background: url('./assets/afb-halo.webp') center/cover no-repeat;
  transform-origin: 78% 25%;
}
body::before {
  z-index: -2;
  animation: afb-halo-drift 18s ease-in-out infinite alternate;
}
body::after {
  z-index: -1;
  opacity: 0.18;
  mix-blend-mode: multiply;
  animation: afb-halo-current 14s ease-in-out -5s infinite alternate;
}
@keyframes afb-halo-drift {
  0% {
    transform: translate3d(-3.5%, 2%, 0) scale(1.03) rotate(-0.8deg);
    opacity: 0.84;
  }
  50% {
    transform: translate3d(1%, -1%, 0) scale(1.09) rotate(0.3deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(3.5%, -2.5%, 0) scale(1.05) rotate(0.8deg);
    opacity: 0.9;
  }
}
@keyframes afb-halo-current {
  0% {
    transform: translate3d(8%, -3%, 0) scale(1.16) rotate(2deg);
    opacity: 0.14;
  }
  50% {
    transform: translate3d(-1%, 4%, 0) scale(1.03) rotate(-0.5deg);
    opacity: 0.44;
  }
  100% {
    transform: translate3d(-6%, -3%, 0) scale(1.14) rotate(-2deg);
    opacity: 0.2;
  }
}
@media (max-width: 599px) {
  body::after {
    display: none;
  }
  body::before {
    animation-duration: 36s;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
    transform: none;
  }
  body::before {
    opacity: 0.9;
  }
  body::after {
    opacity: 0.12;
  }
}
.app-background-fold {
  position: fixed;
  inset: auto 0 0;
  height: clamp(240px, 32vh, 440px);
  z-index: -1;
  pointer-events: none;
  background: url('./assets/theme/legacy-bottom-fold.webp') center bottom/100% 100% no-repeat;
  opacity: 0.94;
  filter: blur(0.3px) brightness(0.96);
  transform-origin: center bottom;
  animation: afb-fold-flow 34s ease-in-out infinite alternate;
}
@keyframes afb-fold-flow {
  from {
    transform: translate3d(-0.5%, 1px, 0) scale(1.018);
  }
  to {
    transform: translate3d(0.5%, 0, 0) scale(1.025);
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-background-fold {
    animation: none;
    transform: none;
  }
}
.app-header {
  min-height: 78px;
  padding: 0 var(--page-gutter);
  gap: 36px;
  background: linear-gradient(120deg, #ffffffb8 0%, #f2f6ff80 52%, #ffffff8f 100%);
  border-bottom: 1px solid #d7e1ef80;
  box-shadow:
    inset 0 1px #ffffffd9,
    0 1px 0 #ffffffc2,
    0 8px 30px -20px #36547a26;
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-size: 21px;
  letter-spacing: -0.035em;
  color: #141d2d;
}
.brand img {
  width: 37px;
  height: 41px;
}
.brand small {
  color: #758299;
  font-size: 7px;
}
.app-header nav {
  gap: 7px;
  padding: 3px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-button {
  padding: 12px 18px;
  font-size: 14px;
  color: #52617a;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.nav-button.active {
  background: linear-gradient(145deg, #ffffffb8 0%, #d3e2f9b8 58%, #e0eafc99 100%);
  color: #17263d;
  font-weight: 650;
  border-color: #ffffffc9;
  box-shadow:
    inset 0 1px 1px #fff,
    inset 0 -1px 1px #adc3df66,
    0 3px 9px #2e4b7110,
    0 0 0 1px #cbd9e754;
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
}
.nav-button:hover {
  background: #ffffff73;
  border-color: #ffffffb3;
  color: #15223b;
  box-shadow:
    inset 0 1px #fff,
    0 2px 8px #2e4b710a;
  transform: translateY(-1px);
}
.nav-button.active:hover {
  background: linear-gradient(145deg, #ffffffd4, #d0e0f7cc 58%, #e0eafccc);
  border-color: #fff;
}
.header-actions {
  gap: 17px;
}
.live-state {
  color: #62728a;
  font-size: 11px;
}
.live-state i {
  width: 6px;
  height: 6px;
  background: #16a98b;
  animation: connection-pulse 3s ease-in-out infinite;
}
.live-state.offline i {
  background: #bd8427;
  animation: none;
}
.app-main {
  max-width: none;
  width: 100%;
  margin: 0;
  position: relative;
  isolation: isolate;
  padding: var(--content-top-gap) var(--page-gutter) 52px;
  min-height: calc(100vh - 138px);
}
/* One continuous ambient background sits beneath the header and page content. */
.page-heading {
  margin-bottom: 25px;
  min-height: 44px;
}
.page-heading h1 {
  font-size: 29px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.045em;
  margin: 3px 0;
  color: #1d1d1f;
}
.page-tools {
  gap: 14px;
}
.chain-select {
  font-size: 12px;
  color: #66748a;
}
.chain-select select {
  min-width: 230px;
  padding: 12px 16px;
  background: #ffffffb8;
  color: #2e3e59;
}
.quiet,
.icon-button {
  background: linear-gradient(180deg, #fffffff5, #f5f5f7bb);
  color: #42424a;
  border-color: #dcdce3;
  border-radius: 999px;
  box-shadow:
    inset 0 1px #fff,
    0 2px 4px #263e6304;
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.quiet {
  font-size: 13px;
}
.quiet:hover,
.icon-button:hover {
  background: #fff;
  border-color: #bfc3cd;
  box-shadow: 0 4px 12px #252b380d;
  transform: translateY(-1px);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.primary {
  color: #fff;
  background: linear-gradient(180deg, #35353b, #222228);
  border-color: #292930;
  border-radius: 999px;
  box-shadow:
    inset 0 1px #ffffff26,
    0 3px 8px #1d1d1f16;
}
.primary:hover {
  background: #414149;
}
input,
select,
.search-field input,
.login-dialog input,
.settings-card input,
.action-dialog input,
.action-dialog select,
.action-dialog textarea {
  background: #ffffffe0;
  color: #303039;
  border-color: #d9dbe3;
  accent-color: #4377bc;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #4377bc;
  outline-offset: 3px;
}
.card {
  background: #ffffffeb;
  border: 1px solid #ededf1;
  border-radius: var(--panel-radius);
  box-shadow:
    inset 0 1px #fff,
    0 2px 5px #1d1d1f03,
    0 16px 32px -25px #262c3a24;
}
/* Optical reflection follows the pointer without moving the interface. */
.overview-grid > .card,
.plan-card {
  background:
    radial-gradient(
      420px circle at var(--surface-x, 80%) var(--surface-y, -120px),
      #e7edf84d,
      transparent 70%
    ),
    linear-gradient(155deg, #fff 0%, #fffffff5 70%, #fbfbfd 100%);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.overview-grid > .card:hover {
  border-color: #d6dbe4;
  box-shadow:
    inset 0 1px #fff,
    0 4px 10px #252b3805,
    0 20px 40px -26px #2934472b;
}
.metric {
  padding: 24px;
  min-height: 135px;
}
.metric-label {
  font-size: 13px;
  color: #6e6e73;
  font-weight: 450;
}
.metric strong {
  color: #25252c;
  font-size: 30px;
  font-weight: 600;
}
.metric strong em {
  font-size: 12px;
  color: #737379;
}
.metric small {
  color: #718099;
  font-size: 11px;
}
.metric.green strong,
.metric.purple strong {
  color: #182031;
}
.app-main[data-page='overview'] .metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(930px, 80%);
  gap: 0;
  margin: 0 0 30px;
}
.app-main[data-page='overview'] .metric {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  padding: 0 28px;
}
.app-main[data-page='overview'] .metric:first-child {
  grid-column: 1/-1;
  padding: 0 0 25px;
}
.app-main[data-page='overview'] .metric:first-child .metric-label {
  font-size: 15px;
}
.app-main[data-page='overview'] .metric:first-child strong {
  color: #172539;
  font-size: clamp(54px, 4.7vw, 90px);
  line-height: 1.13;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 9px 0 0;
}
.app-main[data-page='overview'] .metric:first-child strong em {
  font-size: 18px;
  margin-left: 14px;
  letter-spacing: 0;
}
.app-main[data-page='overview'] .metric:not(:first-child) {
  border-left: 1px solid #e1e2e8;
  align-self: end;
}
.app-main[data-page='overview'] .metric:nth-child(2) {
  border: 0;
  padding-left: 0;
}
.app-main[data-page='overview'] .metric:not(:first-child) strong {
  font-size: 28px;
  line-height: 1.3;
  margin-top: 9px;
  letter-spacing: -0.035em;
}
.app-main[data-page='overview'] .metric small {
  display: none;
}
.overview-grid {
  grid-template-columns: minmax(0, 1fr) clamp(340px, 26vw, 600px);
  gap: 20px;
}
.overview-grid > * {
  min-width: 0;
}
.overview-grid > aside {
  display: flex;
  flex-direction: column;
  height: 0;
  min-height: 100%;
}
.card-heading {
  padding: 25px 26px 0;
  gap: 16px;
  min-height: 60px;
}
.card-heading h2,
.section-top h2 {
  color: #1d1d1f;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.chart-select {
  gap: 3px;
  padding: 4px;
  border: 1px solid #dedfe580;
  border-radius: 999px;
  background: #eaeaeeaa;
  box-shadow:
    inset 0 1px 3px #282c3605,
    0 1px #fff;
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
}
.chart-select button {
  font-size: 12px;
  padding: 8px 15px;
  color: #6e6e73;
  border-radius: 999px;
  transition:
    background 0.24s,
    color 0.24s,
    box-shadow 0.24s;
}
.chart-select button:hover {
  background: #ffffffaa;
  color: #233b5e;
}
.chart-select button.active,
.segments button.active {
  background: linear-gradient(160deg, #fff, #ffffffe0);
  color: #1d1d1f;
  font-weight: 600;
  box-shadow:
    inset 0 1px #fff,
    0 2px 6px #282d3c12,
    0 0 0 0.5px #ffffffb3;
}
.market-chart {
  height: var(--chart-height);
  margin: 8px 0 0;
}
.chart-foot {
  padding: 3px 26px 20px;
  font-size: 11px;
  color: #74839a;
}
.activity-list {
  padding: 12px 26px 20px;
  max-height: none;
  min-height: 0;
  overflow: auto;
  flex: 1;
}
.activity {
  position: relative;
  padding: 17px 0 17px 23px;
  gap: 4px 12px;
  border-color: #eaeaf0;
}
.activity::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 24px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1fb296;
  box-shadow: 0 0 0 4px #e3f6f0;
}
.activity:has(.purple)::before {
  background: #926bd4;
  box-shadow: 0 0 0 4px #eee8f8;
}
.activity time {
  grid-row: 2;
  font-size: 12px;
  color: #73737b;
}
.activity .event-name,
.activity .event-name.green,
.activity .event-name.purple {
  font-size: 14px;
  color: #2d3d56;
  font-weight: 550;
}
.activity strong {
  font-size: 16px;
  font-weight: 550;
  color: #272730;
  letter-spacing: -0.02em;
}
.activity small {
  font-size: 11px;
  color: #73737b;
}
.activity:hover {
  background: #f5f5f7a8;
}
.section-gap {
  margin-top: 25px;
}
.section-top {
  margin-bottom: 15px;
}
.table-scroll {
  scrollbar-color: #bfc3cc transparent;
}
th {
  background: #fafafccc;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 500;
  padding: 15px 24px;
  border-color: #e8e8ee;
}
td {
  font-size: 14px;
  padding: 19px 24px;
  color: #34343d;
  border-color: #ededf1;
}
td small {
  font-size: 11px;
  color: #73737b;
}
tbody tr {
  transition: background 0.22s;
}
tbody tr:hover {
  background: #f4f6fa;
}
.row-link {
  color: #1d2e48;
}
.row-link:hover,
.link-button {
  color: #3c6ca9;
}
.link-button {
  font-size: 12px;
}
.link-button:after {
  color: inherit;
}
.badge {
  font-size: 11px;
}
.badge:not(.red):not(.amber):not(.purple):not(.grey):not(.blue) {
  color: #087d68;
  background: #e8f6f0;
}
.tag {
  color: #61738e;
  background: #f7f9fd;
  border-color: #dfe7f1;
}
.plan-card {
  padding: 27px;
  gap: 25px;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
}
.plan-card:hover {
  transform: translateY(-3px);
  border-color: #d1d5df;
  box-shadow:
    0 16px 35px -22px #252d3a3d,
    inset 0 1px #fff;
}
.plan-card h3 {
  font-size: 18px;
}
.plan-card .plan-id {
  color: #78889c;
}
.plan-amount strong {
  color: #172237;
  font-size: 31px;
}
.plan-breakdown b {
  color: #2e415f;
}
.allocation-bar {
  background: #eaf0f7;
}
.allocation-bar .available {
  background: #40b59b;
}
.allocation-bar .deployed {
  background: #4377bc;
}
.allocation-bar .collateral {
  background: #a085d2;
}
.empty h3 {
  color: #34445e;
}
.empty p {
  color: #718099;
}
.empty .empty-icon {
  color: #718099;
  background: #f0f4fa;
  border-color: #dfe7f1;
}
.text-button,
.privacy-note,
.footnote,
.field-help {
  color: #687992;
}
.proof-card {
  background: #f5f5f7;
  border-color: #e5e5eb;
}
.proof-card dd {
  color: #34445e;
}
.proof-card a {
  color: #4377bc;
}
.proof-json {
  background: #edf2f9;
  color: #405571;
}
.sheet-handle {
  background: #cbd6e5;
}
.trace-stage strong {
  color: #455670;
}
.trace-stage small {
  color: #718099;
}
.trace-stage.done:before {
  background: #20a78a;
}
.trace-stage.active:before {
  background: #9470dd;
}
.detail-summary small,
.key-values small {
  color: #687992;
}
.detail-summary strong,
.key-values strong {
  color: #26334a;
}
.detail-heading h2 {
  color: #172033;
}
.action-summary {
  color: #52627c;
  background: #f1f5fb;
  border-color: #e1e8f2;
}
.action-summary strong {
  color: #172033;
}
.credential-secret {
  color: #34445e !important;
}
.action-dialog input[readonly] {
  background: #f2f5fa;
  color: #6a7890;
}
.action-dialog fieldset {
  border-color: #e1e8f2;
}
.pending-tasks > div {
  border-color: #e6ecf4;
}
.pending-card,
.detail-dialog .pending-card {
  background: #fffdf7;
  border-color: #eee5d3;
}
.task-count {
  background: #f5edda;
  color: #94651c;
}
.segments {
  background: #eaeaeeaa;
  border-color: #dedfe580;
  border-radius: 999px;
}
.form-notice {
  color: #94651c;
}
.page-notice {
  background: #fffbf2;
  border-color: #e9dcbc;
  color: #805e20;
}
#toast {
  background: #25334b;
  color: #fff;
  border-color: #3b4d69;
  box-shadow: 0 12px 40px #22344c26;
}
footer {
  padding: 22px var(--page-gutter);
  color: #86868b;
  background: #f5f5f7;
  border-color: #e5e5eb;
}
body > footer {
  background: transparent;
  border-color: transparent;
}
html,
.detail-dialog,
.action-dialog,
.trace-stages {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
.detail-dialog::-webkit-scrollbar,
.action-dialog::-webkit-scrollbar,
.trace-stages::-webkit-scrollbar {
  display: none;
}
dialog[open] {
  animation: dialog-reveal 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#refreshButton:disabled svg {
  animation: refresh-spin 0.8s linear infinite;
}
@keyframes dialog-reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes connection-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 #16a98b20;
  }
  50% {
    box-shadow: 0 0 0 4px #16a98b0c;
  }
}
@media (min-width: 1800px) {
  .app-header {
    min-height: 86px;
    gap: 48px;
  }
  .brand {
    font-size: 24px;
  }
  .brand img {
    width: 42px;
    height: 46px;
  }
  .nav-button {
    font-size: 16px;
    padding: 13px 22px;
  }
  .header-actions {
    font-size: 14px;
  }
  .live-state {
    font-size: 12px;
  }
  .app-main {
    padding-top: var(--content-top-gap);
  }
  .page-heading {
    margin-bottom: 35px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .chain-select {
    font-size: 14px;
  }
  .chain-select select {
    min-width: 280px;
    padding: 14px 18px;
  }
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .quiet {
    font-size: 14px;
    padding: 12px 18px;
  }
  .app-main[data-page='overview'] .metrics {
    width: 100%;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    align-items: end;
    margin-bottom: 40px;
  }
  .app-main[data-page='overview'] .metric:first-child {
    grid-column: auto;
    padding: 0 34px 0 0;
  }
  .app-main[data-page='overview'] .metric:first-child strong {
    font-size: clamp(70px, 4vw, 104px);
  }
  .app-main[data-page='overview'] .metric:first-child .metric-label {
    font-size: 17px;
  }
  .app-main[data-page='overview'] .metric:nth-child(2) {
    border-left: 1px solid #e1e2e8;
    padding-left: 38px;
  }
  .app-main[data-page='overview'] .metric:not(:first-child) {
    padding: 13px 38px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .app-main[data-page='overview'] .metric:not(:first-child) .metric-label {
    font-size: 15px;
  }
  .app-main[data-page='overview'] .metric:not(:first-child) strong {
    font-size: clamp(29px, 1.5vw, 39px);
    margin-top: 14px;
  }
  .app-main[data-page='overview'] .metric strong em {
    font-size: 15px;
  }
  .card-heading {
    padding: 29px 32px 0;
    min-height: 70px;
  }
  .card-heading h2,
  .section-top h2 {
    font-size: 24px;
  }
  .chart-select button {
    font-size: 14px;
    padding: 10px 18px;
  }
  .chart-foot {
    padding: 3px 32px 22px;
    font-size: 12px;
  }
  .overview-grid {
    gap: 26px;
  }
  .activity-list {
    padding: 12px 32px 20px;
  }
  .activity {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .activity::before {
    top: 28px;
  }
  .activity .event-name,
  .activity .event-name.green,
  .activity .event-name.purple {
    font-size: 16px;
  }
  .activity strong {
    font-size: 19px;
  }
  .activity time,
  .activity small {
    font-size: 13px;
  }
  th {
    font-size: 14px;
    padding: 17px 28px;
  }
  td {
    font-size: 16px;
    padding: 20px 28px;
  }
  td small {
    font-size: 12px;
  }
  .badge,
  .tag {
    font-size: 12px;
  }
  .link-button {
    font-size: 14px;
  }
  .section-gap {
    margin-top: 30px;
  }
  .plan-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .plan-card h3 {
    font-size: 21px;
  }
  .detail-dialog {
    width: min(1500px, calc(100% - 100px));
    max-width: 1500px;
  }
  .detail-heading h2 {
    font-size: 29px;
  }
  .detail-summary small,
  .key-values small {
    font-size: 13px;
  }
  .detail-summary strong {
    font-size: 28px;
  }
  .detail-section h3 {
    font-size: 17px;
  }
  .proof-card dt {
    font-size: 12px;
  }
  .proof-card dd {
    font-size: 13px;
  }
  .privacy-note,
  .footnote {
    font-size: 13px;
  }
  .key-values strong {
    font-size: 14px;
  }
  .plan-card .plan-id,
  .plan-breakdown small {
    font-size: 12px;
  }
  .plan-breakdown b {
    font-size: 15px;
  }
  .plan-amount strong {
    font-size: 36px;
  }
}
@media (max-width: 1300px) {
  .app-header {
    gap: 22px;
  }
  .nav-button {
    padding: 11px 12px;
    font-size: 13px;
  }
  .brand {
    font-size: 19px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 16px;
  }
  .card-heading {
    padding: 23px 21px 0;
  }
  .chart-select button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .app-main[data-page='overview'] .metrics {
    width: min(850px, 100%);
  }
  .app-main[data-page='overview'] .metric:not(:first-child) strong {
    font-size: 25px;
  }
}
@media (max-width: 1000px) {
  .app-header {
    padding-top: 16px;
    gap: 0 20px;
  }
  .app-header nav {
    gap: 5px;
    flex-basis: 100%;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .overview-grid > aside {
    height: auto;
    min-height: 0;
    max-height: 360px;
  }
  .activity-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
    max-height: 280px;
  }
  .app-main[data-page='overview'] .metrics {
    width: 100%;
  }
  .app-main {
    padding-top: var(--content-top-gap);
  }
}
@media (max-width: 600px) {
  :root {
    --page-gutter: 16px;
    --chart-height: 280px;
    --panel-radius: 23px;
  }
  .app-header {
    min-height: 0;
    padding: 15px 16px 0;
    gap: 0 12px;
  }
  .brand {
    font-size: 18px;
  }
  .brand img {
    width: 31px;
    height: 35px;
  }
  .nav-button {
    font-size: 12px;
    padding: 10px 13px;
  }
  .app-header nav {
    margin: 17px 0 12px;
  }
  .app-main {
    padding: var(--content-top-gap) 16px 38px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 25px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-tools {
    width: 100%;
    padding: 0;
    gap: 11px;
  }
  .chain-select {
    flex: 1;
  }
  .chain-select select {
    min-width: 0;
    max-width: none;
    width: 100%;
    font-size: 12px;
    padding: 12px;
  }
  .page-tools .icon-button {
    width: 39px;
    height: 39px;
  }
  body {
    background-size: 100% 680px;
  }
  .app-main[data-page='overview'] .metrics {
    grid-template-columns: 1fr;
    margin-bottom: 25px;
  }
  .app-main[data-page='overview'] .metric:first-child {
    padding: 0 0 22px;
  }
  .app-main[data-page='overview'] .metric:first-child strong {
    font-size: clamp(36px, 10.6vw, 52px);
  }
  .app-main[data-page='overview'] .metric:first-child strong em {
    font-size: 14px;
    margin-left: 8px;
  }
  .app-main[data-page='overview'] .metric:not(:first-child) {
    padding: 8px 0;
    border: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }
  .app-main[data-page='overview'] .metric:not(:first-child) strong {
    font-size: 21px;
    margin: 0;
  }
  .metric-label {
    font-size: 12px;
  }
  .card-heading {
    padding: 20px 18px 0;
    min-height: 0;
  }
  .card-heading h2,
  .section-top h2 {
    font-size: 18px;
  }
  .chart-select {
    width: 100%;
    padding: 3px;
  }
  .chart-select button {
    font-size: 11px;
  }
  .chart-foot {
    padding: 3px 18px 18px;
    font-size: 10px;
  }
  .activity-list {
    display: block;
    padding: 10px 18px 18px;
    max-height: 310px;
  }
  .overview-grid > aside {
    max-height: 370px;
  }
  .activity {
    padding: 16px 0 16px 22px;
  }
  .activity::before {
    top: 23px;
  }
  .activity .event-name,
  .activity .event-name.green,
  .activity .event-name.purple {
    font-size: 13px;
  }
  .activity time,
  .activity small {
    font-size: 11px;
  }
  .activity strong {
    font-size: 14px;
  }
  th {
    font-size: 11px;
    padding: 13px 16px;
  }
  td {
    font-size: 12px;
    padding: 16px;
  }
  td small {
    font-size: 10px;
  }
  .metric strong {
    font-size: 23px;
  }
  .detail-summary strong {
    font-size: 20px;
  }
  .detail-summary em {
    display: block;
    margin: 3px 0 0;
  }
  .detail-dialog {
    padding: 9px 18px 25px;
  }
  .detail-heading h2 {
    font-size: 20px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-card label,
  .action-dialog label,
  .login-dialog label {
    font-size: 12px;
  }
  .action-dialog input,
  .action-dialog select,
  .action-dialog textarea {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.nav-button:focus-visible {
  outline-offset: -3px;
}

/* Finish details: neutral content surfaces, glass controls and graphite typography. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .app-main[data-page='overview'] .metric:first-child strong {
    background-image: linear-gradient(115deg, #152235 4%, #355c86 55%, #172337 94%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
}
.chain-select select {
  border-radius: 999px;
  border-color: #dedfe5;
  background-color: #ffffff8f;
  box-shadow:
    inset 0 1px #fff,
    0 2px 7px #272d3805;
}
.metric strong em {
  color: #737379;
}
.activity .event-name.green {
  color: #2d6f61;
}
.activity .event-name.purple {
  color: #7a5c9f;
}
.activity-list {
  mask-image: linear-gradient(#000 0%, #000 calc(100% - 16px), transparent 100%);
}
.segments button {
  border-radius: 999px;
}
dialog {
  background: linear-gradient(145deg, #fffffffa, #fafafcf5);
  border-color: #ffffffdb;
  box-shadow:
    inset 0 1px #fff,
    0 24px 90px #1d26384a;
}
dialog::backdrop {
  background: #20232e40;
  backdrop-filter: blur(10px) saturate(110%);
}
.detail-dialog {
  border-radius: 32px;
}
.login-dialog,
.action-dialog {
  border-radius: 28px;
}
.detail-section .card {
  background: #f9f9fb;
  border-color: #e8e8ee;
  box-shadow: none;
}
.detail-section th {
  background: #f3f3f6;
}
.detail-section td {
  background: transparent;
}
.proof-json {
  background: #efeff4;
  color: #4b5365;
}
@media (max-width: 600px) {
  .detail-dialog {
    border-radius: 28px 28px 0 0;
  }
  .chart-select button {
    background: transparent;
  }
  .chart-select button.active {
    background: #fff;
  }
}
@media (forced-colors: active) {
  .app-main[data-page='overview'] .metric:first-child strong {
    background: none;
    color: CanvasText;
  }
  .chart-select button.active,
  .nav-button.active {
    outline: 1px solid Highlight;
  }
}

/* Liquid glass controls: clear edges and transmitted light over matte content. */
:root {
  --glass-fill: linear-gradient(155deg, #ffffffbf 0%, #ffffff52 48%, #dfe8f24d 100%);
  --glass-edge: #ffffffdb;
  --glass-shadow:
    inset 0 1px 1px #fff, inset 1px 0 1px #ffffffbd, inset 0 -1px 1px #7b91ad33,
    0 3px 8px #25334a09, 0 12px 24px -18px #3449654a;
}
.app-header {
  background: linear-gradient(115deg, #ffffff66, #ffffff26 55%, #edf3fc33);
  border-bottom-color: #a8bfd526;
  box-shadow:
    inset 0 1px #ffffff80,
    0 6px 24px -22px #43536e26;
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  backdrop-filter: blur(24px) saturate(155%);
}
.nav-button {
  border-radius: 999px;
  transition:
    background 0.24s,
    box-shadow 0.24s,
    color 0.24s,
    transform 0.24s;
}
.nav-button.active,
.nav-button.active:hover {
  background:
    radial-gradient(ellipse at 25% 0%, #ffffffed, transparent 65%),
    linear-gradient(140deg, #ffffffa8, #d6e5f59c 56%, #eae3f363);
  border-color: var(--glass-edge);
  box-shadow: var(--glass-shadow);
  color: #1d304a;
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  backdrop-filter: blur(16px) saturate(165%);
}
.chart-select,
.segments {
  background: linear-gradient(155deg, #d9e1eb52, #ffffff63 48%, #cbd7e34a);
  border-color: #ffffffcf;
  box-shadow:
    inset 0 1px 3px #5d718b17,
    inset 0 -1px #fff,
    0 0 0 1px #a7b4c21c;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.chart-select button.active,
.segments button.active {
  background: radial-gradient(ellipse at 25% 0%, #fff, transparent 78%), var(--glass-fill);
  box-shadow:
    var(--glass-shadow),
    0 0 0 0.5px #ffffffd9;
  color: #213148;
}
.quiet,
.icon-button,
.chain-select select {
  background: var(--glass-fill);
  border-color: var(--glass-edge);
  box-shadow:
    var(--glass-shadow),
    0 0 0 0.5px #879ab329;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}
.quiet:hover,
.icon-button:hover,
.chain-select select:hover {
  background: linear-gradient(145deg, #fffffff0, #e7eff9a8 65%, #ede8f694);
  border-color: #fff;
  box-shadow:
    var(--glass-shadow),
    0 5px 15px #38537614;
}
.nav-button:active:not(:disabled),
.chart-select button:active:not(:disabled),
.quiet:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: scale(0.97);
}
dialog {
  background: linear-gradient(135deg, #fffffff2, #f7f9fce8 65%, #eef2f8e8);
  border: 1px solid #fffffff0;
  box-shadow:
    inset 0 1px 1px #fff,
    inset 1px 0 1px #fff,
    inset 0 -1px 1px #92a5bf66,
    0 0 0 1px #bac8dc3b,
    0 30px 100px #20304740;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
dialog::backdrop {
  background: #26344830;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.sheet-handle {
  background: #a9b6c080;
  box-shadow:
    inset 0 1px #6c829126,
    0 1px #fff;
}
@supports not (backdrop-filter: blur(1px)) {
  .app-header {
    background: #f8fafff5;
  }
  .quiet,
  .icon-button,
  .chain-select select {
    background: #f5f8fc;
  }
  dialog {
    background: #fafbfd;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .app-header,
  dialog {
    background: #fafbfd;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .quiet,
  .icon-button,
  .chain-select select,
  .chart-select,
  .segments {
    background: #edf2f8;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* A modal freezes decorative backgrounds instead of compositing invisible motion. */
body:has(dialog[open])::before,
body:has(dialog[open])::after,
body:has(dialog[open]) > .app-background-fold {
  animation-play-state: paused;
}

/* The border retains its width so switching the sticky background never shifts layout. */
.app-header:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Native customizable selects retain platform focus, keyboard and change events. */
@supports (appearance: base-select) {
  select,
  select::picker(select) {
    appearance: base-select;
  }
  select {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-radius: 18px;
    padding: 11px 15px;
    cursor: pointer;
    background: var(--glass-fill);
    border: 1px solid var(--glass-edge);
    box-shadow:
      var(--glass-shadow),
      0 0 0 0.5px #879ab329;
  }
  select::picker-icon {
    color: #718198;
    width: 14px;
    font-size: 12px;
    transition: rotate 0.2s;
  }
  select:open::picker-icon {
    rotate: 180deg;
  }
  select:focus-visible {
    outline: 2px solid #4377bc80;
    outline-offset: 2px;
  }
  select::picker(select) {
    margin-block: 8px;
    padding: 6px;
    min-width: anchor-size(width);
    max-height: min(360px, 60vh);
    overflow-y: auto;
    border: 1px solid #fffffff0;
    border-radius: 20px;
    background: linear-gradient(145deg, #fffffff5, #f2f6fbed);
    color: #26364b;
    font: inherit;
    box-shadow:
      inset 0 1px #fff,
      0 0 0 1px #aabbd333,
      0 10px 32px #253d5b26,
      0 3px 8px #253d5b0d;
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    backdrop-filter: blur(24px) saturate(145%);
  }
  select option {
    min-height: 40px;
    padding: 11px 13px;
    gap: 14px;
    border-radius: 14px;
    color: #34455c;
    font-size: 13px;
    font-weight: 450;
    transition:
      background 0.15s,
      color 0.15s;
  }
  select option:hover,
  select option:focus {
    background: #dfe9f780;
    color: #1e385b;
  }
  select option:focus-visible {
    outline: 2px solid #4377bc66;
    outline-offset: -2px;
  }
  select option:checked {
    background: linear-gradient(135deg, #e4edf9d9, #e9e9f5b3);
    color: #213d61;
    font-weight: 550;
  }
  select option::checkmark {
    order: 1;
    margin-left: auto;
    color: #4377bc;
    font-size: 13px;
  }
  select:disabled {
    opacity: 0.5;
    cursor: default;
  }
  @media (prefers-reduced-transparency: reduce) {
    select::picker(select) {
      background: #f8faff;
      backdrop-filter: none;
    }
  }
}
/* Bounded detail workspace. */
#detailDialog.detail-dialog {
  position: fixed;
  inset: 0;
  width: calc(100vw - clamp(32px, 5vw, 128px));
  max-width: 1920px;
  height: calc(100dvh - clamp(32px, 6vh, 72px));
  max-height: 1100px;
  margin: auto;
  padding: 0;
  border: 1px solid #ffffffd9;
  border-radius: 28px;
  overflow: hidden;
  background: #f8fafd;
  box-shadow:
    0 36px 100px -35px #22395755,
    0 8px 26px -12px #263d5e26,
    inset 0 1px #fff;
}
#detailDialog[open] {
  display: flex;
  flex-direction: column;
  animation: workspace-enter 0.18s ease-out;
}
@keyframes workspace-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
#detailDialog > .sheet-handle {
  display: none;
}
#detailDialog > .detail-heading {
  flex: 0 0 auto;
  margin: 0;
  padding: 20px clamp(20px, 3vw, 56px);
  gap: 25px;
  border-bottom: 1px solid #dee6f0;
  background: #ffffffd9;
  backdrop-filter: none;
}
#detailDialog .detail-heading > div {
  min-width: 0;
  flex: 1;
}
#detailDialog .detail-heading h2 {
  font-size: 22px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#detailDialog .detail-heading .eyebrow {
  font-size: 10px;
  color: #798ba3;
  letter-spacing: 0.04em;
}
.detail-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  background: #eaf0f680;
  border: 1px solid #e1e8f2;
  border-radius: 30px;
}
.detail-tabs button {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 12px;
  color: #78889d;
}
.detail-tabs button.active {
  color: #3466a3;
  background: #fff;
  box-shadow:
    0 2px 8px #42638a0c,
    inset 0 0 0 1px #e7eef7;
}
#detailContent {
  min-height: 0;
  flex: 1;
  padding: 20px clamp(20px, 3vw, 56px);
  overflow: auto;
  scrollbar-gutter: stable;
}
#detailContent.is-graph {
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
}
.detail-records {
  height: 100%;
  min-height: 0;
}
/* Preserve the original detail-records -> business-link height contract through
   the API graph host so the inspector, not the entire diagram, scrolls. */
.detail-records > .bounded-relation-graph {
  height: 100%;
  min-height: 0;
}
@media (min-width: 1001px) {
  .detail-summary.trace-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
}
.detail-back {
  margin: 0 0 20px;
}
@media (max-width: 700px) {
  #detailDialog.detail-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
    max-height: none;
    border-radius: 22px;
  }
  #detailDialog > .detail-heading {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  #detailDialog .detail-heading h2 {
    font-size: 18px;
  }
  .detail-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .detail-tabs button {
    flex: 1;
    padding: 8px 16px;
  }
  #detailContent {
    padding: 12px 16px;
  }
}

.tree-other-roots .tree-icon {
  width: 11px;
  height: 11px;
}
@media (max-width: 600px) {
  .tree-other-roots {
    top: 12px;
    right: 12px;
    bottom: auto;
    font-size: 10px;
    padding: 6px 9px;
  }
}
#detailContent {
  scrollbar-width: none;
}
#detailContent::-webkit-scrollbar {
  display: none;
}

/* Scope controls share the existing glass treatment and keep chart height stable. */
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px 0;
  min-height: 54px;
}
.chart-toolbar .chart-modes {
  width: auto;
  flex: none;
  padding: 3px;
}
.chart-modes button {
  min-width: 56px;
  padding: 6px 12px;
  font-size: 11px;
  flex: none;
}
#chartRangeLabel {
  font-size: 11px;
  color: #74839a;
  text-align: right;
}
.daily-tip-date {
  font-weight: 600;
  margin-bottom: 8px;
}
.daily-tip-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #eef4fb;
  color: #315f98;
  font-size: 12px;
}
.daily-tip-button:hover {
  background: #e3edf9;
}
html:has(#intradayDialog[open]) {
  overflow: hidden;
}
.intraday-dialog {
  position: fixed;
  inset: auto 0 20px;
  width: min(1320px, calc(100% - 48px));
  max-width: 1320px;
  max-height: calc(100dvh - 40px);
  margin: 0 auto;
  padding: 12px 32px 20px;
  border: 1px solid #ffffffd9;
  border-radius: 30px;
  overflow: auto;
  scrollbar-width: none;
  background: linear-gradient(145deg, #fffffff5, #f7faffeb);
  box-shadow:
    0 30px 100px #2634483d,
    inset 0 1px #fff;
}
.intraday-dialog::-webkit-scrollbar {
  display: none;
}
.intraday-dialog .sheet-handle {
  margin: 0 auto 19px;
  width: 44px;
  height: 4px;
  background: #c9d2de;
  border-radius: 4px;
}
.intraday-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.intraday-heading h2 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #25334c;
  margin-top: 7px;
}
.intraday-heading .eyebrow {
  letter-spacing: 0.04em;
  font-size: 11px;
}
.intraday-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.intraday-controls .icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #ffffff8f;
  box-shadow:
    inset 0 1px #fff,
    0 2px 8px #253a5810;
}
.intraday-controls svg {
  display: block;
  width: 17px;
  height: 17px;
}
.intraday-close {
  margin-left: 12px;
}
.intraday-summary {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 7px;
}
.intraday-summary small {
  display: block;
  font-size: 11px;
  color: #78859a;
  margin-bottom: 9px;
}
.intraday-main-value {
  margin-right: auto;
}
.intraday-summary strong {
  font-size: 34px;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: #25334c;
  font-variant-numeric: tabular-nums;
}
.intraday-summary em {
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  margin-left: 9px;
  color: #78859a;
}
.intraday-summary b {
  font-size: 17px;
  font-weight: 550;
  color: #455a78;
  font-variant-numeric: tabular-nums;
}
.intraday-chart {
  height: clamp(240px, 39dvh, 390px);
  width: 100%;
  position: relative;
}
@media (max-width: 600px) {
  .intraday-dialog {
    inset: auto 0 8px;
    width: calc(100% - 16px);
    max-height: calc(100dvh - 24px);
    padding: 12px 16px 16px;
    border-radius: 26px;
  }
  .intraday-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 21px;
  }
  .intraday-heading h2 {
    font-size: 17px;
    line-height: 1.5;
    max-width: 190px;
  }
  .intraday-heading .eyebrow {
    font-size: 9px;
  }
  .intraday-controls {
    gap: 5px;
  }
  .intraday-controls .icon-button {
    width: 29px;
    height: 29px;
  }
  .intraday-controls svg {
    width: 14px;
    height: 14px;
  }
  .intraday-close {
    margin-left: 3px;
  }
  .intraday-summary {
    gap: 16px;
    flex-wrap: wrap;
  }
  .intraday-main-value {
    flex: 1 0 100%;
    margin: 0 0 4px;
  }
  .intraday-summary strong {
    font-size: 30px;
  }
  .intraday-summary b {
    font-size: 14px;
  }
  .intraday-chart {
    height: 280px;
  }
}
@media (max-width: 600px) {
  .chart-toolbar {
    padding: 12px 18px 0;
    gap: 8px;
  }
  .chart-toolbar .chart-modes {
    width: auto;
  }
  .chart-modes button {
    min-width: 48px;
    padding: 6px 10px;
  }
  #chartRangeLabel {
    font-size: 10px;
  }
}

/* Platform overview: period activity and balance are deliberately different measures. */
.overview-chart-card {
  container-type: inline-size;
}
.trend-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 26px 8px;
  min-height: 104px;
}
.trend-main > span,
.trend-stats span {
  display: block;
  color: #7a8494;
  font-size: 11px;
  line-height: 1.5;
}
.trend-main strong {
  display: block;
  margin-top: 7px;
  color: #21334b;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trend-main em {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: #7a8494;
  margin-left: 8px;
  letter-spacing: 0;
}
.trend-stats {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  padding-bottom: 4px;
}
.trend-stats > div {
  min-width: 65px;
}
.trend-stats b {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 550;
  color: #425770;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trend-stats small {
  font-size: 10px;
  font-weight: 400;
  margin-left: 5px;
  color: #8390a2;
}
.platform-chart {
  height: clamp(340px, 34dvh, 490px);
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0 26px 12px;
  font-size: 11px;
  color: #778398;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chart-legend span:before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--series-color, #4377bc);
}
.chart-legend .line-key:before {
  width: 16px;
  height: 2px;
  border-radius: 1px;
}
.chart-tip-flows {
  border-top: 1px solid #e7edf4;
  margin-top: 8px;
  padding-top: 6px;
}
.chart-tip-flows small {
  color: #8491a5;
}
.fulfillment-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 22px 28px;
  gap: 18px;
}
.fulfillment-stat {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #778398;
  font-size: 12px;
}
.fulfillment-stat + .fulfillment-stat {
  border-left: 1px solid #e5eaf1;
  padding-left: 24px;
}
.fulfillment-stat strong {
  color: #304762;
  font-weight: 550;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.fulfillment-stat small {
  font-size: 10px;
  font-weight: 400;
  color: #8c97a6;
  margin-left: 5px;
}
.fulfillment-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b3c7;
  box-shadow: 0 0 0 4px #a5b3c712;
}
.delivering .fulfillment-mark {
  background: #5485c9;
}
.received .fulfillment-mark {
  background: #2caa92;
}
.returning .fulfillment-mark {
  background: #c38d57;
}
.intraday-summary {
  column-gap: 30px;
}
.intraday-summary b {
  white-space: nowrap;
}
@container (max-width:650px) {
  .trend-summary {
    flex-wrap: wrap;
    gap: 18px;
    min-height: 156px;
  }
  .trend-main {
    flex: 1 0 100%;
  }
  .trend-stats {
    width: 100%;
    justify-content: space-between;
    gap: 15px;
  }
}
@media (max-width: 800px) {
  .fulfillment-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    padding: 24px;
  }
  .fulfillment-stat + .fulfillment-stat {
    border: 0;
    padding: 0;
  }
}
@media (max-width: 600px) {
  .trend-summary {
    padding: 20px 18px 6px;
    min-height: 156px;
    gap: 17px;
  }
  .trend-main strong {
    font-size: 31px;
  }
  .trend-stats span {
    font-size: 10px;
  }
  .trend-stats b {
    font-size: 12px;
  }
  .trend-stats {
    gap: 12px;
  }
  .trend-stats > div {
    min-width: 0;
  }
  .platform-chart {
    height: 335px;
  }
  .chart-legend {
    padding: 0 18px 11px;
    gap: 10px 15px;
    font-size: 10px;
  }
  .overview-chart-card .chart-foot {
    font-size: 9px;
    line-height: 1.7;
  }
  .fulfillment-overview {
    padding: 20px 18px;
    gap: 20px;
  }
  .fulfillment-stat {
    gap: 8px;
    font-size: 11px;
  }
  .fulfillment-stat strong {
    font-size: 21px;
  }
  .intraday-summary {
    column-gap: 20px;
    row-gap: 14px;
  }
  .intraday-summary b {
    font-size: 13px;
  }
  .intraday-chart {
    height: 330px;
  }
}

.intraday-dialog .chart-legend {
  padding: 0 0 3px;
}

/* Repayment ageing is separate from goods fulfillment. */
.badge.blue {
  color: #326ca6;
  background: #eaf3ff;
}
.order-repayment-cell {
  min-width: 145px;
}
.order-repayment-cell time {
  font-variant-numeric: tabular-nums;
}
.repayment-summary {
  padding: 17px 20px;
  margin: 0 0 22px;
  border: 1px solid #dce7f3;
  border-radius: 16px;
  background: #ffffffa8;
}
.repayment-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.repayment-summary-main small {
  display: block;
  font-size: 12px;
  color: #657b9b;
  margin-bottom: 6px;
}
.repayment-summary-main strong {
  font-size: 18px;
  font-weight: 600;
  color: #233d62;
  font-variant-numeric: tabular-nums;
}
.repayment-warning {
  margin: 12px 0 0;
  color: #b63852;
  font-size: 12px;
  line-height: 1.7;
}
.repayment-summary:has(.badge.red) {
  background: #fff6f7b8;
  border-color: #f0cdd5;
}
.link-repayment {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.link-repayment small {
  font-size: 12px;
  color: #5d789f;
}
.link-repayment .badge {
  font-size: 11px;
}
.link-repayment:has(.red) {
  padding: 9px 11px;
  border: 1px solid #f1d3da;
  border-radius: 10px;
  background: #fff6f8b8;
}
@media (max-width: 600px) {
  .repayment-summary {
    padding: 14px 16px;
  }
  .repayment-summary-main strong {
    font-size: 17px;
  }
  .link-repayment {
    margin-bottom: 10px;
  }
}

.settings-card textarea {
  box-sizing: border-box;
  resize: vertical;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
}
.settings-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.overview-record-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: #7a899d;
}
.overview-record-pagination > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.overview-record-pagination .quiet {
  min-height: 38px;
}
.overview-record-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.overview-record-amount.increase {
  color: #477cb9;
}
.overview-record-amount.decrease {
  color: #228b79;
}
.overview-retail-item {
  display: block;
  margin-bottom: 7px;
}
.overview-retail-item:last-child {
  margin-bottom: 0;
}
.orders-fulfillment {
  margin-bottom: 26px;
}
.orders-fulfillment .section-top {
  margin-bottom: 12px;
}
.orders-fulfillment h2 {
  font-size: 17px;
}
@media (max-width: 700px) {
  .overview-record-pagination {
    flex-wrap: wrap;
  }
  .overview-record-pagination > div {
    width: 100%;
    justify-content: space-between;
  }
  .orders-fulfillment .section-top {
    align-items: flex-start;
    gap: 10px;
  }
  .orders-fulfillment .filter-count {
    text-align: right;
    line-height: 1.6;
  }
}

/* One global chain scope, shared by every module and retained across routes. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: 'brand navigation scope actions';
  column-gap: 16px;
  align-items: center;
}
.app-header > .brand {
  grid-area: brand;
}
.app-header > nav {
  grid-area: navigation;
  width: auto;
  margin: 0;
}
.app-header > .header-actions {
  grid-area: actions;
  margin: 0;
  gap: 10px;
}
.global-chain-tools {
  grid-area: scope;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.global-chain-tools .chain-select {
  min-width: 0;
}
.global-chain-tools .chain-select > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.global-chain-tools select {
  width: 176px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 28px 10px 13px;
  font-size: 12px;
  text-overflow: ellipsis;
}
.global-chain-tools .icon-button {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 8px;
}
.global-chain-tools .icon-button svg {
  display: block;
  width: 16px;
  height: 16px;
}
.global-scope-state {
  padding: 32px 22px;
  min-height: 240px;
}
@media (min-width: 1401px) {
  .app-header .brand {
    font-size: 18px;
  }
  .app-header .nav-button {
    padding: 11px 12px;
    font-size: 13px;
  }
  .app-header .live-state {
    display: none;
  }
}
@media (min-width: 601px) and (max-width: 1400px) {
  .app-header {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: 'brand scope actions' 'navigation navigation navigation';
    padding-top: 10px;
    row-gap: 5px;
  }
  .app-header > nav {
    padding: 3px 0 7px;
  }
  .app-header .nav-button {
    padding: 9px 13px;
  }
  .global-chain-tools select {
    width: 200px;
  }
}
@media (max-width: 600px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand actions' 'scope scope' 'navigation navigation';
    gap: 7px 10px;
    padding: 10px 16px 0;
  }
  .global-chain-tools .chain-select {
    flex: 1;
  }
  .global-chain-tools select {
    width: 100%;
    padding-block: 8px;
  }
  .app-header > nav {
    min-width: 0;
    padding: 1px 0 7px;
  }
  .app-header .nav-button {
    padding: 9px 12px;
  }
  .app-header #identity {
    max-width: 70px;
  }
  .app-header .text-button {
    font-size: 11px;
    padding-inline: 4px;
  }
  .app-main {
    padding-top: var(--content-top-gap);
  }
}

/* Fund modest outer insets with compact chain controls, preserving navigation density. */
@media (min-width: 601px) {
  .app-header {
    padding-inline: 20px;
  }
  .global-chain-tools select {
    width: 168px;
  }
  .app-header > .header-actions {
    margin-left: -8px;
    gap: 8px;
  }
}
@media (min-width: 601px) and (max-width: 1400px) {
  .app-header.has-room-for-single-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: 'brand navigation scope actions';
  }
}
.app-header #identity:empty {
  display: none;
}
.global-chain-tools select {
  gap: 8px;
  padding-right: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.global-chain-tools select > button {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.global-chain-tools selectedcontent {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-chain-tools select::picker-icon {
  flex: 0 0 10px;
}

/* One shared content inset, independent of the header's internal layout. */
@media (min-width: 1750px) {
  :root {
    --content-top-gap: 28px;
  }
}
@media (max-width: 1150px) {
  :root {
    --content-top-gap: 16px;
  }
}
@media (max-width: 600px) {
  :root {
    --content-top-gap: 12px;
  }
}

/* One inert, bounded scene snapshot; never retain a module table or the shared top bar. */
.content-motion-ghost {
  position: fixed;
  z-index: 5;
  pointer-events: none !important;
  user-select: none;
  contain: layout paint style;
  overflow: clip;
}
.content-motion-ghost *,
.content-motion-ghost *::before,
.content-motion-ghost *::after {
  pointer-events: none !important;
  animation-play-state: paused !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .content-motion-ghost {
    display: none;
  }
}

/* Plan-associated orders use the order number as their sole detail entry. */
[data-plan-orders] .row-link {
  color: #1766ac;
  text-decoration: underline;
  text-decoration-color: #91b9de;
  text-underline-offset: 3px;
}
[data-plan-orders] .row-link:hover {
  color: #104d86;
  text-decoration-color: currentColor;
}
[data-plan-orders] .row-link:focus-visible {
  outline: 2px solid #2779bc;
  outline-offset: 3px;
  border-radius: 3px;
}

.proof-detail-button {
  width: 100%;
  margin-top: 20px;
  min-height: 36px;
}

/* Batch navigation belongs to the batch column, without a duplicate action column. */
.order-goods-table th,
.order-goods-table td {
  padding-left: 16px;
  padding-right: 16px;
}
.order-goods-table td:nth-child(1),
.order-goods-table td:nth-child(2) {
  min-width: 140px;
  max-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-goods-table td:nth-child(3) {
  min-width: 190px;
  max-width: 290px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-goods-table .row-link {
  color: #3c6ca9;
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-goods-table .row-link:hover {
  text-decoration: underline;
}
.order-goods-table .row-link:focus-visible {
  outline: 2px solid #397fea;
  outline-offset: 3px;
  border-radius: 3px;
}

.claim-help {
  margin: 12px 0;
  color: #58749c;
  font-size: 12px;
}
.claim-help summary,
.claim-history summary {
  cursor: pointer;
  padding: 8px 0;
}
.claim-help p {
  max-width: 64em;
  line-height: 1.7;
}
.claim-history {
  margin-top: 14px;
}
.order-retail-table td:first-child {
  min-width: 190px;
  max-width: 290px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-retail-table .row-link {
  overflow-wrap: anywhere;
  white-space: normal;
  color: #3c6ca9;
}
.order-retail-table .row-link:focus-visible {
  outline: 2px solid #397fea;
  outline-offset: 3px;
  border-radius: 3px;
}

.order-claim-table td,
.order-claim-table th {
  padding-left: 14px;
  padding-right: 14px;
}
.order-claim-table td:first-child {
  min-width: 170px;
  max-width: 270px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-claim-table td:nth-child(2) {
  min-width: 130px;
  max-width: 210px;
  white-space: normal;
}
.order-claim-table .row-link {
  color: #3c6ca9;
  white-space: normal;
  overflow-wrap: anywhere;
}
.order-claim-table .row-link:focus-visible {
  outline: 2px solid #397fea;
  outline-offset: 3px;
  border-radius: 3px;
}

/* Own-portfolio presentation; all selectors stay inside this page. */
.asset-portfolio {
  min-width: 0;
}
.asset-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 20px;
}
.asset-profile strong {
  font-size: 15px;
  font-weight: 600;
}
.asset-profile > span {
  font-size: 12px;
  color: var(--muted);
}
.asset-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.asset-metric {
  min-height: 118px;
  padding: 21px 22px;
}
.asset-metric > span {
  font-size: 12px;
  color: #52647e;
}
.asset-metric strong {
  display: block;
  margin-top: 15px;
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -0.035em;
}
.asset-metric em {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0;
}
.asset-reconciliation,
.asset-income {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 16px 2px 0;
}
.asset-reconciliation > div,
.asset-income > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.asset-reconciliation dt,
.asset-income dt {
  font-size: 11px;
  color: #61728a;
}
.asset-reconciliation dd,
.asset-income dd {
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.asset-income {
  padding-top: 12px;
  border-top: 1px solid #dce5ef;
}
.asset-section {
  margin-top: 28px;
}
.asset-section > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}
.asset-section > header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}
.asset-section > header > span {
  font-size: 10px;
  color: var(--muted);
}
.asset-positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.asset-position {
  padding: 18px 20px;
}
.asset-position > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.asset-position > header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.asset-position-kind {
  font-size: 10px;
  color: #4e6381;
  background: #e9f0f8;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.asset-position > p {
  margin: 12px 0 18px;
  font-size: 11px;
  color: #61728a;
  overflow-wrap: anywhere;
}
.asset-position dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.asset-position dt,
.asset-investment dt {
  font-size: 11px;
  color: #61728a;
}
.asset-position dd,
.asset-investment dd {
  margin: 7px 0 0;
  font-size: 17px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.asset-investments {
  display: grid;
  gap: 12px;
}
.asset-investment {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(0, 3fr);
  gap: 24px;
  padding: 20px;
}
.asset-investment > header > span {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  color: var(--muted);
}
.asset-investment > header > div {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.asset-investment dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.asset-investment dd {
  font-size: 14px;
}
.asset-portfolio .asset-loss dd {
  color: #ad3d36;
}
.asset-zero {
  margin-top: 12px;
}
.asset-zero > summary {
  padding: 10px 3px;
  cursor: pointer;
  font-size: 11px;
  color: #52647e;
}
.asset-zero .asset-position {
  background: #ffffff9e;
}
.asset-empty {
  padding: 18px 20px;
  margin: 0;
  border-radius: 14px;
  background: #ffffff9e;
  color: #61728a;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .asset-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .asset-investment {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
@media (max-width: 600px) {
  .asset-profile {
    margin-bottom: 16px;
  }
  .asset-summary {
    gap: 10px;
  }
  .asset-metric {
    min-height: 111px;
    padding: 17px 14px;
  }
  .asset-metric strong {
    font-size: clamp(16px, 4.5vw, 24px);
  }
  .asset-metric em {
    display: block;
    margin: 5px 0 0;
  }
  .asset-reconciliation,
  .asset-income {
    gap: 8px 18px;
  }
  .asset-positions {
    grid-template-columns: 1fr;
  }
  .asset-position {
    padding: 16px;
  }
  .asset-position > header {
    flex-wrap: wrap;
  }
  .asset-investment {
    padding: 16px;
  }
  .asset-investment dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
  }
  .asset-section {
    margin-top: 24px;
  }
}

.asset-points {
  margin-top: 28px;
}
.asset-points-total {
  font-size: 12px;
  color: #52647e;
  margin-bottom: 16px;
}
.asset-points-total strong {
  font-size: 18px;
  color: #17263d;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
}
