:root {
  --bg:#111;
  --panel:#1f1f1f;
  --text:#e8e8e8;
  --muted:#bdbdbd;
  --accent:#5aa2ff;
  --ok:#79d279;
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;overflow:hidden} /* hide page scroll */
.header{height:56px;background:#0f0f0f;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid #000}
.logo{font-weight:700}
.role-badge{font-size:12px;padding:4px 8px;border-radius:8px;border:1px solid #333;background:#0b0b0b}
.wrapper{display:grid;grid-template-columns:1fr 260px;gap:8px;padding:8px;height:calc(100vh - 72px)}
.panel{background:var(--panel);border-radius:8px;padding:8px;border:1px solid #000;overflow:auto} /* panel scroll */
.chat-panel{display:flex;flex-direction:column;height:100%}
.chatlog{flex:1;padding:8px;overflow:auto;background:linear-gradient(180deg,#111,#141414);border-radius:6px}
.inputbar{display:flex;gap:8px;padding-top:8px}
.inputbar input{flex:1;padding:8px;border-radius:6px;border:1px solid #333;background:#0f0f0f;color:var(--text)}
.inputbar button{padding:8px 12px;border-radius:6px;border:1px solid #333;background:#0b0b0b;color:var(--text);cursor:pointer}
.userlist{max-height:calc(100vh - 140px);overflow:auto}
.user{display:flex;flex-direction:column;align-items:flex-start;margin:6px 0}
.user .user-header{display:flex;align-items:center;gap:6px}
.user .user-buttons{margin-left:16px;margin-top:2px}
.user .dot{width:10px;height:10px;border-radius:50%;background:var(--ok);display:inline-block}
.user .ignore-btn,.user .kick-btn,.user .ban-btn{display:inline-block;margin-right:4px}
.msg{margin:6px 0}
.msg .meta{color:var(--muted);font-size:12px}
.msg.pm{background:#26324a;padding:6px;border-radius:6px}
.msg.system{color:var(--muted);font-style:italic}
.yt{margin-top:6px}
.yt iframe{width:100%;height:210px;border:0;border-radius:8px}
.auth{max-width:420px;margin:16px}
.login-box{padding:16px}
@media(max-width:900px){
  .wrapper{grid-template-columns:1fr;height:auto}
  .userlist{height:220px}
}
