:root {
  --bg:#0f1115; --surface:#171a21; --surface-2:#1e222b; --surface-3:#232833;
  --border:#2a2f3a; --text:#e4e6eb; --muted:#8b93a3; --accent:#5865f2;
  --accent-hover:#4752c4; --green:#43b581; --red:#f04747; --amber:#faa61a;
  --radius:10px; --sidebar-w:250px; --topbar-h:56px;
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--text);font:15px/1.6 "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit;text-decoration:none}
code{background:var(--surface-2);padding:1px 6px;border-radius:4px;font-size:.85em;font-family:ui-monospace,"SF Mono",Menlo,monospace}
hr{border:none;border-top:1px solid var(--border);margin:8px 0}
.topbar{position:fixed;top:0;left:0;right:0;height:var(--topbar-h);display:flex;align-items:center;gap:14px;padding:0 20px;background:var(--surface);border-bottom:1px solid var(--border);z-index:100}
.brand{font-size:19px;font-weight:700;letter-spacing:-.4px}.brand span{color:var(--accent)}
.topbar-spacer{flex:1}
.hamburger{display:none;flex-direction:column;gap:4px;background:none;border:none;cursor:pointer;padding:6px}
.hamburger span{width:20px;height:2px;background:var(--text);border-radius:2px}
.guild-pill,.user-menu{display:flex;align-items:center;gap:9px;background:var(--surface-2);border:1px solid var(--border);padding:5px 12px 5px 6px;border-radius:999px;font-size:14px}
.guild-pill img,.user-menu img,.guild-initial{width:28px;height:28px;border-radius:50%;object-fit:cover}
.guild-initial{display:flex;align-items:center;justify-content:center;background:var(--surface-3);font-weight:700;font-size:13px}
.logout{margin-left:4px;color:var(--muted);font-size:16px;padding-left:8px;border-left:1px solid var(--border)}
.logout:hover{color:var(--red)}
.guild-name,.user-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell{display:flex;padding-top:var(--topbar-h);min-height:100vh}
.sidebar{position:fixed;top:var(--topbar-h);bottom:0;left:0;width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);overflow-y:auto;padding:12px 0 60px;transition:width .15s}
.sidebar.collapsed{width:0;overflow:hidden}
.content{flex:1;margin-left:var(--sidebar-w);padding:32px 40px 80px;max-width:1100px;transition:margin-left .15s}
.sidebar.collapsed~.content{margin-left:0}
.nav-group{margin-bottom:2px}
.nav-group-header{width:100%;display:flex;align-items:center;gap:8px;background:none;border:none;cursor:pointer;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;padding:12px 20px 8px}
.nav-group-header .chev{transition:transform .15s;font-size:13px}
.nav-group.open .nav-group-header .chev{transform:rotate(90deg)}
.nav-items{display:none}.nav-group.open .nav-items{display:block}
.nav-item{display:flex;align-items:center;gap:11px;padding:9px 20px 9px 24px;font-size:14px;color:var(--muted);border-left:2px solid transparent}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{color:var(--text);background:var(--surface-2);border-left-color:var(--accent)}
.nav-icon{width:18px;text-align:center;opacity:.9}
.sidebar-collapse{position:absolute;bottom:0;left:0;right:0;background:var(--surface);border:none;border-top:1px solid var(--border);color:var(--muted);cursor:pointer;padding:10px;font-size:14px}
.sidebar-collapse:hover{color:var(--text)}
.page-head{margin-bottom:24px}.page-head h1{font-size:26px;letter-spacing:-.5px}.page-head .muted{margin-top:4px}
.muted{color:var(--muted);font-size:14px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:20px;overflow:hidden}
.card.accent{border-top:2px solid var(--accent)}
.card-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}
.card-head h2{font-size:15px;font-weight:600}.card-body{padding:20px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.tile{background:var(--surface);border:1px solid var(--border);border-top:2px solid var(--green);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column}
.tile.off{border-top-color:var(--muted);opacity:.85}
.tile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.tile-head h3{font-size:16px}
.tile-desc{color:var(--muted);font-size:13px;margin:8px 0 14px;flex:1}
.tile-foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.badge{font-size:11px;font-weight:600;padding:3px 8px;border-radius:5px;background:var(--accent);color:#fff}
.badge.grey{background:var(--surface-3);color:var(--muted)}
form{display:flex;flex-direction:column;gap:16px}
label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500}
.hint{color:var(--muted);font-weight:400;font-size:12px}.hint.error{color:var(--red)}
input[type=text],input[type=number],input[type=password],select,textarea{background:var(--surface-2);border:1px solid var(--border);border-radius:8px;color:var(--text);padding:10px 12px;font:inherit;font-size:14px;width:100%}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent)}
textarea{resize:vertical;font-family:inherit}
input[type=color]{height:40px;padding:4px;cursor:pointer}
.switch{flex-direction:row;align-items:center;gap:10px;font-weight:400;cursor:pointer}
.switch input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}
.switch.inline{display:inline-flex}
.row{display:flex;gap:14px;flex-wrap:wrap}.row>label{flex:1;min-width:130px}
fieldset{border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:14px}
legend{padding:0 8px;font-weight:600;font-size:14px}
.checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;max-height:280px;overflow-y:auto}
.log-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.actions{display:flex;gap:12px;margin-top:4px}
form>.btn,form .actions{align-self:flex-start}
.btn{display:inline-block;background:var(--accent);color:#fff;border:none;padding:10px 20px;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;transition:background .15s}
.btn:hover{background:var(--accent-hover)}.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.ghost{background:transparent;border:1px solid var(--border)}.btn.ghost:hover{background:var(--surface-2)}
.btn.danger{background:var(--red)}.btn.danger:hover{background:#c53030}
.btn.small{padding:6px 12px;font-size:13px}.btn.big{padding:14px 28px;font-size:16px}
.toast{padding:12px 16px;border-radius:8px;margin-bottom:20px;font-size:14px;border:1px solid var(--border);border-left:3px solid var(--green);background:var(--surface)}
.toast.warn{border-left-color:var(--amber)}.toast.error{border-left-color:var(--red)}
.notice{background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--muted);border-radius:8px;padding:14px 16px;font-size:14px;color:var(--muted);line-height:1.55}
.notice strong{color:var(--text)}.notice.warn{border-left-color:var(--amber)}.notice.error{border-left-color:var(--red)}
.role-chip{display:inline-flex;align-items:center;gap:6px;font-size:14px}
.role-chip::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--role,#99aab5);flex-shrink:0}
.switch.disabled{opacity:.45;cursor:not-allowed}
table.data{width:100%;border-collapse:collapse;font-size:14px}
table.data th{text-align:left;padding:10px 12px;color:var(--muted);font-weight:600;border-bottom:1px solid var(--border);font-size:13px}
table.data td{padding:10px 12px;border-bottom:1px solid var(--border)}
table.data tr:last-child td{border-bottom:none}
table.data .right{text-align:right}
.builder{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
@media(max-width:900px){.builder{grid-template-columns:1fr}}
.preview-card{position:sticky;top:calc(var(--topbar-h) + 20px)}
.fields-head{display:flex;align-items:center;gap:12px}
.field-row{display:grid;grid-template-columns:1fr 1.5fr auto auto;gap:8px;align-items:start;margin-bottom:8px}
.field-row textarea{min-height:38px}
.discord-preview{background:#313338;border-radius:8px;padding:16px;font-size:14px}
.dp-content{color:#dbdee1;margin-bottom:8px;white-space:pre-wrap}
.dp-embed{display:flex;background:#2b2d31;border-radius:4px;max-width:520px;overflow:hidden}
.dp-bar{width:4px;background:var(--accent);flex-shrink:0}
.dp-inner{padding:12px 16px 16px;min-width:0;flex:1}
.dp-author{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:14px;font-weight:600;color:#f2f3f5}
.dp-author img{width:24px;height:24px;border-radius:50%}
.dp-title{color:#00a8fc;font-weight:600;margin-bottom:8px}
.dp-desc{color:#dbdee1;white-space:pre-wrap;margin-bottom:8px;font-size:13.5px}
.dp-fields{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.dp-field{flex-basis:100%}.dp-field.inline{flex-basis:calc(33% - 8px);flex-grow:1}
.dp-field-name{font-weight:600;color:#f2f3f5;font-size:13px;margin-bottom:2px}
.dp-field-value{color:#dbdee1;font-size:13px}
.dp-image{max-width:100%;border-radius:4px;margin-top:8px;display:block}
.dp-thumb{width:72px;height:72px;border-radius:4px;float:right;margin-left:12px}
.dp-footer{display:flex;align-items:center;gap:8px;color:#949ba4;font-size:12px;margin-top:8px}
.dp-footer img{width:18px;height:18px;border-radius:50%}
.hero{text-align:center;padding:60px 0}
.hero h1{font-size:44px;line-height:1.15;letter-spacing:-1px;margin-bottom:20px}
.hero p{color:var(--muted);max-width:620px;margin:0 auto 32px;font-size:17px}
.cta{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.stats-row{display:flex;justify-content:center;gap:56px;margin-top:56px}
.stats-row div{display:flex;flex-direction:column}
.stats-row strong{font-size:30px}
.stats-row span{color:var(--muted);font-size:13px;text-transform:uppercase;letter-spacing:1px}
.server-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:18px;margin-top:28px}
.server{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px;text-align:center}
.server.absent{opacity:.55}
.server img,.server-initial-lg{width:66px;height:66px;border-radius:50%;margin:0 auto 12px;object-fit:cover}
.server-initial-lg{background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:700}
.server h3{font-size:15px;margin-bottom:14px;word-break:break-word}
.check-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:14px}
.check-row .dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.check-row .dot.ok{background:var(--green)}.check-row .dot.bad{background:var(--red)}
.check-row .cname{min-width:240px;font-weight:500}
.check-row .cdetail{color:var(--muted);font-size:13px}
.tb{background:#0b0d11;border:1px solid var(--border);border-radius:8px;padding:14px;overflow-x:auto;font-size:12px;color:#ffb4b4;white-space:pre}
@media(max-width:768px){
.hamburger{display:flex}
.sidebar{transform:translateX(-100%);transition:transform .2s;width:var(--sidebar-w)}
.sidebar.open-mobile{transform:translateX(0)}
.content{margin-left:0;padding:24px 16px 80px}
.guild-name,.user-name{display:none}
.builder{grid-template-columns:1fr}.hero h1{font-size:32px}}
footer{text-align:center;padding:24px;color:var(--muted);font-size:13px;border-top:1px solid var(--border)}
