:root {
  color-scheme: dark;
  --bg: #05090d;
  --panel: #0a1118;
  --panel-2: #0d1720;
  --panel-3: #101d28;
  --line: rgba(132, 158, 184, 0.18);
  --line-strong: rgba(132, 158, 184, 0.34);
  --text: #e7eef6;
  --muted: #8ba0b2;
  --faint: #587084;
  --blue: #00a3ff;
  --cyan: #24d6ff;
  --green: #3fe177;
  --yellow: #ffd23f;
  --orange: #ff9c2e;
  --red: #ff5148;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(5, 13, 20, 0.96), var(--bg) 48%, #030609 100%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1720px);
  margin: 0 auto;
  padding: 0 14px 132px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(520px, 2fr) minmax(270px, 0.9fr);
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 13, 0.9);
  backdrop-filter: blur(18px);
}

.depeg-paused .topbar {
  grid-template-columns: minmax(220px, 1fr) minmax(270px, auto);
}

.depeg-paused .summary-strip {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 30px;
}

.brand-mark span {
  position: absolute;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #00a3ff);
  transform-origin: left center;
}

.brand-mark span:nth-child(1) {
  width: 27px;
  left: 0;
  top: 17px;
  transform: rotate(-52deg);
}

.brand-mark span:nth-child(2) {
  width: 32px;
  left: 16px;
  top: 6px;
  transform: rotate(60deg);
}

.brand-mark span:nth-child(3) {
  width: 24px;
  right: 0;
  top: 18px;
  transform: rotate(-18deg);
}

.brand h1,
.brand p,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 23px;
  line-height: 1;
}

.brand p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 3px;
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
}

.metric.danger strong {
  color: var(--red);
}

.metric.warning strong {
  color: var(--yellow);
}

.metric.mild strong {
  color: var(--orange);
}

.metric.ok strong {
  color: var(--green);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions strong {
  color: var(--green);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.9);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(63, 225, 119, 0.8);
}

.icon-button,
.toggle-button,
.dock-heading button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.9);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.icon-button:hover,
.toggle-button:hover,
.nav-button:hover,
.dock-heading button:hover {
  border-color: var(--blue);
}

.icon-button:disabled,
.toggle-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

main {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.trx-page .topbar {
  grid-template-columns: minmax(230px, 0.9fr) minmax(420px, 1.35fr) minmax(230px, 0.8fr);
}

.tron-mark span {
  background: linear-gradient(90deg, #ff5148, #ff9c2e);
}

.trx-summary {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
}

.metric.mint strong {
  color: var(--green);
}

.metric.redeem strong {
  color: var(--yellow);
}

.trx-layout {
  grid-template-columns: minmax(360px, 0.85fr) minmax(520px, 1.15fr);
  align-items: start;
}

.depeg-drawer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 24, 0.72);
}

.depeg-drawer > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.depeg-drawer > summary::-webkit-details-marker {
  display: none;
}

.depeg-drawer > summary::before {
  content: "›";
  color: var(--faint);
  font-size: 18px;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.depeg-drawer[open] > summary::before {
  transform: rotate(90deg);
}

.depeg-drawer > summary span {
  flex: 1;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.depeg-drawer > summary strong {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 650;
}

.depeg-drawer > .control-bar,
.depeg-drawer > .status-grid,
.depeg-drawer > .table-panel {
  margin: 10px;
}

.control-bar {
  display: grid;
  grid-template-columns: 180px 210px minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.select-control,
.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 17, 24, 0.88);
}

.select-control span,
.search-control span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

select,
input {
  width: 100%;
  min-height: 30px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.toggle-button {
  min-height: 40px;
  padding: 0 15px;
}

.toggle-button[aria-pressed="true"],
#muteAlerts[aria-pressed="true"] {
  border-color: rgba(255, 210, 63, 0.8);
  color: var(--yellow);
  background: rgba(255, 210, 63, 0.08);
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 10px;
}

.status-panel,
.table-panel,
.alert-dock {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 24, 0.9);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 11px 12px;
}

.panel-heading,
.table-toolbar,
.dock-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

h2 {
  font-size: 14px;
  line-height: 1.2;
}

.panel-heading span,
.table-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.source-health {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.source-pill {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.68);
}

.source-pill strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-pill span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.source-pill.ok {
  border-color: rgba(63, 225, 119, 0.36);
}

.source-pill.syncing {
  border-color: rgba(36, 214, 255, 0.42);
}

.source-pill.degraded {
  border-color: rgba(255, 81, 72, 0.48);
}

.source-pill.disabled {
  opacity: 0.58;
}

.route-summary {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.route-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.route-line strong {
  color: var(--text);
  text-align: right;
}

.strx-panel,
.justlend-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 24, 0.9);
  box-shadow: var(--shadow);
}

.strx-heading,
.justlend-heading {
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.strx-heading > div:first-child,
.justlend-heading > div:first-child {
  min-width: 0;
}

.strx-heading span,
.strx-actions span,
.justlend-heading span,
.justlend-actions span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strx-actions,
.justlend-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.save-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.9);
  color: var(--text);
}

.save-button:hover {
  border-color: var(--blue);
}

.save-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-save {
  border-color: rgba(36, 214, 255, 0.5);
  color: var(--cyan);
}

.notify-config-topbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.notify-config-layout {
  display: block;
  width: min(720px, 100%);
}

.notify-config-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 24, 0.9);
  box-shadow: var(--shadow);
}

.notify-config-body,
.notify-config-actions {
  padding: 14px;
}

.notify-config-body {
  display: grid;
  gap: 14px;
}

.notify-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.notify-field,
.check-row {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.check-row {
  display: flex;
  align-items: center;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.notify-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.86);
  color: var(--text);
}

.notify-field input:focus {
  border-color: var(--cyan);
  outline: none;
}

.notify-config-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.strx-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.strx-metric {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.strx-metric:last-child {
  border-right: 0;
}

.strx-metric span,
.strx-metric em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strx-metric strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 5px;
  color: var(--cyan);
  font-size: 24px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.strx-metric em {
  margin-top: 5px;
}

.strx-metric.mint strong {
  color: var(--green);
}

.strx-metric.redeem strong {
  color: var(--yellow);
}

.strx-metric.net strong {
  color: var(--blue);
}

.strx-event-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
}

.strx-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.68);
}

.strx-event.mint {
  border-color: rgba(63, 225, 119, 0.35);
}

.strx-event.redeem {
  border-color: rgba(255, 210, 63, 0.38);
}

.strx-event-main,
.strx-event-meta {
  min-width: 0;
}

.strx-event-main strong,
.strx-event-main span,
.strx-event-meta span,
.strx-event a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strx-event-main strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.strx-event-main span {
  display: block;
  margin-top: 4px;
  color: #dce8f2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.strx-event-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.strx-event-meta span {
  color: var(--muted);
  font-size: 10px;
}

.strx-event a {
  color: var(--cyan);
  font-size: 11px;
  text-align: right;
  text-decoration: none;
}

.strx-event a:hover {
  color: var(--text);
}

.justlend-markets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 9px;
}

.justlend-market {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.68);
}

.justlend-market.above {
  border-color: rgba(63, 225, 119, 0.46);
}

.justlend-market.below,
.justlend-market.unconfigured {
  border-color: rgba(255, 210, 63, 0.34);
}

.justlend-market.error {
  border-color: rgba(255, 81, 72, 0.58);
}

.justlend-market header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.justlend-market header strong,
.justlend-market header a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.justlend-market header strong {
  color: var(--text);
  font-size: 13px;
}

.justlend-market header a {
  color: var(--cyan);
  font-size: 11px;
  text-decoration: none;
}

.justlend-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.justlend-lines div {
  min-width: 0;
}

.justlend-lines span,
.threshold-control span,
.justlend-meta,
.justlend-error {
  color: var(--muted);
  font-size: 11px;
}

.justlend-lines strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #dce8f2;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.justlend-market.above .justlend-lines div:nth-child(2) strong {
  color: var(--green);
}

.justlend-market.error .justlend-error {
  color: var(--red);
  overflow-wrap: anywhere;
}

.threshold-control {
  display: grid;
  gap: 6px;
}

.threshold-control input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 17, 24, 0.86);
  color: var(--text);
}

.justlend-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.justlend-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  min-height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.table-wrap {
  width: 100%;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  z-index: 6;
  background: #0a1118;
  color: #cbd8e3;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

td {
  color: var(--text);
  font-size: 12px;
}

tbody tr {
  background: rgba(10, 17, 24, 0.36);
}

tbody tr:hover {
  background: rgba(0, 163, 255, 0.06);
}

tbody tr.severe {
  box-shadow: inset 3px 0 0 var(--red);
}

tbody tr.medium {
  box-shadow: inset 3px 0 0 var(--orange);
}

tbody tr.mild {
  box-shadow: inset 3px 0 0 var(--yellow);
}

.favorite-col,
.favorite-cell {
  width: 3%;
  text-align: center;
}

.asset-col {
  width: 17%;
}

.fair-col {
  width: 12%;
}

.size-col {
  width: 16%;
}

.risk-col {
  width: 8%;
}

.note-col {
  width: 12%;
}

.favorite-cell button {
  border: 0;
  background: transparent;
  color: #7890a2;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

.favorite-cell button.active {
  color: var(--yellow);
}

.asset-cell {
  vertical-align: middle;
}

.asset-body {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 100%;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.asset-title,
.fair-cell,
.note-cell {
  min-width: 0;
}

.asset-title strong,
.fair-cell strong,
.note-cell strong,
.risk-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-title span,
.fair-cell span,
.note-cell span,
.risk-cell span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-title i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

.fair-cell .warn {
  color: var(--yellow);
}

.size-cell {
  padding: 6px 8px;
}

.cell-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.cell-top strong {
  font-size: 11px;
}

.cell-top span {
  font-size: 11px;
  font-weight: 750;
}

.negative {
  color: var(--red);
}

.positive {
  color: var(--green);
}

.neutral {
  color: var(--muted);
}

.quote-line {
  display: grid;
  grid-template-columns: 16px minmax(56px, 0.75fr) minmax(74px, 1fr);
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  color: var(--muted);
  line-height: 1.35;
}

.quote-line b {
  color: var(--faint);
  font-size: 10px;
}

.quote-line span {
  color: #dce8f2;
  font-variant-numeric: tabular-nums;
}

.quote-line em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-line.pending span,
.quote-line.pending em {
  color: var(--faint);
}

.quote-line.partial span {
  color: var(--yellow);
}

.quote-line.error span,
.quote-line.error em {
  color: var(--red);
}

.risk-cell.severe strong {
  color: var(--red);
}

.risk-cell.medium strong {
  color: var(--orange);
}

.risk-cell.mild strong {
  color: var(--yellow);
}

.risk-cell.normal strong {
  color: var(--green);
}

.muted {
  color: var(--muted);
}

.table-panel.compact th,
.table-panel.compact td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.table-panel.compact .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.table-panel.compact .quote-line {
  line-height: 1.25;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.alert-dock {
  position: fixed;
  z-index: 40;
  overflow: hidden;
  background: rgba(8, 14, 20, 0.94);
  backdrop-filter: blur(18px);
}

.alert-dock.bottom {
  right: 14px;
  bottom: 14px;
  left: 14px;
  max-height: 210px;
}

.alert-dock.right {
  top: 86px;
  right: 14px;
  bottom: 14px;
  width: min(360px, calc(100vw - 28px));
}

.alert-dock.collapsed {
  width: 280px;
  max-height: 48px;
}

.alert-dock.bottom.collapsed {
  left: auto;
}

.dock-heading {
  min-height: 46px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}

.dock-heading h2 {
  flex: 1;
  margin-left: 4px;
}

.dock-heading button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  font-size: 12px;
}

.dock-actions {
  display: flex;
  gap: 7px;
}

.alert-list {
  display: grid;
  gap: 8px;
  padding: 9px;
  overflow: auto;
}

.alert-dock.bottom .alert-list {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.alert-dock.right .alert-list {
  grid-template-columns: 1fr;
  max-height: calc(100vh - 150px);
}

.alert-dock.collapsed .alert-list {
  display: none;
}

.alert-card {
  min-height: 70px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.72);
}

.alert-card.severe {
  border-color: rgba(255, 81, 72, 0.85);
  background: rgba(255, 81, 72, 0.09);
}

.alert-card.medium {
  border-color: rgba(255, 156, 46, 0.75);
  background: rgba(255, 156, 46, 0.09);
}

.alert-card.mild {
  border-color: rgba(255, 210, 63, 0.65);
  background: rgba(255, 210, 63, 0.08);
}

.alert-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
}

.alert-card header span {
  color: var(--muted);
  font-size: 10px;
}

.alert-card p {
  margin-top: 7px;
  color: #c4d2df;
  font-size: 11px;
  line-height: 1.4;
}

.compact-empty {
  padding: 10px;
}

dialog {
  width: min(620px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0a1118;
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(6px);
}

dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.settings-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.settings-grid input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 29, 40, 0.86);
  color: var(--text);
}

.dialog-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: repeat(6, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .trx-layout {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .source-health {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .strx-event-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .justlend-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-col {
    width: 18%;
  }

  .fair-col {
    width: 13%;
  }

}

@media (max-width: 900px) {
  .app-shell {
    padding: 0 10px 116px;
  }

  .control-bar {
    grid-template-columns: 1fr 1fr;
  }

  .search-control {
    grid-column: 1 / -1;
  }

  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .trx-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strx-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .justlend-markets {
    grid-template-columns: 1fr;
  }

  .strx-metric:nth-child(2) {
    border-right: 0;
  }

  .strx-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .table-wrap {
    overflow: auto;
  }

  table {
    min-width: 980px;
  }

  .alert-dock.bottom .alert-list {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 620px) {
  .control-bar,
  .settings-grid,
  .source-health,
  .strx-metrics,
  .strx-event-list,
  .justlend-lines {
    grid-template-columns: 1fr;
  }

  .strx-heading,
  .justlend-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }

  .justlend-actions {
    flex-wrap: wrap;
  }

  .strx-metric,
  .strx-metric:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .strx-metric:last-child {
    border-bottom: 0;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .alert-dock.bottom .alert-list {
    grid-template-columns: 1fr;
  }
}
