:root {
  --bg: #141419;
  --card: #1f1f27;
  --card2: #22222b;
  --border: #33333f;
  --text: #f2f2f4;
  --muted: #9a9aa5;
  --accent: #3a7bfd;
  --accent-hover: #5b93ff;
  --green: #5cd67a;
  --red: #ff6b6b;
  --yellow: #ffc24b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #1b1b22, #141419);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}
.wrap { width: 100%; max-width: 640px; }
h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
}
label { display: block; font-size: 12px; color: #b8b8c0; margin: 0 0 6px; }
input, textarea {
  width: 100%;
  background: #2a2a33;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button:disabled { background: #3a3a45; color: #8a8a93; cursor: not-allowed; }
button.ghost {
  background: #2c2c36;
  color: #cfcfd6;
  font-weight: 500;
}
button.ghost:hover { background: #3a3a46; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.msg { font-size: 13px; margin-top: 10px; white-space: pre-wrap; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.kv { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.kv-row { display: flex; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { width: 160px; background: #2c2c36; color: #a2a2ae; font-size: 12px; padding: 10px 14px; flex-shrink: 0; }
.kv-row .v { padding: 10px 14px; font-size: 13px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.badge.active { background: #225cd67a; color: var(--green); }
.badge.revoked { background: #22ff6b6b; color: var(--red); }
.badge.unused { background: #229a9aa5; color: var(--muted); }
.badge.locked { background: #ffe9d6; color: #b34700; margin-left: 6px; }
.hidden { display: none !important; }
.activation { font-family: Consolas, monospace; font-size: 12px; color: #cfcfd6; padding: 6px 0; border-bottom: 1px solid #2a2a33; }
.activation:last-child { border-bottom: none; }
footer { text-align: center; color: #6e6e78; font-size: 11px; margin-top: 24px; }

/* ── Hỗ trợ & liên hệ ──────────────────────────────────────── */
.support-title { font-size: 12px; color: #8e8e9a; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; font-weight: 700; }
.support-text { color: #b8b8c0; font-size: 13px; margin: 0 0 16px; line-height: 1.6; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }

/* ── Responsive: điện thoại màn hình nhỏ ─────────────────────── */
@media (max-width: 480px) {
  body { padding: 24px 14px; }
  h1 { font-size: 19px; }
  .card { padding: 16px; }
  .kv-row { flex-direction: column; }
  .kv-row .k { width: auto; padding-bottom: 4px; }
  .row { gap: 8px; }
  .row button, .row a.btn-link { flex: 1 1 auto; text-align: center; justify-content: center; }
}
