* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6fb; color: #1f2733; font-size: 14px; }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid #d6dbe5; border-radius: 6px; width: 100%; background: #fff; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #4c7dff; }
button { background: #4c7dff; color: #fff; border: none; padding: 9px 16px;
  border-radius: 6px; font-size: 14px; }
button:hover { background: #3a6af0; }
button.ghost { background: #eef1f8; color: #334; }
button.ghost:hover { background: #e2e7f3; }
button.danger { background: #e35454; }
button.danger:hover { background: #cf4545; }

/* 登录 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 340px; background: #fff; border-radius: 12px; padding: 28px;
  box-shadow: 0 10px 40px rgba(40,60,120,.12); }
.auth-card h1 { font-size: 18px; text-align: center; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab { flex: 1; background: #eef1f8; color: #556; border-radius: 6px; padding: 8px; }
.tab.active { background: #4c7dff; color: #fff; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.hint { font-size: 12px; color: #8a93a6; }
.msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
.msg.err { color: #d6453d; }
.msg.ok { color: #2e9e5b; }

/* 布局 */
.topbar { height: 52px; background: #1f2733; color: #fff; display: flex;
  align-items: center; justify-content: space-between; padding: 0 18px; }
.brand { font-weight: 600; }
.user-box { display: flex; align-items: center; gap: 12px; }
.user-box button { background: #3a4456; padding: 6px 12px; }
.layout { display: flex; min-height: calc(100vh - 52px); }
.sidebar { width: 180px; background: #fff; border-right: 1px solid #e6eaf2; padding: 14px 10px; }
.nav-btn { display: block; width: 100%; text-align: left; background: transparent; color: #445;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; }
.nav-btn.active { background: #eaf0ff; color: #2d5bff; font-weight: 600; }
.content { flex: 1; padding: 20px; overflow: auto; }

/* 卡片/列表 */
.panel { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(40,60,120,.05); }
.panel h2 { font-size: 15px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12px; color: #6b7488; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
table { width: 100%; border-collapse: collapse; margin-top: 6px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef1f6; font-size: 13px; }
th { color: #6b7488; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.svc { background: #e6f0ff; color: #2d5bff; }
.tag.sub { background: #fff0e6; color: #d9722d; }
.tag.ok { background: #e6f7ec; color: #2e9e5b; }
.tag.no { background: #fdeaea; color: #d6453d; }
.empty { color: #9aa3b5; padding: 18px 0; text-align: center; }

/* 编辑器 */
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor .preview { border: 1px solid #e6eaf2; border-radius: 8px; background: #fff; min-height: 320px; }
.editor .preview iframe { width: 100%; height: 320px; border: none; border-radius: 8px; }
.cover-prev { width: 120px; height: 78px; object-fit: cover; border-radius: 6px; border: 1px solid #e6eaf2; margin-top: 6px; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.modal { position: fixed; inset: 0; background: rgba(20,28,45,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #fff; border-radius: 12px; padding: 22px; width: 420px; max-width: 92vw; }
.modal-box h3 { margin-bottom: 14px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1f2733; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 99; }

/* 筛选条 / 小按钮 / 提示 */
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters span { color: #6b7488; font-size: 13px; }
.filters select { width: auto; min-width: 150px; }
button.ghost.sm { padding: 5px 10px; font-size: 12px; }
.hint.err { color: #d6453d; }
.muted { color: #9aa3b5; }

/* 批量推送勾选 */
.chk-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px;
  max-height: 280px; overflow: auto; padding: 4px; border: 1px solid #eef1f6; border-radius: 8px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334; cursor: pointer; }
.chk input[type="checkbox"] { width: auto; }
.tag.sm { font-size: 11px; padding: 1px 6px; }

/* AI 多版本选择卡片 */
.variant { border: 1px solid #e6eaf2; border-radius: 10px; padding: 12px 14px; margin: 8px 0;
  cursor: pointer; transition: all .12s; }
.variant:hover { border-color: #4c7dff; background: #f7faff; box-shadow: 0 2px 10px rgba(76,125,255,.1); }
.variant-h { font-weight: 600; margin-bottom: 6px; color: #1f2733; }
.variant-b { color: #6b7488; font-size: 13px; line-height: 1.6; }
.variant .cover-prev { display: block; }
