:root {
  color-scheme: dark;
}

.account-security-slot {
  display: contents;
}

.totp-migration-setup {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.totp-migration-setup img {
  display: block;
  width: 124px;
  height: 124px;
  border: 1px solid var(--border);
  background: #fff;
}

.totp-migration-setup > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.totp-migration-setup span,
.totp-migration-setup small {
  color: var(--muted, #93a9c7);
  font-size: 11px;
  line-height: 1.45;
}

.totp-migration-setup code {
  overflow-wrap: anywhere;
  color: var(--text, #f5f8ff);
  font-size: 13px;
  letter-spacing: .08em;
}

.totp-migration-dialog .form-error {
  min-height: 17px;
  color: var(--danger, #ff707c);
  font-size: 11px;
}

@media (max-width: 520px) {
  .totp-migration-setup {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* Receipt checker: compact evidence-first workspace. */
.receipt-checker-screen { display: grid; gap: 12px; }
.receipt-checker-toolbar { display: grid; grid-template-columns: minmax(240px, 1.25fr) minmax(360px, 1.15fr) minmax(140px, .55fr) auto auto auto auto; align-items: center; gap: 8px; padding: 12px; }
.receipt-checker-toolbar select,
.receipt-checker-toolbar input,
.receipt-fields input,
.receipt-fields select { width: 100%; min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface, #0d1625); color: var(--text, #f5f8ff); padding: 0 10px; }
.receipt-checker-search { position: relative; }
.receipt-checker-search .action-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; color: #77aefb; pointer-events: none; }
.receipt-checker-search input { padding-left: 36px; }
.receipt-status-filters { display: grid; grid-template-columns: repeat(4, minmax(72px, 1fr)); min-height: 38px; }
.receipt-status-filters button { min-width: 0; padding: 0 9px; white-space: nowrap; }
.receipt-attachment-filter { white-space: nowrap; color: var(--muted, #93a9c7); font-size: 12px; }
.receipt-attachment-filter input { width: auto; min-height: 0; margin: 0 5px 0 0; padding: 0; accent-color: #4d93ee; vertical-align: -2px; }
.receipt-upload-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; }
.receipt-upload-button .action-icon { width: 17px; }
.receipt-checker-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.55fr); gap: 12px; align-items: start; }
.receipt-queue-panel { min-height: 610px; padding: 14px; }
.receipt-queue { display: grid; gap: 8px; margin-top: 10px; }
.statement-imports { margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: rgba(7, 16, 29, .45); }
.statement-imports-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.statement-imports-head strong { font-size: 12px; }
.statement-imports-head span,.muted-copy { color: var(--muted, #93a9c7); font-size: 10px; }
.statement-imports-list { display: grid; gap: 6px; margin-top: 8px; }
.statement-import-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding-top: 6px; border-top: 1px solid rgba(65, 87, 116, .55); }
.statement-import-row:first-child { padding-top: 0; border-top: 0; }
.statement-import-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.statement-import-row time { color: #a9caff; font-size: 10px; font-variant-numeric: tabular-nums; }
.statement-import-row span { color: var(--muted, #93a9c7); font-size: 10px; }
.statement-import-row b { color: #54dfa0; font-size: 10px; font-weight: 700; }
.receipt-queue-card { width: 100%; min-width: 0; border-radius: 8px; }
.receipt-queue-card.active { border-color: #3d86ef; background: #11213a; }
.receipt-card-toggle { width: 100%; min-height: 88px; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1.55fr) minmax(112px, .92fr); grid-template-areas: "sender amount status" "requisite requisite arrived"; gap: 8px 12px; padding: 12px 13px 11px 18px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.receipt-card-toggle:focus-visible { outline: 2px solid #72aefb; outline-offset: -3px; border-radius: 7px; }
.receipt-card-toggle:active { transform: scale(.99); }
.receipt-card-toggle .fintech-time { grid-area: arrived; }
.receipt-card-toggle .fintech-requisite-owner { grid-area: requisite; }
.receipt-card-toggle .fintech-amount { grid-area: amount; }
.receipt-card-toggle .fintech-identity { grid-area: sender; }
.receipt-card-toggle .fintech-status { grid-area: status; }
.receipt-card-sender,.receipt-card-requisite { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-card-amount,.receipt-card-arrived-at strong { font-variant-numeric: tabular-nums; }
.receipt-card-requisite { color: #a9caff !important; }
.receipt-card-arrived-at strong { color: #c7d5ea !important; font-size: 12px !important; }
html[data-theme="experimental"] .fintech-receipt-card.receipt-queue-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "primary"; overflow: hidden; }
html[data-theme="experimental"] .fintech-receipt-card .receipt-card-toggle { min-height: 88px; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1.55fr) minmax(112px, .92fr); grid-template-areas: "sender amount status" "requisite requisite arrived"; gap: 8px 12px; padding: 12px 13px 11px 18px; cursor: pointer; }
html[data-theme="experimental"] .fintech-receipt-card.active { border-color: #3d86ef; background: #11213a; }
.receipt-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.receipt-card-actions .small-action { text-decoration: none; }
.receipt-pager { margin-top: 12px; }
.receipt-analysis-panel { min-height: 610px; padding: 14px; border-top: 2px solid #327be5; }
.receipt-empty-state { min-height: 560px; display: grid; place-content: center; justify-items: center; gap: 9px; color: var(--muted, #93a9c7); text-align: center; }
.receipt-empty-state .action-icon { width: 38px; height: 38px; color: #5d9df5; }
.receipt-empty-state strong { color: var(--text, #f5f8ff); font-size: 16px; }
.receipt-empty-state span { max-width: 440px; line-height: 1.5; }
.receipt-workbench { display: grid; gap: 13px; }
.receipt-workbench-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.receipt-workbench-head h2 { margin: 2px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.eyebrow { color: #6fa8f7; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.receipt-progress { position: relative; min-height: 30px; overflow: hidden; border: 1px solid #29476e; border-radius: 7px; background: #0c1728; display: flex; align-items: center; padding: 0 10px; }
.receipt-progress i { position: absolute; inset: 0 auto 0 0; width: var(--progress, 0%); background: #1d4d87; transition: width .2s ease; }
.receipt-progress span { position: relative; z-index: 1; font-size: 12px; }
.receipt-evidence-rail { display: grid; grid-template-columns: 126px repeat(4, minmax(92px, 1fr)); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #0b1422; }
.receipt-risk,.receipt-signal { min-height: 72px; display: grid; align-content: center; padding: 10px 12px; border-right: 1px solid var(--border); }
.receipt-signal:last-child { border-right: 0; }
.receipt-risk { border-left: 4px solid #64748b; }
.receipt-risk[data-level="low"] { border-left-color: #25c985; }
.receipt-risk[data-level="medium"] { border-left-color: #e1a52b; }
.receipt-risk[data-level="high"] { border-left-color: #ef5d68; }
.receipt-risk strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.receipt-risk span,.receipt-signal span { color: var(--muted, #93a9c7); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.receipt-signal strong { margin-top: 5px; font-size: 12px; }
.receipt-signal[data-state="ok"] strong { color: #54dfa0; }
.receipt-signal[data-state="warn"] strong { color: #f0bd54; }
.receipt-signal[data-state="bad"] strong { color: #ff707c; }
.receipt-fields { display: grid; grid-template-columns: 1fr .55fr 1.25fr; gap: 9px; align-items: end; }
.receipt-fields label { display: grid; gap: 5px; color: var(--muted, #93a9c7); font-size: 11px; }
.receipt-fields [data-receipt-match] { min-height: 38px; }
.receipt-findings { border-top: 1px solid var(--border); padding-top: 11px; }
.receipt-findings h3,.receipt-review h3 { margin: 0 0 8px; font-size: 13px; }
.receipt-finding { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 8px; padding: 7px 0; color: var(--muted, #93a9c7); font-size: 12px; }
.receipt-finding::before { content: ""; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #627995; }
.receipt-finding.ok::before { background: #31cc8c; }.receipt-finding.warn::before { background: #e3aa3b; }.receipt-finding.bad::before { background: #ef6670; }
.receipt-technical { border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.receipt-technical summary { cursor: pointer; color: #a8c5ed; font-size: 12px; }
.receipt-technical dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 12px; margin: 10px 0 0; font-size: 11px; }
.receipt-technical dt { color: var(--muted, #93a9c7); }.receipt-technical dd { margin: 0; overflow-wrap: anywhere; }
.receipt-review { border-top: 1px solid var(--border); padding-top: 11px; }
.receipt-review-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.receipt-review-actions button { min-height: 34px; border: 1px solid #324967; border-radius: 7px; background: #111d30; color: #dce9fb; padding: 0 11px; cursor: pointer; }
.receipt-review-actions button[data-receipt-review="genuine"] { border-color: #247f60; }.receipt-review-actions button[data-receipt-review="suspicious"] { border-color: #9a4c56; }
.receipt-reasons { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: var(--muted, #93a9c7); font-size: 11px; }
.receipt-review p { min-height: 17px; margin: 8px 0 0; color: #6fa8f7; font-size: 11px; }
.statement-dialog { width: min(520px, calc(100vw - 24px)); border: 1px solid var(--border); border-radius: 12px; background: var(--surface, #101927); color: var(--text, #f5f8ff); padding: 0; }
.statement-dialog::backdrop { background: rgba(2, 8, 18, .76); backdrop-filter: blur(3px); }
.statement-dialog-form { display: grid; gap: 13px; padding: 18px; }
.statement-dialog-form .modal-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.statement-dialog-form h2 { margin: 3px 0 0; font-size: 18px; }
.statement-dialog-form p { margin: 0; color: var(--muted, #93a9c7); font-size: 12px; line-height: 1.5; }
.statement-dialog-form label { display: grid; gap: 6px; color: var(--muted, #93a9c7); font-size: 11px; }
.statement-dialog-form input { min-height: 42px; border: 1px solid var(--border); border-radius: 8px; background: #0b1422; color: var(--text, #f5f8ff); padding: 8px 10px; }
.statement-dialog-form .modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
  .receipt-checker-toolbar { grid-template-columns: minmax(220px, 1fr) minmax(330px, 1fr) minmax(130px, .5fr) auto auto; }
  .receipt-checker-layout { grid-template-columns: 1fr; }
  .receipt-queue-panel,.receipt-analysis-panel { min-height: auto; }
}

@media (max-width: 720px) {
  .receipt-checker-screen { gap: 8px; }
  .receipt-checker-toolbar { grid-template-columns: 1fr 1fr; gap: 7px; padding: 9px; }
  .receipt-checker-search { grid-column: 1 / -1; }
  .receipt-upload-button { grid-column: 1 / -1; }
  .receipt-status-filters { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
  .receipt-status-filters button { min-height: 44px; }
  .receipt-queue-panel,.receipt-analysis-panel { padding: 10px; }
  .receipt-card-toggle { min-height: 112px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "sender status" "amount requisite" "arrived arrived"; gap: 7px 10px; padding: 12px 10px 10px 14px; }
  .receipt-card-toggle .fintech-status { justify-self: end; text-align: right; }
  .receipt-card-toggle .fintech-time { display: block; }
  .receipt-card-arrived-at strong { font-size: 11px !important; }
  html[data-theme="experimental"] .fintech-receipt-card .receipt-card-toggle { min-height: 112px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "sender status" "amount requisite" "arrived arrived"; gap: 7px 10px; padding: 12px 10px 10px 14px; }
  .receipt-evidence-rail { grid-template-columns: 1fr 1fr; }
  .receipt-risk { grid-row: span 2; min-height: 116px; }
  .receipt-signal { min-height: 58px; border-bottom: 1px solid var(--border); }
  .receipt-fields { grid-template-columns: 1fr 1fr; }
  .receipt-fields label:nth-of-type(3),.receipt-fields label:nth-of-type(4),.receipt-fields label:nth-of-type(5),.receipt-fields label:nth-of-type(6),.receipt-fields [data-receipt-match] { grid-column: 1 / -1; }
  .receipt-empty-state { min-height: 330px; }
  .receipt-technical dl { grid-template-columns: 95px minmax(0, 1fr); }
  .statement-imports-head { align-items: start; flex-direction: column; gap: 2px; }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body:not(.admin-session) [data-admin-only] {
  display: none !important;
}

body {
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #111216;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: #3d8dff;
}

.sidebar {
  width: 280px;
  height: 100vh;
  min-height: 100vh;
  flex: 0 0 280px;
  position: sticky;
  top: 0;
  overflow: hidden;
  padding: 24px 18px;
  background: #121316;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand,
.sidebar-status,
.device,
.switch-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  padding: 0 8px;
}

.compact-brand {
  padding: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1b2d45;
  color: var(--blue);
}

.icon {
  width: 22px;
  height: 22px;
}

.brand strong,
.sidebar-status strong,
.device strong,
.rule-card strong,
.switch-row strong {
  display: block;
  font-size: 14px;
}

.brand strong {
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.brand span,
.sidebar-status span,
small,
.panel p,
.rule-card span {
  color: var(--muted);
}

.brand span,
.sidebar-status span {
  font-size: 12px;
}

.session-card {
  margin: 0 8px;
  min-height: 86px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a20;
  display: grid;
  gap: 6px;
  box-sizing: border-box;
}

.session-card span,
.session-inline {
  color: var(--muted);
  font-size: 12px;
}

.session-card strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.session-logout {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #20232b;
  color: var(--text);
  cursor: pointer;
}

.session-logout:hover {
  border-color: #3a4352;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: var(--surface-2);
}

.dashboard-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1.08fr) minmax(360px, 1.08fr);
  grid-template-rows: 245px 245px minmax(220px, 1fr);
  gap: 14px;
}

.dashboard-card {
  min-height: 0;
  overflow: hidden;
}

.dashboard-balances {
  grid-row: span 2;
}

.dashboard-turnover {
  grid-row: span 2;
}

.dashboard-approvals {
  grid-row: span 2;
}

.dashboard-appeals {
  grid-column: 1 / -1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-metrics {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.metric-tile {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.metric-tile span {
  color: var(--muted);
  font-size: 13px;
}

.metric-tile strong {
  font-size: 22px;
  letter-spacing: 0;
}

.dashboard-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 2px;
}

.requisites-panel {
  min-height: 0;
}

.requisites-list {
  max-height: none;
}

.archive-requisites {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.archive-requisites summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.archive-requisites summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.archive-requisites[open] summary::after {
  transform: rotate(225deg);
}

.dashboard-empty {
  min-height: 76px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #14161a;
  font-size: 13px;
}

.bincheck-panel {
  min-height: calc(100vh - 150px);
  overflow: visible;
}

.bincheck-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.bincheck-form label {
  display: grid;
  gap: 7px;
  color: #b8c2d8;
  font-size: 13px;
}

.bincheck-tabs {
  width: fit-content;
  margin-bottom: 14px;
}

.bincheck-pane[hidden] {
  display: none !important;
}

.bin-requisite-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.bin-requisite-toolbar h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.bin-requisite-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.bin-requisite-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.bin-card-search {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(170px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
}

.bin-card-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.bin-filter-wrap {
  position: relative;
}

.bin-filter-button {
  gap: 7px;
  min-height: 38px;
  height: 38px;
  padding: 0 13px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.bin-filter-button .icon {
  width: 18px;
  height: 18px;
}

.bin-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(360px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202630;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
}

.bin-filter-popover[hidden] {
  display: none !important;
}

.bin-filter-popover > strong {
  font-size: 14px;
}

.bin-filter-popover label {
  display: grid;
  gap: 6px;
  color: #dbe5f5;
  font-size: 12px;
}

.filter-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bin-filter-popover input {
  min-height: 36px;
  width: 100%;
  border: 1px solid #3a4150;
  border-radius: 7px;
  background: #151922;
  color: var(--text);
  padding: 0 10px;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bin-requisite-list {
  display: grid;
  gap: 8px;
}

.bin-requisite-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(70px, .4fr) 48px minmax(220px, 1.38fr) minmax(118px, .62fr) minmax(130px, .7fr) minmax(210px, 1.05fr) minmax(150px, .72fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.bin-requisite-row > div:not(.bank-logo) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.bin-requisite-row span {
  color: var(--muted);
  font-size: 12px;
}

.bin-requisite-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bin-requisite-main strong {
  font-size: 15px;
}

.bin-requisite-main {
  margin-left: -2px;
}

.bin-requisite-country strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bin-requisite-casino strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.casino-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
  background: #172033;
}

.casino-logo.fallback {
  display: inline-grid;
  place-items: center;
  color: #dbe8ff;
  font-size: 10px;
  font-weight: 800;
}

.bin-requisite-product strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.35;
}

.search-select {
  position: relative;
}

.search-select [data-search-select-button] {
  min-height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.search-select.compact [data-search-select-button] {
  min-height: 36px;
}

.search-select-placeholder {
  color: var(--muted);
}

.search-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #3a4150;
  border-radius: 8px;
  background: #181d26;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

.search-select-menu[hidden] {
  display: none !important;
}

.search-select-menu input {
  min-height: 34px;
  width: 100%;
  border: 1px solid #3a4150;
  border-radius: 7px;
  background: #101217;
  color: var(--text);
  padding: 0 10px;
}

.search-select-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.search-select-list button {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}

.search-select-list button:hover {
  background: #222936;
}

.search-select-empty {
  padding: 9px 8px;
  color: var(--muted);
  font-size: 12px;
}

.bincheck-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  background: #13151a;
}

.bincheck-bank {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #151923;
}

.bincheck-bank span,
.bincheck-row span {
  color: var(--muted);
  font-size: 13px;
}

.bincheck-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: visible;
}

.bin-help {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1px solid #465062;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: #202631;
  color: #d9e4f5;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.bin-help span {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 300;
  width: max-content;
  max-width: 280px;
  transform: translateY(4px);
  padding: 9px 10px;
  border: 1px solid #3a4150;
  border-radius: 8px;
  background: #20232a;
  color: var(--text);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}

.bin-help:hover span,
.bin-help:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.bincheck-bank strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
}

.bank-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1b2d45;
  color: #bcd8ff;
  font-weight: 800;
}

.bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bincheck-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bincheck-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 42px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.bincheck-row:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.bincheck-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.dashboard-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.deal-stream-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px dashed var(--line);
  border-radius: var(--radius-panel);
  color: var(--muted);
  text-align: left;
}

.deal-stream-state > div {
  display: grid;
  gap: var(--space-1);
  max-width: 520px;
}

.deal-stream-state strong {
  color: var(--text);
}

.deal-stream-state.is-error {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
}

.state-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: reader-state-spin .8s linear infinite;
}

@keyframes reader-state-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .state-spinner { animation: none; }
}

@media (max-width: 720px) {
  .deal-stream-state {
    min-height: 132px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: var(--space-4);
  }
}

.dashboard-row strong,
.dashboard-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.approval-row {
  grid-template-columns: minmax(0, 1fr) 92px 150px 178px;
}

.approval-row .badge {
  justify-self: start;
  text-align: center;
}

.dashboard-amount {
  justify-self: end;
  color: #8ee7b7;
  white-space: nowrap;
}

.requisite-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
}

.requisite-profile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.requisite-card-list {
  display: grid;
  gap: 8px;
}

.requisite-card-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(180px, 1.35fr) repeat(4, minmax(120px, .8fr)) minmax(116px, auto);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
}

.requisite-card-row b {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.requisite-card-row strong {
  font-size: 14px;
}

.requisite-pill {
  width: fit-content;
  min-width: 86px;
  padding: 5px 11px;
  border-radius: 999px;
  text-align: center;
  font-weight: 500;
}

.requisite-pill.success {
  color: #74f7bd;
  background: rgba(21, 139, 82, .34);
}

.requisite-pill.warning {
  color: #ffd66b;
  background: rgba(190, 135, 18, .32);
}

.requisite-pill.danger {
  color: #ffaaa4;
  background: rgba(161, 48, 48, .36);
}

.requisite-pill.neutral {
  color: #d8e2ff;
  background: rgba(75, 94, 139, .32);
}

.requisite-card-row .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.requisite-card-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.requisite-card-row.is-empty {
  opacity: .72;
}

.requisite-auto {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.session-settings {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.session-settings:hover {
  border-color: #3a4352;
  color: var(--text);
  background: #1a202b;
}

.session-settings .icon {
  width: 16px;
  height: 16px;
}

.requisite-auto-switch {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  cursor: pointer;
}

.requisite-auto-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.requisite-auto-switch i {
  width: 46px;
  height: 26px;
  position: relative;
  display: block;
  border-radius: 999px;
  background: #2b303b;
  box-shadow: inset 0 0 0 1px var(--line);
}

.requisite-auto-switch i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c3cada;
  transition: transform .16s ease, background .16s ease;
}

.requisite-auto-switch input:checked + i {
  background: #158b52;
}

.requisite-auto-switch input:checked + i::after {
  transform: translateX(20px);
  background: #fff;
}

.appeal-row {
  grid-template-columns: minmax(0, 1fr) 86px;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}

.icon-brand { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.006 19.98a9.869 9.869 0 0 1 -4.306 -.98l-4.7 1l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c1.993 1.7 2.93 4.041 2.746 6.344M19 16v6M22 19l-3 3l-3 -3'/%3E%3C/svg%3E"); }
.icon-grid,
.icon-dashboard { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v8h-6zM4 16h6v4h-6zM14 12h6v8h-6zM14 4h6v4h-6z'/%3E%3C/svg%3E"); }
.icon-sliders,
.icon-reader { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h5M15 6h5M11 4v4M4 12h11M19 12h1M17 10v4M4 18h1M11 18h9M7 16v4'/%3E%3C/svg%3E"); }
.icon-device { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2zM11 4h2M12 17v.01'/%3E%3C/svg%3E"); }
.icon-card { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3zM3 10h18M7 15h.01M11 15h2'/%3E%3C/svg%3E"); }
.icon-bincheck { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v4.5M3 10h18M7 15h.01M11 15h2M15 18a3 3 0 1 0 6 0a3 3 0 0 0 -6 0M20.2 20.2l1.8 1.8'/%3E%3C/svg%3E"); }
.icon-bell { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3l2 3h-16l2 -3v-3a7 7 0 0 1 4 -6M9 17v1a3 3 0 0 0 6 0v-1'/%3E%3C/svg%3E"); }
.icon-filter { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16l-6 8v6l-4 2v-8z'/%3E%3C/svg%3E"); }
.icon-finance { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18v12H3zM7 10h2M15 14h2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.icon-search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0M21 21l-6 -6'/%3E%3C/svg%3E"); }
.icon-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065zM9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0'/%3E%3C/svg%3E"); }
.icon-apps { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1zM14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1zM4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1zM14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z'/%3E%3C/svg%3E"); }
.icon-sync { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8.1 8.1 0 0 0 -15.5 -2M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2M20 19v-4h-4'/%3E%3C/svg%3E"); }
.icon-admin { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4v5a8 8 0 0 1 -16 0v-5zM12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0M12 12v3'/%3E%3C/svg%3E"); }

body.service-select {
  display: block;
  background: #0f1012;
}

.service-shell {
  min-height: 100vh;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 92px;
}

.service-env {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.service-intro {
  max-width: 720px;
  margin-bottom: 34px;
}

.service-intro h1 {
  margin-bottom: 12px;
  font-size: 42px;
}

.service-intro p:last-child {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.two-services {
  max-width: 860px;
}

.service-card {
  min-height: 158px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: start;
  width: 100%;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.service-card:hover {
  border-color: #3f7fce;
  background: #1a1d24;
  transform: translateY(-1px);
}

.service-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.service-card p {
  color: var(--muted);
  line-height: 1.45;
}

.service-card em {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1b2d45;
  color: var(--blue);
}

.service-icon .icon {
  width: 28px;
  height: 28px;
}

.primary-service {
  border-color: #315f9b;
  background: #132033;
}

.primary-service em {
  background: var(--blue);
  color: white;
}

.finance-service {
  border-color: #315f9b;
  background: #151b26;
}

.finance-service:hover {
  background: #172236;
}

.finance-service em {
  background: var(--blue);
  color: white;
}

.disabled-service {
  cursor: default;
  opacity: 0.72;
}

.disabled-service:hover {
  border-color: var(--line);
  background: var(--surface);
  transform: none;
}

.sidebar-status {
  margin-top: auto;
  gap: 10px;
  min-height: 86px;
  margin-left: 8px;
  margin-right: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-sizing: border-box;
}

.status-dot,
.device > span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  flex: 0 0 auto;
}

.warning { background: var(--amber); }
.status-dot.warning { background: var(--amber); }
.status-dot.teal { background: #0e7490; }
.status-dot.info { background: var(--blue); }
.status-dot.success,
.status-dot.online-dot { background: var(--green); }
.status-dot.danger,
.status-dot.offline-dot { background: var(--red); }
.status-dot.muted,
.status-dot.neutral-dot { background: #667085; }
.online > span { background: var(--green); }
.offline > span { background: var(--red); }

.shell {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.ghost-link,
.logout-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.primary-button {
  height: 42px;
  padding: 0 18px;
  border-color: #1f6fce;
  background: var(--primary-surface);
}

.secondary-button,
.ghost-button,
.icon-button {
  background: var(--surface-2);
}

.secondary-button {
  height: 36px;
  padding: 0 14px;
}

.ghost-button,
.icon-button {
  width: 42px;
  height: 42px;
}

.ghost-link,
.topbar-link,
.logout-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.ghost-link,
.logout-button {
  background: var(--surface-2);
}

.topbar-link {
  text-decoration: none;
}

.logout-button {
  width: 100%;
  margin-top: auto;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric,
.panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  padding: 16px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
}

.metric.accent {
  border-color: #315f9b;
  background: #132033;
}

.workspace {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.reader-section,
.workspace > *,
.deals-screen > * {
  min-width: 0;
}

.deals-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: start;
}

.deals-screen {
  min-height: calc(100vh - 128px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 456px);
  grid-template-rows: auto minmax(560px, 1fr);
  gap: 8px 18px;
  align-items: stretch;
}

.payouts-workspace {
  align-items: start;
}

.payout-settings-panel {
  display: grid;
  gap: 10px;
}

.payout-settings-panel .panel-head {
  margin-bottom: 0;
}

.payout-settings-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(2, minmax(96px, 120px)) auto;
  align-items: end;
  gap: 12px;
}

.payout-settings-grid > label:not(.power-switch) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.payout-settings-grid input[type="number"] {
  min-height: 38px;
  max-width: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

.payout-auto-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: #ffb6b2;
  font-size: 12px;
}

.payout-auto-control:not(.is-off) {
  color: #8ee7b7;
}

.payout-fill-control {
  grid-column: 1;
  grid-row: 2;
}

.payout-fill-target {
  grid-column: 2;
  grid-row: 2;
}

.payout-fill-progress {
  grid-column: 3 / -1;
  grid-row: 2;
  min-height: 38px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.payout-auto-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  min-height: 26px;
  justify-content: flex-start;
  cursor: pointer;
}

.payout-auto-switch input {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.payout-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.payout-list {
  overflow: visible;
}

.payout-tabs {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
}

.payout-provider-tabs {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
}

.payout-provider-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.payout-provider-tabs img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.payout-summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121419;
}

.payout-summary span {
  color: var(--muted);
  font-size: 13px;
}

.payout-summary strong {
  color: #8ee7b7;
  font-size: 18px;
  white-space: nowrap;
}

.payout-row {
  position: relative;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.payout-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #667085;
}

.payout-row > .status-dot {
  align-self: center;
  box-shadow: 0 0 0 3px rgba(102, 112, 133, 0.16);
}

.payout-row.status-warning::before { background: var(--amber); }
.payout-row.status-info::before { background: var(--blue); }
.payout-row.status-success::before { background: var(--green); }
.payout-row.status-danger::before { background: var(--red); }
.payout-row.status-muted::before { background: #667085; }

.payout-row.status-warning > .status-dot { box-shadow: 0 0 0 3px rgba(243, 182, 63, 0.16); }
.payout-row.status-info > .status-dot { box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.16); }
.payout-row.status-success > .status-dot { box-shadow: 0 0 0 3px rgba(33, 179, 107, 0.16); }
.payout-row.status-danger > .status-dot { box-shadow: 0 0 0 3px rgba(242, 74, 68, 0.16); }
.payout-row.status-muted > .status-dot { box-shadow: 0 0 0 3px rgba(102, 112, 133, 0.16); }

.payout-feed-panel {
  overflow: visible;
}

.payout-actions {
  min-width: 0;
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  margin-right: 56px;
}

.payout-actions .small-action {
  min-width: 74px;
}

.payout-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout-bank-line,
.payout-requisite-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.dashboard-row .payout-bank-line span {
  display: inline;
  margin-top: 0;
  min-width: 0;
}

.payout-bank-line img {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  background: #1b2d45;
}

.payout-bank-line span,
.payout-requisite-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout-loading {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.payout-loading span {
  width: 18px;
  height: 18px;
  border: 2px solid #2d3440;
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: payout-spin 0.8s linear infinite;
}

.payout-loading b {
  font-weight: 500;
}

@keyframes payout-spin {
  to { transform: rotate(360deg); }
}

.deals-filter-panel {
  grid-column: 1 / -1;
  min-height: 62px;
  display: flex;
  align-items: center;
}

.deals-main-panel,
.deals-code-panel {
  min-width: 0;
}

.deals-main-panel {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.deals-code-panel {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.empty-dashboard {
  min-height: 40vh;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-head > * {
  min-width: 0;
}

.panel-head p {
  margin-top: 5px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.compact {
  align-items: center;
}

.segmented {
  display: flex;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
}

.segmented button {
  min-width: 0;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented .active {
  background: var(--surface-2);
  color: var(--text);
}

.table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.table-row {
  display: grid;
  grid-template-columns: 0.7fr 1.1fr 1fr 1fr 1.4fr;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  background: #15171b;
  font-size: 13px;
}

.deal-table .table-row {
  grid-template-columns: 0.55fr 1.6fr 1fr 0.9fr 1.6fr;
}

.table-head {
  min-height: 38px;
  color: var(--muted);
  background: #111215;
}

.badge {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-style: normal;
}

.badge.warning { background: #3a2c10; color: #ffd880; }
.badge.teal { background: #071f27; color: #5bbfca; }
.badge.danger { background: #3a1718; color: #ffb6b2; }
.badge.muted { background: #2b303b; color: #c3cada; }
.badge.success { background: #123423; color: #8ee7b7; }
.badge.info { background: #102947; color: #9cccff; }

.control-stack,
.device-list,
.rules-grid {
  display: grid;
  gap: 10px;
}

.device-table {
  display: grid;
  gap: 1px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.device-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) 0.6fr 0.75fr 1.05fr auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 10px 14px;
  background: #15171b;
}

.deal-row {
  grid-template-columns: minmax(270px, 1.8fr) 0.95fr 0.75fr 0.75fr 1.1fr;
}

.deal-head {
  min-height: 38px;
  color: var(--muted);
  background: #111215;
  font-size: 13px;
}

.deal-filters {
  flex-wrap: wrap;
  justify-content: flex-start;
  flex: 1 1 520px;
}

.deal-filter-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

.deal-device-filter {
  flex: 0 0 250px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.deal-device-filter span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.deal-device-filter select {
  flex: 1 1 auto;
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.deal-stream {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
}

.empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #14161a;
  color: var(--muted);
  text-align: center;
}

.device-table .empty-state {
  grid-template-columns: 1fr;
  min-height: 62px;
}

.deal-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) minmax(130px, 190px) minmax(148px, 178px);
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.deal-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.deal-card-main > div {
  min-width: 0;
}

.deal-card-main strong,
.deal-card-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card-main small {
  margin-top: 3px;
  color: var(--muted);
}

.deal-card-main .auto-accept-line,
.approval-row .auto-accept-line {
  color: #ffd66b;
  font-weight: 600;
}

.deal-amount {
  justify-self: stretch;
  min-width: 0;
  text-align: left;
  white-space: normal;
}

.deal-counterparty {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.deal-amount-panel {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.deal-amount-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.deal-amount-panel > .badge {
  justify-self: start;
  min-width: 92px;
  padding: 5px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.deal-balance-panel {
  display: grid;
  gap: 5px;
  min-width: 0;
  justify-items: start;
}

.deal-balance-panel small {
  color: var(--muted);
  font-size: 12px;
}

.deal-balance-panel strong {
  color: #d8e2ff;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.deal-amount.positive {
  color: #8ee7b7;
}

.deal-amount.negative {
  color: #ffb6b2;
}

.deal-amount.error {
  justify-self: stretch;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.pager {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pager span {
  color: var(--muted);
  font-size: 13px;
}

.deal-pager {
  justify-content: flex-start;
}

.code-pager {
  margin-top: auto;
  justify-content: space-between;
}

.device-head {
  min-height: 38px;
  color: var(--muted);
  background: #111215;
  font-size: 13px;
}

.device-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.device-title > div {
  min-width: 0;
}

.device-title strong,
.device-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-title small {
  margin-top: 3px;
  color: var(--muted);
}

.online-dot {
  background: var(--green);
}

.offline-dot {
  background: var(--red);
}

.neutral-dot {
  background: #8f7bb8;
}

.switch-row {
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.power-switch input,
.switch-row input {
  position: absolute;
  opacity: 0;
}

.power-switch,
.mode-select,
.mode-picker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 138px;
  color: var(--text);
  font-size: 13px;
}

.custom-select {
  position: relative;
}

.mode-picker {
  justify-content: flex-start;
  min-width: 148px;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
}

.custom-select [data-select-button] {
  min-width: 92px;
  height: 28px;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  position: relative;
}

.custom-select [data-select-button]::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1px solid #c3cada;
  border-bottom: 1px solid #c3cada;
  transform: translateY(-65%) rotate(45deg);
}

.language-picker {
  width: min(100%, 360px);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
}

.language-picker [data-select-button] {
  width: 100%;
  height: 28px;
  min-width: 0;
}

.language-picker [data-select-button],
.language-picker .select-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-flag {
  width: 18px;
  height: 12px;
  flex: 0 0 18px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.flag-ru {
  background: linear-gradient(to bottom, #fff 0 33.33%, #2454d6 33.33% 66.66%, #d52b1e 66.66% 100%);
}

.flag-az {
  background:
    radial-gradient(circle at 53% 50%, transparent 0 2px, #fff 2.2px 3px, transparent 3.2px),
    linear-gradient(to bottom, #00b5e2 0 33.33%, #ef3340 33.33% 66.66%, #509e2f 66.66% 100%);
}

.flag-tr {
  background:
    radial-gradient(circle at 44% 50%, transparent 0 3.6px, #fff 3.8px 4.8px, transparent 5px),
    radial-gradient(circle at 49% 50%, #e30a17 0 3.5px, transparent 3.7px),
    radial-gradient(circle at 62% 50%, #fff 0 1.5px, transparent 1.7px),
    #e30a17;
}

.select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.select-menu button {
  width: 100%;
  min-height: 32px;
  display: block;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.select-menu button:hover {
  background: var(--surface-2);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex: 0 0 auto;
}

.mode-dot.manual {
  background: var(--amber);
}

.mode-dot.auto {
  background: var(--green);
}

.mode-dot.pause {
  background: var(--red);
}

.power-switch i,
.switch-row i {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: #383c46;
  position: relative;
  flex: 0 0 auto;
}

.power-switch i::after,
.switch-row i::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}

.power-switch input:checked + i,
.switch-row input:checked + i {
  background: var(--green);
}

.power-switch.is-off i {
  background: #4b5565;
}

.power-switch.is-off span {
  color: #ffb6b2;
}

.power-switch:not(.is-off) span {
  color: #8ee7b7;
}

.power-switch input:checked + i::after,
.switch-row input:checked + i::after {
  transform: translateX(18px);
}

.select-row {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.select-row select {
  height: 44px;
  width: min(100%, 360px);
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
  color: var(--text);
  outline: none;
}

.connect-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.notification-card {
  margin-top: 18px;
}

.connect-card strong,
.connect-card span {
  display: block;
}

.connect-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mani-session-box {
  min-width: 220px;
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.mani-session-box .badge {
  width: fit-content;
}

.mani-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #315f9b;
  border-radius: 8px;
  background: #132033;
  color: var(--text);
  cursor: pointer;
}

.mani-button:hover {
  border-color: #3f7fce;
  background: #172843;
}

.compact-service-icon {
  width: 30px;
  height: 30px;
}

.compact-service-icon .icon {
  width: 18px;
  height: 18px;
}

.device {
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.device div {
  min-width: 0;
  flex: 1;
}

.device-statuses {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  max-width: 54%;
}

.device-statuses .badge {
  white-space: nowrap;
}

.device em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.device > .small-action {
  flex: 0 0 auto;
}

.rule-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.token-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.token-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.token-form input:not([type="checkbox"]) {
  height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
  color: var(--text);
  outline: none;
}

.token-form input:not([type="checkbox"]):focus {
  border-color: var(--blue);
}

.check-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 9px !important;
  min-height: 34px;
  color: var(--text) !important;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.code-list {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.code-row strong,
.code-row span {
  display: block;
}

.code-row strong {
  font-size: 18px;
}

.code-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.code-row.is-muted {
  opacity: 0.72;
}

body.auth-page,
body.admin-page,
body.user-page {
  background: var(--bg);
}

.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1000;
  width: min(520px, calc(100% - 28px));
  display: grid;
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #5a2525;
  border-radius: 8px;
  background: #2a1719;
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(-10px);
  animation: toast-in 180ms ease forwards;
}

.toast::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--red);
}

.toast.success {
  border-color: #164a33;
  background: #10241b;
}

.toast.success::before {
  background: var(--green);
}

.toast.success span {
  color: #9df3c9;
}

.toast strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.toast span {
  display: block;
  color: #f2b9b7;
  font-size: 13px;
  line-height: 1.35;
}

.toast.is-hiding {
  animation: toast-out 160ms ease forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

body.auth-page {
  display: block;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 460px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.back-link svg {
  width: 20px;
  height: 20px;
}

.auth-brand {
  padding: 0;
  margin-bottom: 30px;
}

.auth-copy {
  margin-bottom: 24px;
}

.auth-copy h1 {
  margin: 4px 0 10px;
}

.auth-copy p:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
}

.auth-tabs button {
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button.active {
  background: var(--surface-2);
  color: var(--text);
}

.auth-form,
.admin-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form input,
.admin-form input,
.admin-form select {
  height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
  color: var(--text);
  outline: none;
}

.auth-form input:focus,
.admin-form input:focus,
.admin-form select:focus {
  border-color: var(--blue);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.service-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0;
}

.service-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
  color: var(--text);
}

.service-checks input {
  width: 16px;
  height: 16px;
}

.admin-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.admin-row {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 1.25fr 1fr;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  background: #15171b;
  font-size: 13px;
}

.admin-head {
  min-height: 38px;
  color: var(--muted);
  background: #111215;
}

.empty-row {
  grid-template-columns: 1fr;
}

.user-cell strong,
.user-cell small {
  display: block;
}

.user-cell small {
  margin-top: 3px;
  color: var(--muted);
}

.service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.service-pills span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(2, 86px);
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
  min-width: 178px;
}

.deal-card .small-action {
  min-width: 86px;
}

.provider-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
}

.provider-action img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 4px;
}

.push-popover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
}

.push-popover[hidden] {
  display: none !important;
}

.push-popover-card {
  width: min(520px, calc(100vw - 40px));
  max-height: min(70vh, 560px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1e2025;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.push-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.push-popover-head strong {
  font-size: 15px;
}

.push-summary { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.push-summary span { padding: 6px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.push-summary-name { color: #e6d3ff; background: rgba(153, 102, 255, .18); }
.push-summary-amount { color: #59e6b2; background: rgba(53, 196, 139, .16); }
.push-summary-time { color: #8eb8ff; background: rgba(83, 133, 226, .16); }

.push-popover pre {
  min-height: 180px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: var(--text);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(460px, calc(100vw - 40px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1e2025;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head strong {
  font-size: 15px;
}

.modal-card label {
  display: grid;
  gap: 7px;
  color: #b8c2d8;
  font-size: 13px;
}

.modal-card select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.small-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.danger-action {
  color: #ffb6b2;
  background: #301416;
}

.success-action {
  color: #8ee7b7;
  background: #123423;
}

.muted-action {
  color: var(--muted);
  background: #1b1d22;
}

.small-action:disabled {
  cursor: default;
  opacity: .46;
}

.disabled-row {
  opacity: 0.68;
}

.profile-card,
.activity-list,
.assigned-services {
  display: grid;
  gap: 10px;
}

.profile-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.profile-line span,
.muted-text {
  color: var(--muted);
}

.assigned-services {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-service-card {
  min-height: 132px;
}

.activity-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15171b;
}

.activity-row > span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  body {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar {
    width: auto;
    height: auto;
    min-height: 0;
    position: static;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
    gap: 12px;
  }

  .brand {
    padding: 0;
  }

  .shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 128px;
    height: 38px;
    justify-content: center;
  }

  .sidebar-status,
  .session-card {
    display: none;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device {
    align-items: flex-start;
  }

  .device-statuses {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: 1 / -1;
  }

  .deals-workspace,
  .deals-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .deals-filter-panel,
  .deals-main-panel,
  .deals-code-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .dashboard-balances,
  .dashboard-turnover,
  .dashboard-approvals,
  .dashboard-appeals {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-card {
    min-height: 220px;
  }

  .payout-settings-grid {
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(96px, 120px));
  }

  .payout-settings-grid .small-action {
    grid-column: 1 / -1;
    width: fit-content;
    justify-self: end;
  }

  .payout-fill-control {
    grid-column: 1;
    grid-row: 3;
  }

  .payout-fill-target {
    grid-column: 2;
    grid-row: 3;
  }

  .payout-fill-progress {
    grid-column: 3;
    grid-row: 3;
  }

  .requisite-card-row {
    grid-template-columns: 22px minmax(220px, 1.3fr) repeat(2, minmax(120px, .8fr));
  }

  .requisite-auto {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  body {
    width: 100%;
  }

  h1 {
    font-size: 26px;
    line-height: 1.15;
  }

  h2 {
    font-size: 17px;
    line-height: 1.2;
  }

  .sidebar {
    padding: 12px 10px;
  }

  .brand {
    display: none;
  }

  .nav-list {
    gap: 6px;
  }

  .nav-item {
    min-width: 48px;
    width: 48px;
    padding: 0;
  }

  .nav-label {
    display: none;
  }

  .payout-settings-grid {
    grid-template-columns: 1fr;
  }

  .payout-settings-grid .small-action {
    width: 100%;
  }

  .payout-settings-grid input[type="number"] {
    max-width: none;
  }

  .payout-fill-control,
  .payout-fill-target,
  .payout-fill-progress {
    grid-column: auto;
    grid-row: auto;
  }

  .shell {
    width: 100%;
    padding: 14px 10px 22px;
  }

  .topbar,
  .panel-head {
    display: grid;
    gap: 12px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .topbar-actions,
  .topbar-actions .ghost-link,
  .panel-head > button,
  .panel-head > .small-action {
    width: 100%;
  }

  .metrics,
  .nav-list {
    grid-template-columns: none;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel {
    padding: 14px;
  }

  .table {
    overflow-x: auto;
  }

  .table-row {
    min-width: 760px;
  }

  .metric-grid,
  .compact-metrics {
    grid-template-columns: 1fr;
  }

  .approval-row {
    grid-template-columns: 1fr;
  }

  .approval-row .badge,
  .dashboard-amount,
  .approval-row .row-actions {
    justify-self: start;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  .dashboard-row strong,
  .dashboard-row span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .dashboard-empty {
    min-height: 72px;
    padding: 14px;
    text-align: center;
  }

  .requisite-card-row {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
  }

  .requisite-card-row > span:not(.icon) {
    grid-column: 2;
  }

  .device-table {
    overflow-x: auto;
  }

  .device-row {
    min-width: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .deal-list {
    overflow-x: auto;
  }

  .deal-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .deal-card {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding: 14px;
  }

  .deal-card-main {
    align-items: flex-start;
  }

  .deal-card-main strong,
  .deal-card-main small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .deal-amount-panel,
  .deal-balance-panel,
  .deal-card .row-actions {
    justify-self: start;
  }

  .deal-card .row-actions,
  .row-actions {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: stretch;
  }

  .deal-card .small-action {
    min-width: 0;
    width: 100%;
  }

  .deal-filter-bar {
    display: grid;
    gap: 10px;
  }

  .deal-filters,
  .payout-provider-tabs,
  .payout-tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .deal-filters button,
  .payout-provider-tabs button,
  .payout-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .deal-device-filter {
    width: 100%;
    flex: none;
    display: grid;
    gap: 6px;
  }

  .payout-summary {
    display: grid;
    gap: 8px;
    align-items: start;
  }

  .payout-summary strong {
    font-size: 22px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .payout-row {
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .payout-row .payout-actions {
    grid-column: 2;
    width: 100%;
    margin-right: 0;
    justify-content: flex-start;
  }

  .payout-row .payout-actions .small-action {
    min-width: 0;
    flex: 1 1 0;
  }

  .payout-row small,
  .payout-bank-line span,
  .payout-requisite-line {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .payout-hint {
    line-height: 1.4;
  }

  .pager {
    flex-wrap: wrap;
  }

  .pager .small-action {
    flex: 1 1 92px;
  }

  .pager span {
    flex: 1 1 100%;
    order: -1;
    text-align: center;
  }

  .bincheck-form,
  .bincheck-bank,
  .bincheck-grid {
    grid-template-columns: 1fr;
  }

  .bin-requisite-toolbar {
    display: grid;
  }

  .bin-requisite-actions,
  .bin-requisite-toolbar .primary-button {
    width: 100%;
  }

  .bin-card-search {
    width: 100%;
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }

  .bin-filter-wrap,
  .bin-filter-button {
    width: 100%;
  }

  .bin-filter-popover {
    position: fixed;
    top: 88px;
    left: 18px;
    right: 18px;
    width: auto;
  }

  .bin-requisite-row {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .bin-requisite-country {
    grid-column: 1 / -1;
  }

  .bin-requisite-row > div:not(.bank-logo):not(.bin-requisite-country),
  .bin-requisite-row > a,
  .bin-requisite-row > span {
    grid-column: 2;
  }

  .bincheck-row,
  .bincheck-row:nth-child(odd) {
    grid-template-columns: 1fr;
    border-right: 0;
  }

  .bin-help span {
    max-width: min(280px, calc(100vw - 56px));
  }

  .service-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 18px;
  }

  .service-header {
    margin-bottom: 54px;
  }

  .service-intro h1 {
    font-size: 31px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 46px 1fr;
  }

  .service-card em {
    grid-column: 2;
    width: fit-content;
  }

  .service-checks,
  .admin-row,
  .assigned-services,
  .activity-row {
    grid-template-columns: 1fr;
  }
}

/* Reader dashboard responsive layout, 2026-08. Kept last so it can safely
   normalize the older page-specific breakpoints above. */
:root {
  --sidebar-width: 244px;
}

html {
  min-width: 0;
  background: var(--bg);
}

body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

input,
.token-form input:not([type="checkbox"]),
.modal-card select,
.deal-device-filter select,
.select-row select {
  border-color: var(--line);
  background: #0f1216;
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

.sidebar {
  width: var(--sidebar-width);
  min-width: 0;
  flex-basis: auto;
  padding: 22px 16px 18px;
  border-color: var(--line);
  background: #101216;
  gap: 18px;
}

.brand {
  min-height: 46px;
  padding: 0 6px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: #172b43;
}

.nav-list {
  gap: 4px;
}

.nav-item {
  position: relative;
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  color: #aab2c0;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: #191d23;
}

.nav-item.active {
  border-color: #303744;
  background: #222730;
  color: var(--text);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}

.sidebar-status,
.session-card {
  margin-left: 0;
  margin-right: 0;
  background: #15191f;
}

.shell {
  width: 100%;
  min-width: 0;
  padding: 24px clamp(18px, 2.2vw, 36px) 36px;
  scrollbar-gutter: stable;
}

.topbar {
  min-height: 46px;
  margin-bottom: 20px;
}

h1 {
  font-size: 27px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
}

.panel {
  padding: 18px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .02);
}

.panel-head {
  gap: 14px;
}

.panel-head p {
  max-width: 78ch;
  line-height: 1.45;
}

.dashboard-grid {
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 12px;
}

.dashboard-balances,
.dashboard-turnover,
.dashboard-approvals,
.dashboard-appeals {
  grid-column: auto;
  grid-row: auto;
}

.dashboard-card {
  min-height: 230px;
  overflow: visible;
}

.dashboard-appeals,
.dashboard-approvals {
  min-height: 280px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-tile {
  min-height: 88px;
  padding: 14px;
  background: #111419;
}

.metric-tile strong {
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-list {
  overflow: visible;
  padding-right: 0;
}

.workspace {
  gap: 12px;
}

.deals-screen {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 360px);
  grid-template-rows: auto auto;
  gap: 12px;
}

.deals-filter-panel {
  min-height: 0;
}

.deals-main-panel,
.deals-code-panel {
  min-height: 420px;
}

.deal-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px 138px;
  align-items: center;
  gap: 10px;
}

.deal-filter-bar .deal-device-filter {
  width: 138px;
  min-width: 0;
  flex: none;
}

.deal-filter-bar .deal-device-filter select {
  width: 100%;
  height: 38px;
}

.deal-search-expandable {
  width: auto;
  min-width: 72px;
  flex: 1 1 150px;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-left: 1px solid #283246;
  cursor: text;
}

.deal-search-expandable.is-open {
  width: auto;
}

.deal-search-expandable .deal-search-toggle {
  width: 34px;
  min-width: 34px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.deal-search-expandable .deal-search-toggle:hover,
.deal-search-expandable.is-open .deal-search-toggle {
  color: var(--blue);
  background: #17243a;
}

.deal-search-expandable .action-icon {
  width: 17px;
  height: 17px;
}

.deal-search-expandable input {
  width: 0;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  transition: width 170ms ease, opacity 120ms ease, padding 170ms ease;
}

.deal-search-expandable.is-open input {
  width: calc(100% - 34px);
  padding: 0 10px 0 4px;
  opacity: 1;
}

.deal-search-control {
  position: relative;
  flex: 0 1 230px;
  min-width: 180px;
}

.deal-search-control .action-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.deal-search-control input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111215;
  color: var(--text);
  outline: none;
}

.deal-search-control input:focus {
  border-color: var(--blue);
}

.deal-filters {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.segmented {
  gap: 2px;
  background: #0e1115;
}

.segmented button {
  min-height: 32px;
  height: auto;
  padding: 5px 12px;
  line-height: 1.25;
}

.segmented .active {
  background: #262b34;
  box-shadow: inset 0 0 0 1px #323946;
}

.deal-stream,
.dashboard-list,
.code-list {
  gap: 9px;
}

.deal-card {
  grid-template-columns: minmax(230px, 1.3fr) minmax(150px, .72fr) minmax(125px, .62fr) minmax(174px, auto);
  min-height: 78px;
  padding: 13px 14px;
  border-color: var(--line);
  background: #111419;
}

.deal-card:hover,
.payout-row:hover,
.device-row:not(.device-head):hover,
.requisite-card-row:hover,
.bin-requisite-row:hover {
  border-color: var(--line-strong);
  background: #151920;
}

.deal-card-main strong {
  line-height: 1.35;
}

.deal-card-main small,
.deal-amount-panel small,
.deal-balance-panel small {
  line-height: 1.4;
}

.row-actions {
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  min-width: 174px;
  gap: 7px;
}

.small-action {
  min-height: 32px;
  border-color: var(--line);
  background: #1a1e24;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.small-action:hover:not(:disabled),
.ghost-link:hover {
  border-color: #46505f;
  background: #252a33;
}

.success-action {
  border-color: #1d6545;
  background: #123a28;
}

.success-action:hover:not(:disabled) {
  border-color: #25875b;
  background: #174a33;
}

.danger-action {
  border-color: #69302f;
  background: #351a1b;
}

.payout-settings-grid {
  grid-template-columns: minmax(210px, 280px) repeat(2, 104px) 110px;
  gap: 10px 12px;
}

.payout-settings-grid input[type="number"] {
  width: 104px;
  max-width: 104px;
}

.payout-settings-grid .small-action {
  width: 110px;
  justify-self: start;
}

.payout-auto-control {
  flex-wrap: wrap;
}

.payout-summary {
  background: #101318;
}

.payout-row {
  min-height: 82px;
  padding: 14px 16px;
  background: #111419;
}

.payout-actions {
  margin-right: 24px;
}

.payout-row small,
.payout-bank-line span,
.payout-requisite-line {
  max-width: 100%;
}

.device-table {
  border-color: var(--line);
  background: var(--line);
}

.device-row {
  grid-template-columns: minmax(220px, 1.7fr) minmax(80px, .55fr) minmax(105px, .72fr) minmax(138px, .9fr) auto;
  background: #111419;
}

.requisite-card-row {
  grid-template-columns: 22px minmax(180px, 1.35fr) repeat(4, minmax(110px, .8fr)) minmax(110px, auto);
  background: #0f1216;
}

.bin-requisite-row {
  background: #111419;
}

.connect-card,
.rule-card,
.code-row,
.switch-row,
.profile-line,
.activity-row {
  background: #111419;
}

.token-form {
  gap: 12px;
}

.token-form .primary-button {
  width: fit-content;
  min-width: 176px;
}

.pager {
  justify-content: space-between;
}

.deal-pager {
  justify-content: flex-start;
}

.pager span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-root {
  top: 14px;
}

.toast {
  background: #281719;
  box-shadow: 0 14px 48px rgba(0, 0, 0, .46);
}

.modal-backdrop,
.push-popover {
  padding: 18px;
  backdrop-filter: blur(3px);
}

.modal-card,
.push-popover-card {
  max-width: 100%;
  background: #171b21;
}

@media (min-width: 1600px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-appeals {
    grid-column: span 2;
  }
}

@media (max-width: 1380px) {
  .deals-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .deals-filter-panel,
  .deals-main-panel,
  .deals-code-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .deals-code-panel {
    min-height: 220px;
  }

  .code-pager {
    margin-top: 12px;
  }

  .requisite-card-row {
    grid-template-columns: 22px repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .requisite-card-row > .icon { grid-column: 1; grid-row: 1; }
  .requisite-card-row > strong:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  .requisite-card-row > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .requisite-card-row > span:nth-child(4) { grid-column: 3; grid-row: 2; }
  .requisite-card-row > span:nth-child(5) { grid-column: 4; grid-row: 2; }
  .requisite-card-row > span:nth-child(6):not(.requisite-auto) { grid-column: 2 / 4; grid-row: 3; }
  .requisite-card-row > .requisite-auto { grid-column: 4; grid-row: 3; justify-items: start; }
}

@media (min-width: 721px) and (max-width: 1180px) {
  :root {
    --sidebar-width: 76px;
  }

  body {
    height: 100vh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    overflow: hidden;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 100vh;
    padding: 16px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    gap: 14px;
  }

  .brand {
    display: flex;
    justify-content: center;
    padding: 0;
  }

  .brand > div:last-child,
  .nav-label,
  .sidebar-status,
  .session-card {
    display: none;
  }

  .nav-list {
    display: grid;
    gap: 5px;
    overflow: visible;
    padding: 0;
  }

  .nav-item {
    min-width: 0;
    width: 54px;
    height: 46px;
    justify-content: center;
    padding: 0;
  }

  .nav-item .icon {
    width: 21px;
    height: 21px;
  }

  .shell {
    height: 100vh;
    min-height: 0;
    padding: 22px clamp(16px, 2.2vw, 28px) 32px;
    overflow-y: auto;
  }

  .dashboard-card {
    min-height: 220px;
  }

  .payout-settings-grid {
    grid-template-columns: minmax(210px, 280px) repeat(2, 104px) 110px;
  }

  .payout-settings-grid .small-action {
    grid-column: auto;
    width: 110px;
    justify-self: stretch;
  }

  .payout-fill-control {
    grid-column: 1;
    grid-row: 2;
  }

  .payout-fill-target {
    grid-column: 2;
    grid-row: 2;
  }

  .payout-fill-progress {
    grid-column: 3 / -1;
    grid-row: 2;
  }

  .deal-card {
    grid-template-columns: minmax(220px, 1fr) minmax(145px, .72fr) minmax(125px, .58fr) minmax(174px, auto);
  }
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-card,
  .dashboard-approvals,
  .dashboard-appeals {
    min-height: 0;
  }

  .deal-card {
    grid-template-columns: minmax(0, 1fr) minmax(150px, .58fr);
    align-items: start;
  }

  .deal-balance-panel {
    grid-column: 1;
    padding-left: 19px;
  }

  .deal-card .row-actions {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
  }

  .payout-settings-grid {
    grid-template-columns: minmax(160px, 1fr) repeat(2, 104px);
  }

  .payout-settings-grid .small-action {
    grid-column: 3;
    width: 104px;
    justify-self: stretch;
  }

  .payout-fill-progress {
    grid-column: 3;
  }

  .device-head {
    display: none;
  }

  .device-table {
    gap: 9px;
    border: 0;
    background: transparent;
  }

  .device-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .device-row .device-title {
    grid-column: 1 / -1;
  }

  .device-row .power-switch {
    min-width: 130px;
  }

  .requisite-card-row {
    grid-template-columns: 22px repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .bin-requisite-row {
    grid-template-columns: 44px minmax(0, 1fr) minmax(140px, .7fr);
    align-items: start;
  }

  .bin-requisite-row > div:not(.bank-logo):not(.bin-requisite-country),
  .bin-requisite-row > a,
  .bin-requisite-row > span {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  body {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 70;
    width: 100%;
    height: calc(60px + env(safe-area-inset-bottom));
    min-height: 0;
    display: block;
    overflow: hidden;
    padding: 6px 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--line);
    background: rgba(16, 18, 22, .98);
  }

  .brand,
  .sidebar-status,
  .session-card {
    display: none;
  }

  .nav-list {
    width: 100%;
    height: 53px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    padding: 0;
  }

  .nav-item {
    min-width: 0;
    width: 100%;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 7px;
  }

  .nav-item.active::before {
    inset: auto 12px -1px;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .nav-item .icon {
    width: 20px;
    height: 20px;
  }

  .nav-label {
    display: none;
  }

  .shell {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 14px 12px 22px;
  }

  .topbar {
    min-height: 42px;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .topbar-actions {
    width: auto;
    display: flex;
    gap: 6px;
  }

  .topbar-actions .ghost-link {
    width: auto;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .workspace,
  .dashboard-grid,
  .deals-screen {
    gap: 10px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
  }

  .panel-head > div:first-child {
    flex: 1 1 220px;
  }

  .panel-head > button,
  .panel-head > .small-action {
    width: auto;
    flex: 0 0 auto;
  }

  .metric-grid,
  .compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-tile {
    min-height: 80px;
    padding: 12px;
  }

  .metric-tile strong {
    font-size: 18px;
  }

  .deal-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .deal-filter-bar .deal-filters {
    grid-column: 1 / -1;
  }

  .deal-filters,
  .payout-provider-tabs,
  .payout-tabs,
  .bincheck-tabs {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .deal-filters::-webkit-scrollbar,
  .payout-provider-tabs::-webkit-scrollbar,
  .payout-tabs::-webkit-scrollbar,
  .bincheck-tabs::-webkit-scrollbar {
    display: none;
  }

  .deal-device-filter {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .deal-filter-bar .deal-device-filter {
    width: 100%;
    flex: none;
  }

  .deal-search-expandable,
  .deal-search-expandable.is-open {
    width: 180px;
    min-width: 180px;
  }

  .deal-search-control {
    width: 100%;
    flex: none;
  }

  .deal-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .deal-card-main,
  .deal-amount-panel,
  .deal-balance-panel,
  .deal-card .row-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .deal-balance-panel {
    padding-left: 19px;
  }

  .deal-card-main strong,
  .deal-card-main small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .deal-card .row-actions,
  .row-actions {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deal-card .small-action {
    width: 100%;
    min-width: 0;
  }

  .payout-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .payout-auto-control,
  .payout-fill-control {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: space-between;
  }

  .payout-settings-grid > label:not(.power-switch),
  .payout-fill-target {
    grid-column: auto;
    grid-row: auto;
  }

  .payout-settings-grid input[type="number"] {
    width: 100%;
    max-width: none;
  }

  .payout-settings-grid .small-action {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }

  .payout-fill-progress {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .payout-summary {
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .payout-summary strong {
    font-size: 18px;
    text-align: right;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .payout-row {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 12px;
  }

  .payout-row .payout-actions {
    grid-column: 2;
    width: 100%;
    margin: 4px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .payout-row .payout-actions .small-action {
    width: 100%;
  }

  .payout-row small,
  .payout-bank-line span,
  .payout-requisite-line {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .device-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .device-row .device-title {
    grid-column: 1 / -1;
  }

  .device-row .power-switch {
    grid-column: 1;
    min-width: 0;
    justify-content: flex-start;
  }

  .device-row > .small-action {
    grid-column: 2;
  }

  .requisite-profile-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .requisite-card-row {
    grid-template-columns: 22px repeat(2, minmax(0, 1fr));
  }

  .requisite-card-row > .icon { grid-column: 1; grid-row: 1; }
  .requisite-card-row > strong:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  .requisite-card-row > span:nth-child(3) { grid-column: 2; grid-row: 2; }
  .requisite-card-row > span:nth-child(4) { grid-column: 2; grid-row: 3; }
  .requisite-card-row > span:nth-child(5) { grid-column: 3; grid-row: 3; }
  .requisite-card-row > span:nth-child(6):not(.requisite-auto) { grid-column: 2 / -1; grid-row: 4; }
  .requisite-card-row > .requisite-auto { grid-column: 3; grid-row: 2; justify-items: start; }

  .bincheck-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .bin-requisite-toolbar,
  .bin-requisite-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bin-card-search,
  .bin-filter-wrap,
  .bin-filter-button {
    width: 100%;
  }

  .bin-requisite-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .bin-requisite-country,
  .bin-requisite-row > div:not(.bank-logo):not(.bin-requisite-country),
  .bin-requisite-row > a,
  .bin-requisite-row > span {
    grid-column: 2;
  }

  .connect-card {
    align-items: flex-start;
  }

  .mani-session-box {
    min-width: min(45%, 220px);
  }

  .token-form .primary-button {
    width: 100%;
  }

  .pager {
    display: grid;
    grid-template-columns: minmax(86px, 1fr) minmax(0, auto) minmax(86px, 1fr);
    gap: 8px;
  }

  .pager span {
    grid-column: 2;
    grid-row: 1;
    order: initial;
    text-align: center;
  }

  .pager .small-action {
    min-width: 0;
    width: 100%;
  }

  .pager .small-action:first-child {
    grid-column: 1;
  }

  .pager .small-action:last-child {
    grid-column: 3;
  }

  .toast-root {
    top: 8px;
    width: calc(100% - 20px);
  }

  .modal-backdrop,
  .push-popover {
    place-items: end center;
    padding: 10px;
  }

  .modal-card,
  .push-popover-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 8px;
  }
}

@media (max-width: 440px) {
  .shell {
    padding-left: 9px;
    padding-right: 9px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-actions .ghost-link {
    padding: 0 8px;
  }

  .panel {
    padding: 12px;
  }

  .metric-grid,
  .compact-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-tile {
    min-height: 72px;
  }

  .requisite-card-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .requisite-card-row > strong:nth-child(2),
  .requisite-card-row > span:nth-child(3),
  .requisite-card-row > span:nth-child(4),
  .requisite-card-row > span:nth-child(5),
  .requisite-card-row > span:nth-child(6):not(.requisite-auto),
  .requisite-card-row > .requisite-auto {
    grid-column: 2;
    grid-row: auto;
  }

  .payout-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .payout-settings-grid > *,
  .payout-auto-control,
  .payout-fill-control,
  .payout-settings-grid .small-action,
  .payout-fill-progress {
    grid-column: 1;
  }

  .payout-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .payout-summary strong {
    text-align: left;
  }

  .connect-card {
    display: grid;
  }

  .mani-session-box {
    width: 100%;
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .filter-grid-two,
  .filter-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pager span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .pager .small-action:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .pager .small-action:last-child {
    grid-column: 2;
    grid-row: 2;
  }
}

.platform-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Scheduled shutdown for all automatic payout claims. */
.payout-settings-grid {
  grid-template-columns: minmax(190px, 1fr) repeat(2, 104px) 136px 110px;
}

.payout-stop-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.payout-stop-input {
  min-height: 38px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
  color: var(--text);
  color-scheme: dark;
  padding: 0 10px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.payout-stop-countdown {
  min-height: 14px;
  color: #58d998;
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 721px) and (max-width: 1100px) {
  .payout-settings-grid {
    grid-template-columns: minmax(190px, 1fr) 120px 120px;
  }

  .payout-settings-grid > [data-payout-auto-label] { grid-column: 1; grid-row: 1; }
  .payout-settings-grid > .payout-min-field { grid-column: 2; grid-row: 1; }
  .payout-settings-grid > .payout-max-field { grid-column: 3; grid-row: 1; }
  .payout-settings-grid > .payout-fill-control { grid-column: 1; grid-row: 2; }
  .payout-settings-grid > .payout-stop-field { grid-column: 2; grid-row: 2; }
  .payout-settings-grid > [data-payout-save] { grid-column: 3; grid-row: 2; width: 100%; }
  .payout-settings-grid > .payout-fill-target { grid-column: 1; grid-row: 3; }
  .payout-settings-grid > .payout-fill-progress { grid-column: 2 / 4; grid-row: 3; }
}

@media (max-width: 720px) {
  .payout-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payout-settings-grid > [data-payout-auto-label],
  .payout-settings-grid > .payout-fill-control,
  .payout-settings-grid > .payout-fill-progress {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .payout-settings-grid > .payout-min-field,
  .payout-settings-grid > .payout-max-field,
  .payout-settings-grid > .payout-stop-field,
  .payout-settings-grid > .payout-fill-target,
  .payout-settings-grid > [data-payout-save] {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .payout-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .payout-settings-grid > * {
    grid-column: 1 / -1 !important;
  }
}

.deals-code-panel {
  container-type: inline-size;
  align-self: start;
  min-height: 0;
  height: fit-content;
}

@container (max-width: 820px) {
  .platform-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 430px) {
  .platform-balance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .platform-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .platform-balance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.platform-balance-card {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.platform-balance-tooltip {
  position: absolute;
  z-index: 30;
  right: -1px;
  bottom: calc(100% + 8px);
  width: min(248px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transform-origin: right bottom;
  pointer-events: none;
  transition: opacity 160ms cubic-bezier(.23, 1, .32, 1), transform 160ms cubic-bezier(.23, 1, .32, 1), visibility 160ms linear;
}

.platform-balance-card:hover .platform-balance-tooltip,
.platform-balance-card:focus-visible .platform-balance-tooltip,
.platform-balance-card.is-tooltip-open .platform-balance-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.platform-balance-tooltip > span:not(.platform-balance-tooltip-head):not(.platform-balance-tooltip-source) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.platform-balance-tooltip-head {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.platform-balance-tooltip small,
.platform-balance-tooltip-source {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.platform-balance-tooltip strong {
  height: auto;
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.platform-balance-tooltip-source {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.platform-balance-total {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.platform-balance-total > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 600;
}

.platform-balance-total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.platform-balance-total strong {
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.platform-balance-card:hover {
  border-color: var(--line-strong);
  background: #252b34;
}

.platform-balance-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.platform-balance-logo {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.platform-balance-card img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.platform-balance-card > span:not(.platform-balance-logo) {
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-balance-card > strong {
  height: 32px;
  display: flex;
  align-items: center;
  color: var(--green);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.platform-balance-card.is-low > strong {
  color: #ff7770;
}

.platform-balance-card.is-unavailable > strong {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .platform-balance-tooltip { transition: opacity 1ms linear, visibility 1ms linear; transform: none; }
}

.wallet-balance-card {
  width: 100%;
  font: inherit;
  text-align: left;
}

.wallet-logo-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: center;
}

.wallet-logo-trigger:hover img {
  filter: drop-shadow(0 0 7px rgba(51, 117, 255, .55));
}

.wallet-logo-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.wallet-logo-trigger.is-activating {
  animation: wallet-logo-open 320ms cubic-bezier(.2, .8, .2, 1) both;
}

.balance-list-view {
  display: grid;
  gap: 12px;
}

.balance-list-view.is-leaving {
  pointer-events: none;
  animation: balance-view-out 210ms ease both;
}

.balance-list-view.is-entering,
.finance-balance-host.is-entering {
  animation: balance-view-in 260ms ease both;
}

.finance-balance-host.is-leaving {
  pointer-events: none;
  animation: balance-view-out 190ms ease both;
}

.finance-inline-shell {
  width: 100%;
  height: 100%;
}

.finance-balance-host {
  width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-gutter: stable;
  background:
    radial-gradient(circle at 100% 0, rgba(51, 117, 255, .09), transparent 42%),
    radial-gradient(circle at 0 100%, rgba(0, 211, 168, .05), transparent 38%);
}

.finance-balance-host .finance-modal {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.finance-balance-host .finance-modal-head {
  flex: none;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 0 11px;
  border-bottom: 1px solid rgba(84, 116, 160, .42);
  background: linear-gradient(180deg, #111a28 75%, rgba(17, 26, 40, .94));
}

.finance-balance-host .finance-pin-view {
  width: 100%;
  min-height: 0;
  flex: 1;
  align-content: center;
  padding: 4px 0 12px;
}

.finance-balance-host .finance-keypad {
  --finance-key-width: 52px;
  --finance-key-height: 42px;
  grid-template-columns: repeat(3, var(--finance-key-width));
  gap: 8px;
}

.finance-balance-host .finance-key,
.finance-balance-host .finance-key:hover,
.finance-balance-host .finance-key:active {
  width: var(--finance-key-width);
  height: var(--finance-key-height);
  font-size: 16px;
}

.finance-balance-host .finance-setup-view,
.finance-balance-host .finance-wallet-view {
  width: 100%;
}

.finance-relogin {
  justify-self: center;
}

@keyframes wallet-logo-open {
  0% { transform: scale(1) rotate(0); filter: brightness(1); }
  45% { transform: scale(1.22) rotate(-8deg); filter: brightness(1.25); }
  100% { transform: scale(.88) rotate(6deg); filter: brightness(1.1); }
}

@keyframes balance-view-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(.985); }
}

@keyframes balance-view-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.finance-modal-backdrop {
  align-items: start;
  overflow-y: auto;
}

.finance-modal {
  width: min(760px, calc(100vw - 40px));
  margin: 32px 0;
  gap: 18px;
  padding: 20px;
  background: #111823;
}

.finance-modal-head strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: #f3f7ff;
  text-shadow: 0 0 18px rgba(51, 117, 255, .18);
}

.finance-modal-head img {
  width: 28px;
  height: 28px;
}

.finance-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finance-head-actions .icon-action {
  width: 32px;
  height: 32px;
}

.finance-head-actions .icon-action:hover {
  border-color: #456a9b;
  color: #a9c8ff;
}

.finance-head-actions .icon-action.is-active {
  border-color: var(--blue);
  color: #8eb8ff;
  background: rgba(51, 117, 255, .12);
}

.finance-setup-view,
.finance-pin-view,
.finance-wallet-view,
.finance-form,
.finance-admin-tools,
.finance-transfer-history {
  display: grid;
  gap: 14px;
}

.finance-setup-view h3,
.finance-pin-view h3,
.finance-wallet-view h3,
.finance-transfer-history h3,
.finance-setup-view p,
.finance-pin-view p,
.finance-wallet-view p {
  margin: 0;
}

.finance-pin-view {
  width: min(320px, 100%);
  justify-self: center;
  padding: 14px 0 24px;
  text-align: center;
}

.finance-pin-copy p,
.finance-warning {
  margin-top: 6px !important;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.finance-pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}

.finance-pin-dots i {
  width: 12px;
  height: 12px;
  border: 1px solid #52709a;
  border-radius: 50%;
  background: transparent;
}

.finance-pin-dots i.is-filled {
  border-color: #3375ff;
  background: #3375ff;
  box-shadow: 0 0 10px rgba(51, 117, 255, .55);
}

.finance-keypad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  justify-content: center;
  gap: 10px;
}

.finance-key,
.finance-key:hover,
.finance-key:active {
  width: 64px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #18263a, #121d2e);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  animation: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  transition-duration: 0s !important;
  transition-property: none !important;
}

.finance-key:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.finance-key-clear {
  color: var(--muted);
}

.finance-wallet-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 12px;
  gap: 8px 12px;
  padding: 8px 0 14px;
  border-bottom: 1px solid rgba(84, 116, 160, .32);
}

.finance-wallet-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-wallet-summary [data-finance-role] {
  color: #5ee8c2;
  font-size: 12px;
  letter-spacing: .02em;
}

.finance-wallet-summary [data-finance-balance] {
  color: #78aaff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.finance-wallet-address-row {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-wallet-address-row mark {
  flex: none;
  padding: 3px 6px;
  border: 1px solid rgba(0, 211, 168, .34);
  border-radius: 999px;
  background: rgba(0, 211, 168, .09);
  color: #5ee8c2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}

.finance-wallet-summary [data-finance-address] {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dbe8ff;
  font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: copy;
}

.finance-wallet-summary [data-finance-address]:hover {
  color: #78aaff;
}

.finance-wallet-view {
  gap: 13px;
}

.finance-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 18, .28);
}

.finance-wallet-view .finance-form,
.finance-admin-tools .finance-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.finance-form input,
.finance-form select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b111b;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  color-scheme: dark;
}

.finance-form select option {
  background: #101a29;
  color: #edf4ff;
}

.finance-form input:focus,
.finance-form select:focus {
  outline: none;
  border-color: var(--blue);
}

.finance-transfer-form {
  gap: 10px;
}

.finance-field {
  display: grid;
  gap: 7px;
  color: #b8c2d8;
  font-size: 13px;
}

.finance-transfer-form .primary-button {
  border-color: rgba(51, 117, 255, .72);
  background: linear-gradient(135deg, #2563eb, #3375ff 55%, #2b8bdc);
  box-shadow: 0 8px 22px rgba(37, 99, 235, .16);
}

.finance-address-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.finance-scan-button {
  width: 42px;
  height: 42px;
  border-color: rgba(0, 211, 168, .36);
  color: #5ee8c2;
  background: rgba(0, 211, 168, .08);
}

.finance-scanner {
  overflow: hidden;
  border: 1px solid rgba(0, 211, 168, .34);
  border-radius: 10px;
  background: #071019;
}

.finance-scanner video {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
}

.finance-scanner > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
}

.finance-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-whitelist-list,
.finance-transfer-history [data-finance-transfer-history] {
  display: grid;
  gap: 8px;
}

.finance-list-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.finance-history-view .finance-list-row {
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.finance-history-view .finance-list-row:last-child {
  border-bottom: 0;
}

.finance-list-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.finance-list-row strong,
.finance-list-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-list-row small,
.finance-empty {
  color: var(--muted);
}

.finance-transfer-status-failed {
  color: #ff7770;
}

.finance-transfer-status-broadcast {
  color: #59e6b2;
}

.finance-message {
  min-height: 18px;
  color: #ff8c86;
  font-size: 12px;
}

.finance-message.is-success {
  color: #59e6b2;
}

@media (max-width: 620px) {
  .finance-modal-backdrop {
    padding: 10px;
  }

  .finance-modal {
    width: 100%;
    margin: 10px 0;
    padding: 14px;
  }

  .finance-tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 430px) {
  .finance-tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-form {
    padding: 11px;
  }

  .finance-pin-view {
    gap: clamp(12px, 3.5cqw, 18px);
  }

  .finance-balance-host .finance-keypad {
    --finance-key-width: clamp(54px, 19cqw, 64px);
    --finance-key-height: clamp(46px, 16cqw, 54px);
    gap: clamp(8px, 2.5cqw, 12px);
  }

  .finance-balance-host .finance-key,
  .finance-balance-host .finance-key:hover,
  .finance-balance-host .finance-key:active {
    font-size: clamp(16px, 5cqw, 19px);
  }

  .finance-pin-copy h3 {
    font-size: 16px;
  }

  .finance-pin-copy p {
    font-size: 11px;
  }

  .finance-pin-dots {
    gap: 9px;
    padding: 4px 0;
  }

  .finance-pin-dots i {
    width: 10px;
    height: 10px;
  }
}

@container (min-width: 431px) {
  .finance-balance-host .finance-pin-view {
    grid-template-columns: minmax(0, 1fr) 180px;
    grid-template-rows: auto auto auto auto;
    align-items: center;
    column-gap: 24px;
    text-align: left;
  }

  .finance-balance-host .finance-pin-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .finance-balance-host .finance-pin-dots {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .finance-balance-host .finance-keypad {
    grid-column: 2;
    grid-row: 1 / 5;
  }

  .finance-balance-host .finance-message {
    grid-column: 1;
    grid-row: 3;
  }

  .finance-balance-host .finance-relogin {
    grid-column: 1;
    grid-row: 4;
    justify-self: start;
  }
}

.tronlink-readonly-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.appeals-screen {
  display: grid;
  gap: 12px;
}

.appeals-main-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.appeals-toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.appeals-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.appeals-state-filters {
  width: auto;
  min-width: 360px;
  flex: 1 1 440px;
}

.appeal-search-expandable {
  min-width: 42px;
  flex: 1 1 120px;
}

.appeals-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.appeals-pager {
  margin-top: 2px;
}

.appeals-filter-select {
  width: 154px;
  min-height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
}

.appeals-list {
  display: grid;
  gap: 8px;
}

.appeal-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .8fr) minmax(180px, 1.25fr) minmax(90px, .65fr) minmax(150px, .9fr) 38px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 11px 12px 11px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.appeal-card.is-test::before {
  background: var(--blue);
}

.appeal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--yellow);
}

.appeal-card > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.appeal-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.appeal-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appeal-amount strong,
.appeal-status strong {
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.appeal-card .platform-logo-action {
  justify-self: end;
}

.appeal-diagnosis {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.appeal-diagnosis .action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

@media (max-width: 980px) {
  .appeals-toolbar {
    align-items: flex-start;
  }

  .appeals-toolbar-actions {
    flex-wrap: wrap;
  }

  .appeal-card {
    grid-template-columns: minmax(100px, .7fr) minmax(130px, .9fr) minmax(180px, 1.25fr) 38px;
  }

  .appeal-status,
  .appeal-time {
    grid-row: 2;
  }

  .appeal-status {
    grid-column: 1;
  }

  .appeal-time {
    grid-column: 2 / 4;
  }

  .appeal-card .platform-logo-action {
    grid-column: 4;
    grid-row: 1 / 3;
  }

  .appeal-diagnosis {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 720px) {
  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item[data-section="dashboard"],
  .nav-item[data-section="devices"],
  .nav-item[data-section="appeals"],
  .nav-item[data-section="receipt-checker"],
  .nav-item[data-section="autopayouts"],
  .nav-item[data-section="bincheck"] {
    display: none;
  }

  .appeals-main-panel {
    padding: 10px;
  }

  .appeals-toolbar {
    display: grid;
  }

  .appeals-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    width: 100%;
  }

  .appeals-filter-select {
    width: 100%;
  }

  .appeal-card {
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto) 34px;
    gap: 10px;
    min-height: 0;
    padding: 12px 10px 12px 15px;
  }

  .appeal-provider {
    grid-column: 1;
  }

  .appeal-amount {
    grid-column: 2;
  }

  .appeal-client {
    grid-column: 1 / 3;
  }

  .appeal-status {
    grid-column: 1;
    grid-row: 3;
  }

  .appeal-time {
    grid-column: 2;
    grid-row: 3;
  }

  .appeal-card .platform-logo-action {
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: center;
  }

  .appeal-diagnosis {
    grid-column: 1 / -1;
    grid-row: 4;
  }
}

@media (max-width: 430px) {
  .appeals-toolbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .appeals-toolbar-actions .small-action {
    grid-column: 1 / -1;
  }
}

label.receipt-attachment-filter > input[type="checkbox"] {
  appearance: auto !important;
  width: 14px !important;
  height: 14px !important;
  min-height: 0 !important;
  margin: 0 6px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  vertical-align: -2px;
}

@media (max-width: 720px) {
  .receipt-attachment-filter { display: flex; align-items: center; min-height: 38px; }
  .receipt-checker-toolbar > [data-receipt-refresh] { width: 100%; }
}
