:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --row: 30px;
  --accent: #8b8cff;
  --accent-2: #5ad1ff;
  --accent-ink: #0b0c1a;
  --open: #34d47a;
  --taken: #ff5468;
  --warn: #f5b74a;
  --grad: linear-gradient(90deg, #8b8cff, #5ad1ff 55%, #34d47a);
}
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-2: #0f1218;
  --panel: #12151c;
  --panel-2: #171b23;
  --line: #222733;
  --line-2: #2c3240;
  --text: #e8eaf0;
  --muted: #8a91a2;
  --faint: #5c6374;
  --open-bg: rgba(52, 212, 122, 0.08);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f4f8;
  --line: #e4e7ee;
  --line-2: #d5d9e3;
  --text: #141821;
  --muted: #5d6475;
  --faint: #9298a8;
  --accent: #5b5cf0;
  --accent-ink: #ffffff;
  --open: #12a150;
  --taken: #e5354b;
  --open-bg: rgba(18, 161, 80, 0.08);
  --shadow: 0 12px 40px rgba(20, 24, 33, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* boot */
.boot { height: 100vh; display: grid; place-items: center; }
.logo-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.logo-mark i { display: block; width: 4px; border-radius: 4px; }
.logo-mark i:nth-child(1) { height: 60%; background: #8b8cff; }
.logo-mark i:nth-child(2) { height: 100%; background: #5ad1ff; }
.logo-mark i:nth-child(3) { height: 45%; background: #ff6b8b; }
.logo-mark.big { height: 40px; gap: 6px; } .logo-mark.big i { width: 9px; animation: pulse 1s ease-in-out infinite alternate; }
.logo-mark.big i:nth-child(2) { animation-delay: .15s } .logo-mark.big i:nth-child(3) { animation-delay: .3s }
@keyframes pulse { to { opacity: .35; transform: scaleY(.7); } }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s; text-decoration: none; }
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { color: var(--taken); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn.discord:hover { background: #4752c4; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); }
svg.i { width: 16px; height: 16px; flex: none; }
.input, .textarea, .select { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; height: 36px; outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { padding: 10px 12px; height: auto; resize: vertical; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.check { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line-2); background: var(--bg-2); flex: none; }
input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
input[type=checkbox]:checked + .check { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked + .check::after { content: ''; width: 8px; height: 4px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
input[type=checkbox]:focus-visible + .check { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
label.row { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; user-select: none; }

/* layout */
.app { display: grid; grid-template-rows: 56px 1fr; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-decoration: none; }
.brand b { font-weight: 700; } .brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 2px; margin-left: 18px; }
.nav a { padding: 7px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.dot.open { background: var(--open); box-shadow: 0 0 8px var(--open); }
.dot.taken { background: var(--taken); }
.plan-pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; cursor: pointer; background: var(--panel); text-decoration: none; }
.plan-pill .bar { width: 46px; height: 5px; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.plan-pill .bar i { display: block; height: 100%; background: var(--grad); }
.plan-pill.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); color: var(--warn); }

/* user dropdown */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
.user-btn:hover { background: var(--panel-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #0b0c1a; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 248px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .12s, transform .12s; }
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown .head { display: flex; gap: 10px; align-items: center; padding: 10px; }
.dropdown .head .avatar { width: 36px; height: 36px; }
.dropdown .head small { display: block; color: var(--muted); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 7px; text-align: left; cursor: pointer; text-decoration: none; font-size: 13.5px; }
.dropdown a:hover, .dropdown button:hover { background: var(--panel-2); }
.dropdown .kbd { margin-left: auto; color: var(--faint); font-size: 12px; }

/* checker layout */
.main { display: grid; grid-template-columns: 236px 1fr; min-height: 0; }
.sidebar { border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.side-scroll { overflow: auto; padding: 18px 20px; flex: 1; }
.side-title { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.side-title .count { color: var(--text); margin-left: 6px; }
.side-title .links button { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.side-title .links button:hover { color: var(--text); }
.plat-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 26px; }
.plat-list label.row { padding: 6px 6px; margin: 0 -6px; border-radius: 6px; font-size: 14px; }
.plat-list label.row:hover { background: var(--panel-2); }
.plat-list .sw { width: 6px; height: 6px; border-radius: 2px; margin-left: auto; opacity: .8; }
.plat-list .del { margin-left: auto; opacity: 0; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; }
.plat-list label.row:hover .del { opacity: 1; }
.side-foot { border-top: 1px solid var(--line); padding: 16px 20px; font-size: 12.5px; }
.side-foot .k { color: var(--muted); }
.side-foot b { display: block; font-size: 14px; margin: 2px 0 6px; }
.side-foot a { color: var(--muted); text-decoration: none; } .side-foot a:hover { color: var(--text); }

.content { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.composer { padding: 14px; }
.composer .textarea { border: 0; background: transparent; box-shadow: none !important; padding: 0 2px; min-height: 76px; max-height: 260px; }
.composer-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.composer-foot .meta { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.progress { height: 4px; border-radius: 9px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .15s linear; }
.stats { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stats b { font-size: 18px; color: var(--text); font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }
.stats .o b { color: var(--open); } .stats .t b { color: var(--taken); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; padding: 0 12px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.toolbar .input { flex: 1 1 110px; width: auto; max-width: 240px; height: 34px; }
.toolbar .spacer { flex: 1 1 0; }
.toolbar label.row, .composer-foot label.row { font-size: 13px; color: var(--muted); margin-right: 4px; }
.select { width: auto; padding-right: 28px; padding-left: 10px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; height: 34px; }

/* results table (virtualised) */
.table { flex: 1; min-height: 200px; display: flex; flex-direction: column; overflow: hidden; }
.thead, .tr { display: grid; grid-template-columns: 56px minmax(140px, 1.6fr) minmax(110px, 1fr) 130px minmax(120px, 1.4fr); align-items: center; padding: 0 14px; }
.thead { height: 38px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); flex: none; }
.tbody { overflow: auto; flex: 1; position: relative; }
.tr { position: absolute; left: 0; right: 0; height: var(--row); border-bottom: 1px solid var(--line); font-size: 13px; }
.tr .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.tr .u { font-family: var(--mono); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: copy; }
.tr .p { color: var(--muted); }
.tr .d { color: var(--faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr.open { background: var(--open-bg); }
.tr.open .u { color: var(--open); }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.open { color: var(--open); } .badge.open::before { box-shadow: 0 0 8px currentColor; }
.badge.taken, .badge.unverified { color: var(--taken); }
.badge.invalid { color: var(--warn); }
.empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); text-align: center; padding: 20px; }
.empty b { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; }

/* pages */
.page { overflow: auto; }
.page-inner { max-width: 1040px; margin: 0 auto; padding: 28px 22px 60px; }
.page h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
.page .sub { color: var(--muted); margin: 0 0 22px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pad { padding: 18px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card p { margin: 0 0 14px; color: var(--muted); }
.stat-card .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-card .k { color: var(--muted); font-size: 12.5px; }
.list { width: 100%; border-collapse: collapse; font-size: 13px; }
.list th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tr.click { cursor: pointer; } .list tr.click:hover td { background: var(--panel-2); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.tag.ok { color: var(--open); border-color: color-mix(in srgb, var(--open) 40%, transparent); }
.tag.dead { color: var(--taken); border-color: color-mix(in srgb, var(--taken) 40%, transparent); }
.tag.tier-starter { color: #5ad1ff; } .tag.tier-pro { color: #8b8cff; } .tag.tier-unlimited { color: #ffcf5a; border-color: #ffcf5a55; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.form-row > .input { flex: 1; min-width: 160px; }
.key-input { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; height: 46px; font-size: 15px; }
.usage { height: 8px; background: var(--line); border-radius: 9px; overflow: hidden; margin: 10px 0 6px; }
.usage i { display: block; height: 100%; background: var(--grad); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { padding: 22px; position: relative; }
.plan .name { font-weight: 700; font-size: 15px; }
.plan .amt { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .amt small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { padding: 0; margin: 14px 0 18px; list-style: none; color: var(--muted); display: grid; gap: 6px; }
.plan li::before { content: '✓'; color: var(--open); margin-right: 8px; font-weight: 700; }
.plan.hot { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow); }
.plan .ribbon { position: absolute; top: 14px; right: 14px; }

/* landing */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing .topbar { background: transparent; border-color: transparent; }
.hero { text-align: center; padding: 70px 20px 40px; max-width: 820px; margin: 0 auto; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; margin-bottom: 22px; background: var(--panel); }
.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 18px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.preview { max-width: 980px; margin: 30px auto 0; padding: 0 20px; }
.preview .card { overflow: hidden; box-shadow: var(--shadow); }
.preview .tr { position: static; }
.steps { max-width: 980px; margin: 60px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps .num { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.landing .plans { max-width: 980px; margin: 60px auto 0; padding: 0 20px; }
.landing footer { margin-top: auto; padding: 40px 20px; text-align: center; color: var(--faint); font-size: 12.5px; }
.platform-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 36px auto 0; max-width: 760px; padding: 0 20px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(5, 6, 10, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s; }
.modal { width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.modal h3 { margin: 0 0 4px; font-size: 16px; }
.modal p { color: var(--muted); margin: 0 0 16px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.field { margin-bottom: 12px; } .field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
@keyframes fade { from { opacity: 0; } }

/* toasts */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; animation: up .18s ease-out; }
.toast.err { border-color: color-mix(in srgb, var(--taken) 50%, transparent); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

.lock { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(2px); border-radius: 12px; z-index: 2; text-align: center; padding: 20px; }

/* responsive */
@media (max-width: 960px) {
  .legend, .nav .wide { display: none; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
  .side-foot { display: none; }
  .plat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .nav { display: none; }
  .thead, .tr { grid-template-columns: 40px 1.4fr 1fr 110px; }
  .thead > :last-child, .tr > :last-child { display: none; }
  .grid2, .plans, .steps { grid-template-columns: 1fr; }
  .plan-pill .bar { display: none; }
  .topbar { padding: 0 14px; gap: 10px; }
  .content { padding: 12px; overflow: auto; }
  .table { min-height: 420px; flex: none; height: 70vh; }
  .plat-list .sw { display: none; }
  .app { height: auto; min-height: 100vh; }
}
