@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg0: #0f1c17;
  --bg1: #1a3329;
  --ink: #f2f7f4;
  --muted: #a8c0b4;
  --line: rgba(242, 247, 244, 0.12);
  --wechat: #22c55e;
  --alipay: #0ea5e9;
  --warn: #f59e0b;
  --danger: #ef4444;
  --panel: rgba(255, 255, 255, 0.06);
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--bg0);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(34, 197, 94, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(14, 165, 233, 0.16), transparent 50%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #12241c);
  color: var(--ink);
}

a { color: inherit; }

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 8px;
  line-height: 1.05;
}

.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34ch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 14px;
  font: inherit;
  outline: none;
}

input:focus, select:focus {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.row { margin-bottom: 16px; }

.channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.channel {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 12px;
  font: inherit;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.channel:hover { transform: translateY(-1px); }
.channel.active-wechat {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.12);
}
.channel.active-alipay {
  border-color: rgba(14, 165, 233, 0.7);
  background: rgba(14, 165, 233, 0.12);
}
.channel strong { display: block; font-family: 'Syne', sans-serif; margin-bottom: 4px; }
.channel span { color: var(--muted); font-size: 0.85rem; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #2dd4a0, #16a34a);
  color: #062016;
  width: 100%;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.sky { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #041821; }
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }

.hint, .error, .ok {
  margin-top: 12px;
  font-size: 0.92rem;
}
.error { color: #fda4af; }
.ok { color: #86efac; }
.hint { color: var(--muted); }

.pay-layout {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .pay-layout { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

.amount-hero {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  margin: 8px 0 4px;
  letter-spacing: -0.04em;
}
.amount-hero small {
  font-size: 0.45em;
  color: var(--muted);
  margin-right: 4px;
}

.qr-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  place-items: center;
  min-height: 280px;
}
.qr-wrap img {
  width: min(260px, 100%);
  height: auto;
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.wechat { color: #86efac; border-color: rgba(34,197,94,.35); }
.badge.alipay { color: #7dd3fc; border-color: rgba(14,165,233,.35); }
.badge.paid { color: #86efac; }
.badge.expired { color: #fda4af; }

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0,0,0,.18);
}
.stat b {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  margin-top: 4px;
}
.stat span { color: var(--muted); font-size: 0.82rem; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}
.tab.active {
  color: var(--ink);
  border-color: rgba(45, 212, 160, 0.5);
  background: rgba(45, 212, 160, 0.12);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th { color: var(--muted); font-weight: 500; }
.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.grid-2 {
  display: grid;
  gap: 12px;
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn { width: auto; padding: 8px 12px; font-size: 0.85rem; }

.hidden { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.shell > * { animation: fadeUp .45s ease both; }
.shell > *:nth-child(2) { animation-delay: .05s; }
.shell > *:nth-child(3) { animation-delay: .1s; }
