:root {
  --bg: #23272c;
  --panel: #2c3035;
  --panel-soft: #2f343a;
  --panel-strong: #343941;
  --panel-contrast: #0f1318;
  --line: #454b55;
  --line-strong: #5b6370;
  --text: #edf1f7;
  --muted: #b4bbc8;
  --green: #49a26a;
  --green-soft: rgba(73, 162, 106, 0.18);
  --red: #e05f5f;
  --red-soft: rgba(224, 95, 95, 0.18);
  --blue: #6c8cff;
  --ink: #f2f4f8;
  --topnav-text: #c5ccda;
  --topnav-active-bg: #11151b;
  --topnav-active-text: #ffffff;
  --input-bg: #262b31;
  --surface-hover: #343941;
  --quote-bg: #f6f7fb;
  --quote-text: #1b1f25;
  --chart-bg: linear-gradient(180deg, rgba(108, 140, 255, 0.08), transparent), #262b31;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(108, 140, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #24282d 0%, #1f2327 100%);
}

body.theme-light {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #fbfcfe;
  --panel-strong: #f3f6fb;
  --panel-contrast: #1d2433;
  --line: #e7ebf1;
  --line-strong: #d7dde7;
  --text: #1d2433;
  --muted: #7b8494;
  --green: #3d9564;
  --green-soft: #dff5e7;
  --red: #d65959;
  --red-soft: #fbe0e0;
  --blue: #3f6fe5;
  --ink: #222833;
  --topnav-text: #536079;
  --topnav-active-bg: #1d2433;
  --topnav-active-text: #ffffff;
  --input-bg: #ffffff;
  --surface-hover: #f3f6fb;
  --quote-bg: #eef2f8;
  --quote-text: #1d2433;
  --chart-bg: linear-gradient(180deg, rgba(63, 111, 229, 0.08), transparent), #f7f9fd;
  --shadow: 0 12px 32px rgba(23, 30, 44, 0.06);
  background:
    radial-gradient(circle at top left, rgba(63, 111, 229, 0.07), transparent 24%),
    linear-gradient(180deg, #fafbfe 0%, #f2f5fb 100%);
}

body.theme-neo-dark {
  --bg: #161a20;
  --panel: #1d222a;
  --panel-soft: #232934;
  --panel-strong: #29303c;
  --panel-contrast: #0a0d12;
  --line: #323949;
  --line-strong: #495266;
  --text: #f4f7fb;
  --muted: #98a3b7;
  --green: #5bc68a;
  --green-soft: rgba(91, 198, 138, 0.18);
  --red: #ff7474;
  --red-soft: rgba(255, 116, 116, 0.16);
  --blue: #7da2ff;
  --ink: #f8fbff;
  --topnav-text: #c8d1e2;
  --topnav-active-bg: #090d13;
  --topnav-active-text: #ffffff;
  --input-bg: #171c24;
  --surface-hover: #272e3a;
  --quote-bg: #eef2f8;
  --quote-text: #1d2433;
  --chart-bg: linear-gradient(180deg, rgba(125, 162, 255, 0.08), transparent), #171c24;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at top left, rgba(125, 162, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #161a20 0%, #11151b 100%);
}

.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 36, 51, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 36, 51, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 88%);
}

.app-shell,
.page-shell {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
  position: relative;
  z-index: 1;
}

.page-shell--narrow {
  width: min(1180px, calc(100% - 32px));
}

.topbar,
.toolbar,
.scanner-card,
.issues-card,
.hero,
.panel,
.stat-card,
.filters {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-radius: 22px;
}

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

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  background: #000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

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

.topnav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topnav__link {
  cursor: pointer;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--topnav-text);
}

.topnav__link.is-active {
  background: var(--topnav-active-bg);
  color: var(--topnav-active-text);
}

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

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lang-switch__btn {
  cursor: pointer;
  position: relative;
  z-index: 1;
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.lang-switch__btn:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.lang-switch__btn.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #3a4454 0%, var(--panel-contrast) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 6px 16px rgba(0, 0, 0, 0.28);
}

.lang-switch__btn:active {
  transform: scale(0.97);
}

body.theme-light .lang-switch__btn.is-active {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f8 100%);
  color: var(--panel-contrast);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 12px rgba(15, 19, 24, 0.12);
}

.theme-picker {
  position: relative;
}

.theme-picker__toggle {
  gap: 8px;
}

.theme-picker__caret {
  font-size: 12px;
  color: var(--muted);
}

.theme-picker__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  z-index: 20;
}

.theme-picker__option {
  cursor: pointer;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 700;
}

.theme-picker__option:hover,
.theme-picker__option.is-active {
  background: var(--panel-strong);
  border-color: var(--line);
}

#account-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 160px;
  gap: 2px;
}

.account-button__title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
}

.account-button__meta {
  font-size: 11px;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}


.status-inline,
.status-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c3a341;
  box-shadow: 0 0 0 6px rgba(195, 163, 65, 0.14);
}

.status-dot.is-live {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(61, 149, 100, 0.14);
}

.status-dot.is-error {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(214, 89, 89, 0.12);
}

.content {
  margin-top: 18px;
  min-width: 0;
}

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.page-head h1,
h1,
h2,
h3,
p {
  margin: 0;
}

.page-head h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-head p {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
}

.page-head__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
}

.pulse-box {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-strong) 95%, transparent);
  min-width: 110px;
}

.pulse-box__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pulse-box__value {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  margin-bottom: 18px;
}

.toolbar__main,
.toolbar__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar-control select,
.searchbox input,
.filter input,
.filter select {
  min-width: 150px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.toolbar-control--strategy select {
  min-width: 190px;
}

.searchbox {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.searchbox__icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.searchbox input {
  min-width: 260px;
  padding-left: 36px;
}

.ghost-button,
.refresh-button {
  cursor: pointer;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.ghost-button--dark {
  background: var(--panel-contrast);
  color: #ffffff;
  border-color: var(--panel-contrast);
}

.auth-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border: 0;
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(10px);
}

.auth-panel {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel-strong) 72%, transparent), transparent),
    var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  padding: 24px;
}

.auth-panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.auth-panel__head {
  padding-right: 40px;
}

.auth-panel__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-panel h2,
.auth-profile h3 {
  margin: 0;
  color: var(--text);
}

.auth-panel h2 {
  font-size: clamp(28px, 5vw, 38px);
}

.auth-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 22px 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.auth-tabs__button {
  cursor: pointer;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}

.auth-tabs__button.is-active {
  background: var(--panel-contrast);
  color: #ffffff;
}

.auth-form,
.auth-profile {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  padding: 0 14px;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent);
}

.auth-submit {
  cursor: pointer;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #49a26a);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
}

.auth-submit:disabled,
.auth-logout:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-message--error {
  color: var(--red);
}

.auth-message--success {
  color: var(--green);
}

.auth-profile {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.auth-profile p:empty {
  display: none;
}

.auth-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--panel-contrast);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.auth-profile__email {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  word-break: break-all;
  white-space: pre-line;
}

.auth-admin-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2ca96b, #48d597);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(44, 169, 107, 0.28);
}

.auth-logout {
  grid-column: 1 / -1;
  width: 100%;
}

.auth-subscription {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.auth-subscription__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-subscription__plan {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.auth-subscription__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.auth-cabinet-tabs {
  grid-column: 1 / -1;
}

.auth-cabinet-block {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.auth-cabinet-block h4 {
  margin: 0 0 8px;
}

.auth-cabinet-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  margin-bottom: 8px;
}

.auth-cabinet-grid input,
.auth-cabinet-grid select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text);
}

.auth-cabinet-grid--admin {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
}

#admin-users {
  margin-top: 14px;
}

.cab-watch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.ghost-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.ghost-tabs__tab {
  cursor: pointer;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
}

.ghost-tabs__tab.is-active {
  background: var(--panel-contrast);
  color: #ffffff;
}

.scanner-card,
.issues-card,
.panel {
  padding: 18px;
  border-radius: 24px;
}

.scanner-card__head,
.panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.scanner-card__head h2,
.panel__header h2 {
  font-size: 22px;
}

.scanner-card__head p,
.panel__header p {
  color: var(--muted);
}

.table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.table-wrap--scanner {
  max-width: 100%;
  touch-action: pan-y;
}

.scanner-table,
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

.scanner-table {
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.scanner-table th,
.scanner-table td,
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.scanner-table th,
.scanner-table td {
  overflow: hidden;
}

.scanner-table .mono,
.scanner-table .spread-pill,
.scanner-table .status-pill,
.scanner-table .open-link,
.scanner-table .sort-button {
  white-space: nowrap;
}

.scanner-table th,
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 13px;
  font-weight: 800;
}

.scanner-table td,
td {
  font-size: 15px;
  vertical-align: middle;
}

.scanner-table tbody tr:hover {
  background: var(--surface-hover);
}

.sort-button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
}

.sort-arrow {
  color: var(--green);
  min-width: 10px;
}

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

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

.bank-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.coin-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f8d35c, #f3a64a);
  color: #342400;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 28px;
}

.coin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-name,
.market-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 16px;
}

.quote-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--quote-bg);
  font-size: 12px;
  color: var(--quote-text);
}

.market-sub,
.arb-route {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.exchange-cell,
.exchange-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.exchange-mini span,
.exchange-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exchange-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.exchange-icon--mini {
  width: 16px;
  height: 16px;
}

.arb-pair-row--top td {
  border-bottom: none;
  padding-bottom: 8px;
}

.arb-pair-row--bottom td {
  padding-top: 0;
}

.arb-pair-row--bottom td {
  border-bottom: 1px solid var(--line);
}

.arb-coin-link {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
}

.arb-coin-link:hover {
  text-decoration: underline;
}

.arb-legend {
  margin: 8px 0 0;
  max-width: 920px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.arb-leg {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.arb-leg__lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.arb-leg__action {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.arb-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.arb-arrow--up {
  color: #20734b;
  background: var(--green-soft);
}

.arb-arrow--down {
  color: #b23e3e;
  background: var(--red-soft);
}

.arb-leg__price {
  font-size: 13px;
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
}

.arb-fund {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.arb-fund__rate {
  font-size: 13px;
  font-weight: 700;
}

.arb-fund__interval {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.arb-fund__timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.arb-fund__clock {
  font-size: 11px;
  opacity: 0.85;
}

.arb-merge-cell {
  text-align: center;
  vertical-align: middle;
}

.arb-merge-cell .spread-pill {
  min-width: 88px;
}

.arb-spread-stack {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.arb-net-line {
  display: grid;
  gap: 2px;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.arb-net-line__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arb-verdict-cell {
  min-width: 108px;
}

.arb-verdict {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.arb-verdict__hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  max-width: 120px;
}

.exchange-mini--short span {
  text-transform: lowercase;
  font-weight: 700;
}

.pill,
.spread-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
}

.spread-pill {
  min-width: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.status-pill {
  min-width: 0;
  font-size: 12px;
  padding: 6px 10px;
}

.transfer-status {
  display: grid;
  gap: 5px;
  min-width: 112px;
}

.transfer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.transfer-pill--open {
  background: var(--green-soft);
  color: #236b46;
}

.transfer-pill--closed {
  background: var(--red-soft);
  color: #a94141;
}

.watch-button {
  cursor: pointer;
  min-height: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--blue) 80%, #d2dbee);
  border-radius: 999px;
  background: linear-gradient(135deg, #1f3b8f 0%, #2a66d8 100%);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0 12px;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 22px rgba(42, 102, 216, 0.26);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.watch-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(42, 102, 216, 0.34);
  filter: brightness(1.04);
}

.watch-button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
  box-shadow: none;
}

.watch-button.is-loading .watch-button__label {
  opacity: 0.55;
}

.watch-button.is-loading .watch-button__dot {
  animation: watchPulse 0.9s ease-in-out infinite;
}

.watch-button__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52d2ff;
  box-shadow: 0 0 0 3px rgba(82, 210, 255, 0.2);
}

.watch-button__label {
  line-height: 1;
}

@keyframes watchPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.watch-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
}

.watch-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 24, 38, 0.5);
}

.watch-modal__card {
  position: relative;
  width: min(92vw, 440px);
  margin: 10vh auto 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 16px;
}

.watch-modal__card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.watch-modal__text {
  margin: 10px 0 8px;
  color: var(--muted);
}

.watch-modal__row {
  display: flex;
  gap: 8px;
}

.watch-modal__input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 0 10px;
  font: 600 13px/1 "IBM Plex Mono", monospace;
  color: var(--text);
}

.watch-modal__copy {
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--blue) 70%, var(--line));
  background: color-mix(in srgb, var(--blue) 16%, var(--panel-soft));
  color: var(--text);
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

.watch-modal__bot-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.watch-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

a.exchange-cell,
a.exchange-mini {
  text-decoration: none;
  color: inherit;
}

.status-pill--open,
.spread-pill.positive {
  background: var(--green-soft);
  color: #236b46;
}

.spread-pill.negative {
  background: var(--red-soft);
  color: #a94141;
}

.status-pill--watch {
  background: rgba(108, 140, 255, 0.18);
  color: color-mix(in srgb, var(--blue) 78%, #ffffff);
}

.status-pill--risk {
  background: var(--red-soft);
  color: #a94141;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline: 12px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
}

.spread-link {
  display: inline-flex;
  text-decoration: none;
}

.sparkline {
  display: block;
  width: 148px;
  height: 38px;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

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

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

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

.bank-rate {
  font-weight: 700;
}

.bank-rate--soft {
  background: color-mix(in srgb, var(--green-soft) 45%, transparent);
}

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

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 24px;
  margin-bottom: 20px;
}

.hero--compact h1 {
  font-size: clamp(28px, 4vw, 48px);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero__lead {
  max-width: 680px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  min-width: 220px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.market-detail-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.detail-stat,
.chart-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.detail-stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.detail-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

#detail-symbol {
  font-size: clamp(18px, 2vw, 22px);
}

.detail-chart-stack {
  display: grid;
  gap: 16px;
}

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

.detail-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.detail-chip strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
}

.detail-chip--positive {
  background: var(--green-soft);
  color: #236b46;
}

.detail-chip--negative {
  background: var(--red-soft);
  color: #a94141;
}

.detail-range-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 700;
}

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

.chart-meta__item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.chart-meta__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.chart-meta__value {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.refresh-button--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

canvas {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: var(--chart-bg);
  border: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .topbar,
  .page-head,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .topnav {
    justify-content: flex-start;
  }

  .topbar__side,
  .page-head__meta {
    justify-content: flex-start;
  }
}

.app-body--arbitrage .scanner-table th:nth-child(1),
.app-body--arbitrage .scanner-table td:nth-child(1) {
  width: 9%;
}

.app-body--arbitrage .scanner-table th:nth-child(2),
.app-body--arbitrage .scanner-table td:nth-child(2) {
  width: 21%;
}

.app-body--arbitrage .scanner-table th:nth-child(3),
.app-body--arbitrage .scanner-table td:nth-child(3) {
  width: 13%;
}

.app-body--arbitrage .scanner-table th:nth-child(4),
.app-body--arbitrage .scanner-table td:nth-child(4) {
  width: 13%;
}

.app-body--arbitrage .scanner-table th:nth-child(5),
.app-body--arbitrage .scanner-table td:nth-child(5) {
  width: 8%;
}

.app-body--arbitrage .scanner-table th:nth-child(6),
.app-body--arbitrage .scanner-table td:nth-child(6) {
  width: 11%;
}

.app-body--arbitrage .scanner-table th:nth-child(7),
.app-body--arbitrage .scanner-table td:nth-child(7) {
  width: 9%;
}

.app-body--arbitrage .scanner-table th:nth-child(8),
.app-body--arbitrage .scanner-table td:nth-child(8) {
  width: 9%;
}

.app-body--arbitrage .scanner-table th:nth-child(9),
.app-body--arbitrage .scanner-table td:nth-child(9) {
  width: 7%;
}

.scanner-card {
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .table-wrap--scanner {
    overflow-x: auto;
    touch-action: auto;
  }

  .scanner-table {
    min-width: 960px;
    table-layout: auto;
  }

  .app-shell,
  .page-shell {
    width: min(100%, calc(100% - 20px));
  }

  .page-head__meta,
  .detail-stats,
  .chart-meta,
  .market-detail-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar__side,
  .toolbar__main {
    width: 100%;
  }

  .searchbox,
  .searchbox input {
    width: 100%;
  }

  .hero {
    flex-direction: column;
  }

  .hero__meta {
    align-items: flex-start;
  }

  .detail-chart-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-panel {
    width: min(94vw, 560px);
    padding: 18px;
  }

  .auth-profile {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .auth-avatar {
    width: 50px;
    height: 50px;
  }

  .auth-cabinet-grid,
  .auth-cabinet-grid--admin {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .page-shell {
    width: min(100%, calc(100% - 14px));
    padding-top: 10px;
  }

  .topbar {
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand__copy {
    min-width: 0;
  }

  .brand__copy strong {
    font-size: 16px;
    line-height: 1.15;
  }

  .brand__copy span {
    font-size: 11px;
  }

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

  .topnav__link {
    min-width: 0;
    padding: 10px 8px;
    font-size: 13px;
    text-align: center;
  }

  .topbar__side {
    width: 100%;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .lang-switch,
  .theme-picker,
  #account-button {
    width: 100%;
    min-width: 0;
  }

  .theme-picker__toggle,
  #account-button {
    min-height: 44px;
  }

  #account-button {
    align-items: center;
    text-align: center;
    min-width: 0;
    padding-inline: 10px;
  }

  .account-button__title,
  .account-button__meta {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-head__meta,
  .detail-stats,
  .chart-meta {
    grid-template-columns: 1fr;
  }

  .toolbar-control select,
  .searchbox input {
    min-width: 0;
  }

  .scanner-card,
  .issues-card,
  .panel {
    padding: 14px;
  }

  .auth-panel {
    width: min(96vw, 420px);
    padding: 14px;
    border-radius: 18px;
  }

  .auth-panel h2 {
    font-size: 22px;
  }

  .auth-profile {
    padding: 14px;
    gap: 12px;
  }

  .auth-cabinet-tabs {
    overflow-x: auto;
  }

  .ghost-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .ghost-tabs__tab {
    white-space: nowrap;
  }

  .auth-cabinet-grid,
  .auth-cabinet-grid--admin {
    grid-template-columns: 1fr;
  }

  .auth-cabinet-grid input,
  .auth-cabinet-grid select,
  .auth-submit,
  .auth-logout,
  .ghost-button {
    width: 100%;
  }

  .cab-watch-row {
    flex-direction: column;
    align-items: stretch;
  }
}
