:root {
  --bg: #0f1014;
  --bg-2: #15171c;
  --panel: #1b1d23;
  --panel-2: #22252c;
  --line: #2c2f37;
  --line-2: #3a3e48;
  --text: #eef0f3;
  --text-2: #b7bcc6;
  --muted: #858b97;
  --accent: #5865f2;
  --accent-2: #7b86ff;
  --accent-soft: rgba(88, 101, 242, 0.16);
  --green: #3ba55d;
  --yellow: #f0b232;
  --red: #e5484d;
  --twitch: #9146ff;
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
input[type="checkbox"] { accent-color: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.warn-text { color: var(--yellow); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(15, 16, 20, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo img, .logo .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 15px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--text-2); padding: 7px 11px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--panel-2); text-decoration: none; }
.spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; }
.me img { width: 30px; height: 30px; border-radius: 50%; }
.me form { margin: 0; }
.navmenu { display: none; position: relative; }
.navmenu summary { list-style: none; cursor: pointer; color: var(--text-2); font-weight: 700; font-size: 14px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line-2); white-space: nowrap; }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu[open] summary { background: var(--panel-2); color: var(--text); }
.navmenu-list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 180px; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.navmenu-list a { color: var(--text-2); padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.navmenu-list a:hover, .navmenu-list a.on { color: var(--text); background: var(--panel-2); text-decoration: none; }
@media (max-width: 1100px) { .nav { display: none; } .navmenu { display: block; } .me .name { display: none; } }
@media (max-width: 420px) { .logo { font-size: 0; gap: 0; } .top .wrap { gap: 10px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.danger { color: #ff8a8d; border-color: rgba(229, 72, 77, 0.4); background: transparent; }
.btn.big { padding: 14px 24px; font-size: 16px; }
.card .btn { max-width: 100%; white-space: normal; text-align: center; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- landing ---------- */
.hero { padding: 72px 0 40px; text-align: center; }
.hero .bot-av { width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 22px; display: block; box-shadow: 0 0 0 6px var(--accent-soft), 0 20px 60px rgba(88, 101, 242, 0.35); background: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--text-2); max-width: 640px; margin: 14px auto 28px; }
.hero .row { justify-content: center; }
.stats { display: flex; justify-content: center; gap: 36px; margin-top: 34px; color: var(--muted); font-size: 14px; }
.stats b { display: block; color: var(--text); font-size: 26px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding: 30px 0 60px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .em { font-size: 26px; margin-bottom: 8px; }
.feature p { color: var(--text-2); margin: 0; font-size: 14px; }
.section-title { text-align: center; margin: 20px 0 6px; font-size: 28px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 10px; }
.cta { background: linear-gradient(135deg, #3b44b8, #5865f2 55%, #7b5cff); border-radius: 18px; padding: 42px 28px; text-align: center; margin: 10px 0 70px; }
.cta p { color: #e3e6ff; }
.cta .btn { background: #fff; color: #2c32a0; border-color: #fff; }

/* ---------- content pages ---------- */
.page { padding: 42px 0 70px; flex: 1; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 30px; }
.prose p, .prose li { color: var(--text-2); }
.prose li { margin: 6px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.cmd-group { margin-bottom: 26px; }
.cmd { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cmd code { background: var(--accent-soft); color: #c9ceff; font-weight: 700; min-width: 130px; text-align: center; }
.cmd span { color: var(--text-2); flex: 1; }
.tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 7px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.tag.green { background: rgba(59, 165, 93, 0.18); color: #74d696; }
.tag.red { background: rgba(229, 72, 77, 0.18); color: #ff8a8d; }
.tag.purple { background: rgba(145, 70, 255, 0.2); color: #c7a5ff; }
.tag.gold { background: rgba(250, 166, 26, 0.2); color: #f7c04a; }
details.qa { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
details.qa summary { cursor: pointer; font-weight: 700; }
details.qa p { margin: 10px 0 0; color: var(--text-2); }

/* ---------- leaderboard ---------- */
.lb-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.lb-head img, .gicon { width: 72px; height: 72px; border-radius: 18px; background: var(--panel-2); display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; object-fit: cover; }
.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tabs { max-width: 100%; flex-wrap: wrap; }
.tabs a { padding: 7px 16px; border-radius: 7px; color: var(--text-2); font-weight: 700; font-size: 14px; }
.tabs a.on { background: var(--accent); color: #fff; }
.tabs a:hover { text-decoration: none; }
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 44px 44px 1fr auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.lb .rank { font-weight: 800; color: var(--muted); text-align: center; font-size: 17px; }
.lb li.top1 .rank { color: #ffd257; } .lb li.top2 .rank { color: #d7dde6; } .lb li.top3 .rank { color: #f0a36b; }
.lb img, .lb .noav { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); }
.lb .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-top: 6px; max-width: 320px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lb .val { text-align: right; font-weight: 800; }
.lb .val small { display: block; color: var(--muted); font-weight: 500; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------- server list ---------- */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.server { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.server .gicon { width: 64px; height: 64px; }
.server b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.server.off { opacity: 0.75; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; padding-top: 28px; padding-bottom: 70px; flex: 1; }
.dash > section { min-width: 0; }
.roles-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .roles-layout { grid-template-columns: 1fr; } .top .btn.sm { padding: 6px 10px; } .me .btn.ghost { padding: 6px 4px; } }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } }
.side { position: sticky; top: 80px; align-self: start; min-width: 0; }
@media (max-width: 860px) { .side { position: static; } }
.side .ghead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.side .ghead .gicon { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.side .ghead b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .side nav { flex-direction: row; flex-wrap: wrap; } }
.side nav a { color: var(--text-2); padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.side nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--accent-soft); color: #c9ceff; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.head h1 { font-size: 28px; margin: 0; }
.head p { color: var(--muted); margin: 4px 0 0; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.flash.ok { background: rgba(59, 165, 93, 0.14); border: 1px solid rgba(59, 165, 93, 0.35); color: #8ee0a8; }
.flash.err { background: rgba(229, 72, 77, 0.12); border: 1px solid rgba(229, 72, 77, 0.35); color: #ffa3a5; }
.flash.warn { background: rgba(240, 178, 50, 0.1); border: 1px solid rgba(240, 178, 50, 0.3); color: #f5cd6f; }
.flash.info { background: var(--accent-soft); border: 1px solid rgba(88, 101, 242, 0.35); color: #c9ceff; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 17px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label:not(.toggle), .lbl { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="search"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 90px; resize: vertical; }
textarea.mono { font-family: var(--mono); font-size: 13px; }
input[type="color"] { width: 48px; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-2); padding: 3px; cursor: pointer; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 42px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; transition: background 0.15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle input:checked + .track { background: var(--green); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }
.checklist { max-height: 220px; overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px; }
.checklist.tall { max-height: 280px; }
.checklist label { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.checklist label:hover { background: var(--panel-2); }
.checklist label.sub { padding-left: 22px; }
.checklist label.off { opacity: 0.5; cursor: not-allowed; }
.checklist label em, .checklist .cat em { color: var(--muted); font-style: normal; font-size: 12px; margin-left: auto; }
.checklist .cat-h { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 8px 8px 2px; }
.checklist .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #99aab5); flex: none; }
.filter { margin-bottom: 6px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rowline { display: grid; gap: 8px; align-items: center; }
.rowline.rw { grid-template-columns: 90px minmax(0, 1fr) 40px; }
.rowline.tw { grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; background: var(--bg-2); }
@media (max-width: 700px) { .rowline.tw { grid-template-columns: 1fr; } }
.rowline.link { grid-template-columns: 70px 1fr 1.4fr 40px; }
.rowline.btnrow { grid-template-columns: 1fr 70px 1fr 130px 40px; }
@media (max-width: 700px) { .rowline.link, .rowline.btnrow { grid-template-columns: 1fr 1fr; } }
.x { background: none; border: 1px solid var(--line-2); color: var(--muted); border-radius: 8px; height: 40px; cursor: pointer; font-size: 16px; }
.x:hover { color: #ff8a8d; border-color: rgba(229, 72, 77, 0.5); }
.savebar { position: sticky; bottom: 0; margin-top: 18px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cmd-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmd-toggle:last-child { border-bottom: 0; }
.cmd-toggle code { font-weight: 700; }
.cmd-toggle span { color: var(--muted); font-size: 13px; flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.kpi b { display: block; font-size: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi b.txt { font-size: 18px; line-height: 32px; }
.kpi span { color: var(--muted); font-size: 13px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.quick a { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quick a > span { min-width: 0; overflow-wrap: anywhere; }
.quick a:hover { border-color: var(--accent); text-decoration: none; }
.quick a small { display: block; color: var(--muted); font-weight: 400; }
.panel-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; color: var(--text); background: var(--bg-2); }
.panel-list a.on { border-color: var(--accent); }
.panel-list a:hover { text-decoration: none; border-color: var(--muted); }
.live { color: #ff6b6b; font-weight: 800; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--text-2); }

/* ---------- login ---------- */
.login-card { max-width: 480px; margin: 20px auto; text-align: center; padding: 34px 30px; }
.login-av { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent); font-size: 34px; }
.login-card h1 { font-size: 26px; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; width: 100%; margin: 10px 0 18px; }
.btn.discord:hover { background: #4752c4; }
.login-points { text-align: left; color: var(--text-2); font-size: 13.5px; padding-left: 20px; margin: 0; }
.login-points li { margin: 6px 0; }

/* ---------- support ---------- */
.support-login { max-width: 560px; }
.tlist { display: flex; flex-direction: column; gap: 6px; }
.tlist a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--text); }
.tlist a:hover { border-color: var(--muted); text-decoration: none; }
.tlist a > span:first-child { min-width: 0; }
.tlist b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tlist small { color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.msg.staff { border-color: rgba(59, 165, 93, 0.45); background: rgba(59, 165, 93, 0.06); }
.msg-h { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.msg-h .muted { margin-left: auto; font-size: 12px; }
.msg-ev { display: flex; gap: 10px; align-items: baseline; padding: 6px 14px; border-left: 3px solid var(--line); color: var(--text-2); font-size: 14px; }
.msg-ev .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
.invite-ask { margin-bottom: 14px; border-color: rgba(88, 101, 242, 0.5); }
.invite-ask.ok { border-color: rgba(59, 165, 93, 0.45); }
.invite-ask h3 { margin: 0 0 6px; }
.invite-ask .quote { margin: 6px 0; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.invite-ask ul.list { margin: 8px 0 0; padding-left: 18px; }
.inv-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.msg-b { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* ---------- owner ---------- */
.owner-badge { background: linear-gradient(135deg, #f0b232, #ff7a59); }
.state-online { color: #74d696; } .state-offline, .state-error { color: #ff8a8d; } .state-connecting { color: var(--yellow); }
.kpi b { text-transform: capitalize; }
.kpi a { color: inherit; }
.logbox { max-height: 330px; overflow: auto; font-family: var(--mono); font-size: 12px; background: var(--bg-2); border-radius: 9px; padding: 8px; }
.logbox .log { padding: 3px 4px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.logbox .log span { color: var(--muted); margin-right: 8px; }
.logbox .log.error { color: #ff8a8d; } .logbox .log.warn { color: #f5cd6f; } .logbox .log.success { color: #74d696; }
.ttable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ttable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 10px; }
.ttable td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.ttable td.right { text-align: right; white-space: nowrap; }
.ttable tr[data-href]:hover td { background: var(--bg-2); }
.av32 { width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.av40 { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); }
.mono { font-family: var(--mono); }
details.leave { display: inline-block; position: relative; }
details.leave summary { list-style: none; display: inline-flex; }
details.leave summary::-webkit-details-marker { display: none; }
.leave-form { position: absolute; right: 0; top: 38px; z-index: 5; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; display: flex; gap: 8px; width: 330px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
@media (max-width: 860px) { .ttable th:nth-child(4), .ttable td:nth-child(4) { display: none; } }
.staff-badge { background: linear-gradient(135deg, #3ba55d, #2d8cf0); }
.person { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
.person > span:nth-child(2) { flex: 1 1 220px; min-width: 0; }
.person small { display: block; }
.person b { display: block; }
.person small { color: var(--muted); }
.person form { margin: 0; }
.check-line { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 14px; }
.check-line input { margin-top: 3px; }
.tag.gold { background: rgba(240, 178, 50, 0.18); color: #f5cd6f; }
.rank-owner { background: linear-gradient(135deg, #f0b232, #ff7a59); }
.rank-admin { background: linear-gradient(135deg, #e5484d, #b3246b); }
.rank-senior { background: linear-gradient(135deg, #9146ff, #5865f2); }
.rank-staff { background: linear-gradient(135deg, #3ba55d, #2d8cf0); }
.sm-select { width: auto; padding: 6px 8px; font-size: 13px; }
.ranks { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 10px; table-layout: fixed; }
.ranks th:first-child, .ranks td:first-child { width: 40%; }
.ranks th, .ranks td { padding: 7px 4px; border-top: 1px solid var(--line); text-align: center; }
.ranks td:first-child { text-align: left; color: var(--text-2); }
.ranks td:not(:first-child) { color: #74d696; font-weight: 800; }
.ranks thead th { border-top: 0; }
.health-sum { padding: 10px 14px; border-radius: 9px; margin-bottom: 10px; font-size: 14px; }
.health-sum.good { background: rgba(59, 165, 93, 0.12); color: #8ee0a8; }
.health-sum.warn { background: rgba(240, 178, 50, 0.1); color: #f5cd6f; }
.health-sum.bad { background: rgba(229, 72, 77, 0.12); color: #ffa3a5; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-2); padding: 8px 10px; background: var(--bg-2); border-radius: 8px; border-left: 3px solid var(--line-2); }
.checks li.error { border-left-color: var(--red); }
.checks li.warn { border-left-color: var(--yellow); }
.checks li.ok { border-left-color: var(--green); }
.checks b { color: var(--text); }
.checks .fix { color: var(--muted); margin-top: 3px; }
.feat-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.errmsg { color: var(--text); display: block; margin-top: 4px; overflow-wrap: anywhere; }
.ttable tr.fixed td { opacity: 0.55; }
.stack-trace { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-2); padding: 12px; border-radius: 9px; max-height: 360px; overflow: auto; color: var(--text-2); margin: 0; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 90px; background: var(--bg-2); border-radius: 8px; padding: 8px; }
.spark i { flex: 1; min-width: 3px; max-width: 14px; background: linear-gradient(var(--red), #b3246b); border-radius: 2px 2px 0 0; }
.cl-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cl-jump a { padding: 4px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 700; font-family: var(--mono); }
.cl-jump a:hover { border-color: var(--muted); text-decoration: none; }
.cl-jump a.on { border-color: var(--green); color: #8ee0a8; }
.cl-ver { scroll-margin-top: 80px; }
.cl-sec { margin-top: 12px; }
.cl-sec ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
.cl-sec li { margin: 5px 0; }
.cl-sec li ul { margin-top: 4px; }
.cl-sec b { color: var(--text); }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.layout-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.layout-card:hover { border-color: var(--accent); text-decoration: none; }
.layout-card span { font-size: 13.5px; }
.layout-card small { color: var(--muted); }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; max-height: 200px; overflow: auto; }
.role-chips .rchip { padding: 3px 10px; }
.role-chips em { color: var(--muted); font-style: normal; font-size: 11px; }
.rchip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #99aab5); display: inline-block; }
.tree { margin-top: 8px; font-size: 14px; max-height: 460px; overflow: auto; background: var(--bg-2); border-radius: 9px; padding: 8px 12px; }
.tree-cat { margin-top: 10px; text-transform: none; }
.tree-cat:first-child { margin-top: 0; }
.tree-ch { padding: 3px 0 3px 18px; color: var(--text-2); }
.mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.mode small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.mode.danger b { color: #ff8a8d; }
.mode input { margin-top: 4px; }
.wipe-confirm { display: none; border-left: 3px solid var(--red); padding-left: 12px; }
form:has(input[value="wipe"]:checked) .wipe-confirm { display: block; }
.exact { font-family: var(--mono); text-transform: none; color: var(--text); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; font-size: 13.5px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.kv > div > span { color: var(--muted); }
.kv > div > b { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-live { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-2); font-size: 14px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* v1.18: Logs, Verification & raids */
.togs { display: flex; flex-direction: column; gap: 10px; }
label.radio { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text-2); margin: 6px 0; cursor: pointer; }
label.radio input { width: auto; margin: 0; }
ul.hint.list { margin: 6px 0 0; padding-left: 18px; }
ul.hint.list li { margin: 3px 0; }
.btn.success { background: #248046; border-color: #248046; color: #fff; }
.preview-embed { background: var(--bg-2); border-left: 4px solid var(--c, #57f287); border-radius: 6px; padding: 12px 14px; }
.preview-embed p { margin: 6px 0 10px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-embed .btn { pointer-events: none; }
.field > label.radio { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text-2); }
/* Twitch connection */
.tw-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.45); }
.tw-avatar.ph { display: grid; place-items: center; background: var(--panel-2); font-size: 24px; }
.tw-conn { border-color: rgba(145, 70, 255, 0.45); }
.tw-name { font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .tw-conn > .row { flex-wrap: wrap !important; } }
/* ---------- docs ---------- */
.docs .docs-filter { width: 100%; margin-bottom: 10px; }
.docs-nav .docs-sec { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin: 14px 12px 4px; }
.docs-nav .docs-sec:first-child { margin-top: 0; }
@media (max-width: 860px) { .docs-nav .docs-sec { width: 100%; margin: 8px 4px 0; } }
.docs-body { max-width: 780px; }
.docs-body h1 { margin-top: 0; }
.docs-body h2 { margin-top: 32px; padding-top: 4px; }
.docs-body .docs-crumb { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 4px; }
.docs-body code { white-space: nowrap; }
.docs-body .callout { background: var(--accent-soft); border: 1px solid rgba(88, 101, 242, 0.35); border-radius: 10px; padding: 12px 16px; margin: 16px 0; color: var(--text-2); }
.docs-body .callout.warn { background: rgba(250, 166, 26, 0.1); border-color: rgba(250, 166, 26, 0.35); }
.docs-body ol li, .docs-body ul li { margin: 6px 0; }
.docs-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.docs-body th, .docs-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-body th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.docs-body td { color: var(--text-2); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.docs-grid a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--text); }
.docs-grid a:hover { border-color: var(--accent); text-decoration: none; }
.docs-grid a small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.docs-help { margin-top: 36px; font-size: 14px; }
.docs-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.docs-pager a { flex: 1; max-width: 48%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; color: var(--text); }
.docs-pager a:hover { border-color: var(--accent); text-decoration: none; }
.docs-pager a.nx { text-align: right; margin-left: auto; }
.docs-pager small { display: block; color: var(--muted); }
.docs-cmd { border-bottom: 1px solid var(--line); padding: 12px 0; }
.docs-cmd > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.docs-cmd code.c { background: var(--accent-soft); color: #c9ceff; font-weight: 700; }
.docs-cmd ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.docs-cmd .req { color: #ff8a8d; font-size: 11px; font-weight: 800; }

.docs-nav a { padding: 7px 12px; }
.docs-jump { display: none; margin-bottom: 18px; }
@media (max-width: 860px) {
  .docs .side .docs-filter, .docs .side .docs-nav { display: none; }
  .docs-jump { display: block; }
  .docs .side .ghead { margin-bottom: 10px; }
}

/* ---------- server directory ---------- */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.srv-card { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); }
.srv-card:hover { border-color: var(--accent); text-decoration: none; }
.srv-card.feat { border-color: rgba(250, 166, 26, 0.45); }
.srv-top { display: flex; gap: 12px; align-items: center; }
.srv-top > div:not(.srv-icon) { flex: 1; min-width: 0; }
.srv-top small { display: block; margin-top: 2px; }
.srv-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-icon { width: 48px; height: 48px; border-radius: 14px; flex: none; object-fit: cover; }
.srv-icon.ph { display: grid; place-items: center; background: var(--panel-2); font-weight: 800; }
.srv-icon.big { width: 72px; height: 72px; border-radius: 20px; font-size: 22px; }
.srv-label { align-self: flex-start; }
.srv-desc { margin: 0; color: var(--text-2); font-size: 14px; flex: 1; overflow-wrap: anywhere; }
.srv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-tags .tag { text-transform: none; letter-spacing: 0; font-weight: 700; }
a.tag:hover { text-decoration: none; color: var(--text); }
.srv-filter { margin-bottom: 14px; flex-wrap: wrap; }
.srv-filter select { width: auto; flex: none; }
.srv-filter input[type="search"] { width: auto; }
@media (max-width: 640px) { .srv-filter select { flex: 1; } }
.srv-page .btn.big { flex: none; }
@media (max-width: 640px) { .srv-page > .row { flex-wrap: wrap !important; } }
.tag-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-picks label { display: inline-flex; gap: 6px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.tag-picks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* ---------- templates ---------- */
.tpl-tree { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-top: 10px; }
@media (max-width: 760px) { .tpl-tree { grid-template-columns: 1fr; } }
.tpl-tree h3 { font-size: 15px; margin: 0 0 8px; }
.tpl-tree ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text-2); }
.tpl-tree li { padding: 3px 0; overflow-wrap: anywhere; }
.tpl-roles .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; }
.tpl-cat { margin-bottom: 12px; }
.tpl-cat > b { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.tpl-cat ul { margin-top: 4px; padding-left: 8px; }

.grid-side { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 860px) { .grid-side { grid-template-columns: 1fr; } }
.grid-aside { grid-template-columns: minmax(0, 1fr) 270px; }
@media (max-width: 860px) { .grid-aside { grid-template-columns: 1fr; } }
.ttable .tag { white-space: nowrap; }
/* ---------- analytics ---------- */
.an-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 4px; }
.kpi small.up { color: #74d696; font-weight: 700; }
.kpi small.down { color: #ff8a8d; font-weight: 700; }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart .c-grid { stroke: var(--line); stroke-width: 1; }
.chart .c-base { stroke: var(--line-2); stroke-width: 1; }
.chart .c-ax { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart .c-bar { fill: var(--accent); }
.chart .c-hit:hover .c-bar { fill: var(--accent-2); }
.chart .c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.chart .c-hit:hover .c-dot { r: 6; }
.an-table td { padding: 8px 10px; }
.an-scroll { overflow-x: auto; max-width: 100%; }
.an-scroll .an-table td, .an-scroll .an-table th { white-space: nowrap; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.f-row { display: grid; grid-template-columns: minmax(80px, 150px) minmax(60px, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.f-lab { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-track { background: var(--panel-2); border-radius: 6px; height: 14px; overflow: hidden; }
.f-bar { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.f-num { font-size: 13px; color: var(--muted); white-space: nowrap; }
.f-num b { color: var(--text); }
.f-num small { color: #ff8a8d; }
@media (max-width: 560px) { .f-row { grid-template-columns: 90px minmax(0, 1fr) 84px; } }

.tabs a { white-space: nowrap; }
