/* fatie 发帖助手 · 设计系统（bnsbot 风格：琥珀金 + 深色） */
:root {
  --bg: #f6f6f7; --bg2: #ffffff; --fg: #1a1b1e; --muted: #71717a; --line: #e4e4e7;
  --amber: #f0b90b; --amber-d: #d9a806; --gold: #c9a227;
  --ok: #16a34a; --danger: #dc2626; --warn: #d97706; --info: #2563eb;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.05);
  --side-w: 218px;
}
html.dark { --bg: #0a0b0d; --bg2: #131417; --fg: #e7e7ea; --muted: #a8a8b1; --line: #26272b; --shadow: 0 1px 3px rgba(0,0,0,.4); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.65 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.muted { color: var(--muted); } .mini { font-size: 12px; color: var(--muted); } .mini12 { font-size: 12px; }
.strong { font-weight: 600; }
.mt6 { margin-top: 6px; } .mb6 { margin-bottom: 6px; } .mt10 { margin-top: 10px; } .mt16 { margin-top: 16px; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .wrap { flex-wrap: wrap; }
.num { color: var(--amber-d); font-weight: 600; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--fg); border-radius: 10px; padding: 8px 14px; font-size: 14px; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--amber); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #111; font-weight: 600; }
.btn.primary:hover { background: var(--amber-d); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(220,38,38,.35); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 卡片 */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.tight { padding: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-t { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bar-l { width: 4px; height: 14px; background: var(--amber); border-radius: 2px; display: inline-block; }
.goldline { border-top: 2px solid var(--gold); }

/* 输入 */
.input, textarea.input, select.input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; }
.input:focus { border-color: var(--amber); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* 标签/徽章 */
.tag { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.tag.gold { color: var(--gold); border-color: rgba(201,162,39,.5); }
.tag.ok { color: var(--ok); border-color: rgba(22,163,74,.4); }
.tag.err { color: var(--danger); border-color: rgba(220,38,38,.4); }
.tag.amber { color: var(--amber-d); border-color: rgba(240,185,11,.5); }

/* 分段/开关 */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--bg2); color: var(--fg); box-shadow: var(--shadow); font-weight: 600; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--line); cursor: pointer; transition: .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch.on { background: var(--amber); }
.switch.on::after { left: 20px; }
input[type="checkbox"].sw { display: none; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--bg); }

/* 聊天气泡（创作者台） */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 16px; }
.qa { display: flex; gap: 8px; }
.qa.me { flex-direction: row-reverse; }
.ava { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--amber); color: #111; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ava.me { background: var(--line); color: var(--fg); }
.bub { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; max-width: 82%; white-space: pre-wrap; word-break: break-word; }
.bub.me { background: var(--amber); border-color: var(--amber); color: #111; }
.qround { display: block; font-size: 11px; color: var(--amber-d); margin-bottom: 2px; font-weight: 600; }
.ext { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; max-width: 82%; }
.optwrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--bg2); color: var(--fg); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--amber); border-color: var(--amber); color: #111; font-weight: 600; }

/* Toast */
.toast-host { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.fa-toast { background: #18181b; color: #fafafa; padding: 9px 16px; border-radius: 10px; font-size: 13px; opacity: 0; transform: translateY(-6px); transition: .25s; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: 80vw; }
.fa-toast.show { opacity: 1; transform: none; }
.fa-toast.err { background: #7f1d1d; }

/* 落地页 */
.hero { max-width: 1080px; margin: 0 auto; padding: 48px 20px 32px; text-align: center; }
.hero h1 { font-size: 34px; font-weight: 800; }
.hero .sub { color: var(--muted); font-size: 16px; margin-top: 10px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero .cta { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge-amber { display: inline-block; background: rgba(240,185,11,.14); color: var(--amber-d); border: 1px solid rgba(240,185,11,.4); border-radius: 999px; padding: 3px 12px; font-size: 12px; margin-bottom: 14px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 1080px; margin: 0 auto 40px; padding: 0 20px; }
.feat { text-align: left; }
.feat i.ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(240,185,11,.15); display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 8px; }
.feat h3 { font-size: 15px; margin-bottom: 4px; }
.feat p { font-size: 13px; color: var(--muted); margin: 0; }
.section-title { text-align: center; font-size: 22px; font-weight: 700; margin: 34px 0 16px; }

/* 控制台布局 */
.shell { display: flex; min-height: 100dvh; }
.sidebar { width: var(--side-w); background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; bottom: 0; left: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; padding: 6px 10px 14px; }
.brand i { width: 26px; height: 26px; background: var(--amber); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #111; font-style: normal; font-size: 13px; font-weight: 800; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.nav-item:hover { color: var(--fg); background: var(--bg); }
.nav-item.on { background: rgba(240,185,11,.13); color: var(--amber-d); font-weight: 600; border-color: rgba(240,185,11,.3); }
.main { flex: 1; margin-left: var(--side-w); padding: 20px 26px 60px; max-width: 1080px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-sub { font-size: 13px; color: var(--muted); }
.pgchip { margin-left: auto; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 8px 20px; margin: 0 -26px 18px; }
.bell-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

/* 进度段 */
.seg-progress { display: flex; gap: 4px; }
.seg-progress i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.seg-progress i.on { background: var(--amber); }
.seg-progress i.now { background: var(--amber-d); }

/* 弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal h3 { margin-bottom: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-card .v { font-size: 24px; font-weight: 800; }
.stat-card .k { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 16px; color: var(--fg); font-weight: 600; margin-bottom: 6px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); background: var(--bg2); }
.kv { font-size: 13px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 8px; background: var(--bg); }
.notice { border: 1px solid rgba(240,185,11,.45); background: rgba(240,185,11,.08); color: var(--fg); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.notice.err { border-color: rgba(220,38,38,.4); background: rgba(220,38,38,.07); }
@media (max-width: 860px) {
  .sidebar { width: 60px; padding: 10px 6px; }
  .sidebar .nav-item span, .brand span { display: none; }
  .main { margin-left: 60px; padding: 14px 12px 60px; }
  .topbar { margin: 0 -12px 14px; padding: 8px 12px; }
}
