:root {
  --bg: #0e0e0e;
  --side: #121212;
  --card: #1a1a1a;
  --line: #2a2a2a;
  --ink: #f2f2f2;
  --muted: #8d8d8d;
  --orange: #ff5a1f;
  --orange-2: #ff7a3d;
  --red: #ff5d4a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.4 "Segoe UI", sans-serif;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.app { display: flex; min-height: 100vh; }
.side {
  width: 248px;
  flex: none;
  background: var(--side);
  border-right: 1px solid #1c1c1c;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 22px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #c8c8c8;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.nav a svg, .nav-logout svg { flex: none; }
.nav a.active {
  background: linear-gradient(90deg, #4a2c18, #2c2118);
  color: #ff8a45;
}
.nav-logout { margin-top: 8px; }

.tg-card {
  margin-top: auto;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 14px 14px 12px;
  position: relative;
  overflow: hidden;
}
.tg-card strong { display: block; font-size: 14px; line-height: 1.25; }
.tg-card p { margin: 8px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.35; max-width: 150px; }
.tg-card .btn { position: relative; z-index: 1; }
.tg-float { position: absolute; right: 8px; bottom: 8px; opacity: 0.95; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid #1b1b1b;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px 12px;
  color: #777;
}
.search input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: #eee;
}
.search input::placeholder { color: #777; }
.bell {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  cursor: pointer;
}
.content { padding: 22px 28px 48px; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.project-sign { margin: 4px 0 0; color: #9a9a9a; font-size: 13px; }
h2 { margin: 26px 0 10px; font-size: 15px; font-weight: 650; color: #ddd; }

.btn, button {
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 650;
  cursor: pointer;
}
button.ghost, .btn.ghost {
  background: transparent;
  color: #ddd;
  border: 1px solid #3a3a3a;
}
.nav-logout button {
  background: transparent;
  color: #ff5d4a;
  font-weight: 500;
  padding: 9px 12px;
}
.nav-logout button:hover { background: #241614; }
button.danger {
  background: transparent;
  color: var(--red);
  border: 1px solid #5c3028;
}
a.btn { display: inline-flex; align-items: center; }

.flash, .error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-left: 3px solid #2f8f62;
}
.error { border-left-color: var(--red); }

.empty {
  background: #1c1c1c;
  border-radius: 14px;
  text-align: center;
  color: #9a9a9a;
  padding: 16px 18px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  border: 0;
  background: transparent;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
}
.kpi .lbl { font-size: 12px; color: var(--muted); }
.kpi .val {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.kpi .sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.note { color: var(--muted); font-size: 12px; }
.period a { color: var(--muted); margin-left: 12px; }
.period a.on { color: #fff; }

.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.sw { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; }
.sw.sbp { background: #3d7eff; }
.sw.card { background: #d0d0d0; }
.sw.crypto { background: var(--orange); }
.day {
  display: grid;
  grid-template-columns: 78px 1fr 140px;
  gap: 12px;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}
.day .d { color: var(--muted); }
.track { height: 8px; background: #242424; display: flex; border-radius: 4px; overflow: hidden; }
.track i { display: block; height: 8px; }
.track .sbp { background: #3d7eff; }
.track .card { background: #d0d0d0; }
.track .crypto { background: var(--orange); }
.day .sum { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: #ccc; }

.sheet { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #161616; }
.sheet input {
  width: 72px;
  text-align: right;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 4px 6px;
}
table { width: 100%; border-collapse: collapse; background: transparent; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8a8a;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
td { padding: 10px 12px; border-bottom: 1px solid #222; vertical-align: top; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #1c1c1c; }
a.id { border-bottom: 1px solid #444; }
.reason { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.st-paid { color: #3dcc8a; }
.st-review { color: #e0a04a; }
.st-declined, .st-expired { color: #ff6b5a; }
.st-awaiting { color: #7eb0ff; }
.st-refunded { color: #9a9a9a; }
.on { color: #3dcc8a; }
.off { color: #ff6b5a; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select, .field input, .field select, .coins input {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 8px 10px;
}
.filters input { min-width: 220px; }
.form { max-width: 640px; display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field span, .hint { color: var(--muted); font-size: 12px; }
.checks { display: flex; gap: 16px; }
.coins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coins label, .checks label {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px 10px;
}
.facts {
  display: grid;
  grid-template-columns: 160px 1fr 160px 1fr;
  background: #161616;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.facts dt, .facts dd { margin: 0; padding: 10px 12px; border-bottom: 1px solid #242424; }
.facts dt { color: var(--muted); }
.time { list-style: none; margin: 0; padding: 0; background: #161616; border: 1px solid var(--line); border-radius: 14px; }
.time li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #242424; }
.time time { color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.actions form, .inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.pager { display: flex; gap: 14px; margin-top: 12px; color: var(--muted); }
.pager a { color: var(--orange-2); }
.limit { height: 4px; background: #2a2a2a; margin-top: 4px; border-radius: 4px; }
.limit i { display: block; height: 4px; background: #3d7eff; }
.cards { display: grid; gap: 10px; }
.project {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #1c1c1c;
  border-radius: 14px;
  padding: 14px 16px;
}
.project b { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; color: #ddd; background: #2a2a2a; border-radius: 999px; padding: 3px 8px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }

.login-body { background: #0e0e0e; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login { width: 360px; }
.login .brand { padding: 0 0 8px; font-size: 28px; }
.login p { margin: 0 0 18px; color: var(--muted); }
.login label { display: block; color: var(--muted); font-size: 12px; margin: 12px 0 6px; }
.login input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 11px 12px;
}
.login button { width: 100%; margin-top: 16px; padding: 11px; }

.dash {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.15fr);
  gap: 16px;
  align-items: start;
}
.panel {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 18px;
  padding: 16px 16px 12px;
  min-height: 420px;
}
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #bdbdbd;
  font-size: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #242424;
  border-radius: 10px;
  padding: 6px 10px;
}
.caret { color: #8d8d8d; font-size: 12px; }
.big {
  margin: 14px 0 16px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.big small { font-size: 18px; font-weight: 650; margin-left: 2px; }
.dash-gap { color: #8d8d8d; font-weight: 500; margin-left: 8px; }
.wallets { display: flex; flex-direction: column; max-height: 360px; overflow: auto; }
.wallet {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-top: 1px solid #262626;
}
.coin {
  position: relative;
  width: 32px;
  height: 32px;
  display: block;
}
.coin img {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
}
.coin .net {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #171717;
}
.wallet-sum { text-align: right; }
.wallet-sum b, .wallet b { font-weight: 650; }
.wait { margin: 0 0 14px; color: #9a9a9a; font-size: 13px; }
.wait span { margin-left: 18px; }
.spans { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.spans a {
  color: #9a9a9a;
  padding: 6px 10px;
  border-radius: 999px;
}
.spans a.on { background: #2a2a2a; color: #fff; }
.refresh {
  width: 32px;
  height: 32px;
  border: 1px solid #333;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-left: 6px;
}
.vol-chart { display: block; width: 100%; height: 180px; margin-top: 18px; }
.vol-axis {
  display: flex;
  justify-content: space-between;
  color: #8d8d8d;
  font-size: 12px;
  padding: 0 4px 6px;
}
.quiet { color: #ff7a3d; font-size: 13px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 22px;
}
.section-head h2 { margin: 0 0 10px; }
.pay-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.pay-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  padding: 18px 18px 16px;
  min-height: 560px;
}
.pay-card h2 { margin: 0; font-size: 18px; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay-form { display: flex; flex-direction: column; margin-top: 18px; }
.pay-label { margin: 14px 0 8px; color: #d7d7d7; font-size: 14px; }
.pay-form input, .pay-select select {
  width: 100%;
  background: #1b1b1b;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.pay-form input::placeholder { color: #6f6f6f; }
.pay-select { position: relative; }
.pay-select select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, #9a9a9a 50%), linear-gradient(135deg, #9a9a9a 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.asset-select select { padding-left: 46px; }
.asset-select img {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  pointer-events: none;
}
.asset-select img + img { left: 24px; top: 20px; width: 12px; height: 12px; box-shadow: 0 0 0 2px #1b1b1b; }
.asset-select img.off { display: none; }
.pay-avail { margin: 8px 0 0; color: #8d8d8d; font-size: 13px; }
.fee-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fee-switch label { margin: 0; }
.fee-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fee-switch span {
  display: block;
  text-align: center;
  background: #1b1b1b;
  border: 1px solid #2e2e2e;
  border-radius: 999px;
  padding: 10px 8px;
  color: #cfcfcf;
  cursor: pointer;
}
.fee-switch input:checked + span { background: #2a2a2a; color: #fff; }
.pay-submit { width: 100%; margin-top: 22px; padding: 12px 16px; border-radius: 999px; }
.tariffs { position: relative; }
.tariffs summary {
  list-style: none;
  cursor: pointer;
  color: #cfcfcf;
  background: #242424;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}
.tariffs summary::-webkit-details-marker { display: none; }
.tariffs .info {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 1px solid #888;
  border-radius: 50%;
  font-size: 10px;
  color: #bbb;
}
.tariff-pop {
  position: absolute;
  right: 0;
  top: 36px;
  width: 280px;
  z-index: 2;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  color: #cfcfcf;
  font-size: 13px;
}
.tariff-pop p { margin: 0 0 8px; }
.tariff-pop p:last-child { margin: 0; }
.pay-history { border: 0; background: transparent; min-height: 460px; }
.pay-empty td {
  text-align: center;
  color: #8d8d8d;
  padding: 72px 12px;
  border-bottom: 0;
}
.pay-history th { font-size: 11px; letter-spacing: 0.04em; }
.linkish {
  display: block;
  margin-top: 4px;
  padding: 0;
  background: transparent;
  color: #ff7a3d;
  font-weight: 500;
  font-size: 12px;
}
@media (max-width: 980px) {
  .dash, .pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { display: none; }
  .facts, .coins { grid-template-columns: 1fr; }
}
