:root{
  --brand:#3C84F1; --brand-d:#2f6fd8; --ink:#1a1d21; --muted:#6b7280;
  --bg:#f5f7f5; --card:#fff; --line:#e5e7eb;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink)}
.center-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#eaf1fb,#f5f7f5 60%,#eafaf0)}
.login-card{background:#fff;border-radius:16px;padding:40px 36px;width:360px;max-width:92vw;
  box-shadow:0 12px 40px rgba(60,132,241,.16);text-align:center}
.brand-title{font-size:19px;font-weight:700;color:var(--brand-d)}
.brand-sub{font-size:14px;color:var(--muted);margin:6px 0 22px}
.login-tip{font-size:13px;color:var(--muted)}
.btn-primary{display:inline-block;width:100%;margin-top:14px;padding:12px 0;border:none;border-radius:10px;
  background:linear-gradient(135deg,var(--brand-d),var(--brand));color:#fff;font-size:15px;font-weight:600;
  cursor:pointer;text-decoration:none}
.btn-primary:hover{filter:brightness(1.05)}
.login-foot{margin-top:20px;font-size:12px;color:#9aa39d}
.input-sel{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;font-size:15px;
  background:#fff;margin-top:8px}
.bind-msg{margin-top:12px;font-size:13px}

/* 对话页 */
.chat-body{height:100vh;display:flex;flex-direction:column;background:var(--bg)}
.chat-head{height:56px;flex:0 0 auto;background:linear-gradient(135deg,var(--brand-d),var(--brand));
  color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px}
.chat-title{font-size:15px;font-weight:600}
.chat-user{font-size:12.5px;color:#eaf1fb}
.chat-user .logout{color:#fff;margin-left:10px;text-decoration:underline}
.chat-msgs{flex:1 1 auto;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px}
.msg{max-width:78%;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.msg.me{align-self:flex-end;background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.chat-input{flex:0 0 auto;display:flex;gap:10px;padding:12px 16px;background:#fff;border-top:1px solid var(--line)}
.chat-input textarea{flex:1;resize:none;border:1px solid var(--line);border-radius:10px;padding:10px 12px;
  font-size:14px;font-family:inherit;max-height:120px;outline:none}
.btn-send{padding:0 22px;border:none;border-radius:10px;background:linear-gradient(135deg,var(--brand-d),var(--brand));
  color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.btn-send:disabled{opacity:.6;cursor:default}

/* 后台 */
.admin-wrap{max-width:1000px;margin:0 auto;padding:24px 18px}
.admin-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.admin-h h2{font-size:18px;margin:0}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:20px}
.card h3{font-size:15px;margin:0 0 12px}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left}
th{background:#f2f7f4;font-weight:600}
.tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:12px}
.tag.self{background:#e8f0fe;color:#2f6fd8}
.tag.admin{background:#fdeede;color:#b07a00}
.btn-sm{padding:5px 12px;border:none;border-radius:7px;font-size:12.5px;cursor:pointer;background:var(--brand);color:#fff}
.btn-sm.danger{background:#e35d5d}
.row-flex{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
select,input[type=text],input[type=password]{padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:14px}
