:root{
  --bg:#0b1220;
  --panel:#0f172a;
  --card:#0b1220;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#1f2a44;
  --brand:#22c55e;
  --brand2:#16a34a;
  --danger:#ef4444;
  --warn:#f59e0b;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 600px at 15% 0%, #111c35, var(--bg));
  color:var(--text);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
}

a{color:inherit; text-decoration:none}
.container{max-width:520px; margin:18px auto; padding:0 14px}

.topbar{
  position:sticky; top:0; z-index:50;
  background: rgba(7,10,20,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px; font-size:18px}
.brand-dot{width:10px; height:10px; border-radius:99px; background:linear-gradient(135deg,var(--brand),var(--brand2)); box-shadow:0 0 0 4px rgba(34,197,94,.15)}

.nav-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color:var(--text);
}
.nav-toggle:active{transform:scale(.98)}

.nav{
  display:flex; gap:10px;
}
.nav a{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color:var(--text);
  font-size:14px;
}
.nav a.active{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.12);
  color:#d1fae5;
}

@media (max-width:520px){
  .nav{display:none}
  .nav.open{
    display:flex;
    flex-direction:column;
    position:absolute;
    right:14px;
    top:64px;
    width:min(280px, calc(100vw - 28px));
    padding:10px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.09);
    background: rgba(7,10,20,.92);
    box-shadow: 0 18px 50px rgba(0,0,0,.45);
  }
  .nav.open a{justify-content:flex-start}
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.h1{font-size:22px; font-weight:800; margin:0 0 6px}
.muted{color:var(--muted); font-size:13px; line-height:1.35}
.hr{height:1px; background:rgba(255,255,255,.08); margin:14px 0}

label{display:block; font-size:13px; color:var(--muted); margin:12px 0 6px}
input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.55);
  color:var(--text);
  outline:none;
}
input:focus{border-color: rgba(34,197,94,.38); box-shadow:0 0 0 4px rgba(34,197,94,.12)}

.total{
  text-align:center;
  margin:14px 0 12px;
}
.total .title{font-size:13px; color:var(--muted)}
.total .value{font-size:26px; font-weight:900; letter-spacing:.2px; margin-top:6px}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#04210f;
  font-weight:900;
  cursor:pointer;
}
.btn:active{transform:scale(.99)}
.btn.secondary{
  background: rgba(255,255,255,.05);
  color:var(--text);
}

.badge{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color:var(--text);
  font-size:12px;
}

.alert{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin:12px 0;
}
.alert.ok{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.12)}
.alert.error{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.12)}
.alert.warn{border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12)}

.footer{
  margin:18px 0 24px;
  text-align:center;
  color:rgba(255,255,255,.6);
  font-size:12px;
}
.qr-wrap{display:flex; justify-content:center; padding:14px 0}
.qr-img{width:280px; max-width:100%; border-radius:16px; border:1px solid rgba(255,255,255,.12); background:#fff}
.small{font-size:12px; color:var(--muted)}


/* QR section */
.qrwrap{
  display:flex;
  justify-content:center;
  padding:14px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.qrimg{
  width: 280px;
  max-width: 100%;
  height:auto;
  border-radius:14px;
  background:#fff;
  padding:10px;
}
.copybox{
  padding:12px;
  border-radius:14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-all;
  padding:10px;
  border-radius:12px;
  background: rgba(0,0,0,.25);
}
.notice.ok{
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.25);
}
