/* ==========================================================================
   小吃培训网 管理后台样式（浅色主题）
   ========================================================================== */
* { box-sizing: border-box; }
body.adm {
  margin: 0; background: #f2f4f7; color: #1f2329;
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
a { text-decoration: none; color: inherit; }
img { border: 0; max-width: 100%; }

.adm-layout { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.adm-side { width: 216px; flex: none; background: #101828; color: #cbd5e1; display: flex; flex-direction: column; }
.adm-logo { height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-logo img { height: 30px; }
.adm-logo b { color: #fff; font-size: 15px; letter-spacing: .5px; }
.adm-logo small { display: block; font-size: 11px; color: #7b899c; font-weight: normal; }
.adm-nav { flex: 1; overflow-y: auto; padding: 8px 0 24px; }
.adm-nav-group { padding: 12px 16px 6px; font-size: 11px; color: #5d6b7f; letter-spacing: 1px; }
.adm-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 16px; font-size: 13.5px; color: #cbd5e1; border-left: 3px solid transparent; }
.adm-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.adm-nav a.on { background: rgba(56,140,255,.14); color: #fff; border-left-color: #388cff; font-weight: 600; }
.adm-nav a i { font-style: normal; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; background: rgba(255,255,255,.08); font-size: 11px; flex: none; }
.adm-nav a.on i { background: #388cff; }
.adm-nav a em { margin-left: auto; font-style: normal; font-size: 11px; background: #ef4444; color: #fff; border-radius: 9px; padding: 0 6px; line-height: 16px; }

/* ---------- 主区域 ---------- */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top { height: 62px; background: #fff; border-bottom: 1px solid #e7eaef; display: flex; align-items: center; padding: 0 22px; gap: 14px; position: sticky; top: 0; z-index: 20; }
.adm-top h1 { font-size: 17px; font-weight: 600; margin: 0; }
.adm-top .crumb { font-size: 12px; color: #98a2b3; }
.adm-top .spacer { flex: 1; }
.adm-top .who { font-size: 13px; color: #475467; }
.btn-mini { display: inline-block; height: 30px; line-height: 28px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 13px; color: #344054; background: #fff; cursor: pointer; }
.btn-mini:hover { border-color: #388cff; color: #388cff; }
.btn-primary { background: #388cff; border-color: #388cff; color: #fff; }
.btn-primary:hover { background: #2670e0; border-color: #2670e0; color: #fff; }
.btn-danger { background: #fff; border-color: #f04438; color: #f04438; }
.btn-danger:hover { background: #f04438; color: #fff; }
.adm-content { padding: 20px 22px 40px; flex: 1; }

/* ---------- 卡片 / 提示 ---------- */
.card { background: #fff; border: 1px solid #e7eaef; border-radius: 10px; margin-bottom: 16px; }
.card-hd { height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #eef1f5; }
.card-hd h2 { font-size: 15px; font-weight: 600; margin: 0; }
.card-hd .desc { font-size: 12px; color: #98a2b3; }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 16px; }
.card-bd.p0 { padding: 0; }

.flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.flash.ok { background: #ecfdf3; border: 1px solid #a6f4c5; color: #027a48; }
.flash.err { background: #fef3f2; border: 1px solid #fda29b; color: #b42318; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid #e7eaef; border-radius: 10px; padding: 16px; }
.stat .lb { font-size: 12.5px; color: #667085; margin-bottom: 8px; }
.stat .vl { font-size: 26px; font-weight: 700; color: #101828; line-height: 1.1; }
.stat .sub { font-size: 12px; color: #98a2b3; margin-top: 6px; }
.stat.blue .vl { color: #388cff; }
.stat.orange .vl { color: #f79009; }
.stat.green .vl { color: #12b76a; }
.stat.red .vl { color: #f04438; }

/* ---------- 表格 ---------- */
.tb-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tb th, table.tb td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
table.tb th { background: #f9fafb; color: #667085; font-weight: 500; font-size: 12.5px; white-space: nowrap; position: sticky; top: 0; }
table.tb tr:hover td { background: #fcfdff; }
table.tb td { word-break: break-word; overflow-wrap: anywhere; }
table.tb td.bold { font-weight: 600; color: #101828; }
table.tb td.code { font-family: Consolas, Monaco, monospace; font-size: 12.5px; color: #667085; }
table.tb td.wrap { white-space: normal; max-width: 320px; }
table.tb .thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid #eef1f5; display: block; }
.tag { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 8px; border-radius: 9px; }
.tag.on { background: #ecfdf3; color: #027a48; }
.tag.off { background: #f2f4f7; color: #98a2b3; }
.tag.hot { background: #fff4ed; color: #c4320a; }
.tag.warn { background: #fffaeb; color: #b54708; }
.acts a { color: #388cff; margin-right: 10px; font-size: 13px; white-space: nowrap; }
.acts button { background: none; border: 0; color: #f04438; cursor: pointer; font-size: 13px; padding: 0; }
.tb-empty { text-align: center; color: #98a2b3; padding: 40px 0; }

/* ---------- 分页 ---------- */
.pager { padding: 14px 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid #eef1f5; }
.pager a, .pager span { display: inline-block; min-width: 32px; height: 32px; line-height: 30px; padding: 0 9px; text-align: center; border: 1px solid #e1e6ec; border-radius: 6px; font-size: 13px; color: #475467; background: #fff; }
.pager a:hover { border-color: #388cff; color: #388cff; }
.pager span.cur { background: #388cff; border-color: #388cff; color: #fff; }
.pager .info { margin-left: auto; font-size: 12.5px; color: #98a2b3; }

/* ---------- 表单 ---------- */
.form-group { border-bottom: 1px dashed #eef1f5; padding: 6px 0 14px; margin-bottom: 14px; }
.form-group:last-child { border-bottom: 0; }
.form-group > h3 { font-size: 13.5px; color: #101828; margin: 0 0 12px; padding-left: 9px; border-left: 3px solid #388cff; }
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.f-item { display: flex; flex-direction: column; }
.f-item.wide { grid-column: 1 / -1; }
.f-item label { font-size: 13px; color: #344054; margin-bottom: 6px; font-weight: 500; }
.f-item .hint { font-size: 12px; color: #98a2b3; margin-top: 5px; }
.f-item input[type=text], .f-item input[type=number], .f-item input[type=password], .f-item select, .f-item textarea {
  width: 100%; height: 38px; border: 1px solid #d0d5dd; border-radius: 7px; padding: 0 11px; font-size: 13.5px; color: #101828; background: #fff; font-family: inherit;
}
.f-item textarea { height: auto; min-height: 92px; line-height: 1.6; padding: 9px 11px; resize: vertical; }
.f-item textarea.rt { min-height: 200px; font-family: Consolas, Monaco, monospace; font-size: 12.5px; }
.f-item input:focus, .f-item select:focus, .f-item textarea:focus { border-color: #388cff; outline: 0; box-shadow: 0 0 0 3px rgba(56,140,255,.12); }
.f-item .img-cell { display: flex; gap: 10px; align-items: flex-start; }
.f-item .img-cell img { width: 120px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid #e7eaef; background: #f9fafb; }
.f-item .img-cell .ops { display: flex; flex-direction: column; gap: 6px; }
.f-item .img-cell input[type=text] { height: 34px; font-size: 12.5px; }
/* 图集（images）字段：textarea 在上、上传按钮与缩略图预览在下 */
.f-item .img-cell.imgs-cell { flex-direction: column; }
.f-item .img-cell.imgs-cell textarea { width: 100%; font-size: 12.5px; line-height: 1.7; }
.f-item .img-cell.imgs-cell .ops { flex-direction: row; align-items: center; }
.f-item .img-cell.imgs-cell .imgs-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.f-item .img-cell.imgs-cell .imgs-preview img { width: 96px; height: 64px; }
.form-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e7eaef; padding: 12px 16px; display: flex; gap: 10px; border-radius: 0 0 10px 10px; }
.btn { height: 38px; line-height: 36px; padding: 0 20px; border-radius: 7px; border: 1px solid #d0d5dd; background: #fff; color: #344054; font-size: 14px; cursor: pointer; }
.btn:hover { border-color: #388cff; color: #388cff; }
.btn.primary { background: #388cff; border-color: #388cff; color: #fff; }
.btn.primary:hover { background: #2670e0; color: #fff; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #eef1f5; background: #fcfdff; }
.toolbar input[type=text], .toolbar select { height: 34px; border: 1px solid #d0d5dd; border-radius: 7px; padding: 0 10px; font-size: 13px; }
.toolbar input[type=text] { width: 220px; }
.toolbar .spacer { flex: 1; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef4ff, #f7fafc 60%, #eefaf5); }
.login-box { width: 380px; background: #fff; border-radius: 14px; padding: 34px 34px 28px; box-shadow: 0 18px 50px rgba(16,24,40,.1); }
.login-box .brand { text-align: center; margin-bottom: 22px; }
.login-box .brand img { height: 46px; }
.login-box h1 { font-size: 19px; text-align: center; margin: 0 0 4px; }
.login-box .sub { text-align: center; font-size: 13px; color: #98a2b3; margin-bottom: 22px; }
.login-box .f-item { margin-bottom: 14px; }
.login-box .btn.primary { width: 100%; }

/* ---------- 其它 ---------- */
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.mini-list li { list-style: none; padding: 9px 0; border-bottom: 1px dashed #eef1f5; font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list li .vv { color: #98a2b3; font-size: 12.5px; }
ul.plain { padding-left: 0; margin: 0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12.5px; padding: 3px 10px; border-radius: 12px; background: #f2f4f7; color: #475467; }
.chip.on { background: #388cff; color: #fff; }
.help { font-size: 12.5px; color: #667085; background: #f9fafb; border: 1px dashed #e1e6ec; border-radius: 8px; padding: 10px 12px; line-height: 1.8; }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .adm-side.open { transform: none; }
  .f-grid { grid-template-columns: 1fr; }
  .adm-content { padding: 14px; }
}

/* ---------- 友情链接「同步到城市分站」城市多选 ---------- */
.xc-citycheck { border: 1px solid #e2e8f0; border-radius: 8px; background: #fbfcfe; padding: 10px 12px; }
.xc-citycheck.is-disabled { opacity: .55; background: #f4f6f8; }
.xc-cc-bar { display: flex; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed #e2e8f0; margin-bottom: 8px; }
.xc-cc-all { display: inline-flex; align-items: center; font-weight: 600; color: #db4339; cursor: pointer; }
.xc-cc-all input { width: 15px; height: 15px; margin: 0 6px 0 0; vertical-align: middle; accent-color: #db4339; }
.xc-cc-btns { margin-left: auto; white-space: nowrap; }
.xc-cc-btns .btn-mini { margin-left: 8px; }
.xc-cc-num { font-size: 12px; color: #667085; margin-left: 10px; }
.xc-cc-num b { color: #db4339; }
.xc-cc-list { max-height: 220px; overflow-y: auto; padding-top: 2px; }
.xc-cc-i { display: inline-block; width: 120px; margin-right: 10px; font-size: 13px; color: #344054; line-height: 1.9; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xc-cc-i input { width: 14px; height: 14px; margin: 0 5px 0 0; vertical-align: middle; accent-color: #db4339; }
.xc-cc-i input:disabled { cursor: not-allowed; }
