:root {
  --red: #C62828; --red-dark: #A01F1F; --gold: #D4AF37;
  --bg: #F6F1E7; --panel: #FFFFFF; --line: #E8E0D2;
  --text: #3d372f; --text2: #7a6f63;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 修复：display:flex/grid 会覆盖 hidden 属性的默认 display:none，统一强制隐藏 */
[hidden] { display: none !important; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 18px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--red) 0%, var(--gold) 160%); color: #fff; }
.btn-ghost { background: #fff; color: var(--red-dark); border: 1px solid var(--red); }
.btn-danger { background: #fff; color: #b3261e; border: 1px solid #d9a0a0; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 登录 */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; background: var(--panel); border-radius: 14px; padding: 36px; box-shadow: 0 10px 40px rgba(120, 60, 30, .12); }
.login-card h1 { font-size: 20px; color: var(--red-dark); }
.login-sub { color: var(--text2); margin: 8px 0 20px; font-size: 12px; }
.login-card label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text2); }
.login-card input { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.login-err { color: #b3261e; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* 布局 */
.app-view { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #2b2118; color: #d8cfc2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { padding: 20px 18px; font-weight: 600; color: var(--gold); border-bottom: 1px solid #443627; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-group { padding: 10px 18px 4px; font-size: 11px; color: #8d7f6d; }
.nav-item { display: block; width: 100%; text-align: left; padding: 9px 18px; background: none; border: none; color: #d8cfc2; cursor: pointer; font-size: 13px; }
.nav-item:hover { background: #3a2d20; }
.nav-item.active { background: var(--red); color: #fff; }
.nav-badge { float: right; background: var(--gold); color: #4a3800; font-size: 11px; border-radius: 8px; padding: 0 6px; }
.side-foot { padding: 14px 18px; border-top: 1px solid #443627; }
.main { flex: 1; min-width: 0; }
.view { padding: 24px; max-width: 1200px; }

/* 列表 */
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.view-head h2 { font-size: 18px; color: var(--red-dark); flex: 1; }
.view-note { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.search-input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; width: 240px; background: #fff; }
.table-wrap { background: var(--panel); border-radius: 12px; overflow: auto; box-shadow: 0 2px 10px rgba(120,60,30,.06); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { background: #faf6ee; color: var(--text2); font-weight: 500; white-space: nowrap; }
td .cell-clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td img.thumb { width: 44px; height: 32px; object-fit: cover; border-radius: 4px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 12px; background: #f3e9d5; color: #8a6a12; }
.tag-red { background: #f9e3e3; color: var(--red-dark); }
.tag-orange { background: #fdecd7; color: #a3610c; }
.tag-green { background: #e2f2e5; color: #2e7d3b; }
.empty-tip { padding: 40px; text-align: center; color: var(--text2); }

/* 弹窗表单 */
.modal-mask { position: fixed; inset: 0; background: rgba(30,20,10,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: 640px; max-height: 86vh; background: #fff; border-radius: 12px; display: flex; flex-direction: column; }
.modal-head { padding: 14px 20px; font-weight: 600; color: var(--red-dark); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text2); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-item { display: flex; flex-direction: column; }
.form-item.wide { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.form-item input[type=text], .form-item input[type=date], .form-item input[type=number],
.form-item select, .form-item textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; }
.form-item textarea { min-height: 64px; resize: vertical; }
.form-item input[type=checkbox] { width: 16px; height: 16px; }
.form-item .img-preview { margin-top: 4px; width: 80px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
fieldset.sub { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; grid-column: 1 / -1; }
fieldset.sub legend { font-size: 12px; color: var(--text2); padding: 0 6px; }
.hint { font-size: 11px; color: var(--text2); }

/* 其他视图 */
.panel { background: var(--panel); border-radius: 12px; padding: 20px; box-shadow: 0 2px 10px rgba(120,60,30,.06); margin-bottom: 16px; }
.panel h3 { font-size: 15px; color: var(--red-dark); margin-bottom: 12px; }
.panel textarea { width: 100%; min-height: 160px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-family: monospace; font-size: 12px; }
.panel .row { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.form-col .form-item { margin-bottom: 14px; }
.sync-result { margin-top: 12px; padding: 10px; background: #f0f7ee; border-radius: 8px; color: #2e5c2a; font-size: 12px; white-space: pre-wrap; }
.sync-result.err { background: #f9e9e9; color: #8c2020; }

/* 资讯服务综合页子版块 Tab（通知公告/行业资讯/喜庆文化/活动预约） */
.hub-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.hub-tab { padding: 7px 18px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--text2); }
.hub-tab:hover { border-color: var(--red); color: var(--red-dark); }
.hub-tab.is-on { background: var(--red); border-color: var(--red); color: #fff; }

/* 入会指引（入会条件 / 入会流程 / 会员权益 三合一页面）：纯文字排版 */
.guide-section { background: var(--panel); border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(120,60,30,.06); margin-bottom: 16px; }
.guide-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.guide-section__title { font-size: 15px; color: var(--red-dark); }
.guide-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; }
.guide-row + .guide-row { border-top: 1px dashed var(--line); }
.guide-row__text { flex: 1; min-width: 0; }
.guide-row__title { font-size: 13px; font-weight: 600; margin: 0; }
.guide-row__desc { font-size: 12px; color: var(--text2); line-height: 1.7; margin: 4px 0 0; white-space: pre-wrap; }
.guide-row__line { font-size: 13px; line-height: 1.8; margin: 0; white-space: pre-wrap; }
.guide-row__ops { display: flex; gap: 6px; flex: none; }
.guide-empty { font-size: 12px; color: var(--text2); margin: 6px 0; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(40,30,20,.92); color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 13px; z-index: 99; }

/* TIERS 结构化编辑器 */
.tiers-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.tiers-table th, .tiers-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tiers-table th { background: #faf6ee; color: var(--text2); font-weight: 500; text-align: left; }
.tiers-table input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }

/* 多选字段（行业细分）：复选框组胶囊样式 */
.multiselect { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.multiselect__item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text2); cursor: pointer; user-select: none; background: #fff; }
.multiselect__item.is-on { background: #fdf3e3; border-color: #d4af37; color: #8a6a12; font-weight: 600; }
.multiselect__item input { margin: 0; accent-color: #d4af37; }
.multiselect__empty { color: #999; font-size: 12px; }

/* 风采集图片列表：缩略图 + 删除角标 */
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gallery-thumbs__empty { color: #999; font-size: 12px; }
.gallery-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #faf6ee; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.is-broken { border-style: dashed; background: #f0ebe2; }
.gallery-thumb__del { position: absolute; top: 0; right: 0; width: 18px; height: 18px; line-height: 16px; text-align: center; background: rgba(160,40,30,.85); color: #fff; border-radius: 0 0 0 8px; cursor: pointer; font-size: 13px; user-select: none; }
.gallery-thumb__del:hover { background: rgba(160,40,30,1); }

/* 批量新增弹窗 */
.batch-tip { font-size: 12px; color: #8a6a12; line-height: 1.7; margin-bottom: 8px; }
.batch-lines { width: 100%; min-height: 180px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-family: monospace; font-size: 13px; line-height: 1.7; }
.batch-result { margin-top: 10px; max-height: 180px; overflow: auto; font-size: 12px; }
.batch-ok { color: #2e5c2a; font-weight: 600; margin-bottom: 6px; }
.batch-list { color: #444; line-height: 1.8; }
.batch-fail { color: #8c2020; font-weight: 600; margin: 8px 0 4px; }
.batch-fail-item { color: #8c2020; line-height: 1.8; }

/* 图文正文编辑器（喜庆文化） */
.body-editor { display: flex; flex-direction: column; gap: 10px; }
.body-editor__empty { color: #999; font-size: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.body-block { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fffdf8; }
.body-block.is-img { background: #faf6ee; }
.body-block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.body-block__tag { font-size: 12px; color: #8a6a12; font-weight: 600; }
.body-block__ops { display: flex; gap: 6px; }
.body-block__op { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: var(--text2); }
.body-block__op:hover { border-color: #d4af37; color: #8a6a12; }
.body-block__text { width: 100%; min-height: 60px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.7; box-sizing: border-box; }
.body-block__imgrow { display: flex; align-items: center; gap: 10px; }
.body-block__thumb { width: 72px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.body-block__url { font-size: 11px; color: #999; word-break: break-all; flex: 1; }
.body-editor__ops { margin-top: 4px; }

/* 图文编辑器增强：拖拽/对齐/宽度 */
.body-editor__tip { font-size: 11px; color: #999; line-height: 1.6; margin-bottom: 4px; }
.body-block__drag { cursor: grab; color: #b8ab93; font-size: 14px; margin-right: 6px; user-select: none; padding: 0 2px; }
.body-block__drag:active { cursor: grabbing; }
.body-block__tools { display: flex; gap: 6px; margin-bottom: 6px; }
.body-block__tool { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 10px; font-size: 12px; cursor: pointer; color: var(--text2); }
.body-block__tool.is-on { background: #fdf3e3; border-color: #d4af37; color: #8a6a12; font-weight: 600; }
.body-block.drag-over { border-color: #d4af37; background: #fdf3e3; }

/* 实体表格：多选标签单元格（行业细分等）——列内换行，不再横向撑爆表格 */
.tags-cell { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; max-width: 100%; }

/* 实体表格：固定布局——th 的 width 严格生效，行首缩进/长内容按列宽换行或省略 */
.entity-table { table-layout: fixed; width: 100%; }
.entity-table .cell-clip { max-width: 100%; } /* 覆盖通用 260px：fixed 下跟随列宽省略 */
