:root {
  --acc: #d4a857; --acc-rgb: 212, 168, 87; --acc-2: #f3d79c;
  --bg: #0b0b0e; --panel: rgba(255,255,255,.035); --panel-2: rgba(255,255,255,.06); --panel-hover: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --text: #ece7df; --text-2: #a7a29b; --text-3: #6d6963; --red: #ef6461; --green: #4fc48f;
  --ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: Georgia, Cambria, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--ui); font-size: 15px; color: var(--text); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(var(--acc-rgb), .13), transparent 60%),
    radial-gradient(700px 500px at 100% 110%, rgba(var(--acc-rgb), .07), transparent 60%),
    var(--bg);
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
::selection { background: rgba(var(--acc-rgb), .35); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.25); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font-family: var(--display); font-size: 22px; font-weight: 700; background: linear-gradient(180deg, var(--acc-2), var(--acc)); -webkit-background-clip: text; color: transparent; }
.brand small { font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--text-3); margin-left: 4px; }
#nav { display: flex; gap: 8px; align-items: center; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px; }
.foot { text-align: center; color: var(--text-3); font-size: 12px; padding: 22px; border-top: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 600; background: var(--panel-2); box-shadow: 0 0 0 1px var(--line) inset; transition: background .15s, box-shadow .15s, filter .15s; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--panel-hover); box-shadow: 0 0 0 1px var(--line-2) inset; text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, var(--acc-2), var(--acc)); color: #1a1408; box-shadow: 0 8px 24px rgba(var(--acc-rgb), .22); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: #ff9c99; }
.btn.danger:hover { background: rgba(239,100,97,.12); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

.kicker { font-size: 11.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--acc); font-weight: 700; }
h1 { font-family: var(--display); font-size: 52px; line-height: 1.08; margin: 14px 0 16px; letter-spacing: .2px; }
h1 em { color: var(--acc-2); }
h2 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; }
h3 { font-family: var(--display); font-size: 19px; margin: 0 0 4px; }
.lead { color: var(--text-2); font-size: 17px; line-height: 1.6; max-width: 640px; margin: 0; }
.muted { color: var(--text-3); }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 30px 0 50px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { position: relative; border-radius: 22px; padding: 30px; overflow: hidden; background: radial-gradient(400px 200px at 80% 0%, rgba(var(--acc-rgb), .25), transparent 70%), linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); box-shadow: 0 0 0 1px var(--line) inset, 0 30px 70px rgba(0,0,0,.4); }
.hero-card::after { content: "M"; position: absolute; right: 10px; bottom: -60px; font-family: var(--display); font-size: 240px; font-weight: 700; color: rgba(var(--acc-rgb), .08); }
.q { position: relative; z-index: 1; font-size: 14px; padding: 11px 14px; border-radius: 12px; margin-bottom: 10px; }
.q.user { background: rgba(var(--acc-rgb), .16); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .3) inset; margin-left: 40px; }
.q.bot { background: rgba(0,0,0,.35); box-shadow: 0 0 0 1px var(--line) inset; line-height: 1.55; color: #ddd8d0; }
.q.bot b { color: var(--text); }
.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 11px; font-weight: 700; background: rgba(var(--acc-rgb), .2); color: var(--acc-2); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { padding: 22px; border-radius: 16px; background: var(--panel); box-shadow: 0 0 0 1px var(--line) inset; }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: rgba(var(--acc-rgb), .14); margin-bottom: 14px; }
.feature p { color: var(--text-2); font-size: 13.5px; line-height: 1.55; margin: 6px 0 0; }

.card { max-width: 440px; margin: 20px auto; padding: 32px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); box-shadow: 0 0 0 1px var(--line) inset, 0 30px 70px rgba(0,0,0,.35); }
.card .lead { font-size: 14px; margin-bottom: 22px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; border: 0; outline: 0; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .2s; color: var(--text); }
.input:focus { box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .6) inset, 0 0 0 4px rgba(var(--acc-rgb), .1); }
.input.code { font-family: Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; }
select.input { appearance: none; }
.form-error { color: #ff9c99; font-size: 13px; background: rgba(239,100,97,.1); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.form-foot { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-2); }
.card .btn.primary { width: 100%; height: 46px; margin-top: 6px; }

.panel { border-radius: 18px; padding: 24px; background: var(--panel); box-shadow: 0 0 0 1px var(--line) inset; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { padding: 18px; border-radius: 15px; background: var(--panel); box-shadow: 0 0 0 1px var(--line) inset; }
.stat b { display: block; font-family: var(--display); font-size: 30px; }
.stat span { font-size: 12.5px; color: var(--text-3); }
.qbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0 6px; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: 3px; }

.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.3); box-shadow: 0 0 0 1px var(--line) inset; width: fit-content; margin-bottom: 18px; }
.tabs button { padding: 8px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.tabs button.on { background: var(--panel-hover); color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }

.inv-form { display: grid; grid-template-columns: 90px 110px 130px 1fr 130px auto; gap: 10px; align-items: end; }
.inv-form .field { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: Consolas, monospace; letter-spacing: .5px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); color: var(--text-2); }
.pill.ok { background: rgba(79,196,143,.14); color: #6fdcaa; }
.pill.bad { background: rgba(239,100,97,.14); color: #ff8f8c; }
.pill.gold { background: rgba(var(--acc-rgb), .16); color: var(--acc-2); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.new-codes { margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(var(--acc-rgb), .08); box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .3) inset; }
.new-codes .mono { display: block; padding: 3px 0; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; background: #1d1c21; box-shadow: 0 0 0 1px rgba(var(--acc-rgb), .35), 0 16px 40px rgba(0,0,0,.5); z-index: 50; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .features, .stats { grid-template-columns: 1fr 1fr; }
  .inv-form { grid-template-columns: 1fr 1fr; }
  .top { padding: 14px 16px; }
  .brand small { display: none; }
}
@media (max-width: 520px) {
  .features, .stats { grid-template-columns: 1fr; }
  main { padding: 24px 16px 40px; }
  .card { padding: 22px; }
}
