/* EngAI Bot 二级页公共样式（bot.html / channel.html / scene.html 共用） */
:root {
  --bg: #0a0c0f;
  --panel: #12151b;
  --panel2: #171a21;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --text: #e7e9ee;
  --muted: #8b909c;
  --red: #C8102E;
  --ok: #26c281;
  --warn: #e8a33d;
  --r: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

.top {
  display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 26px;
  border-bottom: 1px solid var(--line); background: rgba(10, 12, 15, .85);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.logo i { width: 26px; height: 26px; border-radius: 8px; display: block;
  background: radial-gradient(circle at 30% 30%, #ff4b63, var(--red) 60%, #6d0b1c);
  box-shadow: 0 0 18px rgba(200, 16, 46, .45); }
.logo span { color: var(--red); }
.vsep { width: 1px; height: 18px; background: var(--line2); }
.top .muted { color: var(--muted); font-size: 13px; }
.grow { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--line2); background: transparent;
  cursor: pointer; font-size: 13px; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #e0153a; border-color: #e0153a; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 26px 26px 80px; }
.wrap.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }

.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 4px; font-size: 15.5px; }
.card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.card.pad0 { padding: 0; overflow: hidden; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 14px; }
.kpi b { display: block; font-size: 22px; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.inp, .ta, .sel {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: #0d1014; outline: none; transition: .16s;
}
.inp:focus, .ta:focus, .sel:focus { border-color: rgba(200, 16, 46, .6); box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
.ta { min-height: 84px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.red { color: #ffcdd6; border-color: rgba(200, 16, 46, .5); background: rgba(200, 16, 46, .12); }
.tag.green { color: #b7f0d6; border-color: rgba(38, 194, 129, .4); background: rgba(38, 194, 129, .1); }
.tag.warn { color: #ffdca8; border-color: rgba(232, 163, 61, .45); background: rgba(232, 163, 61, .12); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.hero { position: relative; height: 250px; background: #08090c; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.hero .lbl { position: absolute; left: 14px; bottom: 12px; font-size: 12px; letter-spacing: 1px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.hero .dot { position: absolute; right: 14px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero .dot.off { background: #555b66; box-shadow: none; }

.body { padding: 18px; }
.nm { font-size: 17px; font-weight: 700; }
.hd { color: var(--muted); font-size: 12px; margin-top: 2px; }
.dsc { color: var(--muted); font-size: 12.5px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }

.list { display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--panel2); padding: 12px 14px; }
.li .t1 { font-weight: 600; font-size: 13px; }
.li .t2 { color: var(--muted); font-size: 12px; margin-top: 2px; }
.li .r { color: var(--muted); font-size: 12px; text-align: right; }
.li.link { cursor: pointer; }
.li.link:hover { background: #1c2028; }

.links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.linkcard {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel2);
  padding: 14px; cursor: pointer; transition: .16s;
}
.linkcard:hover { border-color: rgba(200, 16, 46, .55); transform: translateY(-1px); }
.linkcard .ic { font-size: 18px; }
.linkcard .t { font-weight: 700; margin-top: 6px; font-size: 13px; }
.linkcard .d { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.chat-log { display: grid; gap: 8px; max-height: 320px; overflow: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: var(--panel2); border: 1px solid var(--line); }
.msg.me { margin-left: auto; background: rgba(200, 16, 46, .13); border-color: rgba(200, 16, 46, .35); }
.msg .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer .inp { flex: 1; }

.qr { display: grid; place-items: center; padding: 18px; background: #0d1014; border: 1px solid var(--line); border-radius: 12px; }
.qr img { width: 200px; height: 200px; image-rendering: pixelated; background: #fff; border-radius: 8px; }
.qr .st { color: var(--muted); font-size: 12px; margin-top: 10px; text-align: center; }

.empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  padding: 11px 20px; border-radius: 10px; background: #171a21; border: 1px solid var(--red);
  font-size: 13px; z-index: 120; box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
}

.sc-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.sc-cat { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 13px; cursor: pointer; }
.sc-cat.on { color: var(--text); border-color: rgba(200, 16, 46, .55); background: rgba(200, 16, 46, .1); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); cursor: pointer; transition: .16s; }
.bcard:hover { border-color: rgba(200, 16, 46, .5); transform: translateY(-2px); }
.bcard .im { height: 160px; background: #08090c; }
.bcard .im img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.bcard .bd { padding: 13px; }
.bcard .bn { font-weight: 700; }
.bcard .bs { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

@media (max-width: 1020px) {
  .wrap.split { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .links { grid-template-columns: 1fr; }
}
