/* 管理端样式 */
.admin-body { overflow: auto !important; background: #f0f2f5; }
#adminDash { min-height: 100vh; display: flex; flex-direction: column; }
.ad-top { display: flex; align-items: center; gap: 20px; background: #001529; color: #fff; padding: 0 18px; height: 54px; position: sticky; top: 0; z-index: 10; }
.ad-brand { font-size: 16px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.ad-tabs { display: flex; gap: 4px; flex: 1; }
.ad-tab { color: #c3cdd9; padding: 6px 14px; border-radius: 6px; font-size: 14px; }
.ad-tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.ad-tab.active { background: #07c160; color: #fff; }
.ad-user { display: flex; align-items: center; gap: 8px; }
.ad-user .small-muted { color: #9fb0c0; }
.ad-main { padding: 18px; max-width: 1400px; width: 100%; margin: 0 auto; }
.ad-page { display: flex; flex-direction: column; gap: 12px; }
.ad-h3 { font-size: 14px; color: #555; margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .k { font-size: 12px; color: #8a94a0; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 6px; word-break: break-all; }
.card .v small { font-size: 12px; font-weight: 400; color: #8a94a0; margin-left: 4px; }
.ad-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; padding: 10px 12px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ad-bar .inp { height: 32px; font-size: 13px; background: #f5f6f7; width: auto; min-width: 140px; }
.ad-bar select.inp { min-width: 120px; }
.ad-bar .small-btn { height: 32px; padding: 0 14px; }
.small-btn.danger { background: #fa5151; color: #fff; }
.table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ad-table th, .ad-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.ad-table th { background: #fafafa; color: #666; font-weight: 600; position: sticky; top: 0; }
.ad-table tr:hover td { background: #fbfefc; }
.ad-table tr.disabled-row td { background: #fff6f6; color: #999; }
.ad-table td .name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.ad-table .thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; background: #eee; }
.ad-table .ico { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #f2f3f5; border-radius: 5px; font-size: 17px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.gray { background: #eef0f2; color: #666; }
.tag.red { background: #ffe8e8; color: #d33; }
.tag.green { background: #e6f9ee; color: #0a8f4e; }
.tag.blue { background: #e8f3ff; color: #1677ff; }
.ad-pager { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 6px 0 20px; }
.ad-table .ops { display: flex; gap: 6px; }
.ad-table .ops .small-btn { padding: 3px 10px; font-size: 12px; }
/* 可点击的聊天记录文件名 */
.chat-file { color: #1677ff; cursor: pointer; text-decoration: underline; }
.chat-file:hover { color: #0958d9; }
/* 纯文本聊天记录预览 */
.txt-pre { max-height: 58vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.65;
  background: #fafbfc; border: 1px solid #eef0f2; border-radius: 8px; padding: 12px 14px; margin: 0; color: #222; }
/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #c9ced6; border-radius: 24px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(22px); }
