/* TG 运营后台 —— 浅色主题（参照模版） */
* { box-sizing: border-box; margin: 0; }
:root {
  --teal: #0e5f56; --teal-dark: #0a4c44; --teal-light: #17766a;
  --fg: #1c2b2a; --dim: #8ca39f; --line: #e5ebea; --bg: #f5f7f8;
  --blue: #3b82f6; --red: #ef5350; --green: #22ab7c; --orange: #f59e0b;
}
[v-cloak] { display: none; }
body { font: 14px/1.5 -apple-system, "PingFang SC", "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }

/* ---------- 品牌 ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: #fff; }
.logo-sq { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: rgba(255,255,255,.55); font-size: 11px; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.card { background: #fff; border-radius: 14px; padding: 26px; box-shadow: 0 6px 24px rgba(15,60,55,.10); }
.login { width: 320px; display: flex; flex-direction: column; gap: 12px; color: var(--fg); }
.login .brand { color: var(--fg); padding: 0 0 8px; }
.login .logo-sq { background: var(--teal); color: #fff; }
.login input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.login button { padding: 10px; border: 0; border-radius: 8px; background: var(--teal); color: #fff; font-size: 14px; cursor: pointer; }
.err { color: #d64541; font-size: 12px; }

/* ---------- 侧栏 ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 210px; background: var(--teal); overflow-y: auto; }
.side nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: rgba(255,255,255,.82); text-decoration: none; font-size: 14px; }
.side nav a:hover { background: rgba(255,255,255,.08); }
.side nav a.on { background: rgba(255,255,255,.16); color: #fff; }
.side .ic { width: 18px; text-align: center; }
.cnt { margin-left: auto; font-style: normal; font-size: 11px; background: rgba(255,255,255,.18);
  padding: 1px 7px; border-radius: 9px; }

/* ---------- 主区 ---------- */
main { margin-left: 210px; min-height: 100vh; }
.topbar { background: #fff; padding: 18px 26px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid var(--line); }
.topbar h2 { font-size: 20px; }
.sub { color: var(--dim); font-size: 12px; margin-top: 2px; }
.topright { display: flex; align-items: center; gap: 10px; }
.wrap { padding: 22px 26px 40px; }

.pill { border: 1px solid #f0c34c; border-radius: 20px; padding: 6px 12px; background: #fff; font-size: 13px; }
.sel { appearance: auto; outline: none; cursor: pointer; }
.userchip { display: inline-flex; align-items: center; gap: 8px; border-color: var(--line); }
.userchip .ava { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.out { color: var(--dim); font-size: 12px; text-decoration: none; margin-left: 4px; }
.out:hover { color: var(--red); }

.bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.seg button { border: 0; background: #fff; padding: 6px 16px; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--teal); color: #fff; }
.ghost { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 14px;
  font-size: 13px; cursor: pointer; }
.ghost:hover { border-color: var(--teal); color: var(--teal); }
.dim { color: var(--dim); font-size: 12px; }
.hint { color: var(--dim); font-size: 12px; }

/* ---------- 统计卡 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.scard { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(15,60,55,.06);
  border-top: 3px solid transparent; }
.scard h4 { font-size: 12px; color: var(--dim); font-weight: 500; }
.scard b { display: block; font-size: 26px; margin: 6px 0 2px; }
.scard i { font-style: normal; font-size: 11px; color: var(--dim); }
.scard.blue { border-top-color: var(--blue); }
.scard.red { border-top-color: var(--red); }
.scard.green { border-top-color: var(--green); }
.scard.orange { border-top-color: var(--orange); }

.panel { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(15,60,55,.06); }
.panel h3 { font-size: 14px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 表格 ---------- */
table.lt { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(15,60,55,.06); }
.lt th { text-align: left; font-size: 12px; color: var(--dim); font-weight: 500;
  padding: 10px 12px; background: #fafbfb; border-bottom: 1px solid var(--line); }
.lt td { padding: 9px 12px; border-bottom: 1px solid #f2f5f5; font-size: 13px; vertical-align: top; }
.lt tr:last-child td { border-bottom: 0; }
.lt tbody tr[onclick], .lt tbody tr:hover { background: #f7fafa; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.trunc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: rgba(59,130,246,.12); color: var(--blue); font-size: 12px; white-space: nowrap; }
.badge.chan { background: rgba(14,95,86,.12); color: var(--teal); margin-right: 6px; }

.cfgt { margin-bottom: 12px; }
.cfg { width: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--fg); font: 12px ui-monospace, Menlo, Consolas, monospace; }
.save-btn { border: 0; background: var(--teal); color: #fff; border-radius: 8px; padding: 9px 18px;
  font-size: 13px; cursor: pointer; }
.save-btn:hover { background: var(--teal-dark); }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(10,30,28,.35); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal { width: min(680px, 92vw); max-height: 80vh; overflow: auto; }
.modal h3 { font-size: 14px; margin-bottom: 12px; }
.modal pre { background: #f7fafa; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; font-size: 12px; overflow: auto; margin-bottom: 12px; }
.modal button { border: 0; background: var(--teal); color: #fff; border-radius: 8px; padding: 7px 16px; cursor: pointer; }
