:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --accent: #f7931a;
  --border: #262b34;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 21, .9);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { font-weight: 700; font-size: 20px; letter-spacing: .3px; color: var(--text); }
.brand span { color: var(--accent); }

.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

main { padding: 36px 0 56px; }

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 18px; }
h2 { font-size: 21px; margin: 32px 0 12px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 28px 0;
}

.placeholder { border-style: dashed; }

.muted { color: var(--muted); }

.legal { max-width: 760px; }
.legal h1 { margin-bottom: 22px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 0 0 6px; }

@media (max-width: 640px) {
  h1 { font-size: 25px; }
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; gap: 8px; }
}

/* Forms */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 18px; }
legend { padding: 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #0c0e12; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(247, 147, 26, .35); border-color: var(--accent); }
textarea { resize: vertical; min-height: 68px; }
.full { grid-column: 1 / -1; }
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: #16110a; font-weight: 700; cursor: pointer; font: inherit; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.alert { border: 1px solid #6b2b2b; background: #2a1616; color: #ffd7d7; padding: 14px 18px; border-radius: var(--radius); margin: 0 0 18px; }
.alert ul { margin: 8px 0 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.table .right { text-align: right; }
.inline { display: inline; margin: 0; }
.small { font-size: 13px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-top: 1px solid var(--border); font-size: 18px; }
.cart-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Status */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-pending { background: #3a2f12; color: #ffd27a; }
.badge-paid { background: #12331f; color: #7ee2a8; }
.badge-expired { background: #3a1a1a; color: #ff9b9b; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.address { word-break: break-all; background: #0c0e12; border: 1px solid var(--border); padding: 10px 12px; border-radius: 8px; }
.break { word-break: break-all; }
.qr { background: #fff; padding: 8px; border-radius: 8px; }
.pay-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.copy-row input { flex: 1; }
.qr-box { text-align: center; }
@media (max-width: 640px) { .pay-grid { grid-template-columns: 1fr; } }

@media (max-width: 780px) { .grid, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .grid, .grid-5 { grid-template-columns: 1fr; } }
