:root {
  --red: #8F0F22;
  --red-2: #B01B32;
  --red-deep: #6E0B1A;
  --red-soft: #F9EDEF;
  --bg: #F4F2EE;
  --panel: #FFFFFF;
  --ink: #23262B;
  --ink-2: #4A4E55;
  --muted: #8A8F97;
  --line: #E7E1D9;
  --line-2: #DCD4CA;
  --cream: #FBF7F2;
  --green: #1F7A4D;
  --green-soft: #EAF6EF;
  --orange: #A86412;
  --orange-soft: #FCF3E3;
  --purple: #6B4BA3;
  --purple-soft: #F1ECFA;
  --blue: #2B5C9A;
  --blue-soft: #EAF1FA;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* 登录 */
.login-page {
  min-height: 100vh;
  background: #1B1113;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 18px;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(176, 27, 50, .55), transparent 60%),
    radial-gradient(700px 500px at 88% 92%, rgba(110, 11, 26, .7), transparent 62%),
    linear-gradient(135deg, #2A1116, #180E10 65%);
}
.login-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .35;
}
.login-shell { position: relative; z-index: 1; width: 100%; max-width: 400px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: #fff; }
.login-brand .brand-mark { width: 44px; height: 44px; font-size: 23px; }
.login-brand strong { font-size: 17px; display: block; letter-spacing: .5px; }
.login-brand p { margin: 2px 0 0; font-size: 11.5px; color: rgba(255,255,255,.55); }
.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow: 0 30px 70px rgba(0,0,0,.42);
}
.login-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; }
.login-sub { margin: 0 0 20px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn.block { width: 100%; margin-top: 8px; height: 42px; }
.login-back { display: inline-block; margin-top: 18px; color: #9A8F86; font-size: 12.5px; }
.login-back:hover { color: var(--red); }
.login-foot { margin: 18px 0 0; text-align: center; color: rgba(255,255,255,.4); font-size: 11.5px; }

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(145deg, #C21E3A, #7A0A1B);
  color: #fff; font-weight: 700; font-size: 21px;
  box-shadow: 0 6px 14px rgba(143, 15, 34, .28);
  flex: 0 0 auto;
}

/* 布局 */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, #2A1519 0%, #201214 100%);
  color: #D8CFD1;
  overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand .brand-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 9px; box-shadow: none; }
.side-brand strong { display: block; color: #fff; font-size: 14px; letter-spacing: .4px; }
.side-brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.4); font-size: 10.5px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: #C9BEC1;
  font-size: 13.5px;
  text-align: left;
  transition: .16s;
}
.side-link svg { width: 18px; height: 18px; fill: currentColor; opacity: .7; flex: 0 0 auto; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.is-active { background: rgba(176,27,50,.28); color: #fff; box-shadow: inset 3px 0 0 #D32C48; }
.side-link.is-active svg { opacity: 1; }
.side-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 2px; }
.logout-form { margin: 0; }
.logout-form .side-link { color: #B7A9AC; }

.admin-main { flex: 1; min-width: 0; padding: 0 30px 40px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin: 0 -30px 20px;
  padding: 22px 30px 15px;
  background: rgba(244, 242, 238, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: .3px; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-link { color: #7E746B; font-size: 12.5px; }
.topbar-link:hover { color: var(--red); }
.admin-chip { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #6B625A; font-size: 11.5px; }
.admin-content { max-width: 1380px; }

/* 通用 */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 3px 12px rgba(70, 45, 30, .025); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.panel-head h2 { margin: 0; font-size: 15.5px; letter-spacing: .2px; }
.panel-sub { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.panel-head-wrap { align-items: center; }
.panel > .panel-head:first-child { margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 16px;
  border-radius: 9px; border: 1px solid transparent;
  font-size: 13px; line-height: 1; white-space: nowrap;
  transition: .16s;
}
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 10px rgba(143,15,34,.16); }
.btn.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.ghost { background: #fff; border-color: var(--line-2); color: #5F574F; }
.btn.ghost:hover { border-color: #C9A6AC; color: var(--red); }
.btn.tiny { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn.block { width: 100%; }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--red); font-size: 12.5px; }
.link-btn.danger, .row-actions .danger, .danger-text { color: #B3261E; }
.link-more { color: var(--red); font-size: 12.5px; }

.alert { padding: 12px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; }
.alert-error { background: #FDF1F0; border: 1px solid #F2C9C5; color: #8F2A22; }
.alert-success { background: var(--green-soft); border: 1px solid #BCDFCA; color: #17633E; }
.error-list { margin: 8px 0 0; padding-left: 18px; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px; background: #F1EDE7; color: #77706A; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-gray { background: #F1EDE7; color: #77706A; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { color: #5B544D; font-size: 12.5px; font-weight: 500; }
.field > span em { color: #C0392B; font-style: normal; }
.field > span small { color: var(--muted); font-weight: 400; margin-left: 5px; }
.field input[type="text"], .field input[type="url"], .field input[type="password"], .field input[type="number"],
.field input[type="datetime-local"], .field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: #FEFDFB; color: var(--ink);
  outline: 0; transition: .16s;
}
.field textarea { resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #C58C97; box-shadow: 0 0 0 3px rgba(143,15,34,.07); background: #fff; }
.field input[type="color"] { width: 64px; height: 38px; padding: 3px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.input-title { font-size: 17px !important; font-weight: 600; padding: 11px 13px !important; }
.code-textarea { font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.field-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 0; min-width: 140px; }
.field-row > .field.grow-2 { flex: 2 1 240px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; color: #5B544D; font-size: 13px; margin: 2px 0 6px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--red); }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* 概览 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.stat-card { position: relative; overflow: hidden; padding: 17px 18px 15px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -34px; top: -34px; border-radius: 50%; background: var(--tone-soft, #F6F0EA); }
.tone-red { --tone: #8F0F22; --tone-soft: #F9EDEF; }
.tone-orange { --tone: #A86412; --tone-soft: #FCF3E3; }
.tone-green { --tone: #1F7A4D; --tone-soft: #EAF6EF; }
.tone-blue { --tone: #2B5C9A; --tone-soft: #EAF1FA; }
.stat-label { display: block; color: var(--muted); font-size: 11.5px; }
.stat-value { display: block; margin: 5px 0 3px; font-size: 27px; font-weight: 700; letter-spacing: .3px; color: var(--tone); font-variant-numeric: tabular-nums; }
.stat-sub { color: #938A81; font-size: 11px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.dash-side { min-width: 0; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #FCFAF7; transition: .16s; }
.quick-item:hover { border-color: #D8B7BC; background: #fff; transform: translateY(-1px); }
.quick-item strong { font-size: 13px; color: #3A3632; }
.quick-item span { color: var(--muted); font-size: 10.5px; }
.status-line { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 12.5px; color: #5C554E; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-green { background: #27A566; box-shadow: 0 0 0 4px rgba(39,165,102,.12); }
.dot-gray { background: #B9B1A8; box-shadow: 0 0 0 4px rgba(150,140,130,.1); }
.last-log { margin-top: 13px; padding: 10px 12px; border-radius: 9px; background: #FBF8F5; border: 1px solid var(--line); }
.last-log.ok { background: #F5FBF7; border-color: #D7ECDF; }
.last-log.bad { background: #FDF4F3; border-color: #F0D2CE; }
.last-log strong { font-size: 11.5px; }
.last-log span { float: right; color: var(--muted); font-size: 10.5px; }
.last-log p { margin: 4px 0 0; color: #6C655E; font-size: 11.5px; line-height: 1.6; word-break: break-all; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: #938A81; font-size: 11px; font-weight: 500; text-align: left; white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid #F1ECE5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FDFBF8; }
.table-title { display: block; max-width: 440px; color: #2E3136; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-title:hover { color: var(--red); }
.table-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #A49B92; font-size: 10.5px; }
.table-empty { padding: 36px 14px !important; color: var(--muted); text-align: center !important; }
.cat-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--cat); vertical-align: 1px; }
.cat-text { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cat-text i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.row-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row-actions a, .row-actions button { border: 0; background: transparent; padding: 0; color: #7B6E62; font-size: 12px; white-space: nowrap; }
.row-actions a:hover, .row-actions button:hover { color: var(--red); }
.row-actions .danger:hover { color: #B3261E; }
.inline-form { display: inline; margin: 0; }
.th-actions { text-align: right; }
.row-actions { justify-content: flex-end; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 12px; margin-bottom: 12px; background: #FAF7F2; border: 1px solid var(--line); border-radius: 10px; }
.filter-bar input[type="search"], .filter-bar select { height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; font-size: 12.5px; }
.filter-bar input[type="search"] { flex: 1; min-width: 180px; }
.filter-reset { color: #8B7F73; font-size: 12px; }
.filter-reset:hover { color: var(--red); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 18px 0 2px; }
.pager a, .pager span { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; color: #5F574F; }
.pager .is-current { background: var(--red); border-color: var(--red); color: #fff; }
.pager .is-disabled { color: #C5BDB4; background: #F8F5F1; }

/* 编辑页 */
.edit-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.back-link { color: #8B7F73; font-size: 12px; }
.back-link:hover { color: var(--red); }
.edit-head h2 { margin: 6px 0 0; font-size: 20px; }
.edit-meta { display: flex; align-items: center; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.edit-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.edit-main, .edit-side { min-width: 0; }
.edit-side .panel { padding: 17px 18px; }
.edit-side .field:last-child { margin-bottom: 4px; }

.editor-shell { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.editor-toolbar { border-bottom: 1px solid var(--line); background: #FCFAF7; }
.editor-container { height: 560px; overflow: hidden; }
.editor-container .w-e-text-container { height: 100% !important; background: #fff; }
.editor-container .w-e-text-placeholder { font-style: normal; color: #B3AAA1; }
.editor-container .w-e-scroll { min-height: 100%; }
.editor-fallback { margin-top: 10px; }
.editor-fallback textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 9px; padding: 12px; }
.upload-actions { display: flex; gap: 8px; }

.attach-editor-list { display: flex; flex-direction: column; border: 1px dashed #E3D8CB; border-radius: 10px; padding: 4px 12px; background: #FDFBF8; }
.attach-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #F2EBE2; }
.attach-row:last-child { border-bottom: 0; }
.attach-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.attach-name strong { font-size: 12.5px; font-weight: 550; color: #3B3733; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-name small { color: var(--muted); font-size: 10.5px; }
.attach-empty { margin: 14px 0; text-align: center; color: #A79E95; font-size: 12px; }
.file-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 7px; background: var(--file, #6B7280); color: #fff; font-size: 9.5px; font-weight: 700; flex: 0 0 auto; letter-spacing: .2px; }

.cover-preview { position: relative; width: 100%; aspect-ratio: 2.35 / 1; border-radius: 10px; border: 1px dashed #DDD2C4; background: #FBF7F2; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cover-preview.has-image { border-style: solid; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-empty { text-align: center; color: #A79A8C; }
.cover-empty strong { display: block; color: #8B7A68; font-size: 12.5px; }
.cover-empty span { font-size: 10.5px; }
.cover-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }

.qr-mini { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.edit-side .qr-mini { flex-direction: column; gap: 10px; }
.edit-side .qr-mini > img, .edit-side .qr-placeholder { width: 128px; height: 128px; }
.qr-mini > img, .qr-placeholder { width: 112px; height: 112px; border-radius: 8px; border: 1px solid var(--line); background: #fff; object-fit: contain; flex: 0 0 auto; }
.qr-placeholder { display: flex; align-items: center; justify-content: center; color: #B0A69B; font-size: 11px; background: #FAF7F2; border-style: dashed; }
.qr-mini-info { flex: 1; min-width: 0; }
.mini-label { display: block; color: var(--muted); font-size: 10.5px; margin-bottom: 5px; }
.copy-line { display: flex; gap: 6px; }
.copy-line input { flex: 1; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: #6C635A; font-size: 11px; }
.stack-actions { display: flex; flex-direction: column; gap: 8px; }
.mini-logs { margin-top: 13px; border-top: 1px solid #F2ECE4; padding-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.mini-log { display: grid; grid-template-columns: auto auto 1fr; gap: 6px; align-items: baseline; font-size: 10.5px; }
.mini-log span { font-weight: 600; }
.mini-log.ok span { color: var(--green); }
.mini-log.bad span { color: #B3261E; }
.mini-log time { color: #A9A096; }
.mini-log p { grid-column: 1 / -1; margin: 0; color: #8C837A; line-height: 1.5; word-break: break-all; }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; position: sticky; bottom: 10px; z-index: 15; box-shadow: 0 10px 26px rgba(70,45,30,.09); }
.form-actions-left, .form-actions-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.delete-form { margin: 18px 0 0; text-align: right; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.meta-list { margin: 0; }
.meta-list > div { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid #F2ECE4; font-size: 12.5px; }
.meta-list > div:last-child { border-bottom: 0; }
.meta-list dt { width: 80px; flex: 0 0 auto; color: var(--muted); }
.meta-list dd { margin: 0; color: #3B3733; }

.info-box { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #FBF7F2; border: 1px solid #EEE4D6; color: #6C635A; font-size: 11.5px; line-height: 1.75; }
.info-box strong { color: #4A443D; }
.info-box ol { margin: 7px 0 0; padding-left: 18px; }
.info-box code { background: #F2E9DC; padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 10.5px; }
.color-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 弹窗 */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20,16,15,.56); backdrop-filter: blur(3px); }
.modal-box { width: min(900px, 96vw); max-height: 90vh; background: #fff; border-radius: 14px; padding: 18px 20px 16px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: #9A9087; }
.modal-box textarea { width: 100%; flex: 1; min-height: 320px; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* 公众号排版预览 */
.wechat-preview-panel .wx-phone { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid #EAE3DA; border-radius: 12px; padding: 26px 22px; box-shadow: 0 10px 30px rgba(80,50,30,.06); }
.wx-preview { font-size: 16px; line-height: 1.85; color: #3f3f3f; word-break: break-word; }
.wx-title { margin: 0 0 6px; font-size: 23px; line-height: 1.45; color: #1F2226; }
.wx-meta { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid #F0EAE2; color: #9E948A; font-size: 11.5px; }
.wx-preview img { max-width: 100%; height: auto; }
.wx-origin { margin-top: 24px; padding-top: 12px; border-top: 1px dashed #EEE7DE; color: #9A9087; font-size: 11px; word-break: break-all; }
.wx-origin a { color: #8F0F22; }
.wx-note { max-width: 720px; margin: 0 auto 16px; padding: 10px 13px; border-radius: 8px; background: #FFFBF0; border: 1px solid #F0E3C1; color: #8A6C2A; font-size: 11.5px; line-height: 1.7; }

/* 响应式 */
@media (max-width: 1100px) {
  .edit-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; padding: 10px 12px; flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; }
  .side-brand { padding: 0 10px 0 2px; margin: 0; border: 0; flex: 0 0 auto; }
  .side-brand strong { font-size: 12px; }
  .side-brand small { display: none; }
  .side-brand .brand-mark { width: 32px; height: 32px; font-size: 16px; }
  .side-nav { flex-direction: row; gap: 2px; flex: 0 0 auto; }
  .side-link { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .side-link svg { width: 15px; height: 15px; }
  .side-link.is-active { box-shadow: inset 0 -3px 0 #D32C48; }
  .side-bottom { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; gap: 2px; }
  .admin-main { padding: 0 16px 30px; }
  .topbar { margin: 0 -16px 16px; padding: 15px 16px 12px; }
  .topbar p { display: none; }
  .edit-grid, .two-col { grid-template-columns: 1fr; }
  .edit-head { flex-direction: column; align-items: flex-start; }
  .editor-container { height: 460px; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-value { font-size: 23px; }
  .panel { padding: 15px 14px; border-radius: 12px; }
  .topbar h1 { font-size: 18px; }
  .topbar-right .topbar-link { display: none; }
  .field-row { gap: 0; }
  .field-row > .field { flex: 1 1 100%; }
  .form-actions { position: static; flex-direction: column; align-items: stretch; }
  .form-actions-left, .form-actions-right { justify-content: flex-end; }
  .form-actions-right .btn { flex: 1; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .table-title { max-width: 220px; }
  .editor-container { height: 420px; }
  .login-card { padding: 24px 20px; }
  .wechat-preview-panel .wx-phone { padding: 18px 15px; }
}

.copy-inline { border: 0; background: none; padding: 0; color: var(--red); font-size: 11px; cursor: pointer; }
.copy-inline:hover { text-decoration: underline; }

.qr-own-field[hidden] { display: none !important; }

/* 海报工具弹窗 */
.modal-open { overflow: hidden; }
.poster-modal-box { width: min(1080px, 96vw); }
.poster-tool { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; min-height: 0; }
.poster-tool-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.poster-tool-form .field { margin: 0; }
.poster-tool-form textarea { width: 100%; min-height: 96px; max-height: 180px; flex: none; resize: vertical; }
.poster-tool-preview { display: flex; align-items: center; justify-content: center; min-height: 520px; padding: 12px; background: #F7F2EC; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.poster-tool-preview img { display: block; max-width: 100%; max-height: 70vh; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.poster-tool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
@media (max-width: 760px) {
  .poster-modal-box { max-height: 92vh; overflow: auto; }
  .poster-tool { grid-template-columns: 1fr; }
  .poster-tool-preview { min-height: 320px; }
  .poster-tool-preview img { max-height: 54vh; }
}

/* 多公众号发布 */
.poster-accounts { padding: 10px 12px; background: #FAF8F4; border: 1px solid var(--line); border-radius: 9px; }
.poster-accounts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 600; color: #2B2622; }
.poster-accounts-head small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.poster-account-all { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.poster-account-list { display: flex; flex-direction: column; gap: 6px; max-height: 148px; overflow: auto; margin-top: 8px; }
.poster-account-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #4C4640; cursor: pointer; }
.poster-account-item em { padding: 0 5px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-style: normal; font-size: 10px; line-height: 1.6; }
.check-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4C4640; }

/* 海报配色 */
.poster-style-field { display: flex; flex-direction: column; gap: 7px; }
.poster-style-label { font-size: 12px; color: var(--muted); }
.poster-style-list { display: flex; flex-wrap: wrap; gap: 7px; }
.poster-style-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; font-size: 11.5px; color: #4C4640; }
.poster-style-item:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.poster-style-item i { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg, var(--sw-top), var(--sw-bottom)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.poster-style-item input { margin: 0; }
