:root{--bg:#f6f7fb;--card:#fff;--border:#e5e7eb;--text:#111827;--muted:#6b7280;--blue:#2563eb;--red:#dc2626;--bubbleUser:#dbeafe;--bubbleBorder:#93c5fd;}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;margin:0;background:var(--bg);color:var(--text);}
.wrap{max-width:920px;margin:0 auto;padding:20px;}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:16px;box-shadow:0 8px 24px rgba(17,24,39,.06);}
.row{display:flex;gap:12px;flex-wrap:wrap;}
.col{flex:1 1 260px;}
label{display:block;font-size:13px;color:#374151;margin-bottom:6px;}
input,select,textarea,button{width:100%;box-sizing:border-box;border-radius:12px;border:1px solid #d1d5db;background:#fff;color:var(--text);padding:10px 12px;font-size:14px;}
textarea{min-height:110px;resize:vertical;}
button{cursor:pointer;border:1px solid var(--blue);background:var(--blue);color:#fff;}
button:hover{filter:brightness(1.03);}
.muted{color:var(--muted);font-size:13px;}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;}
.title{font-size:18px;font-weight:900;}
.sub{color:var(--muted);font-size:13px;}
.chatbox{height:440px;overflow:auto;border-radius:14px;border:1px solid var(--border);background:#fafafa;padding:12px;}
.msg{max-width:78%;padding:10px 12px;border-radius:14px;margin:8px 0;line-height:1.6;white-space:pre-wrap;word-break:break-word;}
.user{margin-left:auto;background:var(--bubbleUser);border:1px solid var(--bubbleBorder);}
.admin{margin-right:auto;background:#fff;border:1px solid var(--border);}
.meta{font-size:11px;color:var(--muted);margin-top:6px;}
.actions{display:flex;gap:10px;align-items:center;margin-top:10px;flex-wrap:wrap;}
.actions button{width:auto;padding:10px 14px;}
.ok{color:#16a34a;}
.err{color:var(--red);}
.headerLine{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.statusDot{width:10px;height:10px;border-radius:999px;background:#9ca3af;display:inline-block;}
.statusWrap{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);}
.statusOn{background:#22c55e;}
.statusOff{background:#ef4444;}