:root {
  color-scheme: dark;
  --bg: #111311;
  --bg-soft: #171a17;
  --surface: #1d201d;
  --surface-2: #242824;
  --surface-3: #2a2e2a;
  --line: #343a34;
  --line-strong: #454d45;
  --text: #f3f1e9;
  --muted: #a7ada4;
  --muted-2: #7e867d;
  --green: #65d989;
  --green-soft: #1e3927;
  --cyan: #5fcbd1;
  --cyan-soft: #193438;
  --amber: #e8b957;
  --amber-soft: #3c301b;
  --coral: #ef7f72;
  --coral-soft: #41231f;
  --violet: #b59be8;
  --violet-soft: #302841;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --sidebar: 226px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #54735d;
  border-radius: 6px;
  background: #213127;
  color: var(--green);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-mark-large {
  width: 46px;
  height: 46px;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(280px, 440px);
  align-content: center;
  justify-content: center;
  padding: 80px 24px;
  isolation: isolate;
}

.login-screen::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  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: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 85%);
}

.login-brand {
  position: absolute;
  top: 26px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-panel {
  width: 100%;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(29, 32, 29, .96);
  box-shadow: var(--shadow);
}

.login-heading {
  margin-bottom: 26px;
}

.login-heading h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.login-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(101, 217, 137, .12);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.rules-field input,
.rules-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #131613;
  color: var(--text);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell > svg {
  position: absolute;
  left: 12px;
  width: 16px;
  color: var(--muted-2);
}

.input-shell input {
  padding-right: 44px;
  padding-left: 40px;
}

.input-action {
  position: absolute;
  right: 4px;
  width: 34px !important;
  height: 34px !important;
}

.primary-btn,
.secondary-btn,
.text-btn,
.icon-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 750;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}

.primary-btn {
  padding: 0 15px;
  background: var(--green);
  color: #0c1b10;
}

.primary-btn:hover {
  background: #79e49a;
}

.secondary-btn {
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.secondary-btn:hover,
.icon-btn:hover {
  border-color: #637063;
  background: var(--surface-3);
}

.text-btn {
  min-height: 30px;
  padding: 0 3px;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
}

.text-btn svg {
  width: 14px;
  height: 14px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.icon-btn.danger:hover:not(:disabled) {
  border-color: #71453f;
  background: var(--coral-soft);
  color: var(--coral);
}

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

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 5px;
}

.form-error {
  min-height: 21px;
  margin: 13px 0 -6px;
  color: var(--coral);
  font-size: 12px;
}

.login-footer {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.login-footer span {
  margin: 0 7px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid #2d322d;
  background: #141614;
}

.sidebar-brand {
  display: flex;
  height: 78px;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid #2d322d;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
}

.nav-item {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover {
  background: #1b1e1b;
  color: var(--text);
}

.nav-item.active {
  border-color: #3c4f40;
  background: #213026;
  color: var(--green);
}

.nav-item svg {
  width: 17px;
  height: 17px;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid #2d322d;
}

.user-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.user-chip > span:first-child {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #506357;
  border-radius: 5px;
  background: #243029;
  color: var(--green);
  font-weight: 800;
}

.user-chip > span:last-child {
  display: grid;
  max-width: 105px;
}

.user-chip strong,
.user-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip small {
  color: var(--muted-2);
  font-size: 10px;
}

.sidebar-foot .icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 0 28px 48px;
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 19, 17, .94);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.live-pill,
.section-badge,
.status-badge,
.role-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.live-pill {
  border-color: #3f5b46;
  color: var(--green);
}

.live-pill .status-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.view {
  display: none;
  padding-top: 24px;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  display: flex;
  min-width: 0;
  min-height: 116px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted);
}

.metric > div:last-child {
  display: grid;
  min-width: 0;
}

.metric span,
.metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  margin: 2px 0;
  overflow: hidden;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-green .metric-icon { background: var(--green-soft); color: var(--green); }
.metric-cyan .metric-icon { background: var(--cyan-soft); color: var(--cyan); }
.metric-amber .metric-icon { background: var(--amber-soft); color: var(--amber); }
.metric-coral .metric-icon { background: var(--coral-soft); color: var(--coral); }
.metric-violet .metric-icon { background: var(--violet-soft); color: var(--violet); }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
  gap: 14px;
  margin-top: 14px;
}

.surface,
.data-section {
  border-top: 1px solid var(--line-strong);
  background: transparent;
}

.surface {
  min-height: 310px;
  padding: 18px 0 0;
}

.service-surface {
  padding-right: 2px;
}

.section-head {
  display: flex;
  min-height: 38px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2,
.rules-toolbar h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.section-head p,
.rules-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.section-badge {
  min-height: 23px;
  color: var(--muted-2);
}

.pnl-chart {
  position: relative;
  display: grid;
  height: 232px;
  grid-template-columns: repeat(24, minmax(4px, 1fr));
  align-items: stretch;
  gap: 5px;
  padding: 10px 2px 24px;
  border-bottom: 1px solid var(--line);
}

.pnl-chart::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  border-top: 1px dashed #3c423c;
  content: "";
}

.chart-col {
  position: relative;
  min-width: 0;
}

.chart-bar {
  position: absolute;
  right: 0;
  left: 0;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--green);
}

.chart-bar.negative {
  border-radius: 0 0 2px 2px;
  background: var(--coral);
}

.chart-label {
  position: absolute;
  right: -5px;
  bottom: -21px;
  left: -5px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.service-list,
.process-list {
  display: grid;
  gap: 7px;
}

.service-row,
.process-row {
  display: grid;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2c312c;
}

.service-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.process-row {
  grid-template-columns: auto minmax(140px, 1fr) repeat(4, minmax(70px, auto));
}

.service-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.service-light.online {
  background: var(--green);
}

.service-row strong,
.process-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-row span:last-child,
.process-row span {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 28px;
  margin-top: 24px;
}

.data-section {
  padding-top: 16px;
}

.full-table {
  margin-top: 18px;
}

.leaderboard-head,
.leaderboard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.leaderboard-head p,
.leaderboard-meta span {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.leaderboard-meta {
  margin-top: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.leaderboard-meta > div:first-child {
  display: grid;
  gap: 3px;
}

.leaderboard-meta strong {
  color: var(--text);
  font-size: 12px;
}

.leaderboard-progress {
  display: grid;
  width: min(360px, 38vw);
  gap: 6px;
}

.leaderboard-progress > span {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leaderboard-progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #262b27;
}

.leaderboard-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  margin: 0;
  background: var(--cyan);
  transition: width .25s ease;
}

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

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

th,
td {
  min-height: 44px;
  padding: 11px 10px;
  border-bottom: 1px solid #2c312c;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: #d8dbd3;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

tbody tr[data-record-id],
tbody tr[data-config-id] {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

.dense-table {
  min-width: 1060px;
}

.peer-rank-table {
  min-width: 920px;
}

.peer-rank-table th:nth-child(1) { width: 70px; }
.peer-rank-table th:nth-child(2) { width: 220px; }
.peer-rank-table th:nth-child(3) { width: 110px; }
.peer-rank-table th:nth-child(4) { width: 105px; }
.peer-rank-table th:nth-child(5) { width: 105px; }
.peer-rank-table th:nth-child(6) { width: 125px; }
.peer-rank-table th:nth-child(7) { width: 150px; }
.peer-rank-table th:nth-child(8) { width: 155px; }

.rank-number,
.win-rate {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.leaderboard-wallet {
  display: block;
}

.leaderboard-checked {
  display: grid;
  gap: 2px;
}

.leaderboard-checked small {
  color: var(--amber);
  font-size: 9px;
}

.dense-table th:first-child,
.dense-table td:first-child {
  padding-left: 4px;
}

.wallet-cell,
.hash-cell {
  display: grid;
  min-width: 0;
}

.wallet-cell strong,
.hash-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
}

.wallet-cell small,
.hash-cell small,
.cell-sub {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
}

.profit-positive {
  color: var(--green) !important;
  font-weight: 800;
}

.profit-negative {
  color: var(--coral) !important;
  font-weight: 800;
}

.status-badge.added,
.status-badge.online {
  border-color: #3d6147;
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.rejected,
.status-badge.offline {
  border-color: #68403a;
  background: var(--coral-soft);
  color: var(--coral);
}

.status-badge.pending,
.status-badge.manual {
  border-color: #66532e;
  background: var(--amber-soft);
  color: var(--amber);
}

.role-badge {
  min-height: 22px;
  padding: 0 7px;
  color: var(--muted);
}

.role-badge.bundle {
  border-color: #524568;
  color: var(--violet);
}

.decision-feed {
  display: grid;
}

.decision-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #2c312c;
}

.decision-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
}

.decision-mark.added { background: var(--green-soft); color: var(--green); }
.decision-mark.rejected { background: var(--coral-soft); color: var(--coral); }
.decision-mark.manual { background: var(--amber-soft); color: var(--amber); }

.decision-copy {
  display: grid;
  min-width: 0;
}

.decision-copy strong,
.decision-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-copy strong {
  font-size: 12px;
}

.decision-copy small,
.decision-time {
  color: var(--muted-2);
  font-size: 10px;
}

.toolbar {
  display: flex;
  min-height: 44px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-box {
  position: relative;
  display: flex;
  width: min(360px, 100%);
  min-width: 240px;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 11px;
  width: 16px;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.segmented {
  display: inline-flex;
  height: 38px;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.segmented button {
  height: 30px;
  padding: 0 10px;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--surface-3);
  color: var(--text);
}

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

.pagination .icon-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.rules-toolbar > div:last-child {
  display: flex;
  gap: 8px;
}

.rules-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 30px;
  padding-top: 22px;
}

.rule-section {
  min-width: 0;
}

.rule-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.rule-section-head span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--cyan);
}

.rule-section-head h3 {
  margin: 0;
  font-size: 13px;
}

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

.rules-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.rules-field > span:first-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-field small {
  min-height: 16px;
  color: var(--muted-2);
  font-size: 9px;
}

.toggle-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #131613;
}

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3b413b;
  cursor: pointer;
}

.toggle span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #bec3bb;
  content: "";
  transition: transform .15s ease;
}

.toggle input:checked + span {
  background: #3e7d50;
}

.toggle input:checked + span::after {
  transform: translateX(16px);
  background: #f3fff5;
}

.wallet-page-head {
  display: flex;
  min-height: 56px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.wallet-page-head h2,
.wallet-config-head h3 {
  margin: 0;
  font-size: 15px;
}

.wallet-page-head p,
.wallet-config-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.wallet-head-actions,
.blacklist-head-actions,
.wallet-switch-actions > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blacklist-count-pill {
  display: inline-flex;
  height: 38px;
  min-width: 58px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #6b3a34;
  border-radius: 5px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.blacklist-count-pill svg {
  width: 16px;
}

.strong-bundle-count-pill {
  display: inline-flex;
  height: 38px;
  min-width: 58px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #315d61;
  border-radius: 5px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}

.strong-bundle-count-pill svg {
  width: 16px;
}

.blacklist-form {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}

.blacklist-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.blacklist-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #131613;
  color: var(--text);
}

.blacklist-address input {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.blacklist-field input.invalid {
  border-color: var(--coral);
  background: #1f1514;
}

.blacklist-add-btn {
  height: 44px;
  white-space: nowrap;
}

.blacklist-table-section {
  margin-top: 26px;
}

.blacklist-table {
  min-width: 820px;
}

.blacklist-table th:first-child { width: 142px; }
.blacklist-table th:nth-child(2) { width: 265px; }
.blacklist-table th:nth-child(4) { width: 160px; }
.blacklist-table th:last-child { width: 54px; }

.blacklist-wallet-link {
  color: inherit;
  text-decoration: none;
}

.blacklist-wallet-link:hover strong {
  color: var(--cyan);
}

.blacklist-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.blacklist-status svg {
  width: 14px;
  height: 14px;
}

.blacklist-status.blocked { color: var(--green); }
.blacklist-status.pending { color: var(--amber); }

.blacklist-remove {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.blacklist-remove:hover {
  border-color: #79443e;
  color: var(--coral);
}

.strong-bundle-form {
  display: grid;
  grid-template-columns: minmax(390px, 1.5fr) minmax(220px, .8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}

.strong-bundle-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.strong-bundle-field input,
.strong-bundle-field textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  background: #131613;
  color: var(--text);
}

.strong-bundle-field input {
  height: 44px;
}

.strong-bundle-field textarea {
  min-height: 86px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.strong-bundle-field input:focus,
.strong-bundle-field textarea:focus {
  border-color: var(--cyan);
}

.strong-bundle-field textarea.invalid {
  border-color: var(--coral);
  background: #1f1514;
}

.strong-bundle-add-btn {
  height: 44px;
  white-space: nowrap;
}

.strong-bundle-table-section {
  margin-top: 26px;
}

.strong-bundle-table {
  min-width: 980px;
}

.strong-bundle-table th:first-child { width: 142px; }
.strong-bundle-table th:nth-child(2) { width: 72px; }
.strong-bundle-table th:nth-child(3) { width: 360px; }
.strong-bundle-table th:nth-child(4) { width: 180px; }
.strong-bundle-table th:nth-child(5) { width: 190px; }
.strong-bundle-table th:last-child { width: 54px; }

.strong-bundle-table td:nth-child(2) strong,
.strong-bundle-table td:nth-child(2) small {
  display: block;
}

.strong-bundle-table td:nth-child(2) small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.strong-bundle-table td:nth-child(3) {
  white-space: normal;
}

.strong-bundle-members {
  display: grid;
  gap: 5px;
}

.strong-bundle-wallet {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.strong-bundle-wallet > span {
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.strong-bundle-wallet strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strong-bundle-wallet:hover strong {
  color: var(--cyan);
}

.strong-bundle-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.strong-bundle-status svg {
  width: 14px;
  height: 14px;
}

.strong-bundle-status.active { color: var(--green); }
.strong-bundle-status.partial { color: var(--amber); }
.strong-bundle-status.idle { color: var(--muted); }

.strong-bundle-remove {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.strong-bundle-remove:hover {
  border-color: #79443e;
  color: var(--coral);
}

.wallet-status-pill {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wallet-status-pill.online {
  border-color: #3f5b46;
  color: var(--green);
}

.wallet-status-pill.error {
  border-color: #6b3a34;
  color: var(--coral);
}

.wallet-status-pill svg {
  width: 16px;
}

.wallet-switch-form {
  margin-top: 22px;
}

.wallet-switch-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.wallet-config-section {
  min-width: 0;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line-strong);
}

.wallet-config-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.wallet-kind-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
}

.wallet-kind-icon.fast-copy {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.change-badge {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #715e30;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.current-wallet-line {
  display: grid;
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #151815;
}

.current-wallet-line > span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
}

.current-wallet-line code,
.history-address {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.current-wallet-line .icon-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.wallet-address-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.wallet-address-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #131613;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.wallet-address-field input.invalid {
  border-color: var(--coral);
  background: #1f1514;
}

.fast-copy-history-pool {
  margin-top: 24px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line-strong);
}

.history-pool-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.history-pool-head h3 {
  margin: 0;
  font-size: 15px;
}

.history-pool-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.wallet-kind-icon.history-pool {
  background: var(--amber-soft);
  color: var(--amber);
}

.history-pool-count {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #66532e;
  border-radius: 4px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.history-pool-wallets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 16px;
}

.history-pool-wallet {
  display: grid;
  min-width: 0;
  min-height: 38px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #151815;
}

.history-pool-wallet code {
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-pool-state {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
}

.history-pool-state.current {
  color: var(--green);
}

.wallet-switch-actions {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
}

.wallet-impact {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.wallet-impact > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
}

.wallet-impact.pending > span:first-child {
  background: var(--amber-soft);
  color: var(--amber);
}

.wallet-impact.error > span:first-child {
  background: var(--coral-soft);
  color: var(--coral);
}

.wallet-impact > span:last-child {
  display: grid;
  min-width: 0;
}

.wallet-impact strong {
  font-size: 12px;
}

.wallet-impact small {
  color: var(--muted);
  font-size: 10px;
}

.wallet-history-section {
  margin-top: 26px;
}

.wallet-history-table {
  min-width: 820px;
}

.wallet-history-table th:first-child {
  width: 116px;
}

.wallet-history-table th:nth-child(2) {
  width: 116px;
}

.wallet-history-table th:last-child {
  width: 92px;
}

.history-result {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.history-result svg {
  width: 14px;
}

.history-result.success { color: var(--green); }
.history-result.error { color: var(--coral); }
.history-result.rollback { color: var(--amber); }
.history-rollback { opacity: .82; }

.spin {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 28px;
}

.security-section > .section-head > svg {
  color: var(--green);
}

.password-form {
  max-width: 520px;
}

.password-form .field {
  margin-bottom: 12px;
}

.logs-section {
  margin-top: 28px;
}

.log-actions {
  display: flex;
  gap: 8px;
}

.log-actions select {
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.log-output {
  height: 420px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0b0d0b;
  color: #c7d4c5;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.drawer-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: rgba(0, 0, 0, .62);
}

.detail-drawer {
  position: fixed;
  z-index: 51;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 92vw);
  overflow: auto;
  border-left: 1px solid var(--line-strong);
  background: #181b18;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .36);
  transform: translateX(102%);
  transition: transform .2s ease;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(24, 27, 24, .96);
  backdrop-filter: blur(10px);
}

.drawer-head h2 {
  margin: 0;
  font-size: 17px;
}

.drawer-body {
  padding: 18px;
}

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

.detail-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.detail-item span,
.detail-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-item span {
  color: var(--muted);
  font-size: 10px;
}

.detail-item strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-section {
  margin-top: 22px;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, .66);
}

.confirm-dialog form {
  padding: 24px;
  text-align: center;
}

.dialog-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
}

.confirm-dialog h2 {
  margin: 13px 0 5px;
  font-size: 17px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 20px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #242824;
  box-shadow: var(--shadow);
}

.toast.success { border-color: #466b50; }
.toast.error { border-color: #70453f; }
.toast.success > svg { color: var(--green); }
.toast.error > svg { color: var(--coral); }

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 12px;
}

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

.pnl-form {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(190px, .75fr) minmax(190px, .75fr) auto;
  align-items: end;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.pnl-form .field {
  min-width: 0;
  margin: 0;
}

.pnl-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.pnl-submit {
  height: 42px;
  white-space: nowrap;
}

.pnl-query-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.pnl-current,
.pnl-history {
  margin-top: 24px;
}

.pnl-progress {
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
}

.pnl-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.pnl-progress-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-progress-copy span {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pnl-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
}

.pnl-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
  transition: width .25s ease;
}

.pnl-progress-track span.failed {
  background: var(--coral);
}

.pnl-progress-stats {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 9px;
}

.pnl-progress-stats span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.pnl-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.pnl-audit {
  padding-top: 16px;
}

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

.pnl-audit-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.pnl-audit-grid > div:last-child {
  border-right: 0;
}

.pnl-audit-grid span {
  color: var(--muted-2);
  font-size: 10px;
}

.pnl-audit-grid strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-size: 11px;
}

.pnl-warning svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.status-badge.pnl-running,
.status-badge.pnl-queued {
  border-color: #365c61;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.status-badge.pnl-completed {
  border-color: #3f6549;
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.pnl-failed {
  border-color: #71453f;
  background: var(--coral-soft);
  color: var(--coral);
}

.pnl-history-table th:nth-child(1) { width: 125px; }
.pnl-history-table th:nth-child(2) { width: 155px; }
.pnl-history-table th:nth-child(3) { width: 150px; }
.pnl-history-table th:nth-child(4) { width: 82px; }
.pnl-history-table th:nth-child(5) { width: 120px; }
.pnl-history-table th:nth-child(7) { width: 92px; }

.pnl-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.empty-state {
  padding: 34px 12px !important;
  color: var(--muted-2);
  text-align: center;
}

.loading-row {
  opacity: .7;
}

.external-link {
  color: var(--cyan);
  text-decoration: none;
}

.external-link:hover {
  text-decoration: underline;
}

@media (max-width: 1260px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .process-row { grid-template-columns: auto minmax(130px, 1fr) repeat(2, minmax(70px, auto)); }
  .process-row span:nth-last-child(-n+2) { display: none; }
}

@media (max-width: 980px) {
  :root { --sidebar: 100%; }
  .app-shell { padding-top: 112px; }
  .sidebar {
    right: 0;
    bottom: auto;
    width: 100%;
    height: 112px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-brand { height: 54px; padding: 0 14px; border-bottom: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .sidebar-nav {
    display: flex;
    height: 58px;
    gap: 4px;
    overflow-x: auto;
    padding: 7px 10px;
    border-top: 1px solid #2d322d;
  }
  .nav-item { width: auto; min-width: 92px; height: 42px; justify-content: center; padding: 0 10px; }
  .nav-item svg { width: 15px; }
  .sidebar-foot { position: absolute; top: 8px; right: 10px; padding: 0; border: 0; }
  .user-chip { display: none; }
  .workspace { margin-left: 0; padding: 0 16px 38px; }
  .topbar { min-height: 66px; }
  .overview-grid,
  .split-section,
  .system-grid { grid-template-columns: 1fr; }
  .split-section { gap: 24px; }
  .rules-layout { grid-template-columns: 1fr; }
  .wallet-switch-layout { grid-template-columns: 1fr; gap: 24px; }
  .blacklist-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .blacklist-add-btn { grid-column: 1 / -1; justify-self: end; }
  .strong-bundle-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .strong-bundle-addresses { grid-column: 1 / -1; }
  .strong-bundle-add-btn { justify-self: end; }
  .history-pool-wallets { grid-template-columns: 1fr; }
  .pnl-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pnl-wallet-field { grid-column: 1 / -1; }
  .pnl-submit { justify-self: end; }
  .pnl-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pnl-audit-grid > div:nth-child(2) { border-right: 0; }
  .pnl-audit-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .clock { display: none; }
  .leaderboard-meta { align-items: flex-start; flex-direction: column; }
  .leaderboard-progress { width: 100%; }
}

@media (max-width: 680px) {
  .login-brand { top: 18px; left: 18px; }
  .login-panel { padding: 24px 20px; }
  .login-heading h1 { font-size: 26px; }
  .workspace { padding-right: 12px; padding-left: 12px; }
  .topbar h1 { font-size: 18px; }
  .live-pill { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { position: relative; display: block; min-height: 104px; padding: 13px; }
  .metric-icon { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; }
  .metric > div:last-child { width: 100%; }
  .metric span { padding-right: 34px; }
  .metric strong { font-size: 17px; }
  .overview-record-table th,
  .overview-record-table td { padding-right: 6px; padding-left: 6px; }
  .overview-record-table th:first-child { width: 66px; }
  .overview-record-table th:nth-child(3) { width: 62px; }
  .overview-record-table th:nth-child(4),
  .overview-record-table td:nth-child(4) { display: none; }
  .overview-record-table th:last-child { width: 70px; }
  .surface { min-height: 280px; }
  .pnl-chart { height: 205px; gap: 3px; }
  .toolbar { align-items: stretch; }
  .search-box { width: 100%; min-width: 0; }
  .segmented { max-width: 100%; overflow-x: auto; }
  .rules-toolbar { align-items: flex-start; }
  .rules-toolbar > div:last-child { flex-direction: column; }
  .wallet-page-head { align-items: flex-start; flex-direction: column; }
  .wallet-head-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .blacklist-head-actions { width: 100%; justify-content: space-between; }
  .blacklist-form { grid-template-columns: 1fr; }
  .blacklist-add-btn { width: 100%; grid-column: auto; }
  .strong-bundle-form { grid-template-columns: 1fr; }
  .strong-bundle-addresses { grid-column: auto; }
  .strong-bundle-add-btn { width: 100%; }
  .pnl-form { grid-template-columns: 1fr; }
  .pnl-wallet-field { grid-column: auto; }
  .pnl-submit { width: 100%; justify-self: stretch; }
  .pnl-query-meta { align-items: flex-start; flex-direction: column; }
  .pnl-audit-grid { grid-template-columns: 1fr; }
  .pnl-audit-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .pnl-audit-grid > div:last-child { border-bottom: 0; }
  .wallet-head-actions .secondary-btn { padding: 0 10px; }
  .wallet-switch-actions { align-items: stretch; flex-direction: column; }
  .wallet-switch-actions > div:last-child { width: 100%; }
  .wallet-switch-actions > div:last-child > button { flex: 1; }
  .current-wallet-line { grid-template-columns: auto minmax(0, 1fr) 32px; }
  .rule-fields { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-drawer { width: 100vw; }
  .log-output { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
