:root {
  --bg: #000;
  --side: #000;
  --card: #141414;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #e4b84a;
  --ink: #f4f4f4;
  --muted: #a0a0a0;
  --blue: #4c86d4;
  --danger: #ff8d8d;
  --ok: #5ddea0;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --sans: "Manrope", Arial, Helvetica, sans-serif;
  --display: "Oswald", "Manrope", Arial, Helvetica, sans-serif;
}

/* Oswald draws Cyrillic У too low vs other caps — swap only that glyph. */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  src: local("Manrope"), local("Arial Narrow"), local("Arial");
  unicode-range: U+0423, U+0443;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font-family: var(--sans);
}
input, button { color-scheme: dark; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, .card strong, .side-foot strong, .side-balance b, .mark b {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.nav-a.is-on { font-weight: 800; }

.admin-body { min-height: 100vh; background: #000; }
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
}
.admin-brand { margin: 0; }
.admin-brand b { font-size: 18px; }
.admin-brand span { color: var(--muted); margin-left: 10px; font-size: 14px; }
.admin-who { margin: 0; color: var(--muted); font-size: 14px; }
.admin-who a { color: var(--gold); margin-left: 14px; }
.admin-main {
  padding: 28px 28px 48px;
  max-width: 1480px;
  width: 100%;
}
.admin-nav { display: flex; gap: 4px; margin-right: auto; margin-left: 28px; }
.admin-nav a { padding: 8px 14px; border-radius: 10px; color: #d0d0d0; font-size: 14px; }
.admin-nav a.is-on { background: #1a1a1a; color: var(--gold); box-shadow: inset 0 0 0 1px rgba(196, 137, 26, 0.45); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.font-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.font-preview.card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #121212;
}
.font-preview.card.is-on {
  box-shadow: inset 0 0 0 1px rgba(196, 137, 26, 0.55);
  border-color: rgba(196, 137, 26, 0.45);
}
.font-preview .fp-title {
  margin: 0;
  font-size: 22px;
  color: var(--gold);
}
.font-preview .fp-num {
  margin: 8px 0 0;
  font-size: 28px;
}
@media (max-width: 900px) {
  .font-grid { grid-template-columns: 1fr; }
}
.card em { display: block; margin-top: 4px; color: var(--muted); font-style: normal; font-size: 13px; }
.section { font-size: 20px; margin: 32px 0 0; }
.section-range { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 10px; }
.table-wrap { overflow-x: auto; width: 100%; }
.admin-main .table-wrap > table {
  width: 100%;
  table-layout: auto;
}
.admin-main th, .admin-main td {
  padding: 10px 12px;
}
td.nowrap { white-space: nowrap; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.actions form { margin: 0; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px #333; }
.btn-ghost:hover { color: var(--ink); }
.pill.off { background: #1c1c1c; color: var(--muted); }
.pill.warn { background: #2a2208; color: #e8b84a; }
.ok-flash { background: #10261c; color: var(--ok); border-radius: 12px; padding: 10px 12px; margin: 0 0 16px; }
.sum-line { color: var(--muted); margin: 16px 0 0; }
.sum-line b { color: var(--ink); }
.admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; max-width: 720px; }
.admin-form input:not([type="hidden"]):not([type="checkbox"]) { flex: 1 1 200px; width: auto; }
.admin-form .check { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-size: 14px; }
.admin-form .check input { width: auto; }
.admin-form.stack { flex-direction: column; align-items: stretch; max-width: 420px; }
.admin-form.stack label { display: flex; flex-direction: column; gap: 6px; color: #bbb; font-size: 13px; }
.admin-form.stack input:not([type="hidden"]):not([type="checkbox"]),
.admin-form.stack select { flex: none; width: 100%; }
.admin-form.stack .checks { display: flex; flex-wrap: wrap; gap: 14px; }
.admin-form.inline { display: inline-flex; flex-wrap: nowrap; margin: 0; max-width: none; align-items: center; gap: 6px; }
.admin-form.inline input { flex: none; }

.window-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(520px, 100%);
  margin: 14px 0 0;
}
.window-opt {
  display: block;
  margin: 0;
  cursor: pointer;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px 14px;
  background: #0d0d0d;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.window-opt input { position: absolute; opacity: 0; pointer-events: none; }
.window-opt span { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.window-opt em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.window-opt.is-on,
.window-opt:has(input:checked) {
  border-color: rgba(215, 181, 106, 0.75);
  background: #15120a;
}

.profit-formula {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: #121212;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #d8d8d8;
  line-height: 1.45;
}
.profit-formula b { color: var(--gold); }
.earn-table td:first-child { color: var(--muted); }
.earn-table tr.earn-total td {
  color: var(--ink);
  font-weight: 700;
  border-top: 1px solid var(--line);
}
.earn-table tr.earn-total td:first-child { color: var(--ink); }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background: var(--bg);
}
.auth-card {
  width: min(360px, 100%);
  text-align: center;
}
.auth-brand {
  margin: 0;
  font-family: var(--display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.auth-sub {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 15px;
}
.auth h1 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.auth .lead { text-align: center; }
.auth form { text-align: left; }
.auth .btn-block { margin-top: 22px; }
.otp-field {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.42em;
  font-family: ui-monospace, "SF Mono", monospace;
  padding-left: 0.42em;
  margin-top: 18px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.side-balance {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.side-balance span { color: var(--muted); font-size: 12px; }
.side-balance b {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mark b { display: block; letter-spacing: -0.03em; font-size: 18px; font-family: var(--display); font-weight: 600; }
.mark span { color: var(--muted); font-size: 13px; }
.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #1c1914;
  display: grid;
  place-items: center;
  flex: none;
}
.logo svg { width: 26px; height: 26px; display: block; }
h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -0.03em; }
.lead { color: var(--muted); margin: 0 0 22px; line-height: 1.45; }
label { display: block; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
input:not([type="hidden"]) {
  width: 100%;
  background: #0a0a0a;
  color: var(--ink);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
input:focus { border-color: var(--gold); }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
}
.btn-gold { background: var(--gold); color: #fffaf0; }
.btn-blue { background: var(--blue); color: white; }
.btn-block { width: 100%; margin-top: 18px; }
.err {
  background: #2a1414;
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.secret {
  font-family: ui-monospace, "SF Mono", monospace;
  letter-spacing: 0.08em;
  background: #111;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.qr-enroll { display: grid; place-items: center; margin: 8px 0 16px; }
.qr-enroll svg { width: 220px; height: 220px; background: white; border-radius: 16px; padding: 10px; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: #000; }
.main { background: #000; }
.side {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side nav { display: flex; flex-direction: column; gap: 4px; }
.nav-a, .sub a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e8e8e8;
}
.nav-a.is-on, .sub a.is-on {
  background: #1a1a1a;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(196, 137, 26, 0.45);
}
.sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 18px; }
.sub a { color: var(--muted); font-size: 14px; }
.group-label {
  color: #bdbdbd;
  padding: 10px 12px 4px;
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
}
.side-foot { margin-top: auto; color: var(--muted); font-size: 12px; padding: 8px 4px 4px; }
.side-foot .tg { display: block; margin-top: 10px; color: var(--gold); }
.rapira-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rapira-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rapira-left strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
  font-family: var(--sans);
}
.rapira-left span {
  display: block;
  color: #8a8a8a;
  font-size: 11px;
}
.tether { width: 22px; height: 22px; flex: none; display: block; }
.rapira-right { text-align: right; }
.rapira-right b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
}
.rapira-right span { color: #8a8a8a; font-size: 11px; }

.main { padding: 28px 32px 48px; position: relative; }
.main .top { padding-right: 80px; }
.leave {
  position: absolute;
  top: 28px;
  right: 32px;
  color: var(--muted);
  font-size: 14px;
  z-index: 2;
}
.leave:hover { color: var(--ink); }
.top h1 { font-size: 36px; }
.top p { margin: 4px 0 0; color: var(--muted); }
.top p.withdraw-note { margin-top: 14px; }
.tabs {
  display: flex;
  gap: 4px;
  background: #111;
  padding: 5px;
  border-radius: 16px;
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.tabs a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d0d0d0;
  font-size: 14px;
}
.tabs a.is-on { background: #f4f4f4; color: #000; }

.panel {
  margin-top: 14px;
  max-width: 420px;
  background: var(--card);
  border: 1px solid rgba(215, 181, 106, 0.7);
  border-radius: 14px;
  padding: 6px;
}
#qr-form {
  max-width: 440px;
  margin: 18px auto 0;
}
#qr-form .panel {
  max-width: none;
  width: 100%;
}
#qr-form .window-pick {
  width: 100%;
}
/* 14 · card stack — поля стопкой + кнопка на всю ширину */
.panel.qr-form,
.panel.withdraw-form {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 440px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 18px;
  background: #111;
  border: 1px solid rgba(215, 181, 106, 0.45);
}
.qr-form { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.qr-form input,
.panel.withdraw-form input:not([type="hidden"]) {
  flex: none;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  color: var(--ink);
  padding: 10px 8px 14px;
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
}
.qr-form input::placeholder,
.panel.withdraw-form input::placeholder {
  color: #8a8a8a;
  font-weight: 400;
}
.qr-form input:focus,
.panel.withdraw-form input:not([type="hidden"]):focus {
  border-color: rgba(255, 255, 255, 0.07);
  outline: none;
}
.panel.withdraw-form input[name="wallet"] {
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 13px;
}
.qr-form input:last-of-type,
.panel.withdraw-form input:not([type="hidden"]):last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 10px;
}
.qr-form .btn,
.panel.withdraw-form .btn {
  width: 100%;
  margin-top: 4px;
  white-space: nowrap;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #e0c17a, #c79a45);
  color: #1a1408;
}
.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mini-modal.is-open { display: flex; }
.mini-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}
.mini-modal-card {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
  padding: 18px 18px 16px;
  background: #141414;
  border: 1px solid rgba(255, 141, 141, 0.28);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.mini-modal-title {
  margin: 0 0 14px;
  color: #ffb0b0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.mini-modal-card .btn { min-width: 110px; }
td.mono, .mono {
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.card span { color: var(--muted); font-size: 13px; }
.card strong { display: block; margin-top: 8px; font-size: 28px; letter-spacing: -0.03em; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num, th.num, td.col-amt, th.col-amt {
  white-space: nowrap;
  min-width: 7.5em;
  padding-right: 18px;
}
.empty { color: var(--muted); padding: 28px 8px; }

.result { max-width: 460px; margin: 28px auto 0; text-align: center; }
.date-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0 6px;
  font-size: 14px;
  color: var(--muted);
}
.date-bar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.date-bar input[type="date"] {
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: var(--ink);
  padding: 5px 8px;
  font: inherit;
  color-scheme: dark;
}
.date-quick a { color: var(--gold); }
.date-bar .btn-gold { margin-left: auto; }
.qr-count { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.qr-add { margin: 12px auto 0; width: min(440px, 100%); }
.qr-add summary { display: inline-block; list-style: none; cursor: pointer; }
.qr-add summary::-webkit-details-marker { display: none; }
.qr-add[open] summary { display: none; }
.qr-multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 28px;
  align-items: start;
}
.qr-multi .result { margin-top: 28px; width: 100%; }
.qr-warn-banner {
  width: min(100%, 560px);
  margin: 0 auto 18px;
  padding: 14px 16px;
  background: #12100c;
  border: 1px solid rgba(228, 184, 74, 0.28);
  border-radius: 14px;
  color: #d9897a;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}
.qr-warn-banner p {
  margin: 0 0 10px;
}
.qr-warn-banner p:last-child {
  margin-bottom: 0;
}
.qr-maint-banner {
  width: min(100%, 520px);
  margin: 0 auto 14px;
  padding: 10px 14px;
  background: #14120e;
  border: 1px solid rgba(228, 184, 74, 0.45);
  border-radius: 12px;
  color: #e4b84a;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.01em;
}
.qr-frame {
  width: 280px;
  height: 280px;
  margin: 0 auto 18px;
  background: #f2f2f2;
  border-radius: 28px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid #1a1a1a;
  box-shadow: 0 0 0 10px #111;
}
.qr-frame svg, .qr-frame img { width: 100%; height: auto; }
.amt-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}
.amt-row .amount-lg { margin: 0; }
.qr-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #161616;
  border: 1px solid #2a2a2a;
  color: #b8a878;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.qr-chip.is-low {
  background: #1a1414;
  border-color: rgba(255, 141, 141, 0.35);
  color: #d9897a;
}
.qr-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.qr-ttl-note {
  margin-top: 38px; /* ~1cm ниже формы */
  font-size: 15px; /* +~15% к 13px */
}
.pay-share {
  width: min(100%, 420px);
  margin: 0 auto 18px;
  text-align: center;
}
.pay-share .note { margin: 0 0 8px; }
.pay-link {
  display: block;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
  text-align: left;
}
.pay-share .copy-pay { margin: 0 auto; }
.pay-share .pay-sbp {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
}
.claim-banner {
  margin: 0 auto 14px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #2a2208;
  border: 1px solid rgba(232, 184, 74, 0.45);
  color: #f0d48a;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.claim-box {
  width: min(100%, 420px);
  margin: 0 auto 8px;
  padding: 14px 14px 16px;
  border-radius: 14px;
  background: #121212;
  border: 1px solid var(--line);
  text-align: center;
}
.claim-box.is-done {
  background: #123226;
  border-color: rgba(90, 180, 120, 0.45);
}
.claim-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.claim-box .note { margin: 0 0 12px; }
.claim-form { margin: 0; }
.invoice-amt { margin-top: 12px; }
.invoice-pay { margin-top: 4px; }
.qr-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.qr-actions form { margin: 0; }
.qr-cancel {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
}
.qr-actions .qr-cancel { margin: 0; }
.qr-cancel .btn-ghost { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 141, 141, 0.35); }
.qr-cancel .btn-ghost:hover { color: #ffb4b4; }
.btn-quiet {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px #2a2a2a;
  font-weight: 600;
}
.btn-quiet:hover { color: var(--ink); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px #3a3a3a;
  font-weight: 600;
}
.btn-secondary:hover { box-shadow: inset 0 0 0 1px rgba(228, 184, 74, 0.45); color: #fffaf0; }
.qr-add > summary.btn-quiet {
  margin: 0 auto;
  display: inline-block;
}
.pay-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 280px;
}
.pay-cell .pay-admin-link {
  color: var(--gold);
  font-size: 12px;
  word-break: break-all;
}
td.col-bot-id, th.col-bot-id {
  width: 1%;
  white-space: nowrap;
  vertical-align: top;
}
.bot-ref-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: max-content;
}
.bot-ref-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.bot-ref {
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #e8b84a;
  background: #161616;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #2e2e2e;
  white-space: nowrap;
}
.bot-ref-share {
  margin: 10px auto 0;
  max-width: 420px;
  text-align: left;
}
.bot-ref-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.bot-ref-full {
  font-size: 11px;
  color: #a8a8a8;
  white-space: nowrap;
  word-break: normal;
  flex: none;
}
.bot-ref-full-line {
  display: block;
  width: auto;
  max-width: none;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  word-break: normal;
}
.bot-ref-bot {
  margin: 6px 0 0;
  font-size: 11px;
  color: #8a8a8a;
  word-break: break-all;
}
.bot-ref-txn {
  color: #c8c8c8;
  box-shadow: inset 0 0 0 1px #3a3a3a;
}
.bot-ref-share .bot-ref-row + .bot-ref-row {
  margin-top: 8px;
}
.pay-full {
  font-size: 11px;
  color: #c8c8c8;
  word-break: break-all;
  max-width: 420px;
}
.qr-state {
  width: 280px;
  margin: 0 auto 18px;
  padding: 18px 16px;
  border-radius: 20px;
  font-weight: 600;
  line-height: 1.4;
}
.qr-state.ok { background: #123226; color: var(--ok); }
.qr-state.off { background: #1c1c1c; color: var(--muted); }
.amount-lg {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.rows { text-align: left; }
.rows div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  color: #d8d8d8;
}
.rows .net {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 12px;
  color: var(--ink);
  font-weight: 700;
}
.note { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 16px; }
.back { display: inline-block; margin-top: 16px; color: var(--gold); }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #2a2416;
  color: var(--gold);
}
.pill.ok { background: #123226; color: var(--ok); }
.pill.role-admin {
  background: #1a2230;
  color: #8eb6e8;
  border: 1px solid rgba(76, 134, 212, 0.35);
}
.pill.role-ref {
  background: #241c12;
  color: var(--gold);
  border: 1px solid rgba(228, 184, 74, 0.35);
}
.fee-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.75em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #18160f;
  border: 1px solid rgba(228, 184, 74, 0.32);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.fee-chip.is-extra {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.12);
  color: #c8c8c8;
  font-weight: 500;
}
.fee-chip.is-empty {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 500;
  min-width: 0;
  padding: 0;
}
.user-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.user-name {
  color: var(--ink);
  font-weight: 600;
}
.user-name:hover { color: var(--gold); }
.user-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ref-name { color: #cfcfcf; }
.muted-dash { color: var(--muted); }
.user-fee-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.fee-formula { color: var(--muted); }
.admin-panel {
  margin-top: 28px;
  padding: 18px 18px 20px;
  max-width: 460px;
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}
.admin-panel .section { margin-top: 0; }
.admin-users-table td.num {
  font-variant-numeric: tabular-nums;
}
.who { color: var(--muted); font-size: 13px; }
.out { color: var(--muted); font-size: 13px; background: none; border: 0; cursor: pointer; padding: 0; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .qr-form,
  .panel.withdraw-form { flex-direction: column; align-items: stretch; }
  .main { padding: 20px 16px 40px; }
  .leave { top: 20px; right: 16px; }
  .admin-bar, .admin-main { padding-left: 16px; padding-right: 16px; }
  .admin-bar { flex-wrap: wrap; }
  .admin-nav { margin-left: 0; order: 3; width: 100%; }
  .cards.four { grid-template-columns: 1fr 1fr; }
}

.dock-body {
  min-height: 100dvh;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 42% 36% at 18% 22%, rgba(196, 150, 70, 0.14), transparent 60%),
    radial-gradient(ellipse 38% 34% at 82% 28%, rgba(120, 100, 60, 0.10), transparent 58%),
    radial-gradient(ellipse 50% 40% at 55% 88%, rgba(40, 55, 45, 0.16), transparent 55%),
    #050505;
}
.dock-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px);
}
.dock-brand { display: flex; align-items: center; gap: 12px; }
.dock-brand .logo { width: 38px; height: 38px; border-radius: 12px; }
.dock-brand .logo svg { width: 22px; height: 22px; }
.dock-brand b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dock-brand span { color: var(--muted); font-size: 12px; }
.dock-stats { display: flex; align-items: center; gap: 22px; }
.dock-stat span { display: block; color: var(--muted); font-size: 11px; }
.dock-stat b {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.tg-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(228, 184, 74, 0.15);
}
.tg-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(93, 222, 160, 0.15); }
.dock-leave {
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dock-leave:hover { color: var(--ink); }
.dock-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 120px;
}
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(420px, calc(100% - 28px));
  margin: 0 auto max(12px, env(safe-area-inset-bottom, 0px));
  padding: 9px 7px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(28, 26, 22, 0.92), rgba(12, 11, 9, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  /* Avoid transform here: on iOS it can break fixed bottom positioning. */
}
.dock-a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 3px;
  border-radius: 14px;
  color: #a39d92;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.dock-a svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock-a:hover { color: var(--ink); }
.dock-a.is-on { color: var(--gold); }
.dock-a.is-on .dock-fill { fill: currentColor; }

.dock-body .auth { background: transparent; }
.dock-body .auth-card {
  width: min(400px, 100%);
  padding: 34px 30px 30px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(16, 14, 11, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.dock-body .auth-logo { margin: 0 auto 14px; width: 48px; height: 48px; }
.dock-body .auth-brand {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dock-body .auth-sub { margin: 6px 0 26px; font-size: 14px; }
.dock-body .auth h1 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8cfbf;
}
.dock-body .auth input:not([type="hidden"]) {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.1);
}
.dock-body .auth input:focus { border-color: var(--gold); }
.dock-body .auth .btn-gold {
  background: linear-gradient(180deg, #e0c17a, #c79a45);
  color: #1a1408;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 16px;
}
.dock-body .auth .btn-gold:hover { filter: brightness(1.06); }

@media (max-width: 760px) {
  .dock-top { padding: 12px 16px; }
  .dock-stats { gap: 14px; }
  .dock-stat:nth-child(2) { display: none; }
  .dock-main { padding: 20px 16px 110px; }
  .dock { width: min(420px, calc(100% - 20px)); }
  .dock-a { font-size: 11px; }
  .dock-a svg { width: 24px; height: 24px; }
  .dock-body .home-cards {
    grid-template-columns: 1fr 1fr;
  }
  .dock-body .home-cards .card:first-child {
    grid-column: 1 / -1;
  }
}
