:root {
  color-scheme: dark;
  --bg: #f2efe8;
  --panel: rgba(16, 24, 32, 0.88);
  --panel-soft: rgba(255, 248, 235, 0.84);
  --text: #f9f5ec;
  --ink: #182028;
  --muted: rgba(249, 245, 236, 0.72);
  --accent: #ff7a00;
  --accent-soft: #ffb86f;
  --line: rgba(255, 255, 255, 0.12);
  --danger: #ff6b6b;
  --success: #2fbf71;
  --shadow: 0 24px 70px rgba(17, 23, 31, 0.22);
  --font-sans: "Avenir Next", "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 154, 69, 0.72) rgba(8, 13, 18, 0.58);
}

html,
body {
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(8, 13, 18, 0.58);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid rgba(12, 18, 24, 0.9);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 184, 111, 0.95), rgba(255, 122, 0, 0.78))
    padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(255, 206, 150, 1), rgba(255, 144, 40, 0.95))
    padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: #10161b;
}

input,
select,
textarea {
  font-size: 16px;
  touch-action: manipulation;
}

button {
  touch-action: manipulation;
}

.auth-body,
.dashboard-body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.28), transparent 30%),
    radial-gradient(circle at bottom right, rgba(10, 124, 255, 0.22), transparent 28%),
    linear-gradient(145deg, #151c22 0%, #202a32 44%, #10161b 100%);
}

.auth-shell,
.dashboard-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-panel,
.panel {
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.auth-panel {
  width: min(460px, 100%);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1;
}

.auth-copy,
.panel-subtitle {
  color: var(--muted);
}

.auth-form {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form span {
  font-size: 14px;
  color: var(--muted);
}

.auth-form input,
.blacklist-form input {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-mono);
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
}

.auth-form button,
.panel-button,
.ghost-button,
.token-chip button {
  border: 0;
  cursor: pointer;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.auth-form button,
.panel-button {
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(120deg, var(--accent) 0%, #ff9b45 100%);
  color: #24170b;
  font-weight: 700;
}

.auth-form button:hover,
.panel-button:hover,
.ghost-button:hover,
.token-chip button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.auth-form button:active,
.panel-button:active,
.ghost-button:active,
.token-chip button:active {
  transform: translateY(0) scale(0.985);
}

.auth-form button.is-loading,
.panel-button.is-loading,
.ghost-button.is-loading,
.token-chip button.is-loading {
  opacity: 0.72;
  cursor: wait;
  filter: saturate(0.82);
}

.auth-form button:disabled,
.panel-button:disabled,
.ghost-button:disabled,
.token-chip button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  filter: saturate(0.72);
  transform: none;
  box-shadow: none;
}

.auth-error,
.feedback {
  margin-top: 16px;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback:empty {
  display: none;
}

.feedback[hidden] {
  display: none;
}

.feedback-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-countdown {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
}

.auth-error,
.feedback.error {
  background: rgba(255, 107, 107, 0.12);
  color: #ffd0d0;
}

.feedback.success {
  background: rgba(47, 191, 113, 0.12);
  color: #cdf2dc;
}

.dashboard-shell {
  width: min(1440px, calc(100% - 24px));
  padding: 18px 0 20px;
}

.page-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}

.page-glow-a {
  top: -80px;
  left: -60px;
  background: #ff7a00;
}

.page-glow-b {
  right: -90px;
  bottom: -40px;
  background: #2f8dff;
}

.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: grid;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: min(88vw, 460px);
  border-radius: 999px;
  padding: 12px 18px;
  color: #1e150d;
  background: linear-gradient(120deg, rgba(255, 184, 111, 0.98), rgba(255, 226, 167, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  opacity: 0;
  text-align: center;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.error {
  color: #fff1f1;
  background: linear-gradient(120deg, rgba(188, 61, 61, 0.98), rgba(255, 107, 107, 0.98));
}

.toast.warning {
  color: #2a1a08;
  background: linear-gradient(120deg, rgba(255, 151, 61, 0.98), rgba(255, 205, 128, 0.98));
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal-shell[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 15, 0.62);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(780px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  overflow: auto;
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(18, 26, 33, 0.96), rgba(18, 26, 33, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.confirm-modal {
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 12px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 24px);
  margin: 0;
  padding: 22px;
}

.confirm-copy {
  display: grid;
  gap: 10px;
}

.confirm-copy .eyebrow {
  margin: 0;
}

.confirm-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.confirm-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.functions-card {
  width: min(720px, calc(100vw - 24px));
}

#functions-modal:not([hidden]),
#logs-modal:not([hidden]),
#settings-modal:not([hidden]) {
  display: grid;
  place-items: center;
  padding: 12px;
}

#functions-modal .modal-card,
#logs-modal .modal-card {
  margin: 0;
}

.settings-modal-card {
  width: min(960px, calc(100vw - 24px));
  height: min(780px, calc(100vh - 24px));
  margin: 0;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .modal-card,
  .confirm-card {
    max-height: calc(100dvh - 24px);
  }

  .settings-modal-card {
    height: min(780px, calc(100dvh - 24px));
  }
}

.settings-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.settings-mobile-save {
  display: none;
}

.functions-card #close-functions {
  min-width: 64px;
  white-space: nowrap;
}

.function-action-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.function-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.function-action-row-accent {
  background:
    radial-gradient(circle at top right, rgba(255, 122, 0, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.02);
}

.function-action-copy {
  min-width: 0;
}

.function-action-copy h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.function-action-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.function-action-row .panel-button {
  min-width: 118px;
  min-height: 44px;
  padding: 12px 16px;
  white-space: nowrap;
}

.functions-card .feedback {
  margin-top: 14px;
}

.settings-form {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.settings-tab-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.settings-tab-button {
  border: 0;
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.settings-tab-button:hover {
  transform: translateY(-1px);
}

.settings-tab-button.is-active {
  color: #24170b;
  background: linear-gradient(120deg, var(--accent) 0%, #ff9b45 100%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.settings-tab-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 184, 111, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.16);
}

.settings-tab-panels {
  display: grid;
  gap: 16px;
}

.settings-content {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 16px;
}

.settings-tab-panel {
  display: none;
  gap: 16px;
}

.settings-tab-panel.is-active {
  display: grid;
}

.settings-empty-state {
  margin: 0;
}

.settings-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  margin-bottom: 14px;
}

.settings-filter-input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 16px;
}

.settings-filter-clear {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
}

.settings-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.settings-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.settings-section-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.settings-tiered-section {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.settings-config-group {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.settings-config-group-200 {
  border-color: rgba(82, 189, 185, 0.24);
  background:
    linear-gradient(135deg, rgba(82, 189, 185, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.025);
}

.settings-config-group-500 {
  border-color: rgba(255, 184, 111, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.025);
}

.settings-config-group-common {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.settings-config-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-config-group-header > div {
  min-width: 0;
}

.settings-config-group-title {
  margin: 0;
  color: rgba(249, 245, 236, 0.94);
  font-size: 15px;
  line-height: 1.35;
}

.settings-config-group-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-config-group-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(249, 245, 236, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.settings-config-group-200 .settings-config-group-badge {
  border-color: rgba(82, 189, 185, 0.28);
  color: rgba(174, 235, 231, 0.94);
  background: rgba(82, 189, 185, 0.1);
}

.settings-config-group-500 .settings-config-group-badge {
  border-color: rgba(255, 184, 111, 0.3);
  color: var(--accent-soft);
  background: rgba(255, 122, 0, 0.12);
}

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

.settings-config-toggle-grid {
  margin: 0;
}

.settings-config-group-hint {
  margin-top: 0;
}

.settings-filter-hidden {
  display: none !important;
}

.settings-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.settings-form label.setting-help-active > span {
  color: #ffe4be;
}

.setting-help {
  grid-column: 1 / -1;
  width: 100%;
  margin: -2px 0 2px;
  border-left: 2px solid rgba(255, 184, 111, 0.5);
  padding: 2px 0 2px 10px;
  color: rgba(249, 245, 236, 0.7);
  font-size: 12px;
  line-height: 1.45;
}

.setting-help-detail {
  margin: 0;
  font-family: var(--font-sans);
}

.setting-help-countdown {
  display: block;
  margin-top: 2px;
  color: rgba(255, 184, 111, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
}

.settings-toggle-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.settings-form .settings-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 38px;
  align-items: center;
  gap: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.settings-form .settings-toggle.is-disabled {
  opacity: 0.55;
}

.settings-form .settings-toggle > span {
  grid-column: 1;
  grid-row: 1;
  color: rgba(249, 245, 236, 0.86);
  font-size: 13px;
  line-height: 1.25;
}

.settings-form .settings-toggle input {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.settings-form .settings-toggle .setting-help {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}

.settings-form .settings-toggle.settings-toggle-compact {
  min-height: 42px;
  align-self: start;
  padding: 9px 12px;
}

.settings-process-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-process-title {
  margin: 0;
  color: rgba(249, 245, 236, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.settings-process-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-process-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-button {
  color: #fff4f0;
  background: rgba(255, 107, 107, 0.2);
}

.danger-button:hover {
  background: rgba(255, 107, 107, 0.28);
}

.settings-form label[hidden] {
  display: none;
}

.settings-form label > span {
  color: var(--muted);
  cursor: help;
  font-size: 13px;
}

.settings-form input[type="number"],
.settings-form input[type="time"],
.settings-form input[type="text"],
.settings-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-mono);
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
}

.settings-form input[type="time"] {
  color-scheme: dark;
  appearance: none;
  padding-right: 38px;
}

.settings-form input[type="time"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0.78;
  cursor: pointer;
  filter: invert(91%) sepia(17%) saturate(388%) hue-rotate(336deg) brightness(106%) contrast(96%);
}

.settings-form input[type="time"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

.settings-form input[type="number"]:focus-visible,
.settings-form input[type="time"]:focus-visible,
.settings-form input[type="text"]:focus-visible,
.settings-form select:focus-visible {
  outline: none;
  border-color: rgba(255, 184, 111, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 184, 111, 0.14);
}

.settings-form input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.settings-form input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(249, 245, 236, 0.86);
  transition: transform 140ms ease, background 140ms ease;
}

.settings-form input[type="checkbox"]:checked {
  border-color: rgba(255, 184, 111, 0.46);
  background: rgba(255, 122, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.settings-form input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: #fff7e6;
}

.settings-form input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 184, 111, 0.18);
}

.settings-actions {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  flex-wrap: wrap;
}

.settings-actions .feedback {
  margin: 0;
  flex: 1 1 260px;
}

@media (max-width: 640px) {
  .settings-mobile-save {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 42px;
    min-height: 0;
    max-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 20px;
    white-space: nowrap;
  }

  .settings-actions > #save-settings {
    display: none;
  }
}

.manual-stats-card {
  width: min(520px, 100%);
}

.manual-stats-card .panel-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.stats-record-card {
  width: min(720px, 100%);
}

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

.manual-stats-form {
  display: grid;
  gap: 14px;
}

.manual-stats-form label {
  display: grid;
  gap: 8px;
}

.manual-stats-form label span {
  color: var(--muted);
  font-size: 13px;
}

.manual-stats-form input,
.manual-stats-form select,
.manual-stats-form textarea {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 16px;
}

.manual-stats-form textarea {
  min-height: 82px;
  resize: vertical;
}

.manual-stats-form select {
  appearance: auto;
}

.token-combobox {
  position: relative;
}

.token-combobox input {
  width: 100%;
}

.token-combobox-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 5;
  max-height: 238px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 6px;
  background: rgba(21, 30, 38, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.token-combobox-options[hidden] {
  display: none;
}

.token-combobox-option {
  appearance: none;
  display: grid;
  width: 100%;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.token-combobox-option:hover,
.token-combobox-option:focus {
  border-color: rgba(255, 184, 111, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.token-combobox-option:focus-visible {
  border-color: rgba(255, 184, 111, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 111, 0.18);
}

.token-combobox-option strong {
  font-family: var(--font-mono);
  font-size: 15px;
}

.token-combobox-option span,
.token-combobox-empty {
  color: var(--muted);
  font-size: 12px;
}

.token-combobox-empty {
  padding: 10px 12px;
}

.manual-stats-form .feedback {
  margin: 0;
}

.logs-modal-card {
  width: min(960px, calc(100vw - 24px));
}

#logs-modal .panel-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

#logs-modal .panel-actions .ghost-button {
  white-space: nowrap;
}

.logs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.logs-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
}

.logs-search-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.logs-search-form input:focus-visible {
  border-color: rgba(255, 184, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.16);
}

.logs-output {
  margin: 0;
  min-height: 320px;
  max-height: min(60vh, 620px);
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(9, 14, 19, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9f0f7;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(20, 28, 35, 0.78), rgba(33, 44, 54, 0.68));
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.topbar-copy {
  min-width: 0;
}

.topbar-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(100%, 540px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.topbar-subline {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.topbar-heartbeat {
  font-size: 13px;
}

.topbar-service-statuses {
  width: 100%;
  display: grid;
  gap: 6px;
}

.topbar-status {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.topbar-status .status-badge {
  padding: 6px 12px;
  font-size: 13px;
}

.topbar-status .topbar-meta {
  min-width: 0;
  text-align: right;
  font-size: 12px;
}

@media (min-width: 981px) {
  .topbar-service-statuses {
    grid-template-columns: 124px max-content;
    justify-content: end;
    column-gap: 10px;
    row-gap: 5px;
  }

  .topbar-status {
    display: contents;
  }

  .topbar-status .status-badge {
    width: 100%;
    justify-content: center;
    justify-self: end;
    align-self: center;
  }

  .topbar-status .topbar-meta {
    justify-self: start;
    align-self: center;
    text-align: left;
  }
}

.topbar-button-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.topbar-button-group form {
  margin: 0;
}

.topbar-button-group .ghost-button {
  min-width: 84px;
  min-height: 42px;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

.ghost-button {
  border-radius: 16px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.date-filter {
  display: inline-grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

.date-filter input,
.date-filter-display {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
}

.stats-date-filter {
  position: relative;
}

.date-filter-display {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.stats-date-filter input[type="date"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.stats-date-filter:focus-within .date-filter-display {
  border-color: rgba(255, 184, 111, 0.58);
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.18);
}

.panel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  grid-column: span 4;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(18, 26, 33, 0.92), rgba(18, 26, 33, 0.82));
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
}

.panel-wide {
  grid-column: span 8;
}

.panel-third {
  grid-column: span 4;
}

.panel-half {
  grid-column: span 6;
}

.panel-full {
  grid-column: span 12;
}

.opportunity-distribution-panel {
  position: relative;
  z-index: 4;
  overflow: visible;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

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

.liquidity-scan-action {
  white-space: nowrap;
}

.liquidity-status-copy {
  min-width: 0;
}

.stats-header-copy {
  min-width: 0;
}

.stats-header {
  align-items: center;
  gap: 16px;
}

.stats-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.stats-filter-row {
  display: grid;
  grid-template-columns: minmax(154px, auto) minmax(108px, auto);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stats-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.stats-filter-row .date-filter {
  min-width: 0;
}

.stats-filter-row .stats-date-filter {
  min-width: 154px;
}

.stats-filter-row .date-filter:not(.stats-date-filter) {
  min-width: 108px;
}

.stats-filter-row .date-filter-display {
  min-height: 42px;
  border-color: rgba(255, 214, 126, 0.14);
  border-radius: 16px;
  padding: 10px 13px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.08), rgba(255, 248, 235, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.stats-filter-row .filter-select {
  min-width: 0;
  max-width: 100%;
}

.stats-action-buttons .ghost-button,
.stats-action-buttons .panel-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 15px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.stats-action-buttons .ghost-button {
  border-color: rgba(255, 214, 126, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.08), rgba(255, 248, 235, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stats-action-buttons .panel-button {
  border-color: rgba(255, 184, 111, 0.38);
}

.stats-action-buttons .ghost-button:focus-visible,
.stats-action-buttons .panel-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255, 122, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.button-label-short {
  display: none;
}

.panel-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.panel-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
}

.trend-panel-header {
  align-items: center;
}

.trend-actions {
  flex: 0 0 auto;
}

.trend-day-toggle .toggle-pill {
  min-width: 58px;
  padding: 8px 12px;
  white-space: nowrap;
}

.trend-card {
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 168, 54, 0.12) 0%, rgba(255, 168, 54, 0) 34%),
    linear-gradient(180deg, rgba(255, 248, 235, 0.08) 0%, rgba(255, 248, 235, 0.04) 100%);
  border: 1px solid rgba(255, 214, 126, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trend-card-meta {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 10px;
}

.trend-metrics {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 18px;
  align-items: flex-start;
  justify-content: flex-end;
}

.trend-metric {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
  min-width: 88px;
}

.trend-metric span {
  color: var(--muted);
  font-size: 12px;
}

.trend-metric strong {
  font-size: 20px;
  line-height: 1;
  max-width: 100%;
}

.trend-money-toggle {
  display: inline-flex;
  justify-content: flex-end;
  max-width: 100%;
  border: 0;
  border-bottom: 1px dashed rgba(255, 226, 167, 0.38);
  padding: 0 0 2px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.trend-money-toggle:hover,
.trend-money-toggle:focus-visible {
  color: #ffe2a7;
  border-bottom-color: rgba(255, 226, 167, 0.78);
  outline: none;
}

.trend-money-toggle.is-cny {
  color: #ffe2a7;
}

.profit-trend-chart {
  width: 100%;
  min-height: 228px;
  overflow-x: hidden;
  overflow-y: visible;
}

.profit-trend-chart.is-scrollable {
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-color: rgba(255, 184, 111, 0.5) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.profit-trend-chart.is-scrollable::-webkit-scrollbar {
  height: 6px;
}

.profit-trend-chart.is-scrollable::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.profit-trend-chart.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 184, 111, 0.54);
}

.profit-trend-svg {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  overflow: visible;
}

.profit-trend-area {
  fill: url(#profit-trend-area-gradient);
}

.profit-trend-line {
  fill: none;
  stroke: #ff8a1c;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 16px rgba(255, 138, 28, 0.14));
}

.profit-trend-average-line {
  stroke: rgba(255, 245, 218, 0.38);
  stroke-width: 1.25;
  stroke-dasharray: 8 7;
}

.profit-trend-average-label {
  fill: rgba(255, 245, 218, 0.74);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.profit-trend-point {
  fill: #fff5da;
  stroke: #ff8a1c;
  stroke-width: 2;
}

.profit-trend-value {
  fill: rgba(255, 245, 218, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.profit-trend-money-toggle {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
}

.profit-trend-money-toggle:hover,
.profit-trend-money-toggle:focus-visible,
.profit-trend-money-toggle.is-cny {
  fill: #ffe2a7;
  outline: none;
}

.profit-trend-label {
  fill: var(--muted);
  font-size: 11px;
}

.profit-trend-empty {
  display: grid;
  place-items: center;
  min-height: 228px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.segmented-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-pill {
  border: 0;
  cursor: pointer;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  transition:
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.toggle-pill:hover {
  transform: translateY(-1px);
}

.toggle-pill.is-active {
  color: #24170b;
  background: linear-gradient(120deg, var(--accent) 0%, #ff9b45 100%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

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

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

.pie-card {
  min-width: 0;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 248, 235, 0.08);
}

.pie-grid-three .pie-layout {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.pie-grid-three .pie-chart {
  width: 96px;
  height: 96px;
}

.pie-grid-three .pie-chart::before {
  inset: 22px;
}

.pie-grid-three .pie-chart span {
  font-size: 14px;
}

.pie-grid-three .pie-chart small {
  font-size: 9px;
}

.pie-grid-three .pie-legend {
  gap: 7px;
  max-height: 190px;
}

.pie-grid-three .pie-legend-item {
  gap: 7px;
}

.pie-grid-three .pie-legend-copy strong {
  font-size: 11px;
}

.pie-grid-three .pie-legend-copy span {
  margin-top: 2px;
  font-size: 10px;
}

.pie-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.pie-chart {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pie-chart::before {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(16, 24, 32, 0.96), rgba(20, 29, 36, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.pie-chart span,
.pie-chart small {
  position: relative;
  z-index: 1;
}

.pie-chart span {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -62%);
  white-space: nowrap;
}

.pie-chart small {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  transform: translate(-50%, 58%);
  white-space: nowrap;
}

.pie-chart.empty {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--muted);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

.pie-chart.empty::before {
  display: none;
}

.pie-legend {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
  align-self: stretch;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pie-swatch {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.pie-legend-copy {
  min-width: 0;
}

.pie-legend-copy strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pie-legend-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.opportunity-chart-header {
  align-items: flex-start;
}

.opportunity-chart-header span:last-child {
  flex: 0 0 auto;
  font-size: 12px;
  text-align: right;
}

.opportunity-funnel-chart {
  display: grid;
  gap: 13px;
  width: 100%;
  min-height: 164px;
}

.opportunity-funnel-chart.empty {
  place-items: center;
  padding: 24px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 12px;
  text-align: center;
}

.opportunity-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.opportunity-total-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.opportunity-total-count strong {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
}

.opportunity-total-count span,
.opportunity-overall-entry span {
  color: var(--muted);
  font-size: 10px;
}

.opportunity-overall-entry {
  text-align: right;
}

.opportunity-overall-entry strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.opportunity-bar-list {
  display: grid;
  gap: 10px;
}

.opportunity-bar-row {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(120px, 1fr) 92px;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  cursor: help;
}

.opportunity-bar-row:focus-visible {
  outline: 1px solid rgba(255, 226, 167, 0.58);
  outline-offset: 3px;
}

.opportunity-bar-label,
.opportunity-bar-value {
  min-width: 0;
}

.opportunity-bar-label strong,
.opportunity-bar-value strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.opportunity-bar-label span,
.opportunity-bar-value span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.opportunity-bar-value {
  text-align: right;
}

.opportunity-bar-value strong {
  font-family: var(--font-mono);
}

.opportunity-bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
}

.opportunity-bar-total {
  display: flex;
  height: 100%;
  overflow: hidden;
  border-radius: 5px;
}

.opportunity-bar-entered {
  background: linear-gradient(90deg, #2fbf71, #5edb93);
}

.opportunity-bar-missed {
  background: rgba(255, 255, 255, 0.18);
}

.opportunity-token-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 98px;
  right: 102px;
  z-index: 30;
  display: none;
  gap: 6px;
  min-width: 230px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 226, 167, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(17, 21, 25, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.opportunity-bar-row:hover .opportunity-token-popover,
.opportunity-bar-row:focus .opportunity-token-popover,
.opportunity-bar-row.is-expanded .opportunity-token-popover {
  display: grid;
}

.opportunity-token-popover > strong {
  color: #ffe2a7;
  font-size: 10px;
  letter-spacing: 0;
}

.opportunity-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  font-size: 10px;
}

.opportunity-token-row > span:first-child {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.opportunity-token-row strong,
.opportunity-token-row code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-token-row strong {
  max-width: 76px;
}

.opportunity-token-row code {
  color: var(--muted);
  font-family: var(--font-mono);
}

.opportunity-token-count {
  color: #ffe2a7;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.opportunity-token-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
}

.opportunity-token-empty {
  color: var(--muted);
  font-size: 10px;
}

.opportunity-collapsed-token-group {
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 6px;
}

.opportunity-collapsed-token-group > summary {
  color: #ffe2a7;
  cursor: pointer;
  font-size: 9px;
  list-style: none;
}

.opportunity-collapsed-token-group > summary::-webkit-details-marker {
  display: none;
}

.opportunity-collapsed-token-group > summary::after {
  content: "展开";
  margin-left: 6px;
  color: var(--muted);
}

.opportunity-collapsed-token-group[open] > summary::after {
  content: "收起";
}

.opportunity-collapsed-token-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  margin-top: 7px;
  overflow-y: auto;
}

.opportunity-funnel-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 13px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}

.opportunity-funnel-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.opportunity-legend-swatch {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.opportunity-legend-swatch.is-entered {
  background: #45cf84;
}

.opportunity-legend-swatch.is-missed {
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 981px) and (max-width: 1120px) {
  .pie-grid-three .pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pie-grid-three .pie-legend {
    width: 100%;
  }
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
}

.chart-bars {
  display: grid;
  gap: 14px;
}

.stats-chart-bars {
  margin-top: 16px;
}

.cny-rate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  margin: 2px 0 14px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.35;
}

.cny-rate-summary[hidden] {
  display: none;
}

.cny-rate-item {
  white-space: nowrap;
}

.cny-rate-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
}

.cny-rate-values {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: min(100%, 260px);
}

.cny-rate-premium {
  color: #ffe4be;
}

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

.chart-scale-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-scale-card div {
  display: grid;
  min-width: 0;
}

.chart-scale-card span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-scale-card strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.chart-bar-group {
  display: grid;
  gap: 0;
  padding: 6px 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 122, 0, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.chart-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chart-row:last-child {
  border-bottom: 0;
}

.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.chart-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-meta strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.chart-money-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 76px;
  max-width: 128px;
  border: 0;
  border-bottom: 1px dashed rgba(255, 226, 167, 0.38);
  padding: 0 0 2px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.chart-money-toggle:hover,
.chart-money-toggle:focus-visible {
  color: #ffe2a7;
  border-bottom-color: rgba(255, 226, 167, 0.78);
  outline: none;
}

.chart-money-toggle.is-cny {
  color: #ffe2a7;
}

.chart-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 13, 18, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #ffe2a7 100%);
  box-shadow: 0 0 18px rgba(255, 122, 0, 0.18);
}

.summary-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.liquidity-status-banner {
  align-items: center;
}

.liquidity-status-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 420px;
  min-width: 0;
}

#liquidity-scan-message {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.liquidity-backup-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.liquidity-backup-indicator[hidden] {
  display: none;
}

.liquidity-backup-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.liquidity-backup-dot-available {
  background: #43c77a;
}

.liquidity-backup-dot-missing {
  background: #ffd166;
}

.liquidity-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.liquidity-progress[hidden] {
  display: none;
}

.liquidity-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.liquidity-progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.liquidity-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #ffe2a7 100%);
  transition: width 180ms ease;
}

.liquidity-progress-detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.blacklist-form {
  display: flex;
  gap: 10px;
}

.token-risk-panel-header {
  align-items: center;
}

.token-risk-panel-actions {
  flex: 0 0 auto;
}

.token-risk-tabs .toggle-pill {
  min-height: 44px;
  padding: 9px 14px;
  white-space: nowrap;
}

.token-risk-tabs .toggle-pill:focus-visible {
  outline: 2px solid rgba(255, 184, 111, 0.82);
  outline-offset: 2px;
}

.token-risk-tab-count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

.token-risk-tabs .toggle-pill.is-active .token-risk-tab-count {
  color: #fff7ed;
  background: rgba(36, 23, 11, 0.3);
}

#blacklist-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(420px, 1.3fr) minmax(96px, 140px);
  align-items: stretch;
  width: 100%;
}

#blacklist-form .panel-button {
  min-width: 84px;
  white-space: nowrap;
  width: 100%;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
}

.filter-select {
  font-family: var(--font-sans);
}

.blacklist-form input {
  flex: 1;
}

.blacklist-scope-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.blacklist-scope-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.blacklist-scope-option input {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 5px;
  appearance: none;
  background: rgba(4, 8, 12, 0.46);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
  cursor: inherit;
}

.blacklist-scope-option input::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff7ed;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(42deg) scale(0.82);
}

.blacklist-scope-option input:checked {
  border-color: rgba(255, 184, 111, 0.96);
  background: linear-gradient(135deg, #ff7a00, #ff9b45);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12);
}

.blacklist-scope-option input:checked::before {
  opacity: 1;
}

.blacklist-scope-option input:focus-visible {
  outline: 2px solid rgba(255, 184, 111, 0.78);
  outline-offset: 2px;
}

.blacklist-scope-option:has(input:checked) {
  border-color: rgba(255, 184, 111, 0.72);
  color: var(--text);
  background: rgba(255, 122, 0, 0.14);
}

.blacklist-scope-group:disabled .blacklist-scope-option {
  cursor: progress;
  opacity: 0.68;
}

.token-list,
.summary-list {
  display: grid;
  gap: 10px;
}

.token-list {
  margin-top: 14px;
}

.blacklist-chain-group {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.blacklist-chain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 2px;
  color: var(--muted);
  font-size: 13px;
}

.blacklist-chain-header strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
}

.blacklist-chain-header span {
  font-family: var(--font-mono);
}

.blacklist-source-group {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid rgba(255, 226, 167, 0.48);
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.blacklist-source-group-manual {
  border-left-color: rgba(123, 211, 137, 0.72);
}

.blacklist-source-group-liquidity_auto {
  border-left-color: rgba(255, 184, 111, 0.78);
}

.blacklist-source-group-liquidity_stuck {
  border-left-color: rgba(255, 109, 109, 0.78);
}

.blacklist-source-group-other {
  border-left-color: rgba(169, 184, 255, 0.66);
}

.blacklist-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 2px 9px;
  color: var(--muted);
  font-size: 13px;
}

.blacklist-source-header strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
}

.blacklist-source-header span {
  font-family: var(--font-mono);
}

.chain-list {
  display: grid;
  gap: 10px;
}

.token-chip,
.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(40%);
}

.summary-item > div {
  min-width: 0;
}

.summary-item b {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.token-chip-meta,
.summary-item strong {
  font-family: var(--font-mono);
}

.token-chip-meta {
  min-width: 0;
}

.token-chip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.blacklist-token-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.blacklist-token-chip .token-chip-meta strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.blacklist-token-chip .token-chip-actions {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) max-content max-content;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.blacklist-token-chip .token-chip-actions.no-liquidity-retest {
  grid-template-columns: minmax(360px, 1fr) max-content;
}

.blacklist-token-chip .blacklist-scope-inline {
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-content: flex-end;
}

.blacklist-token-chip.token-chip button {
  min-height: 44px;
  padding: 0 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.blacklist-token-chip.token-chip button.token-chip-secondary-button {
  min-width: 116px;
}

.blacklist-token-chip.token-chip button.token-chip-danger-button {
  min-width: 76px;
}

.tax-token-chip {
  border-left: 3px solid rgba(190, 128, 255, 0.82);
  background:
    linear-gradient(135deg, rgba(151, 87, 226, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.blacklist-token-chip.tax-token-chip .token-chip-actions {
  display: flex;
  width: auto;
  min-width: 180px;
}

.blacklist-token-chip.tax-token-chip .token-chip-secondary-button {
  width: 100%;
}

.token-chip-meta strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
}

.token-chip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.token-chip-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.token-chip-tag-strong {
  border-color: rgba(255, 184, 111, 0.24);
  color: #ffe4be;
  background: rgba(255, 151, 61, 0.12);
}

.token-chip-tag-tax {
  border-color: rgba(197, 139, 255, 0.42);
  color: #dfbdff;
  background: rgba(151, 87, 226, 0.16);
}

.token-chip-tag-tax-rate {
  border-color: rgba(91, 211, 233, 0.4);
  color: #a5effb;
  background: rgba(44, 178, 203, 0.14);
}

.token-chip-tag-danger {
  border-color: rgba(255, 109, 109, 0.34);
  color: #ffc4c4;
  background: rgba(255, 109, 109, 0.13);
}

.token-chip button {
  flex: 0 0 auto;
  min-width: 58px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.16);
  color: #ffe3e3;
  white-space: nowrap;
}

.token-chip button.token-chip-secondary-button {
  min-width: 0;
  max-width: none;
  background: rgba(255, 184, 111, 0.14);
  color: #ffe4be;
}

.token-chip button.token-chip-secondary-button:hover {
  background: rgba(255, 184, 111, 0.22);
}

.summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.summary-item strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.chain-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 184, 111, 0.24);
}

.chain-row.is-updating {
  opacity: 0.72;
}

.chain-row.locked {
  opacity: 0.72;
  cursor: not-allowed;
}

.chain-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chain-indicator {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.chain-row input:checked + .chain-indicator {
  background: linear-gradient(120deg, var(--accent) 0%, #ffb86f 100%);
  border-color: rgba(255, 184, 111, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.16);
}

.chain-row input:checked + .chain-indicator::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 2px 0 0 6px;
  border-right: 2px solid #2b1b09;
  border-bottom: 2px solid #2b1b09;
  transform: rotate(45deg);
}

.chain-health-target {
  position: relative;
  display: inline-flex;
  justify-self: end;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: help;
}

.chain-health-target:hover,
.chain-health-target:focus-visible,
.chain-health-target.is-tooltip-open {
  background: rgba(255, 255, 255, 0.06);
}

.chain-health-target:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 184, 111, 0.22);
}

.chain-health-tooltip {
  position: fixed;
  z-index: 80;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 214, 126, 0.16);
  background: rgba(20, 18, 15, 0.96);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: normal;
  text-align: left;
}

.chain-health-tooltip[hidden] {
  display: none;
}

.chain-health-tooltip::before {
  content: "";
  position: absolute;
  left: var(--chain-health-tooltip-arrow-x, 50%);
  bottom: -12px;
  border: 6px solid transparent;
  border-top-color: rgba(20, 18, 15, 0.96);
  transform: translateX(-50%);
}

.chain-health-tooltip.is-below::before {
  top: -12px;
  bottom: auto;
  border-top-color: transparent;
  border-bottom-color: rgba(20, 18, 15, 0.96);
}

.chain-health-dot {
  width: 10px;
  height: 10px;
  justify-self: end;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.chain-health-dot.is-healthy {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.chain-health-dot.is-danger {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.chain-health-dot.is-warning {
  background: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.16);
}

.chain-meta strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.table-shell {
  overflow: auto;
}

.table-scroll {
  max-height: 320px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.liquidity-monitor-table {
  min-width: 1020px;
  table-layout: fixed;
}

.liquidity-col-token {
  width: 18%;
}

.liquidity-col-alpha {
  width: 14%;
}

.liquidity-col-chain {
  width: 10%;
}

.liquidity-col-impact {
  width: 8%;
}

.liquidity-col-status {
  width: 19%;
}

.liquidity-col-blacklist {
  width: 13%;
}

.liquidity-col-action {
  width: 10%;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
  color: var(--accent-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: rgba(18, 26, 33, 0.96);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.data-table td {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}

.liquidity-monitor-table th {
  white-space: nowrap;
}

.liquidity-monitor-table td {
  min-width: 0;
  vertical-align: top;
}

.liquidity-cell-token,
.liquidity-cell-alpha,
.liquidity-cell-chain,
.liquidity-cell-status,
.liquidity-cell-blacklist {
  white-space: normal;
  overflow-wrap: anywhere;
}

.liquidity-cell-impact,
.liquidity-cell-action {
  white-space: nowrap;
}

.liquidity-alpha-copy-button {
  appearance: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.liquidity-alpha-copy-button:hover,
.liquidity-alpha-copy-button:focus-visible {
  color: var(--accent-soft);
  text-decoration: underline;
  outline: none;
}

.liquidity-token-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.liquidity-tax-config-trigger {
  border-radius: 10px;
  padding: 3px 4px;
  margin: -3px -4px;
  cursor: pointer;
  touch-action: pan-y;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.liquidity-tax-config-trigger:hover,
.liquidity-tax-config-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  outline: none;
}

.liquidity-token-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stats-token-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.trade-strategy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.trade-strategy-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 184, 111, 0.42);
  border-radius: 999px;
  padding: 2px 7px;
  color: #ffd4aa;
  background: rgba(255, 184, 111, 0.14);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.stable-pool-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(121, 231, 165, 0.38);
  border-radius: 999px;
  padding: 2px 7px;
  color: #a7f3c3;
  background: rgba(67, 199, 122, 0.14);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.token-tax-tag,
.token-tax-rate-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.token-tax-tag {
  border: 1px solid rgba(197, 139, 255, 0.48);
  color: #dfbdff;
  background: rgba(151, 87, 226, 0.18);
}

.token-tax-rate-tag {
  border: 1px solid rgba(91, 211, 233, 0.46);
  color: #a5effb;
  background: rgba(44, 178, 203, 0.16);
}

.token-tax-card {
  width: min(500px, 100%);
}

.token-tax-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.token-tax-toggle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.token-tax-toggle > span:first-child {
  display: grid;
  gap: 5px;
}

.token-tax-toggle small,
.token-tax-policy-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.token-tax-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.token-tax-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 160ms ease;
}

.token-tax-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f6f8fb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease;
}

.token-tax-toggle input:checked + .token-tax-toggle-track {
  background: linear-gradient(120deg, #9f67e9, #c785ff);
}

.token-tax-toggle input:checked + .token-tax-toggle-track::after {
  transform: translateX(22px);
}

.token-tax-toggle input:focus-visible + .token-tax-toggle-track {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 3px rgba(197, 139, 255, 0.22);
}

.token-tax-rate-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.token-tax-rate-field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(8, 13, 18, 0.55);
  font: inherit;
}

.token-tax-rate-field input:disabled {
  opacity: 0.45;
}

.token-tax-policy-note {
  display: grid;
  gap: 6px;
  border-left: 3px solid rgba(91, 211, 233, 0.55);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(44, 178, 203, 0.08);
}

.token-tax-restriction-actions {
  grid-template-columns: minmax(120px, auto);
}

.table-action {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #24170b;
  background: linear-gradient(120deg, var(--accent) 0%, #ffb86f 100%);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.table-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.table-action:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  filter: saturate(0.8);
}

.danger-action {
  color: #fff4f0;
  background: linear-gradient(120deg, #d85f5f 0%, #ff8a65 100%);
}

.persistent-action-group {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  align-items: center;
  justify-content: end;
}

.stats-record-action-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: max-content;
}

.stats-record-action-group .table-action {
  width: 32px;
  min-height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9px;
  padding: 0;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.06);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.stats-record-action-group .table-action:hover {
  transform: none;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(148, 163, 184, 0.13);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
}

.stats-record-action-group .stats-record-convert-action {
  color: #9ee6c2;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.08);
}

.stats-record-action-group .stats-record-convert-action:hover {
  color: #d1fae5;
  border-color: rgba(52, 211, 153, 0.52);
  background: rgba(16, 185, 129, 0.16);
}

.stats-record-action-group .danger-action {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(244, 63, 94, 0.07);
}

.stats-record-action-group .danger-action:hover {
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(244, 63, 94, 0.15);
}

.stats-record-action-group .table-action:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.62);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .manual-stats-card .panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .manual-stats-card .panel-actions {
    width: auto;
    gap: 8px;
  }

  .manual-stats-card .panel-actions .ghost-button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .stats-record-fields {
    grid-template-columns: 1fr;
  }

  .stats-record-action-group {
    flex-wrap: wrap;
    min-width: 112px;
  }
}

.persistent-action-group .table-action {
  white-space: nowrap;
}

.stop-loss-card {
  width: min(640px, 100%);
}

.stop-loss-card .panel-header {
  align-items: start;
}

.stop-loss-summary {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stop-loss-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stop-loss-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.stop-loss-option.is-best {
  border-color: rgba(91, 231, 139, 0.55);
  background:
    linear-gradient(120deg, rgba(91, 231, 139, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.stop-loss-option.is-unavailable {
  opacity: 0.66;
}

.stop-loss-option-header {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.stop-loss-best-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 999px;
  background: #5be78b;
  box-shadow: 0 0 0 4px rgba(91, 231, 139, 0.16);
}

.stop-loss-best-dot.is-empty {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.stop-loss-option h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.stop-loss-option p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stop-loss-option-amount {
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.stop-loss-option-amount strong {
  font-size: 18px;
  line-height: 1.2;
}

.stop-loss-option-amount span {
  color: var(--muted);
  font-size: 12px;
}

.stop-loss-legs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 22px;
}

.stop-loss-legs span {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  line-height: 1.3;
}

.persistent-fallback-scroll {
  max-height: 360px;
}

.persistent-fallback-table {
  min-width: 1180px;
}

.persistent-fallback-table th:last-child,
.persistent-fallback-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: rgba(18, 26, 33, 0.98);
  box-shadow: -12px 0 18px rgba(8, 13, 18, 0.32);
}

.persistent-fallback-table th:last-child {
  z-index: 3;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
  color: #1e150d;
  background: rgba(255, 184, 111, 0.9);
}

.status-badge-idle {
  color: #fff5e7;
  background: rgba(255, 255, 255, 0.18);
}

.status-badge-running {
  color: #1e150d;
  background: linear-gradient(120deg, #ffd166 0%, #ffb347 100%);
}

.status-badge-success {
  color: #0d1f16;
  background: linear-gradient(120deg, #79e7a5 0%, #43c77a 100%);
}

.status-badge-error {
  color: #fff1f1;
  background: linear-gradient(120deg, #d85f5f 0%, #ff7d7d 100%);
}

.cell-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.table-empty,
.empty-state {
  color: var(--muted);
  text-align: center;
}

.empty-state {
  padding: 22px 0;
}

.empty-state.compact {
  padding: 8px 0;
}

@media (max-width: 980px) {
  .panel,
  .panel-third,
  .panel-half,
  .panel-wide,
  .panel-full {
    grid-column: span 12;
  }

  .settings-form,
  .settings-section,
  .settings-config-grid,
  .settings-filter-bar,
  .settings-process-actions {
    grid-template-columns: 1fr;
  }

  .settings-tab-bar {
    padding-bottom: 6px;
  }

  .settings-tab-button {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .settings-process-buttons {
    justify-content: flex-start;
  }

  .summary-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-item b {
    text-align: left;
  }

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

  .pie-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .pie-grid-three .pie-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
  }

  .pie-grid-three .pie-chart {
    width: 150px;
    height: 150px;
  }

  .pie-grid-three .pie-chart::before {
    inset: 34px;
  }

  .pie-chart {
    width: 150px;
    height: 150px;
  }

  .pie-chart::before {
    inset: 34px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .topbar-actions,
  .topbar-status {
    width: 100%;
  }

  .topbar-actions {
    min-width: 0;
    justify-items: stretch;
  }

  .topbar-status {
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .topbar-status .topbar-meta {
    text-align: left;
  }

  .topbar-button-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: 10px;
  }

  .topbar-button-group .ghost-button,
  .topbar-button-group form,
  .topbar-button-group form .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .topbar-button-group .ghost-button {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .panel-actions {
    width: 100%;
  }

  #logs-modal .panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
  }

  #logs-modal .panel-actions {
    width: auto;
  }

  .liquidity-status-header {
    position: relative;
    display: block;
    min-height: 48px;
    padding-right: 108px;
    margin-bottom: 10px;
  }

  .liquidity-status-header .panel-actions {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    display: block;
  }

  .liquidity-status-copy {
    display: block;
    min-width: 0;
  }

  .liquidity-status-copy .panel-title {
    font-size: 20px;
    line-height: 38px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .liquidity-status-copy .panel-subtitle {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .liquidity-scan-action {
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 14px;
  }

  .liquidity-status-banner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .liquidity-status-main {
    width: 100%;
    flex: 1 1 100%;
    gap: 8px;
  }

  .liquidity-backup-indicator {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
    white-space: normal;
  }

  .liquidity-status-banner .status-badge {
    padding: 4px 9px;
    font-size: 12px;
    flex: 0 0 auto;
  }

  #liquidity-scan-message {
    flex: 1 1 180px;
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .stats-header {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
  }

  .stats-header-copy {
    min-height: 0;
    padding-right: 0;
  }

  .stats-header-copy .panel-title {
    line-height: 1.2;
    white-space: nowrap;
  }

  .stats-header-copy .panel-subtitle {
    margin-top: 2px;
    line-height: 1.35;
  }

  .stats-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    margin-top: 0;
  }

  .stats-action-buttons {
    position: static;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .stats-action-buttons .ghost-button,
  .stats-action-buttons .panel-button {
    min-height: 40px;
    border-radius: 15px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .stats-action-buttons .button-label-full {
    display: none;
  }

  .stats-action-buttons .button-label-short {
    display: inline;
  }

  .stats-filter-row {
    grid-template-columns: minmax(0, 1fr) minmax(108px, 0.42fr);
    gap: 8px;
    width: 100%;
  }

  .stats-filter-row .date-filter,
  .stats-filter-row .stats-date-filter,
  .stats-filter-row .date-filter:not(.stats-date-filter) {
    min-width: 0;
  }

  .stats-filter-row .date-filter-display {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    border-radius: 15px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .stats-filter-row .filter-select {
    min-width: 0;
    max-width: 100%;
  }

  .stats-filter-row .stats-date-filter input[type="date"] {
    height: 100%;
    min-height: 0;
    border: 0;
    padding: 0;
  }

  .list-scroll {
    max-height: min(42vh, 360px);
  }

  .table-scroll {
    max-height: min(48vh, 420px);
  }

  #blacklist-form {
    grid-template-columns: 1fr;
  }

  .blacklist-token-chip {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .blacklist-token-chip .token-chip-actions {
    grid-template-columns: 1fr max-content max-content;
    justify-content: stretch;
    width: 100%;
  }

  .blacklist-token-chip .token-chip-actions.no-liquidity-retest {
    grid-template-columns: 1fr max-content;
  }
}

@media (max-width: 640px) {
  #settings-modal:not([hidden]) {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .dashboard-shell,
  .auth-shell {
    width: min(100% - 20px, 1200px);
  }

  .auth-panel,
  .topbar,
  .panel,
  .modal-card {
    border-radius: 22px;
    padding: 18px;
  }

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

  .topbar h1 {
    font-size: clamp(18px, 5.2vw, 24px);
    line-height: 1.08;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .stop-loss-option {
    grid-template-columns: 1fr;
  }

  .stop-loss-option-amount {
    justify-items: start;
    text-align: left;
  }

  .stop-loss-legs {
    padding-left: 0;
  }

  .topbar-subline {
    margin-top: 8px;
  }

  .topbar-heartbeat {
    font-size: 13px;
  }

  .topbar-status {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .topbar-service-statuses {
    gap: 8px;
  }

  .topbar-button-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .topbar-button-group .ghost-button {
    min-height: 36px;
    border-radius: 14px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .function-action-grid {
    border-radius: 16px;
  }

  .function-action-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    gap: 14px;
    padding: 16px;
  }

  .function-action-copy h2 {
    font-size: 20px;
  }

  .function-action-row .panel-button {
    width: 100%;
    min-width: 0;
  }

  .liquidity-status-header {
    min-height: 44px;
    padding-right: 98px;
  }

  .liquidity-status-header .panel-actions {
    top: 0;
  }

  .liquidity-status-copy .panel-title {
    font-size: 19px;
    line-height: 34px;
  }

  .liquidity-scan-action {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .stats-header-copy {
    padding-right: 170px;
  }

  .stats-header {
    position: relative;
    display: block;
  }

  .stats-actions {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .stats-action-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: auto;
    gap: 8px;
  }

  .stats-action-buttons .ghost-button,
  .stats-action-buttons .panel-button {
    width: auto;
    min-width: 48px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
  }

  .stats-filter-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stats-filter-row .date-filter-display {
    min-height: 48px;
    border-radius: 16px;
    padding: 11px 14px;
    font-size: 16px;
  }

  .stats-filter-row .filter-select {
    min-height: 48px;
  }

  .logs-toolbar {
    align-items: stretch;
  }

  #logs-tab-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 18px;
  }

  #logs-tab-toggle .toggle-pill {
    padding-inline: 8px;
    white-space: nowrap;
  }

  .logs-search-form {
    width: 100%;
  }

  .logs-output {
    min-height: 260px;
    max-height: min(56vh, 460px);
    font-size: 12px;
  }

  .chart-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
  }

  .stats-chart-bars {
    margin-top: 14px;
  }

  .cny-rate-summary {
    margin: 2px 0 12px;
    padding: 9px 10px;
    gap: 7px 10px;
    font-size: 12px;
  }

  .cny-rate-values {
    justify-content: flex-start;
    gap: 7px 10px;
    min-width: 100%;
  }

  .chart-scale-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chart-scale-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 13px;
  }

  .chart-scale-card span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chart-scale-card strong {
    font-size: 20px;
  }

  .chart-bar-group {
    padding: 4px 12px;
  }

  .chart-row {
    padding: 11px 0;
  }

  .chart-meta {
    gap: 10px;
  }

  .trend-header {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .trend-panel-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .trend-actions,
  .trend-day-toggle {
    width: 100%;
  }

  .trend-day-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 18px;
  }

  .trend-day-toggle .toggle-pill {
    min-width: 0;
    padding: 10px 8px;
  }

  .trend-card-meta {
    justify-content: stretch;
  }

  .trend-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    gap: 10px;
  }

  .trend-metric {
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .trend-money-toggle {
    justify-content: flex-start;
    text-align: left;
  }

  .profit-trend-chart {
    min-height: 180px;
  }

  .profit-trend-svg {
    width: 100%;
  }

  .profit-trend-empty {
    min-height: 180px;
  }

  .trend-metric span {
    font-size: 12px;
  }

  .trend-metric strong {
    font-size: 18px;
  }

  .blacklist-form {
    flex-direction: column;
  }

  .blacklist-panel {
    padding: 16px;
  }

  .blacklist-panel .panel-header {
    margin-bottom: 12px;
  }

  .token-risk-panel-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .token-risk-panel-actions,
  .token-risk-tabs {
    width: 100%;
  }

  .token-risk-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }

  .token-risk-tabs .toggle-pill {
    min-width: 0;
    padding: 10px 8px;
  }

  .blacklist-panel .panel-title {
    font-size: 22px;
    line-height: 1.15;
  }

  .blacklist-panel .panel-subtitle {
    margin-top: 6px;
    font-size: 14px;
  }

  #blacklist-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #blacklist-input {
    min-height: 46px;
    border-radius: 14px;
    padding: 11px 13px;
    font-size: 14px;
  }

  #blacklist-form .panel-button {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
    padding: 11px 14px;
  }

  .token-chip {
    align-items: stretch;
    flex-direction: column;
  }

  .token-chip-actions {
    justify-content: space-between;
  }

  .blacklist-scope-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .blacklist-scope-option {
    justify-content: flex-start;
    min-width: 0;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .blacklist-scope-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .blacklist-chain-group {
    gap: 8px;
    border-radius: 17px;
    padding: 10px;
  }

  .blacklist-chain-header {
    padding-bottom: 2px;
  }

  .blacklist-source-group {
    gap: 8px;
    border-radius: 15px;
    padding: 10px;
  }

  .blacklist-source-header {
    padding-bottom: 8px;
  }

  .blacklist-token-chip {
    gap: 10px;
    border-radius: 14px;
    padding: 12px;
  }

  .blacklist-token-chip .token-chip-meta strong {
    font-size: 15px;
    line-height: 1.35;
  }

  .blacklist-token-chip .token-chip-tags {
    gap: 5px;
    margin-top: 6px;
  }

  .blacklist-token-chip .token-chip-tag {
    padding: 5px 8px;
    font-size: 11px;
  }

  .blacklist-token-chip .token-chip-actions,
  .blacklist-token-chip .token-chip-actions.has-liquidity-retest {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .blacklist-token-chip .token-chip-actions.no-liquidity-retest {
    grid-template-columns: 1fr;
  }

  .blacklist-token-chip.tax-token-chip .token-chip-actions {
    width: 100%;
    min-width: 0;
  }

  .blacklist-token-chip .blacklist-scope-inline {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .blacklist-token-chip button {
    width: 100%;
    min-height: 38px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 12px;
  }

  .blacklist-token-chip .token-chip-actions.no-liquidity-retest .token-chip-danger-button {
    grid-column: 1 / -1;
  }

  .filter-toolbar {
    grid-template-columns: 1fr;
  }

  .pie-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
  }

  .pie-grid-three .pie-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
  }

  .pie-grid-three .pie-chart {
    width: 140px;
    height: 140px;
  }

  .pie-grid-three .pie-chart::before {
    inset: 30px;
  }

  .pie-chart {
    width: 140px;
    height: 140px;
  }

  .pie-chart::before {
    inset: 30px;
  }

  .pie-legend {
    width: 100%;
    max-height: min(34vh, 240px);
    padding-right: 2px;
  }

  .pie-legend-item {
    width: 100%;
  }

  .pie-legend-copy strong,
  .pie-legend-copy span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .opportunity-bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
  }

  .opportunity-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .opportunity-token-popover {
    left: 0;
    right: 0;
    min-width: 0;
  }
}
