/* 美业图文中台 · 管理后台 */
:root {
  --brand: #6E4432; --brand-dark: #4E2B23; --brand-bg: #F6EFE7;
  --ink: #2B2F38; --muted: #8A8F99; --line: #E8EAEE;
  --bg: #F4F5F7; --card: #fff;
  --ok: #34A853; --warn: #F5A524; --bad: #E5484D; --blue: #4C7DE0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif; color: var(--ink); background: var(--bg); }

#app { display: flex; min-height: 100vh; }

/* ===== 左侧导航 ===== */
.side {
  width: 216px; flex-shrink: 0; background: #2A2D35; color: #C9CDD6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; border-bottom: 1px solid #3A3E48; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.logo-name { color: #fff; font-weight: 600; font-size: 14.5px; }
.logo-sub { font-size: 11px; color: #7C818C; }
#nav { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-group { font-size: 11px; color: #6C7078; padding: 12px 10px 4px; letter-spacing: 1px; }
.nav-more { cursor: pointer; user-select: none; color: #9AA0AA; border-top: 1px solid #343843; margin-top: 8px; }
.nav-more:hover { color: #fff; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13.5px; margin-bottom: 2px; transition: background .15s;
}
.nav-item:hover { background: #343843; }
.nav-item.on { background: var(--brand); color: #fff; }
.nav-item .ni { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.side-foot { padding: 12px 16px; border-top: 1px solid #3A3E48; font-size: 11.5px; color: #7C818C; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.ok { background: var(--ok); } .dot.busy { background: var(--warn); }

/* ===== 主区 ===== */
#main { flex: 1; padding: 22px 26px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { font-size: 20px; }
.page-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.head-actions { display: flex; gap: 8px; }

/* ===== 通用组件 ===== */
.card { background: var(--card); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(20,25,35,.05); margin-bottom: 16px; }
.card h3 { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .hint { font-size: 12px; color: var(--muted); font-weight: 400; }

.btn {
  border: none; border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer;
  background: var(--brand); color: #fff; transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #F3C6C8; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge { display: inline-block; font-size: 11.5px; border-radius: 20px; padding: 1px 10px; }
.badge.ok { background: #E6F4EA; color: var(--ok); }
.badge.warn { background: #FDF3E1; color: #B26A00; }
.badge.bad { background: #FCE9EA; color: var(--bad); }
.badge.mut { background: #F0F1F4; color: var(--muted); }
.badge.brand { background: var(--brand-bg); color: var(--brand-dark); }
.badge.blue { background: #E9F0FC; color: var(--blue); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #F2F3F6; font-size: 13px; vertical-align: middle; }
tr:hover td { background: #FAFBFC; }
td .ops { display: flex; gap: 6px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select, .filters input {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #fff; color: var(--ink);
}

.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #F0F1F4; }

/* 看板 */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(20,25,35,.05); }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
.kpi .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.kpi .d { font-size: 11.5px; margin-top: 2px; }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--bad); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #F0F1F4; font-size: 13px; }
.feed-item:last-child { border-bottom: none; }
.feed-item .t { color: var(--muted); font-size: 12px; flex-shrink: 0; width: 46px; }
.feed-item .amt { color: var(--brand-dark); font-weight: 600; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,24,32,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: min(620px, 92vw); max-height: 86vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-head .x { border: none; background: none; font-size: 15px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-row.wide { grid-template-columns: 1fr; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px;
  font-family: inherit; background: #fff; color: var(--ink);
}
.field textarea { min-height: 88px; resize: vertical; }
.field .desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* toast */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #2A2D35; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13.5px; z-index: 99; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 80vw;
}
.hidden { display: none !important; }

/* 每日一图 */
.daily-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash-grid, .daily-grid { grid-template-columns: 1fr; } }
.cover-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cover-preview img { width: 100%; display: block; }
.cover-preview .cpt { padding: 8px 10px; font-size: 12.5px; color: var(--muted); background: #FAFBFC; }

/* 权限矩阵 */
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-yes { color: var(--ok); font-weight: 600; }
.perm-empty { color: #D4D7DD; }

/* 同步中心 */
.sync-stat { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.sync-chip { background: var(--brand-bg); color: var(--brand-dark); border-radius: 20px; padding: 4px 14px; font-size: 12.5px; }
.note { background: #FDF9F0; border: 1px solid #F1E3BF; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #7A5D19; margin: 12px 0; }
.note b { color: #5E470F; }
.okline { color: var(--ok); font-weight: 600; }

/* ===== 1109 新增 ===== */
/* 上传图片选择框 */
.imgbox { display: flex; flex-direction: column; gap: 6px; width: 180px; }
.imgbox img { width: 180px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #F0F1F4; }
.imgempty { width: 180px; height: 100px; border: 1px dashed #D4D7DD; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; background: #FAFBFC; }
.imgops { display: flex; gap: 6px; }
.checkline { display: flex; gap: 14px; padding: 8px 0; }
.checkline .ck { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }

/* 设计后台 */
.daily-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.strip-cell { position: relative; width: 108px; }
.strip-cell img { width: 108px; height: 144px; object-fit: cover; border-radius: 8px; background: #F0F1F4; }
.strip-cell .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(20,24,32,.55); color: #fff; cursor: pointer; font-size: 11px; }
.strip-cell .cap { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #F0F1F4; font-size: 13px; }
.sch-row:last-child { border-bottom: none; }
.sect-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sect-tab { padding: 5px 12px; border-radius: 20px; font-size: 12.5px; background: #F0F1F4; color: var(--ink); cursor: pointer; }
.sect-tab.on { background: var(--brand); color: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 12px; }
.lib-cell { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #FAFBFC; }
.lib-cell img { width: 100%; height: 150px; object-fit: cover; display: block; background: #F0F1F4; }
.lib-cell.off img { opacity: .4; }
.lib-cell .tag { position: absolute; top: 6px; left: 6px; }
.lib-off { position: absolute; inset: 0 0 auto; top: 120px; text-align: center; color: var(--bad); font-size: 12px; font-weight: 600; }
.lib-cell .meta { padding: 8px 10px; }
.lib-cell .meta b { font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-cell .meta .sub { font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.lib-cell .ops { display: flex; flex-wrap: wrap; gap: 4px; }
.lib-cell .ops .btn { padding: 2px 7px; font-size: 11px; }

/* 换图后台（原型 23 样式） */
.media-wrap { max-width: 720px; margin: 0 auto; }
.media-pills { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.media-pills::-webkit-scrollbar { display: none; }
.media-cover img { display: block; }
.media-bar {
  position: fixed; left: 216px; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; background: #fff;
  padding: 10px 14px; box-shadow: 0 -2px 12px rgba(31,35,41,.06);
}
.media-bar span { font-size: 11px; cursor: pointer; margin-left: 16px; color: #6B7280; }
.media-bar span:first-child { margin-left: 0; color: #9AA0AB; }
.media-bar button {
  margin-left: auto; border: none; padding: 8px 20px; border-radius: 999px;
  background: linear-gradient(135deg, #E8C97C, #C8A24A);
  font-size: 12px; font-weight: 700; color: #2C2416; cursor: pointer;
}
@media (max-width: 900px) { .media-bar { left: 0; } }

/* 课程详情图 */
.detail-list { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-cell { position: relative; }
.detail-cell img { width: 90px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #F0F1F4; }
.detail-cell .x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(20,24,32,.55); color: #fff; cursor: pointer; font-size: 10px; }

/* 轮播编辑（图 + 文并排） */
.banner-edit { display: flex; gap: 16px; }

/* 专家团 */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.expert-cell { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.avatar-row { display: flex; gap: 10px; align-items: flex-start; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #F0F1F4; flex-shrink: 0; }
.qa-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #F0F1F4; }
.qa-row .field { flex: 1; }
.qa-row:last-child { border-bottom: none; }

/* 分润比例 */
.rate-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px dashed #F0F1F4; }
.rate-row:last-of-type { border-bottom: none; }
.rate-row .rl { width: 210px; font-size: 13.5px; flex-shrink: 0; }
.rate-row input[type="range"] { flex: 1; accent-color: var(--brand); }
.rate-row .rv { width: 56px; text-align: right; font-size: 17px; font-weight: 700; color: var(--brand-dark); }
.rate-row .rd { width: 74px; font-size: 11.5px; color: var(--muted); flex-shrink: 0; }


/* ===== 261110 · 手机电脑自适应 ===== */
/* 移动端顶栏与抽屉（桌面隐藏） */
.mtop {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: #2A2D35; color: #fff; align-items: center; gap: 10px; padding: 10px 14px;
}
.mtop .burger { border: none; background: none; color: #fff; font-size: 20px; cursor: pointer; padding: 2px 6px; }
.mtop .mtop-name { font-weight: 600; font-size: 15px; flex: 1; }
.mtop .logo-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.mtop-sync { display: flex; align-items: center; }
.mask { display: none; position: fixed; inset: 0; background: rgba(20,24,32,.45); z-index: 45; }

@media (max-width: 900px) {
  .mtop { display: flex; }
  #app { padding-top: 48px; }                       /* 给固定顶栏让位 */
  .side {
    position: fixed; z-index: 50; top: 0; left: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: none; width: 240px;
  }
  .side.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .mask.show { display: block; }
  #main { padding: 14px 12px 60px; }
  .page-head { flex-wrap: wrap; gap: 8px; }
  .page-head h1 { font-size: 17px; }
  .head-actions { flex-wrap: wrap; }
  /* 表格窄屏横滚（不裁列，可滑动看全） */
  .card > table, .card > div > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .form-row { grid-template-columns: 1fr; }
  .slot-body { flex-direction: column; }
  .banner-edit { flex-direction: column; }
  .rate-row { flex-wrap: wrap; }
  .rate-row .rl { width: 100%; }
  .dash-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
  .modal { width: 96vw; max-height: 90vh; }
  .thumb { width: 36px; height: 36px; }
}
@media (max-width: 900px) and (min-width: 601px) {
  .slot-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .slot-fields { grid-template-columns: 1fr; }
  .kpi { padding: 10px 12px; }
  .kpi .v { font-size: 18px; }
  .card { padding: 14px 12px; }
}

/* ===== 261117 节气提示词屏 ===== */
.tbl th { text-align: left; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line, #eee); font-size: 13px; vertical-align: top; }
.solar-season { margin: 18px 0 10px; }
.solar-term .solar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.solar-term .solar-head b { font-size: 15px; }
.solar-term .solar-head .btn { margin-left: auto; }
.solar-term .solar-head .btn + .btn { margin-left: 0; }
.solar-p { background: #FAF7F2; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.solar-p-k { font-size: 13px; font-weight: 600; color: var(--brand-dark, #4E2B23); }
.solar-p-c { font-size: 12.5px; color: var(--muted, #888); margin: 3px 0; }
.solar-p-t { font-size: 12.5px; white-space: pre-wrap; line-height: 1.6; }
.solar-base { background: #FAF7F2; border-radius: 8px; padding: 10px; margin: 8px 0; font-size: 13px; line-height: 1.7; }
