/* 抖音私信坐席工作台 —— 现代柔和配色 (浅灰底 + 柔玫瑰主色) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent: #ef5777;        /* 柔和玫瑰主色(替代刺眼的抖音红) */
  --accent-press: #e0466a;  /* 按下/深一档 */
  --accent-soft: #fdeef2;   /* 极浅玫瑰, 用于选中底色 */
  --red: var(--accent);     /* 兼容旧引用 */
  --red-soft: var(--accent-soft);
  --ok: #2fb27c;            /* 柔和成功绿 */
  --warn: #e8954a;          /* 柔和警示橙 */
  --dark: #2c2e3a;          /* 柔和深色(文字 + 侧栏基调) */
  --muted: #8a8d99;         /* 次要文字 */
  --bg: #f5f6f8;            /* 页面底 */
  --line: #ebedf1;          /* 柔和分隔线 */
  --side: #2b2d3a;          /* 侧栏深色(替代近黑) */
  --side-hi: #363949;       /* 侧栏选中/悬浮底 */
  --shadow: 0 1px 3px rgba(28, 30, 50, .05), 0 1px 2px rgba(28, 30, 50, .04);
  --shadow-pop: 0 10px 30px rgba(28, 30, 50, .12);
}
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark);
  height: 100vh;
  overflow: hidden;
}
#root { height: 100%; }
button { font-family: inherit; }

/* ============ 登录/注册页 ============ */
.auth-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef5777 0%, #f59ab0 55%, #f3b69b 100%);
}
.auth-card {
  width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 18px 50px rgba(40, 30, 50, 0.14);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; color: var(--dark); }
.auth-card .sub { font-size: 13px; color: #888; margin-bottom: 22px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; padding: 9px 0; border: none; border-radius: 8px;
  background: #f0f0f2; color: #555; font-size: 14px; cursor: pointer;
}
.auth-tabs button.active { background: var(--red); color: #fff; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: #888; margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1px solid #e2e2e6;
  border-radius: 8px; font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--red); }
.btn-primary {
  width: 100%; padding: 12px 0; border: none; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 15px; cursor: pointer; margin-top: 6px;
}
.btn-primary:disabled { background: #f6c2cd; cursor: not-allowed; }
.auth-err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
.cfg-row { display: flex; gap: 8px; margin-top: 18px; }
.cfg-row .field { flex: 1; margin: 0; }
.cfg-row input { font-size: 12px; padding: 7px 8px; }

/* ============ 主界面布局 ============ */
.app { display: flex; height: 100%; }

/* 左侧账号导轨 */
.rail {
  width: 66px; background: var(--dark);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 12px; overflow-y: auto;
}
.rail .logo { color: var(--red); font-weight: bold; font-size: 11px; text-align: center; line-height: 1.2; margin-bottom: 6px; }
.rail .acc {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; object-fit: cover; background: var(--side-hi);
  position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.rail .acc.active { border-color: var(--red); }
.rail .acc.all { background: var(--side-hi); }
.rail .acc .rdot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--dark); }
.rail .acc-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 600; padding: 0 4px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border: 2px solid var(--dark); pointer-events: none; }
.rail .add {
  width: 46px; height: 46px; border-radius: 50%; background: var(--side-hi); color: var(--red);
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-top: auto; flex-shrink: 0;
}
.rail .logout { color: #888; font-size: 10px; cursor: pointer; padding: 4px; }

/* 会话列表 */
.list { width: 320px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.list .lhd { padding: 14px 16px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.list .lhd .reload { margin-left: auto; font-size: 12px; color: var(--red); cursor: pointer; background: none; border: none; }
.proto-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.proto-switch button { font-size: 11px; font-weight: 500; padding: 2px 8px; border: none; background: none; color: #888; cursor: pointer; line-height: 1.6; }
.proto-switch button.on { background: var(--red); color: #fff; }
.proto-switch.big button { font-size: 14px; padding: 8px 22px; line-height: 1.4; }
.list .lhd .proto-tag { font-size: 11px; color: #999; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.list .lhd .proto-tag + .reload { margin-left: auto; }
.list .conv-scroll { flex: 1; overflow-y: auto; }
.conv { display: flex; align-items: center; gap: 11px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f6f6f6; }
.conv:hover { background: #f7f7f8; }
.conv.active { background: var(--red-soft); }
.conv > img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.conv .meta { flex: 1; min-width: 0; }
.conv .meta .top { display: flex; align-items: center; gap: 5px; }
.conv .meta .nick { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .meta .preview { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv .badge { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center; }
.conv .conv-time { font-size: 11px; color: #bbb; white-space: nowrap; line-height: 1.2; }
.tag { font-size: 10px; border-radius: 4px; padding: 0 4px; line-height: 16px; white-space: nowrap; }
.tag.acc { color: var(--red); background: var(--red-soft); }
.tag.group { color: #fff; background: #9b59b6; }
.tag.stranger { color: #fff; background: var(--warn); }
.tag.relation { color: #fff; background: var(--ok); }

/* 聊天区 */
.chat { flex: 1; display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.chat .hd { padding: 15px 20px; background: #fff; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.chat .empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; align-items: flex-start; gap: 9px; max-width: 72%; }
.msg.self { align-self: flex-end; flex-direction: row-reverse; }
.msg-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg.self .msg-col { align-items: flex-end; }
.msg-time { font-size: 11px; color: #b8b8be; padding: 0 3px; }
.msg-blocked { font-size: 11px; color: #fff; background: var(--accent); border-radius: 8px; padding: 2px 8px; align-self: flex-end; max-width: 100%; }
.msg:not(.self) .msg-blocked { align-self: flex-start; }
.msg > img { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: #ddd; object-fit: cover; }
.bub { padding: 9px 13px; border-radius: 10px; font-size: 14px; line-height: 1.5; word-break: break-word; background: #fff; white-space: pre-wrap; }
.msg.self .bub { background: var(--red); color: #fff; }
.bub.bimg { padding: 3px; }
.bub.bimg img { max-width: 200px; max-height: 220px; border-radius: 7px; display: block; }
.bub.placeholder { color: #999; font-style: italic; background: #fafafa; border: 1px dashed #ddd; }
.msg.self .bub.placeholder { color: #ffe6ec; background: var(--accent-press); border-color: #f59ab0; }
.sysmsg { align-self: center; font-size: 12px; color: #999; background: var(--line); border-radius: 10px; padding: 4px 12px; max-width: 80%; text-align: center; }

/* 输入框 */
.input { padding: 12px 16px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.input textarea { flex: 1; resize: none; border: 1px solid #e2e2e6; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; height: 42px; max-height: 120px; font-family: inherit; }
.input textarea:focus { border-color: var(--red); }
.input button { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 0 24px; font-size: 14px; cursor: pointer; }
.input button:disabled { background: #f6c2cd; cursor: not-allowed; }

/* 连接状态 */
.ws-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ws-dot.on { background: var(--ok); }
.ws-dot.off { background: #bbb; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 20; }
.modal .card { background: #fff; border-radius: 12px; width: 560px; max-height: 84vh; overflow-y: auto; padding: 22px; }
.modal .card h3 { margin-bottom: 12px; }
.modal .card textarea { width: 100%; height: 220px; border: 1px solid #e2e2e6; border-radius: 8px; padding: 10px; font-family: monospace; font-size: 12px; outline: none; }
.modal .card .hint { font-size: 12px; color: #888; margin: 8px 0; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal .actions button { padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; }
.modal .actions .cancel { background: #f0f0f2; color: #555; }
.modal .actions .ok { background: var(--red); color: #fff; }
.acc-manage { margin-top: 16px; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f2f2f2; }
.acc-row img { width: 36px; height: 36px; border-radius: 50%; background: #eee; }
.acc-row .del { margin-left: auto; color: var(--red); cursor: pointer; font-size: 13px; background: none; border: none; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 50; }

/* ---------- 头像填充修复: rail 内 Avatar 的 img/占位需撑满 .acc 圆框 ---------- */
.rail .acc img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rail .acc > div { width: 100%; height: 100%; border-radius: 50%; }
.conv > div:first-child { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.msg > div:first-child { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }

/* ---------- 系统提示(建群/入群等)居中细灰条 ---------- */
.sysmsg { align-self: center; max-width: 80%; color: #999; font-size: 12px; background: #f0f0f2; padding: 4px 12px; border-radius: 10px; }
.sysmsg.announce { display: flex; flex-direction: column; gap: 4px; text-align: left; max-width: 72%; background: #fff8ec; border: 1px solid #f5d67a; border-radius: 10px; padding: 8px 14px; color: #7a5c00; }
.sysmsg.announce .ann-title { font-weight: 600; font-size: 12px; }
.sysmsg.announce .ann-body { font-size: 12px; white-space: pre-wrap; line-height: 1.5; }
.live-card .live-tag { color: #e53935; font-size: 11px; font-weight: 500; }
.live-card .lv-ph { font-size: 32px; line-height: 1; }

/* ---------- 链接卡片 / 名片 ---------- */
.bub.card { padding: 0; overflow: hidden; max-width: 240px; background: #fff; border: 1px solid var(--line); }
.bub.card .cov { width: 100%; max-height: 130px; object-fit: cover; display: block; }
.bub.card .ct { padding: 8px 12px 2px; font-size: 14px; font-weight: 500; }
.bub.card .cd { padding: 0 12px; font-size: 12px; color: #888; }
.bub.card .cl { display: block; padding: 6px 12px 10px; font-size: 12px; color: var(--red); word-break: break-all; }
.namecard { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.namecard img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* ---------- 贴纸/大表情 ---------- */
.bub.bsticker { padding: 0; background: transparent; }
.bub.bsticker img { max-width: 120px; max-height: 120px; display: block; }

/* ---------- 视频封面 + 播放按钮 ---------- */
.vid { position: relative; display: inline-block; }
.vid img { max-width: 200px; max-height: 220px; border-radius: 7px; display: block; }
.vid .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 30px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* ============ 左侧导航菜单栏 ============ */
.navbar { width: 72px; background: var(--side); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; flex-shrink: 0; }
.navbar .nb-logo { color: var(--red); font-weight: bold; font-size: 12px; text-align: center; line-height: 1.2; margin-bottom: 14px; }
.navbar .nb-item { width: 100%; color: #9a9aa2; font-size: 12px; text-align: center; padding: 10px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; border-left: 3px solid transparent; }
.navbar .nb-item .ic { font-size: 19px; }
.navbar .nb-item:hover { color: #ddd; }
.navbar .nb-item.on { color: #fff; background: var(--side-hi); border-left-color: var(--red); }
.navbar .nb-spacer { flex: 1; }
.navbar .nb-logout { color: #777; font-size: 11px; cursor: pointer; padding: 8px 0; }
.navbar .nb-logout:hover { color: var(--red); }

/* 关系标签 */
.tag.rel { color: #fff; background: var(--ok); }

/* ============ 通用页(账号/素材) ============ */
.page { flex: 1; overflow-y: auto; padding: 26px 34px; background: #f6f6f8; }
.page h2 { font-size: 20px; margin: 0 0 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; max-width: 760px; }
.panel.wide { max-width: none; }
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap .atable { min-width: 920px; }
.table-wrap .atable td, .table-wrap .atable th { white-space: nowrap; }
.panel h3 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.panel .hint { color: #999; font-size: 12px; margin-bottom: 10px; }
.json-input { width: 100%; height: 120px; resize: vertical; border: 1px solid #e2e2e6; border-radius: 8px; padding: 10px 12px; font-size: 12px; font-family: monospace; outline: none; box-sizing: border-box; }
.json-input:focus { border-color: var(--red); }
.big-input { width: 100%; border: 1px solid #e2e2e6; border-radius: 8px; padding: 11px 12px; font-size: 14px; outline: none; box-sizing: border-box; margin: 6px 0 4px; }
.big-input:focus { border-color: var(--red); }
.ok { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 9px 22px; font-size: 14px; cursor: pointer; margin-top: 10px; }
.ok:disabled { background: #f6c2cd; cursor: not-allowed; }
.ok.mini { padding: 4px 12px; font-size: 12px; margin: 0; margin-left: auto; }
.page select { border: 1px solid #e2e2e6; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.acc-row .hl { font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: auto; }
.acc-row .hl.ok { color: var(--ok); background: #e7f9f0; }
.acc-row .hl.bad { color: #fff; background: var(--red); }
.acc-row .del { margin-left: 12px; }

/* 素材网格 */
.sticker-grid { display: flex; flex-wrap: wrap; gap: 10px; max-height: 360px; overflow-y: auto; }
.sticker-cell { width: 72px; text-align: center; }
.sticker-cell img { width: 58px; height: 58px; object-fit: contain; border-radius: 8px; background: #f3f3f5; }
.sticker-cell span { font-size: 12px; color: #555; }
.sticker-cell .cat { font-size: 10px; color: #aaa; margin-top: 2px; }

/* ============ 聊天输入工具条 ============ */
.input .tools { display: flex; gap: 4px; align-items: center; }
.input .tools button { background: transparent; color: inherit; border: none; padding: 4px; font-size: 19px; cursor: pointer; border-radius: 6px; width: auto; }
.input .tools button:hover { background: #f0f0f2; }
.input .send-btn { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 0 24px; font-size: 14px; cursor: pointer; }
.input .send-btn:disabled { background: #f6c2cd; cursor: not-allowed; }
.emoji-inline { width: 20px; height: 20px; vertical-align: -4px; margin: 0 1px; }

/* ============ 表情/贴纸选择器 ============ */
.picker { position: absolute; bottom: 74px; left: 16px; width: 360px; max-height: 280px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.16); display: flex; flex-direction: column; z-index: 20; }
.ptabs { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 4px 6px; gap: 4px; }
.ptabs button { background: none; border: none; font-size: 13px; color: #888; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.ptabs button.on { color: var(--red); background: var(--red-soft); }
.ptabs .pclose { margin-left: auto; font-size: 18px; color: #bbb; }
.pgrid { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; overflow-y: auto; }
.pitem { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; }
.pitem:hover { background: #f0f0f2; }
.pitem img { max-width: 40px; max-height: 40px; }
.pitem span { font-size: 11px; color: #666; }
.phint { color: #aaa; font-size: 12px; padding: 14px; }
.chat { position: relative; }
.hd .tag { margin-left: 6px; }

/* 上滑加载更早消息提示 */
.load-more { text-align: center; color: #aaa; font-size: 12px; padding: 8px 0; }

/* 视频时长角标 */
.vid .vdur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; }

/* 已读回执 */
.receipt { align-self: flex-end; font-size: 11px; color: #bbb; padding: 0 4px 2px; }
.receipt.read { color: var(--ok); }

/* ---------- 表单行 / 输入 ---------- */
.form-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.form-row label { font-size: 13px; color: #555; }
.ti { border: 1px solid #e2e2e6; border-radius: 7px; padding: 7px 10px; font-size: 13px; outline: none; }
.ti:focus { border-color: var(--red); }
.ti.wide { flex: 1; min-width: 240px; }
.mini-link { color: var(--red); font-size: 12px; cursor: pointer; }
.hl.warn { color: #fff; background: var(--warn); }

/* ---------- 管理后台表格 ---------- */
.atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.atable th, .atable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #f0f0f2; }
.atable th { color: #888; font-weight: 600; background: #fafafa; }
.atable .actions-cell button { font-size: 12px; margin-right: 6px; border: 1px solid #e2e2e6; background: #fff; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.atable .actions-cell button:hover { border-color: var(--red); color: var(--red); }

/* ---------- 素材选择器里的文本/视频项 ---------- */
.mat-text { width: 100%; padding: 8px 10px; border: 1px solid #eee; border-radius: 7px; margin-bottom: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-text:hover { background: #f6f6f8; border-color: var(--red); }

/* ---------- 开关 ---------- */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { display: none; }
.switch .slider { position: absolute; inset: 0; background: #ccc; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch .slider:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ---------- 统计卡片 ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-card { min-width: 92px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; text-align: center; }
.stat-card.alt { background: #fafafb; }
.stat-card .sv { font-size: 22px; font-weight: 700; }
.stat-card .sl { font-size: 12px; color: #999; margin-top: 4px; }
.stat-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card .sc-val { font-size: 22px; font-weight: 700; }
.stat-card .sc-label { font-size: 12px; color: #999; margin-top: 4px; }
.seg-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.seg-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: .12s; }
.seg-card:hover { border-color: var(--red); }
.seg-card.on { border-color: var(--red); background: #fff0f3; }
.seg-card.dis { opacity: .4; cursor: not-allowed; }
.seg-card b { color: var(--red); }
.seg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.conv-search { position: relative; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.conv-search input { width: 100%; box-sizing: border-box; border: 1px solid #e2e2e6; border-radius: 16px; padding: 7px 28px 7px 12px; font-size: 13px; outline: none; background: #f6f6f8; }
.conv-search input:focus { border-color: var(--red); background: #fff; }
.conv-search .cs-clear { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #bbb; font-size: 16px; }
.assign-filter { display: flex; gap: 6px; padding: 6px 12px 8px; border-bottom: 1px solid var(--line); }
.assign-filter button { flex: 1; border: 1px solid #e2e2e6; background: #fff; border-radius: 14px; padding: 4px 0; font-size: 12px; cursor: pointer; color: #555; }
.assign-filter button.on { background: var(--red); color: #fff; border-color: var(--red); }
.tag.seat { background: #eef4ff; color: #3b6fd4; }
.ctag { display: inline-block; color: #fff; font-size: 11px; line-height: 1; padding: 2px 6px; border-radius: 8px; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.sop-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }

/* ---------- 抖音视频选择器(我的喜欢/收藏) ---------- */
.aweme-grid { display: flex; flex-wrap: wrap; gap: 12px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.aweme-cell { width: 124px; cursor: pointer; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; transition: .12s; }
.aweme-cell:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(239,87,119,.14); transform: translateY(-1px); }
.ac-cover { position: relative; width: 100%; height: 165px; background: #f0f1f4; display: flex; align-items: center; justify-content: center; }
.ac-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-ph { font-size: 30px; }
.ac-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(20,20,40,.6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; }
.ac-desc { padding: 6px 8px; font-size: 12px; color: #444; line-height: 1.35; max-height: 50px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* 聊天里的抖音视频卡片 */
.aweme-msg { max-width: 188px; }
.aweme-msg .am-cover { position: relative; width: 100%; height: 240px; background: #f0f1f4; border-radius: 8px 8px 0 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.aweme-msg .am-cover img { width: 100%; height: 100%; object-fit: cover; }
.aweme-msg .am-cover .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 30px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.aweme-msg .am-badge { position: absolute; left: 6px; bottom: 6px; background: var(--accent); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; }
.hd-assign { margin-left: 8px; border: 1px solid #e2e2e6; border-radius: 8px; padding: 5px 8px; font-size: 12px; color: #555; }
.content-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.subtabs { display: flex; gap: 4px; padding: 10px 16px 0; background: #f6f6f8; border-bottom: 1px solid var(--line); }
.subtabs button { border: none; background: none; padding: 8px 16px; font-size: 14px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; }
.subtabs button:hover { color: var(--dark); background: #eef0f3; }
.subtabs button.on { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }

/* ---------- 采集器下载按钮 ---------- */
.dl-row { display: flex; gap: 12px; flex-wrap: wrap; }
.dl-btn { display: flex; align-items: center; gap: 12px; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; color: var(--dark); background: #fff; min-width: 240px; transition: .15s; }
.dl-btn:hover { border-color: var(--red); box-shadow: 0 4px 14px rgba(239,87,119,.14); }
.dl-btn.alt { background: #fafafb; }
.dl-btn .dl-ic { font-size: 26px; }
.dl-btn b { font-size: 14px; }
.dl-btn i { font-size: 12px; color: #999; font-style: normal; }

/* ---------- 标签 ---------- */
.tag-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #ddd; border-radius: 16px; padding: 4px 10px; font-size: 13px; background: #fff; }
.tag-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.tag-chip .cnt { font-size: 11px; color: #999; }
.tag-chip .mini { font-size: 11px; border: 1px solid #e2e2e6; background: #fafafa; border-radius: 6px; padding: 1px 6px; cursor: pointer; }
.tag-chip .mini.on { background: #fff4e5; border-color: var(--warn); color: var(--warn); }
.tag-chip .mini.del { color: #d81e44; border: none; background: none; font-size: 15px; }
.script-row { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; border-top: 1px dashed #eee; font-size: 13px; flex-wrap: wrap; }
.mat-pick { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.matchk { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; border: 1px solid #e8e8ea; border-radius: 6px; padding: 2px 7px; cursor: pointer; }
.matchk.on { background: #eafff3; border-color: var(--ok); }
.matchk input { display: none; }
/* 聊天头部标签按钮 + 弹层 */
.hd-tag { margin-left: auto; font-size: 12px; border: 1px solid #e2e2e6; background: #fff; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.tagpop { position: absolute; right: 16px; top: 52px; width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.16); z-index: 25; padding: 8px; }
.tagpop .row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tagpop .row:hover { background: #f6f6f8; }
.tagpop .dot { width: 10px; height: 10px; border-radius: 50%; }
.tagpop .row.on { font-weight: 600; }

/* ---------- 管理后台独立外壳 ---------- */
.admin-app { display: flex; flex-direction: column; height: 100%; }
.admin-top { height: 52px; background: var(--side); color: #fff; display: flex; align-items: center; padding: 0 22px; flex-shrink: 0; }
.admin-top .admin-logo { font-weight: 600; font-size: 15px; }
.admin-top .admin-actions { margin-left: auto; display: flex; gap: 18px; }
.admin-top .admin-actions span { color: #bbb; font-size: 13px; cursor: pointer; }
.admin-top .admin-actions span:hover { color: var(--red); }
.admin-app .page { flex: 1; }

/* ============================================================
   现代化润色 —— 柔和阴影 / 渐变按钮 / 悬浮微抬 / 细滚动条
   (置于文件末尾, 同名选择器覆盖前面的硬样式)
   ============================================================ */
.panel { max-width: none; border-radius: 14px; border-color: var(--line); box-shadow: var(--shadow); }
.stat-card, .seg-card, .sop-item, .tag-chip, .dl-btn { border-radius: 12px; }
.stat-card { box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.stat-card:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(28,30,50,.08); }
.auth-card { border-radius: 18px; }

/* 主按钮: 柔和渐变 + 悬浮微抬 */
.ok, .btn-primary, .input button, .input .send-btn, .modal .actions .ok, .auth-tabs button.active {
  background: linear-gradient(135deg, #f06a86 0%, var(--accent) 100%);
  box-shadow: 0 2px 8px rgba(239,87,119,.22);
  transition: transform .1s ease, box-shadow .15s ease, filter .15s ease;
}
.ok:hover:not(:disabled), .btn-primary:hover:not(:disabled),
.input button:hover:not(:disabled), .input .send-btn:hover:not(:disabled),
.modal .actions .ok:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 5px 16px rgba(239,87,119,.30); }
.ok:active, .btn-primary:active, .input button:active, .input .send-btn:active { transform: translateY(0); filter: brightness(.97); }
.ok.mini { box-shadow: none; }
.ok.mini:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(239,87,119,.22); }

/* 次级 mini 按钮(列表里的 启停/明细/刷新等)统一柔和描边风 */
.mini { border-radius: 7px; transition: .12s; }

/* 输入聚焦: 柔和外发光替代生硬变色 */
.ti:focus, .field input:focus, .json-input:focus, .big-input:focus,
.input textarea:focus, .page select:focus, .conv-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 表格表头更柔 */
.atable th { background: #f7f8fa; border-bottom-color: var(--line); }
.atable tbody tr:hover { background: #fafbfc; }

/* 弹窗/选择器阴影更柔 */
.modal .card, .picker, .tagpop { box-shadow: var(--shadow-pop); border-radius: 14px; }
.modal { background: rgba(28,30,50,.38); backdrop-filter: blur(2px); }

/* 导航选中态更圆润 */
.navbar .nb-item.on { border-radius: 0 8px 8px 0; }

/* 细滚动条(现代感) */
* { scrollbar-width: thin; scrollbar-color: #cfd2da transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d4d7df; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #bcc0ca; }
::-webkit-scrollbar-track { background: transparent; }

/* 状态高亮胶囊更柔 */
.hl.ok { color: var(--ok); background: #e8f7f0; }
.hl.bad { color: #fff; background: var(--accent); }
.hl.warn { color: #fff; background: var(--warn); }

/* 会话列表滚动分页"加载更多" */
.conv-more { text-align: center; padding: 10px; color: #9aa0ab; font-size: 12px; cursor: pointer; }
.conv-more:hover { color: var(--accent); }

/* 账号 cookie 失效标记(聊天左侧账号栏) */
.rail .acc.bad .avatar, .rail .acc.bad img { filter: grayscale(0.7) opacity(0.7); box-shadow: 0 0 0 2px var(--accent); border-radius: 50%; }
.acc-bad { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; line-height: 15px; text-align: center;
  background: var(--accent); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 700; border: 1.5px solid #fff; }
.acc-warn { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; line-height: 15px; text-align: center;
  background: var(--warn, #f5a623); color: #fff; border-radius: 50%; font-size: 10px; font-weight: 700; border: 1.5px solid #fff; }
.hl.warn { color: #fff; background: var(--warn, #f5a623); }
.rail .acc { position: relative; }

/* 多选胶囊(批量私信: 选账号/素材) */
.chk-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #e2e2e6;
  border-radius: 14px; background: #fafafb; font-size: 13px; cursor: pointer; user-select: none; transition: .12s; max-width: 240px; }
.chk-pill:hover { border-color: #d0d0d6; }
.chk-pill.on { background: #fff0f4; border-color: var(--accent); color: var(--accent); }
.chk-pill input { margin: 0; }
