:root { --bg: #0f1420; --card: #171e2e; --line: #26304a; --text: #e8ecf5; --dim: #9aa5bd; --accent: #3aa0ff; --ok: #36c47a; --warn: #f0b429; --bad: #f05454; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 17px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
h2 { margin: 0 0 10px; font-size: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.narrow { max-width: 380px; margin: 60px auto; }
label { display: block; font-size: 13px; color: var(--dim); margin: 8px 0 4px; }
input, select { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: #0b101a; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
button { font: inherit; font-weight: bold; padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: normal; }
button.small { padding: 5px 11px; font-size: 13px; }
button.danger { background: #4a1f27; color: #ffc4c4; }
.narrow button { width: 100%; margin-top: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 14px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.msg { padding: 9px 12px; border-radius: 8px; margin: 10px 0 0; white-space: pre-wrap; }
.msg.bad { background: #3a1f25; color: #ffc4c4; }
.msg.ok { background: #16321f; color: #b9f0cf; }
.dim { color: var(--dim); font-size: 13px; font-weight: normal; }
.issued { border-color: var(--ok); }
.keyrow { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.keyrow code { font: bold 20px Consolas, monospace; background: #0b101a; padding: 8px 12px; border-radius: 8px; user-select: all; letter-spacing: 1px; }
.listhead { display: flex; gap: 10px; align-items: center; }
.listhead h2 { margin: 0; white-space: nowrap; }
.listhead input { max-width: 300px; margin-left: auto; }
.tablewrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-weight: normal; font-size: 13px; }
td.who { white-space: normal; min-width: 160px; }
td.who small { display: block; color: var(--dim); }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: bold; background: #23324f; color: #cfe2ff; }
.badge.premium { background: #3b2a55; color: #e2ccff; }
.badge.deluxe { background: #1f3d4a; color: #c4ecff; }
.badge.owner { background: #4a3b16; color: #ffe39a; }
.st-active { color: var(--ok); } .st-suspended { color: var(--bad); } .st-expired { color: var(--warn); }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); padding: 0; width: min(520px, 94vw); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dlg { padding: 18px; }
.op { border-top: 1px solid var(--line); padding: 12px 0; }
.op .row { display: flex; gap: 8px; align-items: center; }
.op .row input, .op .row select { flex: 1; }
.op p { margin: 0 0 6px; font-size: 13px; color: var(--dim); }
