* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f5fa; color: #1f2333; font-size: 14px; }
.hidden { display: none !important; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; position: relative; }
.login-box { background: #fff; padding: 40px; border-radius: 16px; width: 360px; box-shadow: 0 8px 32px rgba(31,35,51,.08); }
.login-box h1 { font-size: 20px; }
.login-box .login-title { font-size: 20px; text-align: center; margin: 0; }
.login-box .login-title + .login-title { margin-top: 6px; margin-bottom: 24px; }
.login-sub { display: none; }
.login-box input { width: 100%; padding: 12px 14px; border: 1px solid #d9dbe8; border-radius: 10px; margin-bottom: 14px; font-size: 14px; outline: none; }
.login-box input:focus { border-color: #4f46e5; }
.err { color: #e5484d; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* 底部备案号 */
.beian-foot {
  position: absolute; bottom: 24px; left: 0; right: 0; text-align: center;
  font-size: 12px; color: #8a8fa3; line-height: 1.8;
}
.beian-foot p { margin: 0; }
.beian-foot a { color: #8a8fa3; text-decoration: none; }
.beian-foot a:hover { color: #4f46e5; }
.beian-main { position: static; padding: 20px 0; background: #f4f5fa; }

/* 布局 */
header { display: flex; justify-content: space-between; align-items: center; background: #4f46e5; color: #fff; padding: 14px 24px; }
.logo { font-weight: 600; }
nav { background: #fff; padding: 0 24px; display: flex; gap: 8px; box-shadow: 0 2px 8px rgba(31,35,51,.04); }
.tab { border: none; background: none; padding: 14px 18px; font-size: 14px; color: #5a5f75; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 600; }
main { padding: 24px; max-width: 1100px; margin: 0 auto; }

/* 组件 */
.btn { background: #4f46e5; color: #fff; border: none; border-radius: 10px; padding: 12px; width: 100%; font-size: 15px; cursor: pointer; }
.btn:hover { background: #4338ca; }
.btn-outline { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: 6px 16px; cursor: pointer; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(31,35,51,.05); }
.stat-card .k { color: #8a8fa3; font-size: 13px; }
.stat-card .v { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-card .v.warn { color: #e5484d; }
.panel { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(31,35,51,.05); margin-bottom: 24px; }
.panel h3 { font-size: 15px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #f0f1f7; font-size: 13px; word-break: break-all; }
th { color: #8a8fa3; font-weight: 500; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: #4f46e5; }
.progress { background: #f0f1f7; border-radius: 8px; height: 14px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg,#6366f1,#4f46e5); }
.progress > div.full { background: #e5484d; }
.stats-total td { background: #f5f6fa; font-weight: 600; color: #3a3f55; border-top: 2px solid #4f46e5; }
.pager { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.pager button { border: 1px solid #d9dbe8; background: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }
.filter { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filter input, .filter select { border: 1px solid #d9dbe8; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.form-row label { width: 200px; color: #5a5f75; }
.form-row input { border: 1px solid #d9dbe8; border-radius: 8px; padding: 8px 12px; width: 160px; }
.form-row .hint { color: #8a8fa3; font-size: 12px; }
.save-btn { width: auto; padding: 10px 32px; }
.msg { color: #0e9f6e; font-size: 13px; margin-left: 12px; }
td .clip { max-width: 320px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.hint { color: #8a8fa3; font-size: 12px; }

/* 首页公告编辑器 */
.notice-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; background: #f7f8fc; border-radius: 8px; padding: 10px 12px; }
.notice-row .n-text { flex: 1; min-width: 280px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 8px 12px; }
.notice-row .n-check { white-space: nowrap; font-size: 13px; color: #5a5f75; display: flex; align-items: center; gap: 4px; }
.notice-row .n-start, .notice-row .n-end { width: 140px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 7px 10px; }
.notice-row .n-sep { color: #8a8fa3; font-size: 12px; }
.notice-row .btn-del { background: #fdecec; color: #e5484d; border: none; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.notice-row .btn-del:hover { background: #fbdcdc; }

/* 行内小按钮 */
.mini-btn { background: #4f46e5; color: #fff; border: none; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.mini-btn:hover { background: #4338ca; }
.mini-btn.gray { background: #8a8fa3; }
.mini-btn.gray:hover { background: #6b7089; }

/* 商品类型小标签 */
.tag { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; line-height: 18px; white-space: nowrap; }

/* 模板编辑 */
.tpl-field { margin: 14px 0; }
.tpl-field label { display: block; color: #5a5f75; font-size: 13px; margin-bottom: 6px; }
.tpl-field textarea { width: 100%; border: 1px solid #d9dbe8; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-family: Consolas, "Courier New", monospace; line-height: 1.6; outline: none; resize: vertical; }
.tpl-field textarea:focus { border-color: #4f46e5; }

/* 反馈卡片 */
.fb-card { border: 1px solid #eceef5; border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.fb-head { display: flex; justify-content: space-between; font-size: 13px; color: #5a5f75; }
.fb-head .replied { color: #0e9f6e; }
.fb-head .pending { color: #e5484d; }
.fb-content { margin: 10px 0 6px; font-size: 14px; white-space: pre-wrap; word-break: break-all; }
.fb-time { color: #8a8fa3; font-size: 12px; margin-bottom: 10px; }
.fb-reply { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fb-reply textarea { width: 100%; border: 1px solid #d9dbe8; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; resize: vertical; }
.fb-reply textarea:focus { border-color: #4f46e5; }

/* 题材/文风 编辑器 */
.gs-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.gs-text { flex: 1 1 140px; min-width: 100px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 6px 10px; font-size: 13px; outline: none; }
.gs-text:focus { border-color: #4f46e5; }
.tpl-sel { flex: 1 1 220px; min-width: 160px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 6px 8px; font-size: 13px; outline: none; background: #fff; }
.tpl-sel:focus { border-color: #4f46e5; }
.gs-del { background: #fee2e2; color: #b91c1c; border: none; padding: 4px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
