:root{
  color-scheme: dark;
  --bg:#0b0f14;
  --elev:#101826;
  --ink:#eaf2ff;
  --muted:#9db3c7;
  --line:#1e2b3d;

  --cyan:#06b6d4;
  --purple:#8b5cf6;
  --accent: linear-gradient(135deg,var(--purple),var(--cyan));

  --phi: 1.618;
  --rad: 13px;

  --shadow: 0 1px 0 rgba(255,255,255,.02),
            0 6px 18px rgba(0,0,0,.45);
  --shadow-strong: 0 1px 0 rgba(255,255,255,.04),
                   0 16px 40px rgba(0,0,0,.55);

  --ring: 0 0 0 2px rgba(139,92,246,.25), 0 0 0 5px rgba(6,182,212,.15);
}

/* Reset & base */
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; color:var(--ink);
  font:16px/1.5 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(139,92,246,.06), transparent 60%),
    radial-gradient(900px 600px at 120% 10%, rgba(6,182,212,.05), transparent 60%),
    linear-gradient(#0b0f14,#0b0f14) fixed;
}
::selection{ background:rgba(139,92,246,.35); color:#fff }

main{ max-width:960px; margin:28px auto; padding:0 16px; display:grid; gap:18px }

h1,h2{ margin:.2rem 0 .75rem }
h1{
  font-size: clamp(24px, 4vw, 34px);
  line-height:1.15;
  letter-spacing:.2px;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2{
  font-size: clamp(18px, 2.6vw, 22px);
  position: relative;
  padding-bottom: .25rem;
}
h2::after{
  content:"";
  position:absolute; left:0; bottom:-2px;
  width:64px; height:3px; border-radius:3px;
  background: var(--accent);
  opacity:.9;
}

.muted{ color:var(--muted) }
a{ color:#7cc4ff; text-decoration:none }
a:hover{ text-decoration:underline }

.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center }
.col{ display:flex; flex-direction:column; gap:8px }
.grid{ display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) }

/* Header */
header.row{
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  border:1px solid var(--line);
  border-radius: var(--rad);
  padding: 14px 14px;
  box-shadow: var(--shadow);
}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,.005)) , var(--elev);
  border:1px solid var(--line);
  border-radius: var(--rad);
  padding: calc(10px * var(--phi));
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease;
}
.card:hover{ transform: translateY(-1px); box-shadow: var(--shadow-strong); border-color:#23344a }

/* Inputs & Buttons */
input, select, button{
  font:inherit;
  border-radius: 12px;
  border:1px solid var(--line);
  padding:10px 12px;
  background:#0a1220;
  color:var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
input::placeholder{ color:#87a1b7; opacity:.9 }
input:focus, select:focus{
  outline: none;
  border-color:#2b4060;
  box-shadow: var(--ring);
}
select{ background:#0a1220; appearance:none; padding-right:34px; position:relative }
select::-ms-expand{ display:none }

button{
  background: var(--accent);
  border:0;
  color:#051018;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 6px 14px rgba(6,182,212,.18);
}
button:hover{ transform: translateY(-1px) }
button:active{ transform: translateY(0) scale(.99) }
button:focus-visible{ outline:none; box-shadow: var(--ring) }
button.secondary{
  background: transparent;
  border:1px solid var(--line);
  color: var(--ink);
  box-shadow:none;
}
button.secondary:hover{ border-color:#2a3a52 }

input[disabled], button[disabled], select[disabled]{
  opacity:.6; cursor:not-allowed; filter:saturate(.7)
}

/* QR blocks */
.qr{
  border:1px dashed var(--line);
  border-radius:8px;
  background:#061120;
  width:240px; height:240px;
  display:block;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

/* Small UI bits */
#gateBadge{
  font-size:12px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:2px 8px;
  margin-left:6px;
  color:var(--muted);
  background: rgba(6,182,212,.06);
}

/* Table */
table{ width:100%; border-collapse:collapse; overflow:hidden; border-radius:10px }
th,td{ padding:.55rem .6rem; border-bottom:1px solid var(--line) }
th{ text-align:left; color:var(--muted); font-weight:600; font-size:14px }
td:last-child, th:last-child{ text-align:right }
tbody tr:hover{ background: rgba(255,255,255,.02) }

/* Helper: subtle separators in cards */
.card .grid > *{ min-width:0 }

/* Responsive touches */
@media (max-width: 520px){
  .qr{ width:200px; height:200px }
  header.row{ padding:12px }
  .card{ padding: 16px }
}

/* Fancy gradient border utility (optional) */
.gradient-border{
  position:relative;
  border-radius: var(--rad);
}
.gradient-border::before{
  content:"";
  position:absolute; inset:-1px;
  border-radius: inherit;
  background: var(--accent);
  z-index:0;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding:1px;
}
.gradient-border > *{ position:relative; z-index:1 }

/* Tiny fade-in */
@keyframes fadeInUp{ from{ opacity:0; transform: translateY(6px) } to{ opacity:1; transform:none } }
.card{ animation: fadeInUp .25s ease both }