/* ==========================================================================
   Pay2Crypto Portal — stylesheet
   ========================================================================== */

:root{
  --brand: #00bf63;
  --brand-light:#00d66f;
  --brand-dark:#00b85f;
  --brand-soft:#e7fbf1;
  --brand-line:#b9efd4;

  --bg:#f6f8fa;
  --surface:#ffffff;
  --text:#0f1720;
  --muted:#6b7785;
  --border:#e6eaee;
  --hover:#fbfcfd;

  --danger:#c5221f;
  --danger-soft:#fdecea;
  --warn:#a86a00;
  --warn-soft:#fff5e0;

  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --sidebar-w:236px;
  --topbar-h:64px;
}

*,*::before,*::after{box-sizing:border-box}
/* The hidden attribute must win over any element's own display (e.g. .btn's
   inline-flex), otherwise el.hidden = true fails to hide it. */
[hidden]{display:none !important}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased;
}
h1,h2,h3{margin:0;letter-spacing:-.4px}
a{color:inherit;text-decoration:none}
code,pre,.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

/* ------------------------------------------------------------- buttons */

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:0;border-radius:11px;padding:11px 20px;
  background:var(--brand);color:#fff;font:inherit;font-weight:600;font-size:14.5px;
  cursor:pointer;transition:background .15s,transform .05s;white-space:nowrap;
}
.btn:hover{background:var(--brand-dark)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn.block{width:100%;padding:13px 20px;font-size:15px}
.btn.small{padding:7px 14px;font-size:13px;border-radius:9px}
.btn.ghost{background:var(--surface);color:var(--text);border:1px solid var(--border);font-weight:500}
.btn.ghost:hover{background:var(--hover)}

.link{background:none;border:0;padding:0;font:inherit;font-weight:600;font-size:13.5px;
  color:var(--brand-dark);cursor:pointer}
.link.danger{color:var(--danger)}
/* .muted alone loses to .link's colour (same specificity, declared earlier). */
.link.muted{color:var(--muted);font-weight:600}
.link:hover{text-decoration:underline}

.icon-btn{background:none;border:0;padding:6px;cursor:pointer;display:none}

/* --------------------------------------------------------------- login */

body.guest{background:radial-gradient(1100px 520px at 50% -12%,var(--brand-soft),var(--bg) 62%)}
.login{min-height:100vh;display:grid;place-items:center;padding:24px}
.login-card{
  width:100%;max-width:430px;background:var(--surface);border:1px solid var(--border);
  border-radius:20px;box-shadow:var(--shadow);padding:40px 36px;text-align:center;
}
.login-logo{margin-bottom:10px}
.login-card h1{font-size:25px;margin-bottom:10px}
.login-card>p{color:var(--muted);font-size:14.5px;margin:0 0 26px}
.login-perks{list-style:none;margin:26px 0 0;padding:0;text-align:left;
  font-size:13.5px;color:var(--muted);display:grid;gap:9px}
.login-perks li{position:relative;padding-left:24px}
.login-perks li::before{
  content:"";position:absolute;left:0;top:6px;width:14px;height:14px;border-radius:50%;
  background:var(--brand-soft);
  box-shadow:inset 0 0 0 1px var(--brand-line);
}
.login-perks li::after{
  content:"";position:absolute;left: 2.8px;
  top: 10.5px;
  width: 8px;
  height: 4.5px;
  border-left:2px solid var(--brand-dark);border-bottom:2px solid var(--brand-dark);
  transform:rotate(-45deg);
}
.fineprint{ margin:22px 0 0!important;font-size:10px!important;color:var(--muted)!important }
.form-error{min-height:20px;margin:14px 0 0;font-size:13.5px;color:var(--danger)}

/* -------------------------------------------------------------- topbar */

.topbar{position:sticky;top:0;z-index:30;background:var(--surface);border-bottom:1px solid var(--border)}
.topbar-inner{height:var(--topbar-h);display:flex;align-items:center;gap:14px;padding:0 24px}
.logo{display:inline-flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.4px}
.spacer{flex:1}
.wallet-chip{
  display:inline-flex;align-items:center;gap:9px;padding:7px 14px;border-radius:999px;
  background:var(--bg);border:1px solid var(--border);
  font-size:13.5px;font-weight:600;font-family:ui-monospace,Menlo,monospace;
}
.wallet-chip .live{
  width:7px;height:7px;border-radius:50%;background:var(--brand);
  box-shadow:0 0 0 3px rgba(0,214,111,.18);
}
.menu-toggle span{display:block;width:18px;height:2px;border-radius:2px;background:var(--text);margin:3.5px 0}

/* ------------------------------------------------------------- sidebar */

.shell{display:flex;align-items:flex-start;min-height:calc(100vh - var(--topbar-h))}
.sidebar{
  width:var(--sidebar-w);flex:0 0 var(--sidebar-w);
  position:sticky;top:var(--topbar-h);align-self:flex-start;
  height:calc(100vh - var(--topbar-h));
  background:var(--surface);border-right:1px solid var(--border);
  padding:20px 14px;display:flex;flex-direction:column;
  overflow-y:auto;overscroll-behavior:contain;   /* scroll when items exceed viewport */
}
.sidebar nav{display:block}
.nav-group{display:grid;gap:3px}
.nav-heading{
  font-size:11px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;
  color:var(--muted);margin:20px 0 7px;padding:0 13px;
}
.nav-heading:first-child{margin-top:4px}
.nav-item{
  display:flex;align-items:center;gap:11px;padding:10px 13px;border-radius:10px;
  color:var(--muted);font-size:14.5px;font-weight:500;transition:background .15s,color .15s;
}
.nav-item svg{width:19px;height:19px;flex:0 0 19px}
.nav-item:hover{background:var(--hover);color:var(--text)}
.nav-item.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}

/* ------------------------------------------------------------- content */

.content{flex:1;min-width:0;padding:32px 32px 56px;max-width:1180px}
.page-head{margin-bottom:26px}
.page-head h1{font-size:24px}
.sub{margin:5px 0 0;color:var(--muted);font-size:14.5px}

/* --------------------------------------------------------------- cards */

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;margin-bottom:28px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:22px;box-shadow:var(--shadow)}
.card-label{color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.6px}
.card-value{font-size:31px;font-weight:700;letter-spacing:-1.1px;margin:12px 0 6px}
.card-delta{font-size:13px;font-weight:600;color:var(--brand-dark)}
.card-delta.flat{color:var(--muted);font-weight:500}

/* --------------------------------------------------------------- panel */

.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);margin-bottom:24px}
.panel-head{display:flex;align-items:center;gap:12px;padding:17px 22px;border-bottom:1px solid var(--border)}
.panel-head h2{font-size:16px}
.badge{margin-left:auto;background:var(--bg);border:1px solid var(--border);border-radius:999px;
  padding:3px 11px;font-size:12px;color:var(--muted);font-weight:600}
.empty{padding:46px 22px;text-align:center;color:var(--muted);font-size:14px;margin:0}
.hint{margin:0;padding:14px 22px;color:var(--muted);font-size:13.5px;line-height:1.6;}
.hint a{color:var(--brand-dark);font-weight:600}
.hint a:hover{text-decoration:underline}
.hint code{background:var(--bg);border:1px solid var(--border);border-radius:5px;padding:1px 5px;font-size:12.5px}

/* --------------------------------------------------------------- table */

.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:14px}
th{
  text-align:left;padding:11px 22px;background:var(--hover);border-bottom:1px solid var(--border);
  color:var(--muted);font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;
  white-space:nowrap;
}
td{padding:14px 22px;border-bottom:1px solid #f1f4f6;white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--hover)}
td.mono{color:var(--muted);font-size:13px}
td.num{font-variant-numeric:tabular-nums}
td.strong,.strong{font-weight:600}
td.right{text-align:right}
.asset{font-weight:600}

.pill{display:inline-block;padding:4px 11px;border-radius:999px;font-size:12px;font-weight:600;
  text-transform:capitalize}
.pill.confirmed{background:var(--brand-soft);color:var(--brand-dark)}
.pill.pending{background:var(--warn-soft);color:var(--warn)}
.pill.failed{background:var(--danger-soft);color:var(--danger)}

/* ------------------------------------------------------------- reports */

.filters{
  display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:18px 20px;margin-bottom:16px;
}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field label{font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
.field.actions{flex-direction:row;gap:10px;margin-left:auto;align-items:center}

/* Let the controls share the bar instead of shrinking to their content. Without
   a grow factor each select sized to its longest option, so they bunched up on
   the left and margin-left:auto threw the buttons to the far edge, leaving a
   dead gap between them. */
.filters .field{flex:1 1 170px}
.filters .field > select,
.filters .field > input{width:100%}
.filters .field.actions{flex:0 0 auto}
.filters .field.actions .btn{white-space:nowrap}
select,input[type=date]{
  padding:10px 12px;border:1px solid var(--border);border-radius:10px;
  font:inherit;font-size:14px;background:var(--surface);color:var(--text);outline:none;
  transition:border-color .15s,box-shadow .15s;
}
select:focus,input[type=date]:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,214,111,.14)}
.hidden{display:none !important}
.range-note{margin:0 0 22px;font-size:13.5px;color:var(--muted)}

/* Single-series daily volume chart. Exact values live in the table below,
   which is also the required relief for the brand fill's low contrast. */
.chart{display:flex;align-items:flex-end;gap:2px;height:190px;padding:22px 22px 8px}
.bar-slot{
  position:relative;flex:1;min-width:3px;height:100%;
  display:flex;align-items:flex-end;justify-content:center;outline:none;
}
.bar{
  display:block;width:100%;background:var(--brand);
  border-radius:4px 4px 0 0;transition:background .12s;
}
.bar-slot:hover .bar,.bar-slot:focus-visible .bar{background:var(--brand-dark)}
.bar-slot:focus-visible{box-shadow:0 0 0 2px var(--brand-dark);border-radius:5px}
.bar-tip{
  position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);
  background:var(--text);color:#fff;border-radius:8px;padding:6px 10px;
  font-size:12px;font-weight:600;white-space:nowrap;pointer-events:none;
  opacity:0;transition:opacity .12s;z-index:5;
}
.bar-slot:hover .bar-tip,.bar-slot:focus-visible .bar-tip{opacity:1}
.chart-axis{
  display:flex;justify-content:space-between;gap:12px;
  padding:0 22px 18px;font-size:12px;color:var(--muted);
}
.chart-axis .peak{font-weight:600}

.share-cell{display:flex;align-items:center;gap:10px;min-width:170px}
.share-bar{flex:1;height:6px;border-radius:999px;background:var(--bg);overflow:hidden}
.share-bar span{display:block;height:100%;border-radius:999px;background:var(--brand)}
.share-num{font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:44px;text-align:right}

.pager{display:flex;align-items:center;gap:14px;padding:16px 22px;border-top:1px solid var(--border)}
.pager-info{font-size:13px;color:var(--muted)}
.pager .btn:last-of-type{margin-left:auto}

/* ---------------------------------------------------- transaction view */

.back-link{display:inline-block;margin-bottom:16px;color:var(--muted);font-size:13.5px;font-weight:500}
.back-link:hover{color:var(--brand-dark)}
.tx-head{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.tx-head h1{font-size:30px;letter-spacing:-1px}
.tx-head .pill{margin-left:auto;margin-top:6px}
.alert.warn{background:var(--warn-soft);border-color:#f2dda8;color:var(--warn)}

.detail-list{margin:0}
.detail-row{display:flex;gap:20px;padding:14px 22px;border-bottom:1px solid #f1f4f6}
.detail-row:last-child{border-bottom:0}
.detail-row dt{flex:0 0 180px;color:var(--muted);font-size:13.5px;font-weight:500}
.detail-row dd{margin:0;flex:1;min-width:0;font-size:14px;display:flex;align-items:center;gap:10px}
.breakable{word-break:break-all}
.muted{color:var(--muted)}
.panel-foot{padding:16px 22px;border-top:1px solid var(--border);background:var(--hover)}

tr.row-link{cursor:pointer}

/* -------------------------------------------------------------- tokens */

.token-form{display:flex;gap:10px;padding:20px 22px;border-bottom:1px solid var(--border);flex-wrap:wrap}
input[type=text]{
  flex:1;min-width:220px;padding:11px 14px;border:1px solid var(--border);border-radius:10px;
  font:inherit;font-size:14.5px;outline:none;transition:border-color .15s,box-shadow .15s;
}
input[type=text]::placeholder{color:#9aa4b0}
input[type=text]:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,214,111,.14)}
/* :user-invalid only fires after the field has been interacted with. */
input[type=text]:user-invalid{border-color:var(--danger)}
input[type=text]:user-invalid:focus{box-shadow:0 0 0 3px rgba(197,34,31,.12)}

.alert{border-radius:12px;padding:15px 18px;margin:0 0 22px;font-size:13.5px;border:1px solid}
.alert.success{background:var(--brand-soft);border-color:var(--brand-line)}
.alert.error{background:var(--danger-soft);border-color:#f5c6c3;color:var(--danger)}
.reveal-row{display:flex;align-items:center;gap:10px;margin-top:11px;flex-wrap:wrap}
.reveal-row code{
  flex:1;min-width:240px;background:var(--surface);border:1px solid var(--brand-line);
  border-radius:9px;padding:10px 12px;font-size:13px;word-break:break-all;
}
.token-card .panel-head h2{font-size:15.5px}
.token-card .panel-head .pill{margin-left:4px}
.head-form{margin-left:auto}

/* Collapsible token cards keep the list short when there are many keys */
.token-list-head{display:flex;align-items:center;justify-content:space-between;
  margin:0 2px 12px;font-size:13px;color:var(--muted);font-weight:600}
.token-card{margin-bottom:12px}
.token-card>summary{
  display:flex;align-items:center;gap:14px;padding:15px 20px;cursor:pointer;
  list-style:none;user-select:none;
}
.token-card>summary::-webkit-details-marker{display:none}
.token-card>summary:hover{background:var(--hover)}
.token-summary-main{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;min-width:0;flex:1}
.token-name{font-weight:600;font-size:15px}
.token-hint{font-size:12.5px;color:var(--muted)}
.token-summary-meta{display:flex;align-items:center;gap:12px;flex:none}
.token-summary-meta .muted{font-size:12.5px}
.token-chevron{color:var(--muted);transition:transform .18s ease;flex:none}
.token-card[open]>summary{border-bottom:1px solid var(--border)}
.token-card[open]>summary .token-chevron{transform:rotate(180deg)}
.webhook-card .token-name{font-size:13.5px;font-weight:500}

/* Collapsible API-docs sections reuse the panel-head as a summary */
.doc-summary{cursor:pointer;list-style:none;user-select:none}
.doc-summary::-webkit-details-marker{display:none}
.doc-summary:hover{background:var(--hover)}
details.doc>summary.doc-summary{border-bottom:0}
details.doc[open]>summary.doc-summary{border-bottom:1px solid var(--border)}
.doc-summary .token-chevron{margin-left:auto;color:var(--muted);transition:transform .18s ease;flex:none}
details.doc[open]>summary .token-chevron{transform:rotate(180deg)}
.token-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:18px;padding:14px 22px;
  border-bottom:1px solid var(--border);font-size:13px;color:var(--muted);
}
.domains{padding:18px 22px}
.domains h3{font-size:13px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin-bottom:8px}
.hint-inline{margin:0 0 14px;font-size:13px;color:var(--muted);line-height:1.65;max-width:78ch}
.hint-inline code{background:var(--bg);border:1px solid var(--border);border-radius:5px;padding:1px 5px;font-size:12px}
.domain-list{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:8px}
.domain-list li{
  display:flex;align-items:center;gap:12px;background:var(--bg);
  border:1px solid var(--border);border-radius:10px;padding:9px 14px;font-size:13.5px;
}
.domain-list form{margin-left:auto}
.domain-form{display:flex;gap:10px;flex-wrap:wrap}
.domain-form input[type=text]{min-width:240px}

/* ------------------------------------------- API docs & doc panels */

.doc .panel-head.endpoint{gap:10px}
/* Only endpoint paths are monospaced — prose headings keep the UI font. */
.doc .panel-head.endpoint h2{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:14.5px;font-weight:600;letter-spacing:0;
}
.method{
  flex:0 0 auto;font-size:11px;font-weight:700;letter-spacing:.6px;
  padding:3px 9px;border-radius:6px;font-family:inherit;
}
.method.get{background:var(--brand-soft);color:var(--brand-dark)}
.method.post{background:#e7effb;color:#1f5fbf}

/* One consistent rhythm for everything inside a doc panel. */
.doc-body{padding:20px 22px;display:grid;gap:16px}
.doc-body > p{
  margin:0;font-size:14px;line-height:1.65;color:var(--muted);
}
.doc-body > p strong{color:var(--text)}
.doc-body a{color:var(--brand-dark);font-weight:600}
.doc-body a:hover{text-decoration:underline}
.doc-body code{
  background:var(--bg);border:1px solid var(--border);border-radius:5px;
  padding:1px 5px;font-size:12.5px;color:var(--text);white-space:nowrap;
}

pre.code{
  margin:0;padding:15px 17px;background:var(--hover);
  border:1px solid var(--border);border-radius:11px;
  overflow-x:auto;font-size:12.75px;line-height:1.75;
}
pre.code code{background:none;border:0;padding:0;font-size:inherit;white-space:pre}

.code-label{
  margin:0 0 -8px;font-size:11px;font-weight:700;letter-spacing:.6px;
  text-transform:uppercase;color:var(--muted);
}

.doc-body .table-wrap{border:1px solid var(--border);border-radius:11px;overflow:auto}
.doc-table{font-size:13.5px}
.doc-table th{background:var(--hover);padding:10px 14px}
.doc-table td{padding:12px 14px;white-space:normal;vertical-align:top;line-height:1.6;color:var(--muted)}
.doc-table td:first-child{white-space:nowrap;color:var(--text)}
.doc-table tbody tr:last-child td{border-bottom:0}
.doc-table.params td:first-child code{background:var(--brand-soft);border-color:var(--brand-line)}
.doc-table .muted{font-size:12.5px}

.status-code{
  display:inline-block;font-family:ui-monospace,Menlo,monospace;font-weight:700;
  font-size:12.5px;padding:3px 9px;border-radius:6px;
  background:var(--danger-soft);color:var(--danger);
}

.callout{
  background:var(--bg);border:1px solid var(--border);border-left:3px solid var(--brand);
  border-radius:9px;padding:13px 15px;max-width:none !important;
}

/* -------------------------------------------------------------- footer */

.foot{border-top:1px solid var(--border);background:var(--surface)}
.foot-inner{max-width:1180px;margin:0 auto;padding:18px 32px;display:flex;flex-wrap:wrap;gap:12px;
  align-items:center;font-size:13px;color:var(--muted)}
.foot-links{margin-left:auto;display:flex;gap:18px}
.foot-links a:hover{color:var(--brand-dark)}

/* ---------------------------------------------------------- responsive */

@media (max-width:900px){
  .icon-btn{display:block}
  .sidebar{
    position:fixed;left:0;top:var(--topbar-h);z-index:25;
    transform:translateX(-100%);transition:transform .2s ease;
  }
  .sidebar.open{transform:translateX(0);box-shadow:var(--shadow)}
  .content{padding:24px 18px 48px}
  .foot-inner{padding:18px}
}
@media (max-width:560px){
  .topbar-inner{padding:0 16px;gap:10px}
  .logo span{display:none}
  .wallet-chip{padding:6px 11px;font-size:12.5px}
  .card-value{font-size:27px}
  th,td{padding-left:14px;padding-right:14px}
  .detail-row{flex-direction:column;gap:5px;padding:13px 16px}
  .detail-row dt{flex:none}
  .login-card{padding:32px 24px}
}

.domains + .domains{border-top:1px solid var(--border)}
.optional{
  font-size:10.5px;font-weight:600;letter-spacing:.4px;color:var(--muted);
  background:var(--bg);border:1px solid var(--border);border-radius:999px;
  padding:2px 8px;margin-left:6px;text-transform:uppercase;
}
.link[disabled]{opacity:.4;cursor:not-allowed;text-decoration:none}

/* ------------------------------------------------------ settings forms */

.stack-form{padding:22px;display:grid;gap:18px}
/* Two columns for short fields on wide screens; full width for the rest. */
/* align-items:start stops a field stretching to match a taller neighbour. */
.stack-form .field-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
.field-row{display:grid;gap:6px;min-width:0}
.field-row label{font-size:13px;font-weight:600}
.field-row small{font-size:12.5px;color:var(--muted);line-height:1.55}
.field-row small code{background:var(--bg);border:1px solid var(--border);border-radius:5px;
  padding:1px 5px;font-size:12px}
/* Every text-like field in a stacked form, so new input types (url, number,
   tel…) pick up the styling automatically instead of rendering raw. */
.field-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.field-row textarea{
  width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:10px;
  font:inherit;font-size:14.5px;outline:none;transition:border-color .15s,box-shadow .15s;
  background:var(--surface);color:var(--text);
}
.field-row textarea{resize:vertical;line-height:1.6}
.field-row input:focus,.field-row textarea:focus{
  border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,214,111,.14);
}
.form-actions{padding-top:2px}
/* Room for a note beside the button (which site an address is being added to). */
.form-actions .muted.block{margin-top:8px;max-width:70ch}
.tx-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
@media (max-width:620px){ .stack-form .field-grid{grid-template-columns:1fr} }
.inline-form{display:inline}
/* Compact select for an in-table control (moving an address between sites), so
   the row keeps its height instead of being stretched by a full-size field. */
.mini-select{
  font:inherit;font-size:12.5px;padding:4px 22px 4px 8px;border-radius:7px;
  border:1px solid var(--border);background:var(--surface);color:inherit;max-width:150px;
}
.mini-select + .link{margin-left:8px}
/* Which site an address belongs to, collapsed to its name until you change it. */
.site-move > summary{
  cursor:pointer;list-style:none;font-size:12.5px;color:var(--muted);
  display:inline-block;margin-top:3px;border-bottom:1px dashed var(--border);
}
.site-move > summary::-webkit-details-marker{display:none}
.site-move > summary:hover{color:var(--text)}
.site-move[open] > summary{margin-bottom:6px}
.site-move form{display:flex;align-items:center;gap:8px}
.nowrap{white-space:nowrap}
.right .link, .right .inline-form{margin-left:12px}
.muted.block{display:block;font-size:12.5px;margin-top:2px}
tr.subrow td{padding-top:0;padding-bottom:12px;border-bottom:1px solid #f1f4f6;white-space:normal}
.hash-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  background:var(--warn-soft);border:1px solid #f2e3c2;border-radius:10px;padding:8px 12px}
.hash-note>svg{color:var(--warn);flex:none}
.hash-note-label{font-size:12.5px;font-weight:600;color:var(--text)}
.hash-chip{font-size:12px;background:var(--surface);border:1px solid var(--border);border-radius:6px;
  padding:3px 9px;max-width:min(46vw,340px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  display:inline-block;vertical-align:middle;color:var(--muted)}
.hash-note-hint{font-size:12px;color:var(--muted);margin-left:auto}

/* ------------------------------------------------------------- webhooks */
.stack-form.compact{padding:16px 22px;gap:14px;border-top:1px solid var(--border)}
.check{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:500;cursor:pointer}
.check input{width:16px;height:16px;accent-color:var(--brand);cursor:pointer}
.check code{background:var(--bg);border:1px solid var(--border);border-radius:5px;padding:0 5px;font-size:12px;font-weight:400}
.webhook-card .panel-head h2{font-size:14px;font-weight:600;min-width:0}
.tag{background:var(--brand-soft);color:var(--brand-dark);border-radius:999px;padding:2px 10px;font-size:11.5px;font-weight:600;font-family:ui-monospace,Menlo,monospace}
.err-note{color:var(--danger);font-size:12.5px}
.deliveries{padding:6px 22px 20px}
.deliveries h3{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:14px 0 10px}
.small{font-size:12.5px}

/* ------------------------------------------------------------- billing */
.amt-credit{color:var(--brand-dark)}
.amt-debit{color:var(--text)}

/* --------------------------------------------------------------- admin */
.row-topup{display:flex;gap:6px;align-items:center}
input.mini{width:90px;min-width:0;padding:7px 10px;border:1px solid var(--border);
  border-radius:8px;font:inherit;font-size:13px;outline:none}
input.mini:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,214,111,.14)}

/* ---------------------------------------------------- test-mode flag */

/* Payment-request rows are clickable to open the details modal */
.pr-row{cursor:pointer}
.pr-row:hover{background:var(--hover)}

/* Modal */
body.modal-open{overflow:hidden}
.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:24px}
.modal-backdrop{position:absolute;inset:0;background:rgba(16,24,40,.55);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);animation:modalFade .18s ease}
.modal-card{position:relative;background:var(--surface);border:1px solid var(--border);
  border-radius:20px;box-shadow:0 24px 70px rgba(16,24,40,.28);width:100%;max-width:720px;
  max-height:90vh;overflow:auto;animation:modalPop .22s cubic-bezier(.2,.9,.3,1.1)}
@keyframes modalFade{from{opacity:0}to{opacity:1}}
@keyframes modalPop{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}

/* Header: amount + status take the lead, request title is secondary */
.modal-head{position:sticky;top:0;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;
  gap:16px;padding:22px 26px;background:linear-gradient(180deg,var(--brand-soft),#FFFFFF);
  border-bottom:1px solid var(--border)}
.modal-head .modal-heading{display:flex;flex-direction:column;gap:8px;min-width:0}
.modal-head h3{font-size:12px;font-weight:600;letter-spacing:.7px;text-transform:uppercase;color:var(--muted)}
.modal-topline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.modal-amount{font-size:26px;font-weight:750;letter-spacing:-.02em}
.modal-x{flex:none;border:1px solid var(--border);background:var(--surface);width:34px;height:34px;
  border-radius:10px;font-size:20px;line-height:1;color:var(--muted);cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:.15s}
.modal-x:hover{color:var(--text);background:var(--hover);border-color:var(--muted)}

.modal-body{padding:8px 26px 26px}
.modal-dl{display:grid;grid-template-columns:150px 1fr;gap:0;font-size:14px}
.modal-dl dt{color:var(--muted);font-weight:500;padding:14px 0;align-self:center}
.modal-dl dd{word-break:break-all;padding:14px 0;border-bottom:1px solid var(--border)}
.modal-dl dt{border-bottom:1px solid var(--border)}
.modal-dl>dt:last-of-type,.modal-dl>dd:last-of-type{border-bottom:0}
.modal-dl .reveal-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.modal-dl .reveal-row code{word-break:break-all;background:var(--hover);border:1px solid var(--border);
  border-radius:8px;padding:5px 9px;font-size:13px}
.modal-hash{grid-column:1 / -1;display:grid;grid-template-columns:150px 1fr;gap:0;
  margin-top:14px;padding-top:6px;border-top:1px solid var(--border)}
.modal-hash dt{color:var(--muted);font-weight:500;padding:14px 0;align-self:center}
.modal-hash dd{padding:14px 0}
.mono.is-empty{background:none;border:0;padding:0;color:var(--muted);font-style:italic}
.modal-actions{margin-top:22px;padding-top:20px;border-top:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.modal-actions-note{margin:0;color:var(--muted);font-size:13px;flex:1;min-width:180px}
.btn.ghost.danger{color:var(--danger);border-color:var(--danger-soft)}
.btn.ghost.danger:hover{background:var(--danger-soft)}
.fee-input{display:flex;align-items:center;gap:8px;flex:none}
.fee-input .mini{width:90px}
@media (max-width:560px){
  .modal-card{border-radius:16px}
  .modal-head,.modal-body{padding-left:18px;padding-right:18px}
  .modal-dl,.modal-hash{grid-template-columns:1fr;gap:0}
  .modal-dl dt{padding-bottom:2px;border-bottom:0}
  .modal-dl dd{padding-top:2px}
  .modal-hash dt{border-bottom:0}
}

/* Settings sub-section heading */

/* Terms & Conditions gate (login consent + checkout gate) */
body.tc-open{overflow:hidden}
.tc-gate{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(16,24,40,.5);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.tc-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;
  box-shadow:0 24px 70px rgba(16,24,40,.32);width:100%;max-width:640px;max-height:88vh;
  display:flex;flex-direction:column;overflow:hidden;animation:modalPop .22s cubic-bezier(.2,.9,.3,1.1)}
.tc-head{padding:18px 24px;border-bottom:1px solid var(--border);flex:none}
.tc-head h2{font-size:18px}
.tc-body{padding:18px 24px;overflow-y:auto;flex:1 1 auto;font-size:13.5px;line-height:1.65}
.tc-body h3{font-size:14px;margin:18px 0 6px}
.tc-body h3:first-child{margin-top:0}
.tc-body p{margin:0 0 10px;color:var(--muted)}
.tc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;
  padding:15px 24px;border-top:1px solid var(--border);background:var(--hover)}
.tc-foot-note{font-size:12.5px;color:var(--muted)}
@media (max-width:520px){
  .tc-foot{flex-direction:column;align-items:stretch}
  .tc-foot .btn{width:100%}
}

/* Checkout logo preview in White-Label settings */
.logo-preview{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:10px;
  padding:12px;background:var(--hover);border:1px solid var(--border);border-radius:10px}
.logo-preview img{max-height:48px;max-width:200px;width:auto;height:auto;object-fit:contain}

/* "Acting as" role badge in the topbar for team members */
.role-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;
  background:var(--brand-soft);color:var(--brand-dark);border:1px solid var(--brand-line);
  font-size:12.5px;font-weight:600;white-space:nowrap;max-width:280px;overflow:hidden;text-overflow:ellipsis}

/* Full-width sub-row inside the request modal's definition list (e.g. Return URL) */
.modal-dl-row{grid-column:1 / -1;display:grid;grid-template-columns:150px 1fr;gap:0}
.modal-dl-row dt{color:var(--muted);font-weight:500;padding:14px 0;align-self:center;border-bottom:1px solid var(--border)}
.modal-dl-row dd{padding:14px 0;border-bottom:1px solid var(--border);word-break:break-all}
.modal-dl-row a{color:var(--brand-dark)}
@media (max-width:560px){ .modal-dl-row{grid-template-columns:1fr} .modal-dl-row dt{border-bottom:0;padding-bottom:2px} }

/* Marketplace integration cards */
.integration-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px;margin-bottom:24px}
.integration-section{margin-bottom:8px}
.page-head.sub-head{margin:8px 0 14px}
.page-head.sub-head h2{font-size:18px;font-weight:700}
.integration-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:22px;display:flex;flex-direction:column;gap:12px}
.integration-head{display:flex;align-items:center;gap:14px}
.integration-mono{flex:none;width:46px;height:46px;border-radius:12px;display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:15px;color:#fff;background:var(--tint,var(--brand));
  font-family:ui-monospace,Menlo,monospace}
.integration-icon{flex:none;width:46px;height:46px;border-radius:12px;display:flex;align-items:center;
  justify-content:center;background:var(--tint,#fff);border:1px solid var(--border);overflow:hidden}
.integration-icon img{max-width:80%;max-height:80%;width:auto;height:auto;object-fit:contain}
.integration-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.integration-title h2,.integration-title h3{font-size:16px}

/* README ("Setup guide") modal body */
.md-body{line-height:1.6;font-size:14px;color:var(--text)}
.md-body h2{font-size:19px;margin:18px 0 8px}
.md-body h3{font-size:16px;margin:16px 0 6px}
.md-body h4{font-size:14px;margin:14px 0 6px}
.md-body h2:first-child,.md-body h3:first-child{margin-top:0}
.md-body p{margin:0 0 10px}
.md-body ul,.md-body ol{margin:0 0 10px;padding-left:22px}
.md-body li{margin:3px 0}
.md-body a{color:var(--brand-dark);font-weight:600}
.md-body hr{border:0;border-top:1px solid var(--border);margin:16px 0}
.md-body code{background:var(--hover);padding:1px 5px;border-radius:5px;font-size:12.5px;
  font-family:ui-monospace,Menlo,monospace}
.md-body pre.md-pre{background:#0f1720;color:#e6edf3;padding:12px 14px;border-radius:10px;
  overflow:auto;margin:0 0 12px}
.md-body pre.md-pre code{background:none;padding:0;color:inherit;font-size:12.5px}
.integration-desc{color:var(--muted);font-size:13.5px;line-height:1.6;margin:0;flex:1}
.integration-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}

/* PDF download links in the Terms & Conditions modal */
.tc-downloads{display:flex;flex-wrap:wrap;gap:10px 18px;padding:14px 24px;flex:none;
  border-top:1px solid var(--border);background:var(--surface)}
.tc-doc{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--brand-dark)}
.tc-doc:hover{text-decoration:underline}
.tc-doc svg{flex:none;color:var(--muted)}
.tc-doc-ext{color:var(--muted);font-weight:500}


/* Delete row in the admin currency editor */
.currency-danger{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.currency-danger-note{font-size:12.5px;color:var(--muted)}

/* Settlement badge stacked under the status pill in the requests table */
.pill.block-pill{display:inline-block;margin-top:5px}

/* ---- Asset & network picker -------------------------------------------
   An <option> cannot contain an image, so this is a listbox drawn over the
   native <select>. The select stays in the DOM and keeps owning the submitted
   value; app.js adds .is-enhanced only once it has wired everything up, so with
   JS off (or if the script fails) the plain select renders and still works. */
.chain-select{position:relative}
.chain-select.is-enhanced > select{position:absolute;opacity:0;pointer-events:none;width:0;height:0}

.chain-trigger{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:12px;border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text);font:inherit;font-size:14px;
  cursor:pointer;text-align:left;transition:border-color .15s,box-shadow .15s;
}
.chain-trigger:focus-visible{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,214,111,.14)}
.chain-trigger .chev{margin-left:auto;flex:none;opacity:.5;transition:transform .15s}
.chain-select.is-open .chain-trigger .chev{transform:rotate(180deg)}

.chain-icon{flex:none;display:block}

.chain-options{
  position:absolute;z-index:40;top:calc(100% + 6px);left:0;right:0;
  margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;
  background:var(--surface);border:1px solid var(--border);
  border-radius:12px;box-shadow:var(--shadow);
}
.chain-option{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:8px;cursor:pointer;
}
.chain-option:hover,.chain-option.is-active{background:var(--hover)}
.chain-option[aria-selected="true"]{background:var(--brand-soft)}
.chain-option.is-full{opacity:.5;cursor:not-allowed}
.chain-option.is-full:hover{background:transparent}
.chain-option-text{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.chain-option-asset{font-weight:600;font-size:14px}
.chain-option-net{font-size:12px;color:var(--muted)}
.chain-option .pill{margin-left:auto;flex:none}

.chain-trigger .chain-option-text{flex-direction:row;align-items:baseline;gap:8px}
.chain-trigger .chain-option-net{font-size:13px}

/* ---- Wallet pool availability -----------------------------------------
   One chip per token+network. This was a single sentence, but the separator
   between entries was the same "·" that appears inside each label
   ("USDT · TRON (TRC20)"), so several networks ran together illegibly. */
.pool-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 22px}
.pool-row-label{font-size:13px;color:var(--muted);font-weight:600;margin-right:2px}
.pool-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:5px 6px 5px 9px;border:1px solid var(--border);border-radius:999px;
  background:var(--surface);
}
.pool-chip-name{display:flex;align-items:baseline;gap:6px;line-height:1.2}
.pool-chip-name strong{font-size:13px;font-weight:700}
.pool-chip-name small{font-size:11.5px;color:var(--muted)}
.pool-chip-count{
  padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700;
  background:var(--brand-soft);color:var(--brand-dark);
}
.pool-chip.is-full{border-color:var(--warn)}
.pool-chip.is-full .pool-chip-count{background:var(--warn-soft);color:var(--warn)}
@media (max-width:520px){
  .pool-row-label{width:100%;margin-bottom:2px}
}

/* ---- Site switcher ------------------------------------------------------
   Shown on the Developer pages when an account has more than one site. Keys,
   domains and webhooks all belong to a site, so these pages are always looking
   at one of them and the current site must be obvious. */
.site-switch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.site-switch-label{font-size:13px;font-weight:600;color:var(--muted);margin-right:2px}
.site-chip{
  padding:6px 12px;border:1px solid var(--border);border-radius:999px;
  background:var(--surface);font-size:13px;font-weight:600;color:var(--text);
}
.site-chip:hover{background:var(--hover)}
.site-chip.is-active{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-dark)}
.site-switch-manage{margin-left:auto;font-size:13px;color:var(--brand-dark);font-weight:600}
.site-switch-manage:hover{text-decoration:underline}

/* ---- Sites page ---------------------------------------------------------
   A grid of compact cards rather than one full-width panel each: two sites used
   to push "add a site" below the fold, and a permanently visible rename field
   made every card read as a form instead of a summary. */
.site-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:14px;margin-bottom:22px;align-items:stretch;   /* footers line up across the row */
}
.site-card{
  display:flex;flex-direction:column;gap:12px;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow);padding:16px 18px;
}
.site-card-head{display:flex;align-items:center;gap:10px;min-width:0}
.site-avatar{
  flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;
  background:hsl(var(--h) 62% 94%);color:hsl(var(--h) 55% 34%);
  font-size:14px;font-weight:700;
}
.site-card-name{
  font-size:15.5px;font-weight:700;letter-spacing:-.01em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.site-card-head .pill{margin-left:auto;flex:none}

/* A fixed 2x2. Letting the tiles wrap on their own put three on one row and
   stranded the fourth, and four across truncates the labels at card width. */
.site-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.site-stat{
  flex:1 1 0;display:flex;flex-direction:column;gap:1px;min-width:0;
  padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:var(--bg);
}
.site-stat:hover{border-color:var(--brand);background:var(--brand-soft)}
.site-stat strong{font-size:17px;font-weight:700;line-height:1.15}
.site-stat span{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Reads as an action, not a caption: as plain muted text nobody found it. */
.site-rename summary{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12.5px;font-weight:600;color:var(--brand-dark);cursor:pointer;
  list-style:none;width:max-content;
}
.site-rename summary svg{width:13px;height:13px;flex:none}
.site-rename summary::-webkit-details-marker{display:none}
.site-rename summary:hover{text-decoration:underline}

/* The name is the thing people click to rename. */
.site-card-name.is-editable{cursor:pointer}
.site-card-name.is-editable:hover{text-decoration:underline dotted;text-underline-offset:3px}
.site-card-name.is-editable:focus-visible{
  outline:2px solid var(--brand);outline-offset:2px;border-radius:4px;
}
.site-rename form{display:flex;gap:8px;margin-top:8px}
.site-rename input{flex:1 1 auto;min-width:0}

.site-card-foot{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding-top:11px;border-top:1px solid var(--border);margin-top:auto;font-size:13px;
  /* Normalised so a text footer and a button footer put the divider in the
     same place across a row of cards. */
  min-height:38px;
}

/* The add-a-site card sits in the grid so the page has one rhythm. */
.site-card-add{border-style:dashed;box-shadow:none;background:var(--bg)}
.site-card-add label{font-size:15.5px;font-weight:700;letter-spacing:-.01em}
.site-card-add .site-add-plus{
  display:grid;place-items:center;width:30px;height:30px;border-radius:9px;
  background:var(--brand-soft);color:var(--brand-dark);font-size:19px;font-weight:600;line-height:1;
}
.site-card-add small{font-size:12px;color:var(--muted)}
.site-card-add button{align-self:flex-start}

/* ---- Dashboard first-run checklist ---------------------------------------
   Shown only while a step is outstanding, so an established account never sees
   it. A panel rather than a modal: a modal gets dismissed reflexively and can't
   be returned to, and this has to survive until the work is actually done. */
.setup-list{list-style:none;margin:0;padding:6px 0}
.setup-step{
  display:flex;align-items:center;gap:14px;
  padding:13px 22px;border-bottom:1px solid var(--border);
}
.setup-step:last-child{border-bottom:0}
.setup-mark{
  flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;
  background:var(--bg);border:1px solid var(--border);
  font-size:12.5px;font-weight:700;color:var(--muted);
}
.setup-mark svg{width:14px;height:14px}
.setup-step.is-done .setup-mark{
  background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-dark);
}
.setup-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}
.setup-text strong{font-size:14px;font-weight:650}
.setup-text span{font-size:12.5px;color:var(--muted);line-height:1.5}
.setup-step.is-done .setup-text strong{color:var(--muted);font-weight:600}
.setup-step > .btn, .setup-step > .pill{flex:none;margin-left:auto}
@media (max-width:620px){
  .setup-step{flex-wrap:wrap}
  .setup-text{flex:1 1 100%;order:2}
  .setup-step > .btn, .setup-step > .pill{order:1}
}

/* Admin: the account-wide switch for the checkout billing form, above the list
   so it reads as a policy control rather than another per-row action. */
.billing-bulk{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:14px 22px;border-bottom:1px solid var(--border);
  font-size:13px;color:var(--muted);line-height:1.55;
}
.billing-bulk > span{flex:1 1 320px;min-width:0}
.billing-bulk strong{color:var(--text)}

/* Admin billing form: one block per account, its addresses beneath it. */
.bill-acct{border-bottom:1px solid var(--border)}
.bill-acct:last-child{border-bottom:0}
.bill-acct-head{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:14px 22px;background:var(--bg);
}
.bill-acct-who{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.bill-acct-who strong{font-size:14.5px}
.bill-acct-who code{font-size:12px;color:var(--muted)}
.bill-acct-head form{margin-left:auto}
.bill-none{margin:0;padding:14px 22px;color:var(--muted);font-size:13px}

/* A pill that is also the button that changes it. */
.pill-btn{border:1px solid transparent;cursor:pointer;font:inherit;font-size:12px;font-weight:600}
.pill-btn:hover{filter:brightness(.96)}
