@font-face { font-family: Inter; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root { --bg: #0B0D10; --panel: #16191E; --panel2: #1C2026; --line: #262A31; --line2: #333842; --text: #EEF0F4; --muted: #9AA3B2;
  --blue: #2F6BFF; --cyan: #7FA8FF; --good: #4ADE9B; --warn: #FFB547; --bad: #FF7A85; --grad: #2F6BFF; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, sans-serif; }
body { background: var(--bg); min-height: 100vh; }
a { color: var(--cyan); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; } h1 { font: 800 24px Inter, sans-serif; letter-spacing: -.4px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; background: rgba(11,13,16,.6); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px Inter, sans-serif; color: var(--text); margin: 0 6px 18px; } .brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { color: var(--cyan); } .brand small { font: 600 10px Inter; color: var(--muted); border: 1px solid var(--line2); padding: 1px 6px; border-radius: 99px; margin-left: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: rgba(31,107,255,.08); color: var(--text); text-decoration: none; } .nav a.on { background: rgba(31,107,255,.16); color: var(--text); box-shadow: inset 2px 0 0 var(--cyan); }
.pill { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(255,181,71,.15); color: var(--warn); }
.side .grow { flex: 1; } .side form button { width: 100%; }
main { padding: 28px 32px 60px; max-width: 1180px; width: 100%; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card { background: linear-gradient(180deg, rgba(22,25,30,.85), rgba(8,14,32,.9)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat { padding: 16px 18px; } .stat .k { color: var(--muted); font-size: 12.5px; } .stat .v { font-size: 24px; font-weight: 700; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 11px; padding: 9px 16px; font: 600 13.5px Inter; color: #fff; background: var(--grad); cursor: pointer; text-decoration: none !important; box-shadow: 0 8px 24px -12px rgba(31,107,255,.8); }
.btn:disabled { opacity: .5; cursor: not-allowed; } .btn.secondary { background: var(--panel2); border: 1px solid var(--line2); box-shadow: none; color: var(--text); }
.btn.danger { background: rgba(255,92,122,.14); color: var(--bad); border: 1px solid rgba(255,92,122,.35); box-shadow: none; } .btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--cyan); box-shadow: none; padding: 6px 8px; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea { width: 100%; background: #070e22; border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: 14px Inter; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(43,210,255,.6); box-shadow: 0 0 0 3px rgba(43,210,255,.12); }
textarea { min-height: 90px; resize: vertical; } .field { margin-bottom: 14px; } .field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 6px 0 14px; } .check input { width: 17px; height: 17px; accent-color: var(--blue); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; }
table { width: 100%; border-collapse: collapse; } th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid rgba(160,170,190,.07); vertical-align: middle; } tr:hover td { background: rgba(31,107,255,.04); }
.tl { width: 30px; height: 30px; border-radius: 50%; background: #16191E; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .4px; background: rgba(43,184,255,.14); color: var(--cyan); }
.badge.featured { background: rgba(31,107,255,.2); color: #8db4ff; } .badge.listed { background: rgba(143,160,200,.15); color: var(--muted); }
.badge.paid, .badge.completed, .badge.on { background: rgba(34,211,154,.14); color: var(--good); } .badge.awaiting_payment, .badge.sent { background: rgba(255,181,71,.14); color: var(--warn); }
.badge.rejected, .badge.unused, .badge.off { background: rgba(255,92,122,.14); color: var(--bad); } .badge.approved { background: rgba(31,107,255,.2); color: #8db4ff; }
.alert { padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--line2); background: var(--panel); }
.alert.ok { border-color: rgba(34,211,154,.35); background: rgba(34,211,154,.08); color: #9ff0d2; } .alert.err { border-color: rgba(255,92,122,.4); background: rgba(255,92,122,.08); color: #ffb3c1; }
.alert.warn { border-color: rgba(255,181,71,.35); background: rgba(255,181,71,.07); color: #ffd28a; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(160,170,190,.07); } .kv:last-child { border-bottom: 0; } .kv > span:first-child { color: var(--muted); flex-shrink: 0; } .kv > span:last-child { text-align: right; word-break: break-all; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; } .tabs a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 12.5px; } .tabs a.on { background: rgba(31,107,255,.16); color: var(--text); border-color: rgba(43,184,255,.5); }
pre { background: #070e22; border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 260px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.preview { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: #070e22; border: 1px dashed var(--line2); }
.preview img { width: 48px; height: 48px; border-radius: 50%; background: #16191E; }
.steps { counter-reset: s; display: grid; gap: 10px; } .steps > div { counter-increment: s; padding-left: 38px; position: relative; } .steps > div::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; } .auth { width: 100%; max-width: 400px; }
.public { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; } .qr img, .qr svg { display: block; width: 180px; height: 180px; }
.pagination { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; } .pagination a, .pagination span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
/* sidebar parts (phones turn them into a top bar + drop-down menu) */
.side-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
.menu-btn { display: none; }

/* ---------- tablets & phones ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; z-index: 60; height: auto; padding: 10px 14px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(11,13,16,.94); backdrop-filter: blur(12px); }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .brand { margin: 0; font-size: 17px; } .brand img { width: 30px; height: 30px; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; position: relative; width: 42px; height: 42px; padding: 0 11px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; }
  .menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
  .menu-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--panel2); }
  .side.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); } .side.open .menu-btn span:nth-child(2) { opacity: 0; } .side.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .side-menu { display: none; max-height: calc(100vh - 64px); overflow-y: auto; padding: 10px 0 6px; }
  .side.open .side-menu { display: flex; }
  .side .grow { display: none; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .nav a { padding: 12px; background: rgba(160,170,190,.05); border: 1px solid var(--line); }
  .nav a.on { box-shadow: none; border-color: rgba(43,184,255,.5); }
  .side-menu > .small { margin: 12px 4px 8px !important; }
  main { padding: 18px 14px 50px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  table { display: block; overflow-x: auto; }
  h1 { font-size: 21px; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .btn { min-height: 40px; } .btn.sm { min-height: 34px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea { font-size: 16px; } /* no zoom-in on iPhone */
  .kv { flex-wrap: wrap; gap: 4px 14px; } .kv > span:last-child { min-width: 0; margin-left: auto; }
}
@media (min-width: 520px) and (max-width: 900px) { .g2, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- phones: tables become stacked cards (labels come from the table header, see admin.js) ---------- */
@media (max-width: 700px) {
  table.stack { display: block; overflow: visible; }
  table.stack thead { display: none; }
  table.stack tbody { display: grid; gap: 10px; padding: 6px 0; }
  table.stack tr { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,14,34,.6); }
  table.stack tr:hover td { background: none; }
  table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(160,170,190,.07); text-align: right !important; min-width: 0; word-break: break-word; }
  table.stack td:last-child { border-bottom: 0; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; max-width: 45%; }
  table.stack td[data-label=""]::before, table.stack td:not([data-label])::before { content: none; }
  table.stack td[data-label=""], table.stack td:not([data-label]) { justify-content: flex-end; }
  table.stack td[colspan] { display: block; text-align: center !important; }
  table.stack td > .row { justify-content: flex-end; flex-wrap: nowrap; min-width: 0; }
  table.stack td:first-child { font-size: 15px; }
  table.stack pre, table.stack td.wrap { white-space: pre-wrap; text-align: left; }
  .top { gap: 10px; } .top > .btn, .top > form { flex: 1 1 auto; }
  .card[style*="padding:6px 10px"] { padding: 10px !important; }
}

.badge.cleared { background: rgba(143,160,200,.15); color: var(--muted); }

/* centered success / error popup */
.notice-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2,6,18,.66); backdrop-filter: blur(3px); animation: nfade .15s ease-out; }
.notice { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 24px 22px 18px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: npop .18s ease-out; }
.notice .ic { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font: 800 24px Inter; }
.notice.ok .ic { background: rgba(34,211,154,.15); color: var(--good); } .notice.err .ic { background: rgba(255,92,122,.15); color: var(--bad); } .notice.warn .ic { background: rgba(255,181,71,.15); color: var(--warn); }
.notice h3 { margin: 0 0 6px; font-size: 17px; } .notice .msg { color: var(--muted); font-size: 13.5px; line-height: 1.5; word-break: break-word; margin-bottom: 18px; }
.notice .msg div + div { margin-top: 4px; } .notice .btn { width: 100%; justify-content: center; }
@keyframes nfade { from { opacity: 0; } } @keyframes npop { from { opacity: 0; transform: scale(.94); } }

.notice .ic { width: 76px; height: 76px; position: relative; background: none !important; border-radius: 0; margin-bottom: 14px; }
.notice .ic img { width: 76px; height: 76px; display: block; filter: drop-shadow(0 6px 18px rgba(31,107,255,.45)); }
.notice .ic .mk { position: absolute; left: -6px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 15px Inter; border: 3px solid var(--panel); }
.notice.ok .ic .mk { background: var(--good); color: #04261b; } .notice.err .ic .mk { background: var(--bad); color: #2a0610; } .notice.warn .ic .mk { background: var(--warn); color: #2a1a00; }

/* ---------- mobile pass 2 ---------- */
/* long hashes, errors and addresses wrap instead of pushing the page wider */
.alert, .kv > span, .card p, .card .hint, .notice .msg, .mono { overflow-wrap: anywhere; }
/* checkbox labels: the box on the left, the whole sentence flows next to it */
.check { display: block; position: relative; padding-left: 27px; line-height: 1.45; }
.check input { position: absolute; left: 0; top: 1px; margin: 0; }
.row > .check { margin: 4px 0; }
/* in-page shortcuts (Buy & Sell) */
.jump { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 13px; text-decoration: none; }
[id] { scroll-margin-top: 76px; }
table.compact { width: 100%; }
/* PWA install button in the menu */
.install-btn { display: none; width: 100%; margin-top: 8px; } .install-btn.show { display: inline-flex; justify-content: center; }
@media (min-width: 901px) { .jump { display: none; } }
@media (max-width: 700px) {
  table.compact { display: table; overflow: visible; }
  table.compact .hide-sm { display: none; }
  table.compact th, table.compact td { padding: 10px 6px; font-size: 13.5px; }
  .row.filter { flex-direction: column; align-items: stretch; } .row.filter > * { max-width: none !important; width: 100%; }
  .top { flex-wrap: wrap; }
  form.row { flex-wrap: wrap; } form.row .field input { width: 100% !important; } form.row .field { flex: 1 1 140px; }
  .card h2 { font-size: 17px; }
  details.card > summary { padding: 4px 0; }
}
/* standalone app (installed PWA): room for the phone's status bar */
@media (display-mode: standalone) { .side { padding-top: max(10px, env(safe-area-inset-top)); } main { padding-bottom: max(50px, env(safe-area-inset-bottom)); } }
