:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #182027;
  --muted: #687580;
  --line: #dbe2e8;
  --dark: #17201f;
  --dark-line: rgba(255, 255, 255, 0.12);
  --green: #0f8a62;
  --amber: #b76b22;
  --red: #b42318;
  --blue: #265dc7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.35 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-areas: "tokens main";
  height: 100vh;
  min-height: 0;
}

.layout.cart-open {
  grid-template-columns: minmax(0, 1fr) 390px;
  grid-template-areas: "main cart";
}

.token-sidebar {
  grid-area: tokens;
}

.layout.cart-open .token-sidebar {
  display: none;
}

.sidebar,
.cart-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background: var(--dark);
  color: #f8fbfa;
}

.cart-sidebar {
  grid-area: cart;
  width: auto;
  height: 100vh;
  border-left: 1px solid var(--dark-line);
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.16);
}

.cart-sidebar[hidden] {
  display: none;
}

.brand,
.side-head,
.panel-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand p,
.eyebrow {
  margin: 0 0 3px;
  color: #8ccfc0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1,
.topbar h2,
.panel-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 18px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #7e8d89;
  box-shadow: 0 0 0 5px rgba(126, 141, 137, 0.18);
}

.dot.live {
  background: #20c77a;
  box-shadow: 0 0 0 5px rgba(32, 199, 122, 0.18);
}

.dot.warn {
  background: #d58a36;
  box-shadow: 0 0 0 5px rgba(213, 138, 54, 0.2);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
  margin: 12px 0;
}

.search-row input,
.modal-card input,
.dummy-form input {
  height: 32px;
  min-width: 0;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  padding: 0 10px;
  outline: none;
}

.search-row input {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.search-row button,
.modal-card button,
.panel-head span,
.side-head strong {
  border: 0;
  border-radius: 6px;
  background: #e8f4f0;
  color: #0a654f;
  font-weight: 900;
}

.search-row button {
  cursor: pointer;
}

.side-head {
  color: #aebfba;
  font-weight: 800;
}

.side-title-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.side-title-button:hover,
.side-title-button.active {
  color: #8ccfc0;
}

.side-title-button:focus-visible {
  border-radius: 2px;
  outline: 1px solid #8ccfc0;
  outline-offset: 2px;
}

.side-head strong,
.panel-head span {
  min-width: 28px;
  padding: 3px 8px;
  text-align: center;
}

.token-list {
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  overflow-y: auto;
  padding-right: 3px;
}

.token,
.side-empty {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.token {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  cursor: pointer;
}

.token:hover,
.token.active {
  border-color: rgba(140, 207, 192, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.token strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tick-text {
  font-variant-ligatures: none;
}

.visible-space,
.visible-code {
  display: inline-block;
  border-radius: 3px;
  padding: 0 2px;
  background: rgba(140, 207, 192, 0.14);
  color: #8ccfc0;
  font-size: 0.9em;
  font-weight: 900;
}

.token em,
.token b,
.side-empty {
  color: #adbfba;
  font-size: 11px;
  font-style: normal;
}

.token b {
  align-self: center;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.token i {
  align-self: center;
  min-width: 18px;
  border-radius: 999px;
  padding: 2px 6px;
  background: #d92d20;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.node-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9e6e2;
  cursor: pointer;
  font-weight: 850;
}

.node-toggle b {
  color: #8ccfc0;
}

.node-panel[hidden] {
  display: none;
}

.node-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border-top: 1px solid var(--dark-line);
  padding-top: 10px;
}

.node-panel div,
.metrics div {
  display: grid;
  gap: 2px;
}

.node-panel div {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.node-panel span,
.metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.node-panel span {
  color: #9db0aa;
}

.node-panel strong,
.metrics strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--dark-line);
  padding-bottom: 10px;
}

.cart-side-head p {
  margin: 0 0 3px;
  color: #8ccfc0;
  font-size: 11px;
  font-weight: 900;
}

.cart-side-head h2 {
  margin: 0;
  font-size: 18px;
}

.cart-side-head button {
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9e6e2;
  cursor: pointer;
  font-weight: 850;
}

.main {
  grid-area: main;
  display: grid;
  grid-template-rows: auto minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 8px;
  height: 100vh;
  min-width: 0;
  padding: 10px;
  overflow: hidden;
}

.main.rbf-detail-open {
  grid-template-rows: auto minmax(0, 1fr);
}

.main.rbf-detail-open > .orders-panel:not(.rbf-detail-panel) {
  display: none;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.topbar h2 {
  font-size: 20px;
}

.protocol-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  background: #fff;
}

.protocol-tabs button {
  min-width: 58px;
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.protocol-tabs button.active {
  background: #e8f4f0;
  color: #0a654f;
}

.token-market-link {
  color: inherit;
  text-decoration: none;
}

.token-market-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.address-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.address-filter[hidden] {
  display: none;
}

.address-filter button {
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: 128px repeat(6, 88px);
  gap: 7px;
}

.wallet-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.wallet-button,
.wallet-menu button,
.cart-actions button,
.row-action,
.cart-float {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.wallet-button {
  height: 30px;
  min-width: 96px;
  padding: 0 10px;
}

.tx-tool-button {
  min-width: 70px;
  border-color: #bfe1d7;
  background: #e8f4f0;
  color: #0a654f;
}

.wallet-button.connected {
  border-color: #bfe1d7;
  background: #e8f4f0;
  color: #0a654f;
}

.wallet-menu {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 32, 0.18);
}

.wallet-menu[hidden],
.wallet-connected-panel[hidden],
.wallet-connect-panel[hidden] {
  display: none;
}

.wallet-connect-panel,
.wallet-connected-panel,
.dummy-form,
.wallet-addresses {
  display: grid;
  gap: 8px;
}

.wallet-connect-panel {
  grid-template-columns: 1fr 1fr;
}

.wallet-connect-panel p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wallet-menu button,
.dummy-form > button {
  min-height: 32px;
}

.wallet-addresses {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
}

.wallet-addresses span,
.dummy-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.wallet-addresses strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dummy-form label {
  display: grid;
  gap: 5px;
}

.dummy-form input {
  border-color: var(--line);
}

.disconnect-wallet {
  border-color: #ffd0cc;
  background: #fff1f0;
  color: var(--red);
}

.cart-actions button.primary {
  border-color: #bfe1d7;
  background: #e8f4f0;
  color: #0a654f;
}

.cart-actions button:disabled,
.wallet-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.metrics div,
.orders-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metrics div {
  min-width: 0;
  padding: 8px 9px;
}

.metrics strong {
  font-size: 18px;
}

.price-card strong {
  overflow: visible;
  text-overflow: clip;
}

.orders-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

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

.panel-head {
  min-height: 36px;
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
}

.panel-head h3 {
  font-size: 14px;
}

.confirmed-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.confirmed-pager button {
  height: 26px;
  border: 1px solid #cfe0ec;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.confirmed-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.confirmed-pager strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.load-more {
  border-top: 1px solid var(--line);
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

table {
  width: 100%;
  min-width: 1380px;
  border-collapse: collapse;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.sort-head {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.sort-head.active {
  color: inherit;
}

.sort-arrow {
  color: #9aa7b2;
  font-size: 10px;
  line-height: 1;
}

.sort-head.active .sort-arrow {
  color: var(--blue);
}

.sort-head:focus-visible {
  border-radius: 2px;
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

td strong,
td b,
td a,
td button.addr-link {
  display: block;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

td span {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kind {
  color: var(--blue);
}

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

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

.tx-link {
  color: var(--blue);
}

.addr-link {
  color: var(--blue);
}

.addr-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.tx-link:hover,
.addr-link:hover,
.wallet-address-link:hover {
  text-decoration: underline;
}

.wallet-address-link {
  color: var(--blue);
  cursor: pointer;
}

.group-badge {
  display: inline-block;
  width: fit-content;
  max-width: none;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--group-bg, #fff5e8);
  color: var(--group-color, var(--amber));
  font-weight: 800;
}

.grouped-row td:first-child {
  border-left: 3px solid var(--group-color, #d58a36);
}

.time-cell {
  max-width: none;
  color: #687580;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.rbf {
  display: inline-block;
  width: 28px;
  border: 0;
  border-radius: 999px;
  padding: 2px 0;
  background: #eef3ff;
  color: var(--blue);
  cursor: default;
  font-weight: 900;
  text-align: center;
}

.rbf-link {
  cursor: pointer;
}

.rbf-link:hover {
  box-shadow: inset 0 0 0 1px rgba(38, 93, 199, 0.35);
}

.rbf.hot {
  background: #fff1f0;
  color: var(--red);
}

.rbf-detail-panel {
  grid-row: 2;
}

.rbf-detail-head {
  align-items: flex-start;
}

.rbf-detail-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rbf-detail-head button {
  height: 28px;
  border: 1px solid #cfe0ec;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.rbf-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
}

.rbf-detail-meta span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f5f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.rbf-detail-wrap table {
  min-width: 980px;
}

.timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.timeline-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.timeline-status.current::before,
.timeline-status.confirmed::before {
  background: var(--green);
}

.timeline-status.replaced::before,
.timeline-status.failed::before {
  background: var(--red);
}

.timeline-status.attempt::before {
  background: var(--amber);
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  color: var(--blue);
}

.row-action.active {
  border-color: #9dc1ff;
  background: #eef3ff;
}

.row-action.cancel-action {
  border-color: #ffd0cc;
  background: #fff7f6;
  color: var(--red);
}

.row-action.cpfp-action {
  border-color: #bfe5d9;
  background: #effaf6;
  color: var(--green);
}

.row-action + .row-action {
  margin-left: 4px;
}

.buyer-tags {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.status-tag {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 900;
}

.status-tag.win {
  background: #e8f4f0;
  color: var(--green);
}

.status-tag.lose {
  background: #fff1f0;
  color: var(--red);
}

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

.empty {
  padding: 14px;
}

.modal[hidden] {
  display: none;
}

.modal,
.backdrop {
  position: fixed;
  inset: 0;
}

.modal {
  z-index: 1000;
}

.backdrop {
  background: rgba(16, 24, 32, 0.36);
}

.modal-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  width: min(520px, calc(100vw - 28px));
  margin: 16vh auto 0;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.modal-head h3 {
  margin: 0;
}

.modal-head button {
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.modal-card > button {
  height: 34px;
  cursor: pointer;
}

.cancel-card .rbf-summary {
  background: #f8fafb;
  color: var(--muted);
}

.cancel-card .rbf-summary-main span {
  background: #edf2f6;
  color: #4c5d68;
}

.cancel-card .rbf-fee-grid div {
  border-color: var(--line);
  background: #fff;
}

.cancel-card .rbf-fee-grid strong {
  color: var(--ink);
}

.cancel-card .cart-fee-control {
  color: var(--ink);
}

.cancel-card .cart-fee-control input {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.cancel-order-info {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
}

.cancel-order-info strong {
  font-size: 15px;
}

.cancel-order-info span,
.cancel-order-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.cancel-order-info em {
  color: var(--amber);
}

.tx-tool-card {
  width: min(620px, calc(100vw - 28px));
}

.tx-tool-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.tx-tool-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.tx-tool-actions button.active {
  border-color: #9dc1ff;
  background: #eef3ff;
  color: var(--blue);
}

.tx-tool-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tx-tool-card .rbf-errors {
  white-space: pre-wrap;
}

.rbf-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.rbf-card label input {
  color: var(--ink);
}

.cart-card {
  width: min(760px, calc(100vw - 28px));
}

.cart-rows {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  gap: 6px;
  margin-top: 10px;
  padding-right: 3px;
}

.cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
}

.cart-row strong,
.cart-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-row span {
  color: var(--muted);
  font-size: 11px;
}

.cart-row em {
  display: inline-block;
  margin-top: 3px;
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.cart-row.invalid-cart {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff7f6;
}

.cart-row button {
  width: 32px;
  border: 0;
  border-radius: 6px;
  background: #fff1f0;
  color: var(--red);
  cursor: pointer;
  font-weight: 900;
}

.rbf-summary,
.rbf-errors {
  border-radius: 6px;
  padding: 8px 9px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cart-sidebar .rbf-summary {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9e6e2;
}

.rbf-summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #9fb0ad;
  font-size: 12px;
  font-weight: 850;
}

.rbf-summary-main span {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.rbf-fee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.rbf-fee-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.rbf-fee-grid span,
.rbf-summary-meta {
  display: block;
  color: #91a4a0;
  font-size: 11px;
  font-weight: 850;
}

.rbf-fee-grid strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
}

.rbf-summary-meta {
  margin-top: 7px;
}

.cart-sidebar .rbf-errors {
  margin-top: 8px;
}

.rbf-errors {
  display: none;
  background: #fff1f0;
  color: var(--red);
}

.rbf-errors:not(:empty) {
  display: block;
}

.cart-actions {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr;
  gap: 8px;
  margin-top: 8px;
}

.cart-actions button {
  min-height: 34px;
}

.cart-fee-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #d9e6e2;
  font-size: 12px;
  font-weight: 850;
}

.cart-fee-control.cart-fee-save {
  grid-template-columns: minmax(0, 1fr) 116px 64px;
}

.cart-fee-control input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 850;
}

.cart-fee-control button {
  min-height: 34px;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #e8fff8;
  cursor: pointer;
  font-weight: 900;
}

.cart-fee-control button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rbf-stale {
  color: #ffd27a;
}

.cart-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-width: 108px;
  min-height: 42px;
  border-color: #bfe1d7;
  background: #e8f4f0;
  color: #0a654f;
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.22);
}

.cart-float b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 999px;
  background: #0a654f;
  color: #fff;
}

.cart-float.active {
  border-color: #9dc1ff;
  background: #eef3ff;
  color: var(--blue);
}

.cart-float.active b {
  background: var(--blue);
}

.layout.cart-open ~ .cart-float {
  display: none;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

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

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .layout,
  .main {
    display: block;
    height: auto;
  }

  .layout.cart-open .cart-sidebar {
    display: flex;
    width: auto;
    height: auto;
    min-height: 52vh;
  }

  .sidebar {
    max-height: 42vh;
  }

  .wallet-box {
    justify-self: stretch;
  }

  .wallet-button {
    width: 100%;
  }

  .wallet-menu {
    left: 0;
    right: auto;
    width: min(100%, 340px);
  }

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

  .orders-panel {
    height: 52vh;
    margin-top: 8px;
  }
}

.admin-page {
  min-height: 100vh;
  overflow: auto;
  background: #f3f6f8;
}

.admin-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-topbar p {
  margin: 0 0 4px;
  color: #0a7d63;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.admin-topbar button,
.admin-actions button,
#detailRescanButton {
  border: 1px solid #cfdbe5;
  border-radius: 8px;
  background: #fff;
  color: #12202b;
  font-weight: 900;
  cursor: pointer;
}

.admin-topbar button {
  height: 42px;
  padding: 0 18px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-metrics div,
.admin-panel {
  border: 1px solid #d5e0ea;
  border-radius: 8px;
  background: #fff;
}

.admin-metrics div {
  padding: 12px;
}

.admin-metrics span {
  display: block;
  color: #657585;
  font-size: 13px;
  font-weight: 800;
}

.admin-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(520px, 0.82fr);
  gap: 12px;
  min-height: 70vh;
}

.admin-panel {
  min-height: 0;
  overflow: hidden;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #dce6ee;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.admin-panel-head p,
.admin-panel-head span,
.admin-table em,
.admin-table small {
  color: #6c7d8c;
  font-size: 12px;
}

.admin-panel-head p {
  margin: 4px 0 0;
  word-break: break-all;
}

.admin-table-wrap {
  max-height: 72vh;
  overflow: auto;
}

.detail-table-wrap {
  max-height: calc(72vh - 60px);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e3ebf1;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #687887;
  font-size: 12px;
  font-weight: 900;
}

.admin-table tr.selected td {
  background: #eefaf6;
}

.admin-table strong,
.admin-table em,
.admin-table small {
  display: block;
}

.admin-table small {
  margin-top: 3px;
}

.admin-empty {
  color: #718190;
  text-align: center;
}

.admin-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #1d61c7;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.admin-actions button,
#detailRescanButton {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-actions button:hover,
#detailRescanButton:hover,
.admin-topbar button:hover {
  border-color: #8eb2de;
  color: #0f5db8;
}

#detailRescanButton:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-badge.ok {
  background: #e4f7ef;
  color: #06754f;
}

.admin-badge.bad {
  background: #fdecec;
  color: #b42318;
}

.admin-badge.muted {
  background: #eef2f5;
  color: #657585;
}

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border-bottom: 1px solid #e3ebf1;
  color: #506171;
  font-size: 13px;
  font-weight: 800;
}

.detail-summary b {
  color: #b42318;
}

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

  .admin-table-wrap,
  .detail-table-wrap {
    max-height: 62vh;
  }
}
