:root {
  --bg: #090d12;
  --panel: #111822;
  --panel-2: #17212d;
  --line: #263545;
  --text: #f4f7fb;
  --muted: #8fa2b5;
  --green: #59f3b5;
  --cyan: #58d9ff;
  --yellow: #f3d15b;
  --red: #ff7185;
}

/* Functional controls: metric navigation, wallet filtering and chain actions. */
.metric-button {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.metric-button:hover {
  filter: none;
  border-color: color-mix(in srgb, var(--metric-color, var(--green)) 55%, var(--line));
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
}

.metric-button:focus-visible,
.mini-action:focus-visible,
.wallet-table tr[role="button"]:focus-visible {
  outline: 3px solid rgba(22, 163, 106, .24);
  outline-offset: 2px;
}

.wallet-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.select-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.select-field select {
  min-width: 170px;
  height: 40px;
  padding: 8px 32px 8px 10px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.wallet-table {
  min-width: 1180px;
}

.wallet-table tr[role="button"] {
  cursor: pointer;
}

.wallet-addresses,
.wallet-addresses > div {
  display: grid;
  gap: 7px;
}

.wallet-addresses > div {
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
}

.wallet-addresses code,
.address-list code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  color: #176e50;
  background: #edf9f3;
  border: 1px solid #c8eadb;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.mini-action:hover {
  color: #fff;
  background: #16865d;
  border-color: #16865d;
  filter: none;
}

.address-list > div {
  grid-template-columns: 120px minmax(280px, 1fr) minmax(180px, .6fr) auto;
}

.asset-table > div {
  grid-template-columns: 110px 100px minmax(110px, 1fr) minmax(170px, .7fr) auto;
  align-items: center;
}

.transaction-list > div {
  grid-template-columns: 65px 130px minmax(170px, 1fr) 65px 155px auto;
}

@media (max-width: 760px) {
  .wallet-filters {
    width: 100%;
    align-items: stretch;
  }

  .wallet-filters .search-field,
  .wallet-filters .search-field input,
  .wallet-filters .select-field,
  .wallet-filters .select-field select {
    width: 100%;
  }

  .address-list > div,
  .asset-table > div,
  .transaction-list > div {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    justify-content: flex-start;
  }
}

.wallet-addresses code,
.address-list code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Top-pinned live wallet activity and chain synchronization. */
.live-wallet-panel {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% -35%, rgba(37, 196, 132, .24), transparent 38%),
    linear-gradient(135deg, #102b25 0%, #122638 54%, #142033 100%);
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 35, 48, .16);
  color: #eefcf7;
}

.live-wallet-panel::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.live-wallet-head,
.live-wallet-stats,
.primary-asset-summary,
.wallet-activity-feed,
.live-wallet-foot {
  position: relative;
  z-index: 1;
}

.live-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
}

.live-wallet-head h2 {
  color: #fff;
  font-size: 20px;
}

.live-wallet-head p:not(.eyebrow) {
  margin-top: 5px;
  color: #a9c3c3;
  font-size: 12px;
}

.live-title-line,
.live-wallet-actions,
.live-connection {
  display: flex;
  align-items: center;
}

.live-title-line {
  gap: 8px;
}

.live-title-line .eyebrow {
  margin: 0;
  color: #65e6ae;
}

.live-pulse {
  width: 7px;
  height: 7px;
  background: #51e2a1;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(81, 226, 161, .55);
  animation: live-wallet-pulse 1.8s infinite;
}

@keyframes live-wallet-pulse {
  70% { box-shadow: 0 0 0 8px rgba(81, 226, 161, 0); }
  100% { box-shadow: 0 0 0 0 rgba(81, 226, 161, 0); }
}

.live-wallet-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.live-auto-update {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  padding: 7px 12px;
  color: #bcebd5;
  background: rgba(81, 226, 161, .1);
  border: 1px solid rgba(81, 226, 161, .2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.live-auto-update i {
  display: inline-block;
  color: #61e7ad;
  font-size: 14px;
  font-style: normal;
  line-height: 1;
  transform-origin: 50% 50%;
}

.live-wallet-panel.is-auto-refreshing .live-auto-update i {
  animation: live-auto-refresh-spin 1s linear infinite;
}

@keyframes live-auto-refresh-spin {
  to { transform: rotate(360deg); }
}

.live-connection {
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  color: #b7c8ce;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.live-connection i {
  width: 7px;
  height: 7px;
  background: #8496a5;
  border-radius: 50%;
}

.live-connection.is-live {
  color: #9ff1ca;
  border-color: rgba(81, 226, 161, .28);
}

.live-connection.is-live i {
  background: #51e2a1;
  box-shadow: 0 0 10px rgba(81, 226, 161, .8);
}

.live-connection.is-connecting {
  color: #f3d889;
}

.live-connection.is-connecting i {
  background: #f0c95b;
}

#sync-all-wallets {
  min-height: 35px;
  padding: 7px 13px;
  color: #0c3426;
  background: #66e4ae;
  border-color: #66e4ae;
  font-size: 11px;
}

#sync-all-wallets:hover {
  color: #09291f;
  background: #8aefc3;
  border-color: #8aefc3;
}

.live-wallet-stats {
  display: grid;
  grid-template-columns: 120px 170px 120px minmax(220px, 1fr);
  margin: 0 24px;
  overflow: hidden;
  background: rgba(4, 20, 22, .28);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
}

.live-wallet-stats > div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid rgba(255,255,255,.08);
}

.live-wallet-stats > div:last-child {
  border-right: 0;
}

.live-wallet-stats span,
.live-wallet-stats strong {
  display: block;
}

.live-wallet-stats span {
  color: #8ba9ae;
  font-size: 9px;
  letter-spacing: .04em;
}

.live-wallet-stats strong {
  margin-top: 2px;
  color: #f4fbfa;
  font-size: 16px;
  line-height: 1.25;
}

.live-wallet-stats .amount-in {
  color: #68e7ae;
}

.live-wallet-stats .amount-out {
  color: #ff9aa8;
}

.live-wallet-stats .sync-progress-stat strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-activity-feed {
  display: grid;
  max-height: 390px;
  margin-top: 12px;
  overflow: auto;
  scrollbar-color: rgba(130, 174, 170, .45) transparent;
  scrollbar-width: thin;
}

.wallet-asset-row {
  display: grid;
  grid-template-columns: 38px minmax(180px, .8fr) minmax(320px, 1.7fr) minmax(140px, .65fr) 145px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 11px 24px;
  color: #dcebe9;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.075);
  border-radius: 0;
  font-weight: 400;
  transition: background .15s ease, transform .2s ease;
}

.wallet-asset-row:hover {
  background: rgba(89, 243, 181, .07);
  border-color: rgba(255,255,255,.075);
}

.wallet-asset-row:focus-visible {
  outline: 2px solid #5de2aa;
  outline-offset: -3px;
}

.wallet-asset-row.is-new {
  animation: live-row-arrive 1.4s ease both;
}

.wallet-asset-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #8eaaa9;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.wallet-asset-rank.is-top {
  color: #092d21;
  background: linear-gradient(135deg, #8ef0c6, #54d99e);
  border-color: #86efc1;
  box-shadow: 0 4px 14px rgba(81, 226, 161, .18);
}

.wallet-address-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 0;
  margin-top: 3px;
  padding: 0;
  overflow: hidden;
  color: #6f9296;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 400;
}

.wallet-address-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-address-copy i {
  flex: 0 0 auto;
  color: #60dfaa;
  font-size: 10px;
  font-style: normal;
  opacity: .8;
}

.wallet-address-copy:hover,
.wallet-address-copy:focus-visible {
  color: #a5e9cd;
  background: rgba(81, 226, 161, .08);
  outline: 0;
}

.wallet-token-list {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.wallet-asset-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 0 4px;
  min-width: 72px;
  padding: 7px 9px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
}

.wallet-asset-chip b {
  overflow: hidden;
  color: #eefaf6;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-asset-chip em {
  color: #76e4b2;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.wallet-asset-chip small {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #78999b;
  font-size: 8px;
}

.wallet-asset-more,
.asset-awaiting {
  flex: 0 0 auto;
  color: #7e9b9e;
  font-size: 9px;
}

.wallet-asset-total {
  min-width: 0;
  text-align: right;
}

.wallet-asset-total strong,
.wallet-asset-total small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-asset-total strong {
  color: #65e5aa;
  font-size: 14px;
}

.wallet-asset-total small {
  margin-top: 3px;
  color: #78979a;
  font-size: 9px;
}

.wallet-activity-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1.05fr) minmax(170px, 1fr) minmax(150px, .75fr) 145px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 10px 24px;
  color: #dcebe9;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.075);
  border-radius: 0;
  font-weight: 400;
  transition: background .15s ease;
}

.wallet-activity-row:hover {
  background: rgba(89, 243, 181, .07);
  border-color: rgba(255,255,255,.075);
}

.wallet-activity-row:focus-visible {
  outline: 2px solid #5de2aa;
  outline-offset: -3px;
}

.wallet-activity-row.is-new {
  animation: live-row-arrive 1.4s ease both;
}

@keyframes live-row-arrive {
  0% { background: rgba(81, 226, 161, .24); transform: translateY(-4px); }
  100% { background: transparent; transform: translateY(0); }
}

.activity-direction {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
}

.activity-direction.in {
  color: #6de8b1;
  background: rgba(81,226,161,.11);
  border-color: rgba(81,226,161,.26);
}

.activity-direction.out {
  color: #ff96a6;
  background: rgba(255,113,133,.1);
  border-color: rgba(255,113,133,.24);
}

.activity-wallet,
.activity-route,
.activity-amount,
.activity-time {
  min-width: 0;
}

.activity-wallet strong,
.activity-route strong,
.activity-amount strong,
.activity-wallet small,
.activity-route small,
.activity-amount small,
.activity-time span,
.activity-time small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-wallet strong {
  color: #f6fcfa;
  font-size: 12px;
}

.activity-wallet small,
.activity-route small,
.activity-amount small,
.activity-time small {
  margin-top: 3px;
  color: #819da2;
  font-size: 9px;
}

.activity-route strong {
  color: #abc3c6;
  font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.activity-amount {
  text-align: right;
}

.activity-amount strong {
  font-size: 13px;
}

.activity-amount strong.in {
  color: #6de8b1;
}

.activity-amount strong.out {
  color: #ff96a6;
}

.activity-time {
  text-align: right;
}

.activity-time span {
  color: #ccdcda;
  font-size: 10px;
}

.live-empty-state {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 22px;
  color: #b4c8c7;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.075);
}

.live-empty-state span {
  color: #789397;
  font-size: 10px;
}

.live-wallet-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 24px 13px;
  color: #759096;
  background: rgba(3, 12, 19, .18);
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 9px;
}

@media (max-width: 980px) {
  .wallet-asset-row {
    grid-template-columns: 38px minmax(160px, .8fr) minmax(240px, 1.3fr) 135px;
  }

  .wallet-asset-row .activity-time {
    display: none;
  }

  .wallet-activity-row {
    grid-template-columns: 42px minmax(160px, 1fr) minmax(130px, .8fr) 125px;
  }

  .activity-route {
    display: none;
  }
}

@media (max-width: 700px) {
  .live-wallet-head {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .live-wallet-actions {
    justify-content: space-between;
  }

  .live-wallet-stats {
    grid-template-columns: repeat(3, 1fr);
    margin-inline: 18px;
  }

  .live-wallet-stats .sync-progress-stat {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .wallet-activity-row {
    grid-template-columns: 36px minmax(0, 1fr) minmax(105px, auto);
    min-height: 72px;
    padding-inline: 18px;
  }

  .wallet-asset-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(110px, auto);
    min-height: 78px;
    padding-inline: 18px;
  }

  .wallet-token-list {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .wallet-asset-total {
    grid-column: 3;
    grid-row: 1;
  }

  .activity-direction {
    width: 31px;
    height: 31px;
  }

  .activity-route,
  .activity-time {
    display: none;
  }

  .live-wallet-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-inline: 18px;
  }
}

.primary-asset-summary {
  display: grid;
  grid-template-columns: repeat(10, minmax(66px, 1fr));
  gap: 7px;
  margin: 10px 24px 0;
}

.primary-asset-total {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 8px;
}

.primary-asset-total b {
  color: #8ba9ae;
  font-size: 9px;
  letter-spacing: .04em;
}

.primary-asset-total strong {
  overflow: hidden;
  color: #dcebe9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-asset-total.has-balance {
  background: rgba(81, 226, 161, .09);
  border-color: rgba(81, 226, 161, .22);
}

.primary-asset-total.has-balance strong {
  color: #68e7ae;
}

.scan-images-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.scan-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.scan-image-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(29 45 72 / 7%);
}

.scan-image-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(37 99 235 / 8%), rgb(14 165 233 / 4%)),
    #f4f7fb;
}

.scan-image-preview a,
.scan-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
}

.scan-image-preview img {
  object-fit: contain;
  background: #101828;
}

.scan-image-preview button {
  width: auto;
  min-width: 112px;
}

.scan-image-meta {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.scan-image-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scan-image-title > div {
  display: grid;
  gap: 3px;
}

.scan-image-delete {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #b42318;
  border: 1px solid #f2b8b5;
  background: #fff5f4;
}

.scan-image-delete:hover {
  color: #8f1d14;
  border-color: #e88e88;
  background: #ffe9e7;
}

.scan-image-title span,
.scan-image-meta time,
.scan-image-meta small,
.scan-image-meta > span {
  color: #667085;
  font-size: 12px;
}

.scan-image-meta code,
.scan-image-meta p,
.scan-image-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-image-meta p {
  margin: 2px 0 0;
  font-size: 13px;
}

.scan-device-heading {
  display: grid;
  gap: 3px;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid #e9eef5;
}

.scan-device-heading span {
  color: #667085;
  font-size: 12px;
}

.scan-device-heading strong {
  color: #172033;
  font-size: 16px;
}

.scan-device-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.scan-device-facts > div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f7f9fc;
}

.scan-device-facts dt {
  margin-bottom: 3px;
  color: #667085;
  font-size: 11px;
}

.scan-device-facts dd {
  min-width: 0;
  margin: 0;
  color: #25324a;
  font-size: 12px;
  line-height: 1.45;
}

.scan-device-facts code {
  display: block;
  overflow: visible;
  color: #1f6fa8;
  text-overflow: initial;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.scan-result-copy {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  padding: 9px 10px;
  color: #1f6fa8;
  text-align: left;
  border: 1px solid #cfe2f1;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.scan-result-copy:hover {
  border-color: #72acd2;
  background: #f2f9fd;
}

.scan-result-copy code {
  display: block;
  width: 100%;
  overflow: visible;
  color: inherit;
  font-size: 12px;
  line-height: 1.55;
  text-overflow: initial;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.scan-result-copy span {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
}

.scan-fact-wide {
  grid-column: 1 / -1;
}

.scan-image-group {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #f8fafc;
}

.scan-image-group summary {
  padding: 11px 12px;
  color: #1f6fa8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.scan-image-group-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.scan-image-group-record {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #fff;
}

.scan-image-preview-compact {
  min-height: 92px;
  aspect-ratio: auto;
}

.scan-image-preview-compact button {
  min-width: 0;
  margin: 8px;
  padding: 8px;
  font-size: 11px;
}

.scan-image-group-record-meta {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: start;
  gap: 5px;
  padding: 9px 9px 9px 0;
}

.scan-image-group-record-meta span {
  color: #667085;
  font-size: 11px;
}

.scan-image-group-record-meta code {
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.scan-image-group-record-meta .scan-image-delete {
  padding: 6px 9px;
  font-size: 11px;
}

.scan-image-empty {
  grid-column: 1 / -1;
  padding: 26px;
  text-align: center;
}

@media (max-width: 700px) {
  .scan-images-actions,
  .scan-images-actions .search-field {
    width: 100%;
  }

  .scan-images-actions .search-field input {
    width: 100%;
  }

  .scan-image-grid {
    grid-template-columns: 1fr;
  }

  .scan-device-facts {
    grid-template-columns: 1fr;
  }

  .scan-fact-wide {
    grid-column: auto;
  }

  .scan-image-group-record {
    grid-template-columns: 1fr;
  }

  .scan-image-group-record-meta {
    padding: 0 9px 9px;
  }
}

/* Operator accounts, API metrics and database snapshots */
.system-operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e4eaf1;
}

.system-subpanel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  background: #fbfcfe;
}

.system-subpanel .subsection-head {
  margin-bottom: 14px;
}

.system-metrics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.system-metrics-summary > div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f0f4f8;
}

.system-metrics-summary span,
.system-path-row small,
.database-backup-row small,
.operator-table small {
  color: #718096;
}

.system-metrics-summary strong {
  color: #172033;
  font-size: 1.05rem;
}

.system-top-paths {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.system-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 26%);
  align-items: center;
  gap: 12px;
}

.system-path-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.system-path-row code {
  overflow: hidden;
  color: #26374a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-path-row > span {
  display: flex;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf2;
}

.system-path-row i {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d81b7, #5a9bc9);
}

.database-backups {
  display: grid;
  gap: 8px;
}

.database-backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #e9edf2;
}

.database-backup-row:first-child {
  border-top: 0;
}

.database-backup-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.database-backup-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-panel {
  padding: 20px;
}

.operator-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: #f8fafc;
}

.operator-create-form label,
.auth-dialog form label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.operator-create-form label > span,
.auth-dialog form label > span {
  color: #536174;
  font-size: .8rem;
  font-weight: 700;
}

.operator-create-form input,
.operator-create-form select,
.operator-inline-select,
.auth-dialog input,
.auth-dialog select {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd8e3;
  border-radius: 9px;
  color: #172033;
  background: #fff;
  font: inherit;
}

.operator-filter-bar {
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 190px) minmax(140px, 190px);
}

.operator-table td:first-child {
  min-width: 190px;
}

.operator-table td:first-child strong,
.operator-table td:first-child small,
.operator-table td:first-child code,
.operator-table td:nth-child(3) small {
  display: block;
}

.operator-table td:first-child code {
  max-width: 190px;
  margin-top: 4px;
  overflow: hidden;
  color: #768398;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-inline-select {
  min-height: 36px;
  padding: 6px 8px;
}

.operator-row-actions {
  display: flex;
  min-width: 220px;
  gap: 6px;
  flex-wrap: wrap;
}

.operator-locked {
  margin-top: 5px;
  color: #b54708 !important;
}

.danger-subtle {
  border-color: #f1c9c4 !important;
  color: #b42318 !important;
  background: #fff7f6 !important;
}

.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.auth-dialog::backdrop {
  background: rgb(15 23 42 / 48%);
  backdrop-filter: blur(3px);
}

.auth-dialog form {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.auth-dialog form h2,
.auth-dialog form p {
  margin: 0;
}

.auth-dialog .close {
  z-index: 2;
}

@media (max-width: 1180px) {
  .system-operations-grid {
    grid-template-columns: 1fr;
  }

  .operator-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operator-create-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .system-metrics-summary,
  .operator-create-form,
  .operator-filter-bar {
    grid-template-columns: 1fr;
  }

  .system-path-row {
    grid-template-columns: 1fr;
  }

  .system-path-row > span {
    width: 100%;
  }

  .operator-create-form button {
    grid-column: auto;
  }
}

.backup-status-grid {
  display: grid;
  gap: 10px;
}

.backup-status-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.backup-status-card > div {
  display: grid;
  gap: 5px;
}

.backup-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.backup-status-card > .backup-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.backup-export-action {
  cursor: pointer;
}

.backup-export-action:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 680px) {
  .backup-status-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #wallets-section .wallet-addresses > div {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 620px) {
  .mini-action {
    min-height: 36px;
    padding: 8px 10px;
  }
}

/* Contrast corrections for compact labels, status chips and primary actions. */
:root {
  --green: #0d7c50;
  --green-dark: #08643f;
}

.token-field > span,
.search-field > span,
th {
  color: #596579;
}

.nav-label {
  color: #8391a7;
}

.page-footer {
  color: #667085;
}

#accounts-section tbody td::before,
#wallets-section tbody td::before,
#devices-section tbody td::before,
#clipboard-section tbody td::before {
  color: #596579;
}

@media (max-width: 820px) {
  .wallet-addresses > div {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 620px) {
  .mini-action {
    min-height: 36px;
    padding: 8px 10px;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, #183127 0, transparent 30rem),
    radial-gradient(circle at 100% 25%, #14283a 0, transparent 35rem),
    var(--bg);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

header {
  max-width: 1440px;
  margin: auto;
  padding: 30px 36px 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.04em; }
h2 { font-size: 18px; }
h3 { margin: 24px 0 10px; }

.eyebrow {
  color: var(--green);
  font: 700 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .16em;
  margin-bottom: 7px;
}

.auth { display: flex; gap: 10px; }
input, button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #0d141c;
}
input:focus { outline: 2px solid #59f3b544; border-color: var(--green); }
button { cursor: pointer; background: var(--green); color: #07110d; font-weight: 800; }
button:hover { filter: brightness(1.08); }
button:disabled { cursor: wait; filter: grayscale(.5); opacity: .65; }
button.secondary { color: var(--text); background: #182432; }

main { max-width: 1440px; margin: auto; padding: 0 36px 60px; }
.notice {
  margin: 12px 0 18px;
  border-left: 3px solid var(--yellow);
  padding: 10px 14px;
  color: var(--muted);
  background: #f3d15b10;
}
.notice.ok { border-color: var(--green); background: #59f3b510; }
.notice.error { border-color: var(--red); background: #ff718510; color: #ffb5c0; }

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #131c27e8, #0d141de8);
  border-radius: 12px;
  box-shadow: 0 14px 40px #0004;
}
.card { padding: 18px; min-height: 110px; }
.card strong { display: block; margin-top: 13px; font-size: 28px; letter-spacing: -.04em; }
.card span { color: var(--muted); }

.grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.compliance-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.account-panel { grid-row: span 2; }
.account-table { min-width: 1240px; }
.risk-list { display: grid; gap: 8px; }
.risk-item {
  padding: 11px 12px;
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.risk-item > div { display: flex; align-items: center; gap: 8px; }
.risk-item p { margin: 6px 0 4px; color: #d7e2ed; }
.risk-item small { color: var(--muted); }
.risk-badge, .status-chip, .chain-chip, .scope-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.risk-critical { color: #ffd3d8; background: #ff405b2b; border-color: #ff405b66; }
.risk-high { color: #ff9cac; background: #ff71851a; border-color: #ff718555; }
.risk-medium { color: #ffe08a; background: #f3d15b18; border-color: #f3d15b55; }
.risk-low { color: #8ef7cd; background: #59f3b514; border-color: #59f3b544; }
.status-ok { color: var(--green); background: #59f3b510; border-color: #59f3b544; }
.status-pending { color: var(--yellow); background: #f3d15b10; border-color: #f3d15b44; }
.chain-chip { margin: 2px 4px 2px 0; color: var(--cyan); background: #58d9ff10; }
.scope-chip { margin: 2px 4px 2px 0; color: #c9afff; background: #b593ff10; }
.policy-list { display: grid; gap: 2px; margin-top: 14px; }
.policy-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.policy-list span { color: var(--muted); }
.policy-list strong { text-align: right; }
.panel { padding: 20px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.panel-head input { width: min(340px, 45vw); }

.chart {
  display: flex;
  align-items: end;
  gap: 5px;
  min-height: 230px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
}
.column { flex: 1; min-width: 4px; display: grid; gap: 4px; align-items: end; height: 210px; }
.column .event { background: linear-gradient(var(--cyan), #2284bd); border-radius: 3px 3px 0 0; min-height: 2px; }
.column .active { background: var(--green); min-height: 2px; opacity: .85; }
.column:hover { filter: brightness(1.3); }

.bars { margin-top: 22px; display: grid; gap: 13px; }
.bar-label { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 5px; }
.bar-track { height: 7px; background: #070b10; border-radius: 99px; overflow: hidden; }
.bar-value { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: inherit; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1050px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #59f3b50b; }
code { color: var(--cyan); font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }

dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
dialog h2,
dialog h3 { color: #f4f7fb; }
dialog::backdrop { background: #020407d9; backdrop-filter: blur(5px); }
.close { position: sticky; float: right; top: 0; padding: 6px 12px; font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.kv div { padding: 12px; background: var(--panel-2); border-radius: 8px; }
.kv span { display: block; color: var(--muted); font-size: 11px; }
.kv strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.profile-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.quality-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.quality-good { color: var(--green); background: #59f3b510; border-color: #59f3b544; }
.quality-warn { color: var(--yellow); background: #f3d15b10; border-color: #f3d15b44; }
.quality-bad { color: #ff9cac; background: #ff718510; border-color: #ff718544; }
.profile-quality {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  color: var(--muted);
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.profile-quality p { flex: 1; font-size: 12px; }
.timeline { display: grid; gap: 8px; }
.behavior-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.behavior-title h3 { margin: 0 0 3px; }
.behavior-title p { color: var(--muted); font-size: 12px; }
.behavior-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 13px 0;
}
.behavior-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--muted);
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.behavior-stat b { color: var(--cyan); font-size: 16px; }
.behavior-toolbar { display: flex; margin: 0 0 12px; }
.behavior-toolbar input { width: min(520px, 100%); }
.timeline article,
.timeline-item {
  padding: 13px 15px;
  border: 1px solid #1d2a38;
  border-left: 3px solid var(--cyan);
  border-radius: 0 9px 9px 0;
  background: #0b1119;
}
.timeline-item.type-interaction { border-left-color: #ffb34d; }
.timeline-item.type-navigation { border-left-color: var(--cyan); }
.timeline-item.type-lifecycle { border-left-color: #b593ff; }
.timeline-item.type-wallet { border-left-color: var(--green); }
.timeline-item.type-network { border-left-color: #ff7185; }
.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.timeline-head > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.timeline-head strong { font-size: 15px; }
.timeline-head time {
  flex: none;
  color: var(--muted);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  color: var(--cyan);
  background: #58d9ff14;
  border: 1px solid #58d9ff3c;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.type-interaction .event-badge { color: #ffc46f; background: #ffb34d14; border-color: #ffb34d3c; }
.type-lifecycle .event-badge { color: #c9afff; background: #b593ff14; border-color: #b593ff3c; }
.type-wallet .event-badge { color: var(--green); background: #59f3b514; border-color: #59f3b53c; }
.type-network .event-badge { color: #ff9cac; background: #ff718514; border-color: #ff71853c; }
.event-summary { margin: 9px 0 10px; color: #d7e2ed; }
.property-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.property-chip {
  display: grid;
  gap: 1px;
  min-width: 110px;
  max-width: 100%;
  padding: 6px 9px;
  background: #17212d;
  border: 1px solid #243446;
  border-radius: 7px;
}
.property-chip small { color: var(--muted); font-size: 10px; }
.property-chip b {
  overflow-wrap: anywhere;
  color: #edf5fc;
  font-size: 12px;
  font-weight: 650;
}
.timeline details { margin-top: 9px; color: var(--muted); font-size: 11px; }
.timeline details summary { cursor: pointer; user-select: none; }
.timeline details code {
  display: block;
  max-height: 240px;
  margin-top: 7px;
  padding: 9px;
  overflow: auto;
  white-space: pre-wrap;
  color: #9bb2c7;
  background: #070b10;
  border-radius: 6px;
}
.authorization-list { display: grid; gap: 8px; }
.authorization-list > div, .consent-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 12px;
  background: var(--panel-2);
  border-radius: 8px;
}
.authorization-list small, .consent-row small { color: var(--muted); }
.account-tree { display: grid; gap: 12px; margin-top: 20px; }
.tree-root {
  padding: 14px 16px;
  color: #07110d;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 9px;
  font-weight: 900;
}
.account-tree section {
  position: relative;
  padding: 5px 0 4px 28px;
  border-left: 2px solid #2d4357;
}
.account-tree section::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  width: 20px;
  height: 2px;
  background: #2d4357;
}
.account-tree section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.account-tree section h3 span {
  color: var(--cyan);
  font-size: 12px;
}
.tree-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin-bottom: 7px;
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tree-row > div { display: flex; flex-direction: column; gap: 3px; }
.tree-row small { color: var(--muted); }
.tree-row code { overflow-wrap: anywhere; }
.wallet-row { cursor: pointer; }
.wallet-row:hover { border-color: var(--green); background: #59f3b50b; }
.asset-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.asset-summary div {
  padding: 13px;
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.asset-summary span { display: block; color: var(--muted); }
.asset-summary strong { display: block; margin-top: 4px; font-size: 22px; }
.device-profile {
  padding: 13px;
  margin-bottom: 8px;
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.device-profile-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.device-profile-head > div { display: grid; gap: 3px; }
.device-profile-head code { overflow-wrap: anywhere; }
.device-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.device-facts span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  color: #dce7f1;
  background: #111a24;
  border-radius: 7px;
  overflow-wrap: anywhere;
}
.device-facts b {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}
.data-warning {
  margin: 4px 0 14px;
  padding: 10px 12px;
  color: #ffe08a;
  background: #f3d15b10;
  border: 1px solid #f3d15b44;
  border-radius: 8px;
}
.empty-state {
  padding: 13px;
  color: var(--muted);
  background: #0b1119;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.empty-state strong { display: block; color: #dce7f1; }
.empty-state p { margin-top: 3px; font-size: 12px; }
.address-list > .empty-state,
.asset-table > .empty-state,
.transaction-list > .empty-state {
  display: block;
}
.address-list, .asset-table, .transaction-list { display: grid; gap: 7px; }
.address-list > div {
  display: grid;
  grid-template-columns: 130px minmax(280px, 1fr) 180px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0b1119;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.asset-table > div {
  display: grid;
  grid-template-columns: 120px 110px minmax(120px, 1fr) 170px;
  gap: 10px;
  padding: 10px 12px;
  background: #0b1119;
  border-radius: 8px;
}
.transaction-list > div {
  display: grid;
  grid-template-columns: 70px 140px minmax(180px, 1fr) 70px 170px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0b1119;
  border-radius: 8px;
}
.kv .backup-kv-card {
  position: relative;
}
.clipboard-panel { margin: 12px 0; }
.clipboard-policy { margin: 10px 18px 0; }
.clipboard-table { min-width: 1080px; }
.clipboard-table td { vertical-align: top; }
.clipboard-table td:nth-child(1) { min-width: 170px; }
.clipboard-table td:nth-child(2) { min-width: 240px; }
.clipboard-table td:nth-child(3) { min-width: 210px; }
.clipboard-table td:nth-child(5) { min-width: 300px; }
.clipboard-locked {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  gap: 7px 10px;
}
.clipboard-locked > span {
  color: var(--yellow);
  font-weight: 800;
}
.clipboard-status {
  grid-column: 1 / -1;
  color: var(--muted);
}
.clipboard-revealed {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #ff718566;
  border-radius: 8px;
  background: #ff71850b;
}
.clipboard-revealed code {
  max-height: 190px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}
.clipboard-revealed > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.clipboard-revealed small { color: var(--muted); }
.direction { font-weight: 800; }
.direction.in { color: var(--green); }
.direction.out { color: var(--yellow); }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .compliance-grid { grid-template-columns: 1fr; }
  .account-panel { grid-row: auto; }
  .grid { grid-template-columns: 1fr 1fr; }
  .wide { grid-column: 1 / -1; }
}
@media (max-width: 660px) {
  header { align-items: stretch; flex-direction: column; padding: 22px 18px 12px; }
  main { padding: 0 18px 40px; }
  .auth { flex-direction: column; }
  .cards, .grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .kv { grid-template-columns: 1fr 1fr; }
  .behavior-title, .timeline-head { align-items: stretch; flex-direction: column; }
  .timeline-head { gap: 6px; }
  .property-chip { width: 100%; }
  .tree-row, .address-list > div, .asset-table > div, .transaction-list > div {
    grid-template-columns: 1fr;
  }
  .asset-summary { grid-template-columns: 1fr; }
  .profile-quality, .device-profile-head { align-items: stretch; flex-direction: column; }
  .device-facts { grid-template-columns: 1fr; }
}

/* 2026 console refresh */
:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f7f9fb;
  --line: #e2e7ee;
  --text: #172033;
  --muted: #697689;
  --green: #16a36a;
  --green-dark: #0d7c50;
  --green-soft: #eaf8f1;
  --cyan: #2178b8;
  --yellow: #b7791f;
  --red: #d94b61;
  --nav: #111b2e;
  --nav-muted: #8996aa;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .04);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body,
input,
button {
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--text);
}

h1 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

h2 {
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 232px;
  padding: 22px 14px 18px;
  color: #f8fafc;
  background: var(--nav);
  border-right: 1px solid rgba(255, 255, 255, .05);
  transition: transform .24s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #071b13;
  background: #42d392;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.brand > div {
  display: grid;
  gap: 1px;
}

.brand strong {
  color: #fff;
  font-size: 15px;
}

.brand small {
  color: var(--nav-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.side-nav {
  display: grid;
  gap: 4px;
  padding: 17px 0;
}

.nav-label {
  margin: 13px 10px 6px;
  color: #627087;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 8px 10px;
  color: #aeb9ca;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 650;
  transition: color .18s ease, background .18s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .055);
}

.nav-link.active {
  color: #fff;
  background: rgba(66, 211, 146, .12);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #7f8ca0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.nav-link.active .nav-icon {
  color: #42d392;
  background: rgba(66, 211, 146, .09);
  border-color: rgba(66, 211, 146, .3);
}

.sidebar-foot {
  margin-top: auto;
  padding: 15px 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.system-state {
  display: flex;
  align-items: center;
  gap: 9px;
}

.state-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: #42d392;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(66, 211, 146, .12);
}

.system-state > div {
  display: grid;
}

.system-state strong {
  color: #dce4ef;
  font-size: 11px;
}

.system-state small,
.sidebar-foot > p {
  color: #748197;
  font-size: 10px;
}

.sidebar-foot > p {
  margin-top: 12px;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: 232px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
  min-height: 70px;
  margin: 0;
  padding: 12px 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-title span::after {
  content: "/";
  margin-left: 8px;
  color: #c5ccd6;
}

.topbar-title strong {
  font-size: 13px;
}

.icon-button {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 96px;
  color: var(--muted);
  font-size: 11px;
}

.connection-state .state-dot {
  width: 7px;
  height: 7px;
  background: #aab3c1;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.connection-state.connected .state-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 106, .11);
}

.connection-state.connected {
  color: var(--green-dark);
}

.connection-state.error .state-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(217, 75, 97, .1);
}

.connection-state.error {
  color: var(--red);
}

.token-field,
.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.token-field > span,
.search-field > span {
  position: absolute;
  left: 12px;
  color: #8b96a7;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
}

.token-field input {
  width: 220px;
  height: 40px;
  padding-left: 96px;
}

input,
button {
  min-height: 40px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder {
  color: #a3adbb;
}

input:focus {
  outline: none;
  border-color: rgba(22, 163, 106, .75);
  box-shadow: 0 0 0 3px rgba(22, 163, 106, .11);
}

button {
  padding-inline: 15px;
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-weight: 750;
}

button:hover {
  filter: none;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

button.secondary {
  color: var(--text);
  background: #f4f6f8;
  border-color: var(--line);
}

.workspace > main {
  max-width: 1580px;
  margin: 0 auto;
  padding: 26px 28px 40px;
}

.notice {
  position: relative;
  display: none;
  margin: 0 0 18px;
  padding: 10px 13px;
  color: #725315;
  background: #fff9e8;
  border: 1px solid #f2dfaa;
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 12px;
}

.notice.error {
  display: block;
}

.notice.ok {
  display: none;
  color: #176542;
  background: #eefaf4;
  border-color: #bde6d1;
}

.notice.error {
  color: #a33246;
  background: #fff2f4;
  border-color: #f3c3cc;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 5px 2px 24px;
}

.page-heading .muted {
  margin-top: 8px;
  font-size: 13px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--green-dark);
  font: 800 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}

.update-meta {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 10px;
  min-width: 190px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.update-meta > span {
  color: var(--muted);
  font-size: 10px;
}

.update-meta > strong {
  justify-self: end;
  font-size: 12px;
}

.update-meta > small {
  grid-column: 1 / -1;
  color: #97a1af;
  font-size: 10px;
}

.cards {
  display: block;
  margin: 0 0 16px;
}

.metrics-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(320px, .95fr);
  gap: 14px;
}

.primary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card,
.panel,
.pulse-card {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  min-height: 128px;
  padding: 17px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 17px;
  width: 30px;
  height: 3px;
  background: var(--metric-color, var(--green));
  border-radius: 0 0 4px 4px;
}

.card-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.card strong {
  display: block;
  margin-top: 17px;
  color: var(--text);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -.045em;
}

.card small {
  display: block;
  margin-top: 11px;
  color: #929dac;
  font-size: 10px;
}

.pulse-card {
  padding: 16px 17px;
}

.pulse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.pulse-head strong {
  font-size: 12px;
}

.pulse-head span {
  color: var(--muted);
  font-size: 10px;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pulse-item {
  min-width: 0;
  padding: 10px;
  background: #fbfcfd;
}

.pulse-item span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-item strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.pulse-item.alert strong {
  color: var(--red);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.privacy-panel {
  min-height: 270px;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 163, 106, .13), transparent 42%),
    var(--panel);
}

.privacy-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.privacy-status-grid > div {
  display: flex;
  min-height: 76px;
  padding: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e5eee9;
  border-radius: 12px;
  background: rgba(248, 252, 250, .92);
}

.privacy-control-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 7px;
}

.privacy-control-copy span {
  color: var(--muted);
  font-size: 11px;
}

.privacy-control-copy strong {
  color: #08754a;
  font-size: 16px;
}

.privacy-control.is-enabled {
  border-color: rgba(22, 163, 106, .34);
  background: rgba(239, 252, 246, .96);
  box-shadow: inset 3px 0 0 var(--green);
}

.toggle-switch {
  position: relative;
  width: 46px;
  min-width: 46px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid #cbd5df;
  border-radius: 999px;
  background: #dfe5eb;
  box-shadow: none;
}

.toggle-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 35, 28, .24);
  transition: transform .2s ease;
}

.toggle-switch:hover {
  background: #d3dbe3;
  border-color: #bac6d1;
}

.toggle-switch[aria-checked="true"] {
  background: var(--green);
  border-color: var(--green);
}

.toggle-switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.toggle-switch[aria-checked="true"]:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.toggle-switch:focus-visible,
.privacy-clear-button:focus-visible {
  outline: 3px solid rgba(22, 163, 106, .2);
  outline-offset: 2px;
}

.privacy-clear-button {
  min-height: 32px;
  padding: 6px 10px;
  color: #536171;
  border-color: #d8e0e7;
  background: #fff;
  font-size: 11px;
}

.privacy-clear-button:hover {
  color: #b33b3b;
  border-color: #efcaca;
  background: #fff7f7;
}

.app-version-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  align-items: end;
  border: 1px solid #e5eee9;
  border-radius: 12px;
  background: rgba(248, 252, 250, .92);
}

.app-version-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.app-version-form input {
  width: 100%;
  min-height: 36px;
  border-color: #d8e0e7;
  background: #fff;
}

.app-version-form button {
  min-height: 36px;
  white-space: nowrap;
}

.privacy-updated-at {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.panel-head {
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.trend-panel {
  min-height: 310px;
}

.chart {
  display: grid;
  grid-template-columns: repeat(var(--chart-columns, 1), minmax(58px, 1fr));
  align-items: stretch;
  gap: 8px;
  min-height: 218px;
  padding: 10px 2px 0;
  overflow-x: auto;
  border-bottom: 0;
  background-image: linear-gradient(to bottom, transparent calc(25% - 1px), #edf0f4 25%, transparent calc(25% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), #edf0f4 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(75% - 1px), #edf0f4 75%, transparent calc(75% + 1px));
}

.column {
  display: grid;
  grid-template-rows: 32px minmax(130px, 1fr) 24px;
  align-items: stretch;
  justify-items: center;
  gap: 2px;
  min-width: 58px;
  height: 205px;
}

.column-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--text);
}

.column-value strong {
  font-size: 13px;
}

.column-value small,
.column time {
  color: var(--muted);
  font-size: 9px;
}

.column-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 130px;
  border-bottom: 1px solid #dfe4eb;
}

.column-bars i {
  display: block;
  min-height: 4px;
}

.column .event {
  width: min(18px, 34%);
  background: #3d81b7;
  border-radius: 3px 3px 1px 1px;
}

.column .active {
  width: min(10px, 22%);
  background: #42c486;
  border-radius: 3px 3px 1px 1px;
}

.column time {
  padding-top: 5px;
  font-style: normal;
}

.chart-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-events {
  background: #3d81b7;
}

.legend-devices {
  background: #42c486;
}

.count-badge {
  padding: 4px 8px;
  color: var(--muted);
  background: #f4f6f8;
  border-radius: 99px;
  font-size: 10px;
  white-space: nowrap;
}

.risk-list {
  gap: 8px;
}

.risk-item {
  padding: 11px;
  background: #fafbfc;
  border-color: var(--line);
}

.risk-item p {
  color: #465266;
  font-size: 11px;
}

.risk-item small {
  font-size: 10px;
}

.risk-list > .muted {
  display: grid;
  place-items: center;
  min-height: 176px;
  background: #fafbfc;
  border: 1px dashed #dce2e9;
  border-radius: 8px;
  font-size: 12px;
}

.section-block {
  margin: 0 0 32px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-inline: 2px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid #cfeadd;
  border-radius: 8px;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.section-heading h2 {
  font-size: 17px;
}

.section-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.search-field input {
  width: min(280px, 40vw);
  padding-left: 51px;
}

.table-wrap {
  margin-inline: -18px;
  overflow: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #c9d0da transparent;
}

.table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #c9d0da;
  border: 2px solid #fff;
  border-radius: 99px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

table {
  min-width: 1050px;
  color: #303b4d;
}

.account-table {
  min-width: 1080px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 11px;
  color: #7a8697;
  background: #f8fafb;
  border-bottom-color: var(--line);
  font-size: 10px;
  letter-spacing: .04em;
}

th:first-child,
td:first-child {
  padding-left: 18px;
}

th:last-child,
td:last-child {
  padding-right: 18px;
}

td {
  padding-block: 12px;
  border-bottom-color: #edf0f4;
  font-size: 12px;
}

tbody tr {
  cursor: pointer;
  transition: background .12s ease;
}

tbody tr:hover {
  background: #f5fbf8;
}

code {
  color: #216d98;
  overflow-wrap: anywhere;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) repeat(2, minmax(220px, .68fr));
  gap: 14px;
  margin-bottom: 34px;
}

.policy-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 4px;
}

.policy-list div {
  min-width: 0;
  padding: 8px 0;
  border-bottom-color: #edf0f4;
}

.policy-list span {
  font-size: 11px;
}

.policy-list strong {
  max-width: 65%;
  font-size: 11px;
}

.compact-panel .bars {
  margin-top: 24px;
}

.bars {
  gap: 16px;
}

.bar-label {
  color: var(--muted);
  font-size: 11px;
}

.bar-track {
  height: 6px;
  background: #edf0f4;
}

.bar-value {
  background: linear-gradient(90deg, var(--green), #53c8a0);
}

.security-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  color: #3d4c61;
  background: #f5faf7;
  border: 1px solid #d9ece2;
  border-radius: 8px;
  font-size: 11px;
}

.security-note strong {
  color: var(--green-dark);
  white-space: nowrap;
}

.clipboard-panel {
  margin: 0;
}

.clipboard-table {
  min-width: 960px;
  table-layout: fixed;
}

.clipboard-table th:nth-child(1),
.clipboard-table td:nth-child(1) {
  width: 145px;
  min-width: 0;
}

.clipboard-table th:nth-child(2),
.clipboard-table td:nth-child(2) {
  width: 220px;
  min-width: 0;
}

.clipboard-table th:nth-child(3),
.clipboard-table td:nth-child(3) {
  width: 190px;
  min-width: 0;
}

.clipboard-table th:nth-child(4),
.clipboard-table td:nth-child(4) {
  width: 110px;
}

.clipboard-table th:nth-child(5),
.clipboard-table td:nth-child(5) {
  width: 295px;
  min-width: 0;
}

.clipboard-locked {
  align-items: center;
}

.clipboard-locked > span {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #c7e8d7;
}

.clipboard-locked button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 10px;
}

.clipboard-content-direct {
  display: block;
  width: 100%;
  max-height: 180px;
  overflow: auto;
  padding: 9px 10px;
  border: 1px solid #c7e8d7;
  border-radius: 8px;
  background: #f3fbf7;
  text-align: left;
  cursor: copy;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.clipboard-content-direct:hover {
  border-color: var(--green);
  background: #eaf8f1;
}

.clipboard-content-direct:active {
  transform: translateY(1px);
}

.clipboard-content-direct.is-copied {
  border-color: var(--green);
  background: #dff5e9;
}

.clipboard-content-direct code {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.clipboard-content-direct small {
  display: block;
  margin-top: 6px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
}

.clipboard-content-stack {
  display: grid;
  gap: 8px;
}

.clipboard-row-actions {
  display: flex;
  justify-content: flex-end;
}

.clipboard-row-select,
.clipboard-select-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.clipboard-row-select {
  margin-bottom: 7px;
}

.clipboard-row-select input,
.clipboard-select-visible input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.clipboard-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.clipboard-bulk-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.clipboard-bulk-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.entity-bulk-actions {
  display: flex;
  align-items: center;
  align-self: flex-end;
  gap: 9px;
}

.entity-bulk-actions[hidden] {
  display: none;
}

.entity-select-visible,
.entity-row-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.entity-select-visible input,
.entity-row-select input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.entity-bulk-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.entity-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.clipboard-content-loading,
.clipboard-content-error {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.clipboard-content-error {
  color: var(--red);
}

.table-more-row,
.table-more-row:hover {
  background: #fafbfc;
}

.table-more-row td {
  padding: 12px 18px;
  text-align: center;
}

.table-more-button {
  min-height: 34px;
  padding: 6px 14px;
  color: #506074;
  background: #fff;
  border-color: #d7dde6;
  font-size: 11px;
}

.table-more-button:hover {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #bfe2d1;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 2px 0;
  color: #9aa4b2;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

dialog {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

dialog h2,
dialog h3 {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(4px);
}

.close {
  color: var(--text);
  background: #f4f6f8;
  border-color: var(--line);
}

.kv div,
.behavior-stat,
.timeline article,
.timeline-item,
.authorization-list > div,
.consent-row,
.account-tree section,
.tree-row,
.asset-summary div,
.device-profile,
.device-facts span,
.asset-table > div,
.transaction-list > div {
  background: var(--panel-2);
  border-color: var(--line);
}

.timeline-item p,
.event-summary {
  color: #465266;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  background: rgba(15, 23, 42, .46);
  opacity: 0;
  transition: opacity .2s ease;
}

@media (max-width: 1400px) and (min-width: 821px) {
  .account-table {
    min-width: 940px;
  }

  .account-table th:nth-child(6),
  .account-table td:nth-child(6) {
    display: none;
  }

  #devices-section table {
    min-width: 940px;
  }

  #devices-section th:nth-child(6),
  #devices-section td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 1280px) {
  .metrics-layout {
    grid-template-columns: 1fr;
  }

  .insight-grid {
    grid-template-columns: 1.4fr 1fr;
  }

  .policy-panel {
    grid-row: span 2;
  }
}

@media (max-width: 1040px) {
  .sidebar {
    transform: translateX(-100%);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }

  .workspace {
    margin-left: 0;
  }

  .icon-button {
    display: inline-grid;
    place-items: center;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .risk-panel {
    min-height: 240px;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: row;
    padding: 11px 18px;
  }

  .connection-state {
    display: none;
  }

  .token-field input {
    width: 190px;
  }

  .workspace > main {
    padding: 22px 18px 34px;
  }

  .primary-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .policy-panel {
    grid-row: auto;
  }

  .policy-list {
    grid-template-columns: 1fr;
  }

  #accounts-section .table-wrap,
  #devices-section .table-wrap,
  #clipboard-section .table-wrap {
    margin-inline: 0;
    overflow: visible;
    border-top: 0;
  }

  #accounts-section table,
  #devices-section table,
  #clipboard-section table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  #accounts-section thead,
  #devices-section thead,
  #clipboard-section thead {
    display: none;
  }

  #accounts-section tbody,
  #devices-section tbody,
  #clipboard-section tbody {
    display: grid;
    gap: 10px;
  }

  #accounts-section tbody tr:not(.table-more-row),
  #devices-section tbody tr:not(.table-more-row),
  #clipboard-section tbody tr:not(.table-more-row) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  }

  #accounts-section tbody td,
  #devices-section tbody td,
  #clipboard-section tbody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
    overflow-wrap: anywhere;
  }

  #accounts-section tbody td::before,
  #devices-section tbody td::before,
  #clipboard-section tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #8a95a5;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .04em;
  }

  #accounts-section tbody td:first-child,
  #devices-section tbody td:first-child {
    grid-column: 1 / -1;
    background: #f8fafb;
  }

  #accounts-section tbody td:last-child,
  #devices-section tbody td:last-child {
    grid-column: 1 / -1;
  }

  #clipboard-section tbody tr:not(.table-more-row) {
    grid-template-areas:
      "time type"
      "device device"
      "source source"
      "content content";
  }

  #clipboard-section tbody td:nth-child(1) { grid-area: time; }
  #clipboard-section tbody td:nth-child(2) { grid-area: device; }
  #clipboard-section tbody td:nth-child(3) { grid-area: source; }
  #clipboard-section tbody td:nth-child(4) { grid-area: type; }
  #clipboard-section tbody td:nth-child(5) { grid-area: content; }

  #accounts-section tbody td:nth-child(even),
  #devices-section tbody td:nth-child(even),
  #clipboard-section tbody td:nth-child(even) {
    border-right: 0;
  }

  .table-more-row {
    display: block;
    border: 0;
  }

  .table-more-row td {
    width: 100% !important;
    padding-inline: 0 !important;
    border: 0 !important;
  }

  .table-more-row td::before {
    display: none !important;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-title {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .token-field {
    flex: 1;
  }

  .token-field input {
    width: 100%;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .update-meta {
    width: 100%;
  }

  .primary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .card {
    min-height: 110px;
    padding: 15px;
  }

  .card strong {
    font-size: 25px;
  }

  .pulse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .privacy-status-grid {
    grid-template-columns: 1fr;
  }

  .app-version-form {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head .search-field,
  .panel-head .search-field input {
    width: 100%;
  }

  .chart-legend {
    align-self: flex-start;
  }

  .security-note,
  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Final responsive and interaction polish. */
.metric-button:hover {
  color: var(--text);
  background: var(--panel);
}

.audit-table-wrap {
  max-height: 520px;
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-width: 820px) {
  #wallets-section .table-wrap {
    margin-inline: 0;
    overflow: visible;
    border-top: 0;
  }

  #wallets-section table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  #wallets-section thead {
    display: none;
  }

  #wallets-section tbody {
    display: grid;
    gap: 10px;
  }

  #wallets-section tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  }

  #wallets-section tbody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
    overflow-wrap: anywhere;
  }

  #wallets-section tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #7c8797;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .04em;
  }

  #wallets-section tbody td:nth-child(1),
  #wallets-section tbody td:nth-child(2),
  #wallets-section tbody td:nth-child(3),
  #wallets-section tbody td:nth-child(7) {
    grid-column: 1 / -1;
  }

  #wallets-section tbody td:nth-child(even) {
    border-right: 0;
  }

  .wallet-addresses > div {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 620px) {
  .audit-table-wrap {
    max-height: calc(100vh - 190px);
  }

  .mini-action {
    min-height: 36px;
    padding: 8px 10px;
  }
}

@media (max-width: 340px) {
  .role-badge {
    position: absolute;
    top: 19px;
    right: 18px;
    order: initial;
  }
}

/* UI reliability fixes: remove legacy dark-theme bleed and harden responsive layout. */
body {
  min-width: 0;
}

.update-meta > small,
.card small {
  color: var(--muted);
}

.pulse-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pulse-item {
  grid-column: span 2;
}

.pulse-item:nth-last-child(-n + 2) {
  grid-column: span 3;
}

.risk-critical {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.risk-high,
.quality-bad {
  color: #b4233c;
  background: #fff2f4;
  border-color: #f3c3cc;
}

.risk-medium {
  color: #7a5614;
  background: #fff9e8;
  border-color: #ead59f;
}

.risk-low {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #bfe2d1;
}

.profile-quality,
.empty-state,
.address-list > div,
.property-chip,
.timeline details code {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
}

.profile-quality {
  border: 1px solid var(--line);
}

.profile-quality p,
.empty-state,
.tree-row small,
.address-list small,
.asset-table small,
.transaction-list small {
  color: var(--muted);
}

.empty-state strong,
.property-chip b {
  color: var(--text);
}

.device-facts span {
  color: #3f4d61;
}

.data-warning {
  color: #7a5614;
  background: #fff9e8;
  border-color: #ead59f;
}

tbody tr:focus-visible,
.wallet-row:focus-visible {
  outline: 3px solid rgba(22, 163, 106, .22);
  outline-offset: -3px;
}

@media (max-width: 1040px) {
  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 0;
  }

  #overview,
  #accounts-section,
  #wallets-section,
  #devices-section,
  #audit-section,
  #clipboard-section,
  #risk-section,
  #policy-section {
    scroll-margin-top: 142px;
  }

  input,
  button,
  select,
  .nav-link {
    min-height: 44px;
  }

  .toggle-switch {
    width: 52px;
    min-width: 52px;
    height: 30px;
    min-height: 30px;
  }

  .toggle-switch span {
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
  }

  .toggle-switch[aria-checked="true"] span {
    transform: translateX(22px);
  }

  .pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pulse-item,
  .pulse-item:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .pulse-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .kv {
    grid-template-columns: 1fr;
  }
}

/* Keep interactive wallet controls after the legacy theme rules. */
.metric-button {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.metric-button:hover {
  filter: none;
  border-color: color-mix(in srgb, var(--metric-color, var(--green)) 55%, var(--line));
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
}

.wallet-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.select-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.select-field select {
  min-width: 170px;
  height: 40px;
  padding: 8px 32px 8px 10px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.wallet-table {
  min-width: 1180px;
}

.wallet-table tr[role="button"] {
  cursor: pointer;
}

.wallet-addresses,
.wallet-addresses > div {
  display: grid;
  gap: 7px;
}

.wallet-addresses > div {
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
}

.wallet-addresses code,
.address-list code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  color: #176e50;
  background: #edf9f3;
  border: 1px solid #c8eadb;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.mini-action:hover {
  color: #fff;
  background: #16865d;
  border-color: #16865d;
  filter: none;
}

.address-list > div {
  grid-template-columns: 120px minmax(280px, 1fr) minmax(180px, .6fr) auto;
}

.asset-table > div {
  grid-template-columns: 110px 100px minmax(110px, 1fr) minmax(170px, .7fr) auto;
  align-items: center;
}

.transaction-list > div {
  grid-template-columns: 65px 130px minmax(170px, 1fr) 65px 155px auto;
}

@media (max-width: 760px) {
  .wallet-filters {
    width: 100%;
    align-items: stretch;
  }

  .wallet-filters .search-field,
  .wallet-filters .search-field input,
  .wallet-filters .select-field,
  .wallet-filters .select-field select {
    width: 100%;
  }

  .address-list > div,
  .asset-table > div,
  .transaction-list > div {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    justify-content: flex-start;
  }
}

/* Functional admin modules and role-aware controls. */
[hidden] {
  display: none !important;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: #667085;
  background: #f2f4f7;
  border: 1px solid #e1e6ed;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.role-badge.role-admin {
  color: #a33246;
  background: #fff2f4;
  border-color: #f3c3cc;
}

.role-badge.role-analyst {
  color: #245b8a;
  background: #eff7ff;
  border-color: #c7dff5;
}

.role-badge.role-viewer {
  color: #39725b;
  background: #f0faf5;
  border-color: #cce8d9;
}

.interactive-row {
  cursor: pointer;
}

.interactive-row:hover {
  background: #f5faf7;
}

.risk-panel.has-admin-tools {
  grid-column: 1 / -1;
}

.risk-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

button.compact-action {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 10px;
  white-space: nowrap;
}

.risk-admin-tools {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.subsection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.subsection-head strong,
.subsection-head small {
  display: block;
}

.subsection-head small {
  margin-top: 3px;
  color: var(--muted);
}

.blacklist-form {
  display: grid;
  grid-template-columns: 120px minmax(260px, 1.5fr) minmax(180px, 1fr) 110px auto;
  gap: 9px;
  align-items: end;
  margin-bottom: 14px;
}

.blacklist-form label,
.select-field {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 10px;
  font-weight: 750;
}

.blacklist-form input,
.blacklist-form select,
.select-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8dee7;
  border-radius: 8px;
}

.blacklist-form input:focus,
.blacklist-form select:focus,
.select-field select:focus {
  outline: none;
  border-color: rgba(22, 163, 106, .75);
  box-shadow: 0 0 0 3px rgba(22, 163, 106, .11);
}

.compact-table-wrap {
  margin-inline: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blacklist-table,
.audit-table,
.wallet-table {
  min-width: 860px;
}

.wallet-filters {
  display: flex;
  align-items: center;
  gap: 9px;
}

.wallet-address-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
}

.wallet-address-line code {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-table-wrap {
  margin-inline: -18px;
}

@media (max-width: 1040px) {
  .blacklist-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blacklist-form .address-field {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  #wallets-section .table-wrap,
  #audit-section .table-wrap {
    margin-inline: 0;
    overflow: auto;
  }

  .wallet-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-filters .search-field,
  .wallet-filters .search-field input,
  .wallet-filters .select-field {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .role-badge {
    order: 3;
  }

  .blacklist-form {
    grid-template-columns: 1fr;
  }

  .blacklist-form .address-field {
    grid-column: auto;
  }

  .risk-item-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Final wallet address overflow guard. */
.wallet-addresses code,
.address-list code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Backend operations, filtering and export controls */
.panel-title-actions,
.section-actions,
.maintenance-buttons,
.profile-admin-actions > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, 180px)) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line, #e7ebf0);
}

.audit-filter-bar {
  padding: 18px 20px 14px;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, 190px) minmax(140px, 190px);
}

.risk-filter-bar .search-field,
.audit-filter-bar .search-field,
.risk-filter-bar .select-field,
.audit-filter-bar .select-field {
  min-width: 0;
}

.risk-item > div:first-child {
  align-items: center;
}

.risk-select {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
}

.risk-item.is-resolved {
  opacity: .72;
}

.system-health-panel {
  padding: 22px;
}

.system-health-head,
.system-maintenance-actions,
.profile-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.system-health-grid > div {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 17px;
  border: 1px solid #e4eaf1;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f7f9fc);
}

.system-health-grid span,
.system-quality-grid span,
.profile-admin-actions small,
.system-maintenance-actions small,
.audit-table td small {
  color: #718096;
}

.system-health-grid strong {
  font-size: 1.3rem;
  color: #172033;
}

.system-health-grid small {
  line-height: 1.45;
}

.system-resource-meter {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.system-resource-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  transition: width .35s ease;
}

.system-resource-meter.resource-warning i {
  background: linear-gradient(90deg, #f59e0b, #ea8a00);
}

.system-resource-meter.resource-critical i {
  background: linear-gradient(90deg, #f04438, #d92d20);
}

.system-health-grid > .resource-warning {
  border-color: #f5d58a;
  background: linear-gradient(145deg, #fff, #fffaeb);
}

.system-health-grid > .resource-critical {
  border-color: #f5b7b1;
  background: linear-gradient(145deg, #fff, #fff1f0);
}

.system-quality-grid,
.audit-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.system-quality-grid {
  margin-top: 12px;
}

.system-quality-grid > div,
.audit-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fa;
}

.system-quality-grid strong,
.audit-summary strong {
  color: #172033;
}

.system-maintenance-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e4eaf1;
}

.system-maintenance-actions > div:first-child,
.profile-admin-actions > div:first-child {
  display: grid;
  gap: 4px;
}

.audit-summary {
  padding: 0 20px 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.audit-summary > div {
  display: grid;
  gap: 4px;
}

.audit-table td:nth-child(2),
.audit-table td:nth-child(6) {
  display: table-cell;
}

.audit-table td strong,
.audit-table td small {
  display: block;
}

.audit-table td small {
  max-width: 180px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.http-status {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

.http-status.is-ok {
  color: #087443;
  background: #e8f8f0;
}

.http-status.is-error {
  color: #b42318;
  background: #ffefed;
}

.profile-admin-actions {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #f8fafc;
}

@media (max-width: 1100px) {
  .system-health-grid,
  .system-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .system-health-grid,
  .system-quality-grid,
  .audit-summary,
  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .system-health-head,
  .system-maintenance-actions,
  .profile-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
