:root{
  --bg: #0b1220;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --card: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --shadow: 0 14px 50px rgba(0,0,0,.38);
  --radius: 18px;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 18% 12%, rgba(99,102,241,.35), transparent 60%),
    radial-gradient(1000px 600px at 82% 22%, rgba(16,185,129,.22), transparent 55%),
    radial-gradient(900px 550px at 50% 92%, rgba(236,72,153,.16), transparent 55%),
    var(--bg);
}
a{ color: rgba(255,255,255,.85); text-decoration:none; }
a:hover{ text-decoration:underline; }

.shell{ min-height:100%; display:flex; align-items:center; justify-content:center; padding:42px 18px; }
.wrap{ width:min(1120px,100%); }

.topbar{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.hgroup h1{ margin:0; font-size:34px; letter-spacing:-0.02em; }
.hgroup .sub{ margin-top:6px; color:var(--muted); }

.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn:hover{ background: rgba(255,255,255,.07); }
.btn:active{ transform: translateY(1px); }
.btn.primary{
  border:none;
  background: linear-gradient(90deg, rgba(99,102,241,.92), rgba(16,185,129,.92));
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.btn.primary:hover{ filter: brightness(1.05); }
.btn:disabled{ opacity:.6; cursor:not-allowed; transform:none; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 18px;
}
.grid{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 920px){ .grid{ grid-template-columns:1fr; } .hgroup h1{ font-size:28px; } }

.section-title{ font-size:18px; margin:0 0 8px 0; }
.hint{ color: var(--muted); font-size:13px; margin-bottom:12px; }
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.label{ font-size:13px; color: var(--muted); }
.input,.textarea,.select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}
.textarea{ min-height:130px; resize:vertical; }
.input:focus,.textarea:focus,.select:focus{ border-color: rgba(99,102,241,.55); }

.row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 520px){ .row2{ grid-template-columns:1fr; } }

.pills{ display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.pill{
  display:flex;
  align-items:flex-start;
  gap:10px;
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
}
.pill input{ margin-top:3px; }
.pill .meta{ font-size:12px; color: var(--muted); }

.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
  vertical-align: top;
}
.table th{ color: rgba(255,255,255,.78); font-weight:600; }
.table tr:last-child td{ border-bottom:none; }

.toast{ margin-top:10px; font-size:13px; color: rgba(255,255,255,.86); }
.toast.ok{ color: rgba(16,185,129,.92); }
.toast.err{ color: rgba(244,63,94,.92); }

.qrbox{ margin-top:14px; display:flex; justify-content:center; }
.qrbox img{
  width: 280px; height: 280px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  padding:10px;
}

.spinner{
  width:18px; height:18px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.25);
  border-top-color: rgba(255,255,255,.85);
  display:inline-block;
  animation: spin .8s linear infinite;
  vertical-align:-3px;
}
@keyframes spin{ to{ transform: rotate(360deg);} }
