:root {
  --bg: #0f1822; --bg2: #16222e; --card: #1c2a38; --line: #2c3e50;
  --text: #e8eef3; --muted: #9fb1c1; --accent: #2f81f7; --accent2: #3b8bf8;
  --ok: #2ea043; --warn: #e3a008; --err: #e5534b;
  --radius: 12px;
}
* { box-sizing: border-box; }
/* hidden zuverlässig durchsetzen (sonst überstimmt display:flex das Attribut) */
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 15px; }

.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), #245fb0); }
.brand .sub { font-size: 13px; color: var(--muted); font-weight: 400; }

.centered { min-height: calc(100vh - 61px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 22px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.centered .card { width: 100%; max-width: 380px; }

h1 { font-size: 20px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 16px; }

.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input { padding: 11px 12px; background: #0e1620; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
input:focus { outline: none; border-color: var(--accent); }

.btn { padding: 11px 18px; border: none; border-radius: 8px; background: var(--accent);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { padding: 8px 14px; background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }

.grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.grid .field { margin-bottom: 0; min-width: 110px; }
.grid .field.grow { flex: 1; min-width: 200px; }

.msg { font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.msg.err { color: var(--err); } .msg.ok { color: var(--ok); }

.result { margin-top: 18px; padding: 16px; background: #0e1620; border: 1px solid var(--line);
  border-radius: 8px; }
.result h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.code-list { display: flex; flex-direction: column; gap: 6px; }
.code-pill { font-family: "Consolas", ui-monospace, monospace; font-size: 16px; letter-spacing: 1px;
  color: var(--text); background: #16222e; padding: 8px 12px; border-radius: 6px; }

.row-between { display: flex; align-items: center; justify-content: space-between; }
.stats { display: flex; gap: 18px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.stats b { color: var(--text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
td.code { font-family: "Consolas", ui-monospace, monospace; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.free { background: rgba(159,177,193,.15); color: var(--muted); }
.badge.active { background: rgba(46,160,67,.16); color: #4ac266; }
.badge.expired { background: rgba(229,83,75,.16); color: #f08079; }
.muted { color: var(--muted); }
.btn-del { padding: 5px 11px; font-size: 12.5px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; }
.btn-del:hover { border-color: var(--err); color: var(--err); background: rgba(229,83,75,.08); }
