/* 筑材资讯 · 内容管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --navy: #1a3a6b; --navy-d: #102a52; --accent: #ff8a3d; --accent-d: #f2711c;
  --red: #e5484d; --bg: #eef1f6; --panel: #fff; --line: #e4e9f2;
  --text: #26304a; --muted: #7c87a3;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
.hidden { display: none !important; }

a { color: inherit; text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: linear-gradient(150deg, #102a52 0%, #1a3a6b 55%, #24508f 100%);
}
.login-card {
  width: 380px; max-width: 100%; background: #fff; border-radius: 16px;
  padding: 34px 32px 28px; box-shadow: 0 24px 70px rgba(6, 16, 38, .35);
}
.login-logo { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: 1px; }
.login-card h1 { font-size: 24px; margin: 14px 0 6px; color: var(--navy); }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.login-card input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; outline: none;
  transition: .2s; background: #fafbfe;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.15); }
.login-card .btn { margin-top: 6px; width: 100%; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px; border-radius: 18px; font-size: 13.5px; font-weight: 600;
  background: #edf0f7; color: #44506e; transition: .2s; white-space: nowrap;
}
.btn:hover { filter: brightness(.96); }
.btn.primary { background: linear-gradient(135deg, #1a3a6b, #24508f); color: #fff; }
.btn.primary:hover { background: linear-gradient(135deg, #102a52, #1a3a6b); }
.btn.primary.accent-bg { background: linear-gradient(135deg, var(--accent), var(--accent-d)); color: #fff; }
.btn.danger { background: #fdecec; color: var(--red); }
.btn.danger:hover { background: #f7d6d6; }
.btn.ghost { background: #fff; border: 1px solid var(--line); }
.btn.mini { height: 30px; padding: 0 13px; font-size: 12.5px; border-radius: 15px; }
.btn.block { width: 100%; height: 42px; border-radius: 21px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.tip { font-size: 12.5px; min-height: 16px; }
.tip.err { color: var(--red); }
.tip.ok { color: #1a9c5c; }

/* ---------- 顶部 ---------- */
.top { background: var(--navy-d); color: #fff; position: sticky; top: 0; z-index: 40; }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-brand { font-size: 17px; font-weight: 800; letter-spacing: 1px; display: flex; align-items: baseline; gap: 8px; }
.top-brand em { font-style: normal; font-size: 12px; color: #9fb4d8; background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 9px; }
.top-side { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: #c7d4ea; }
.top-link { color: #c7d4ea; font-size: 12.5px; padding: 4px 8px; border-radius: 6px; transition: .2s; }
.top-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.stat { color: #93a7c9; }

/* ---------- Tabs ---------- */
.tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 54px; z-index: 30; }
.tabs { display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.tab { padding: 13px 16px; font-size: 14.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .2s; }
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-color: var(--accent); }

.main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.tab-panel > .card + .card, .tab-panel > .card { margin-bottom: 18px; }
.card { background: var(--panel); border-radius: 14px; padding: 18px 20px; box-shadow: 0 3px 14px rgba(16,42,82,.05); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input {
  border: 1px solid var(--line); border-radius: 8px; height: 34px; padding: 0 10px;
  background: #fff; outline: none; font-size: 13px;
}
.toolbar input.kw { width: 220px; }
.toolbar .spacer { flex: 1; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #f0f3f9; vertical-align: middle; }
table.grid th { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; background: #f7f9fd; }
table.grid tr:hover td { background: #fafbfe; }
.col-ops { white-space: nowrap; text-align: right; }
.t-btn { display: inline-flex; align-items: center; gap: 3px; padding: 4px 11px; border-radius: 12px; font-size: 12px; background: #eef3fb; color: var(--navy); margin-left: 6px; }
.t-btn:hover { background: #dfe9f8; }
.t-btn.danger { background: #fdecec; color: var(--red); }
.t-btn.danger:hover { background: #f7d6d6; }
.tag-badge { display: inline-block; padding: 1px 9px; border-radius: 8px; font-size: 11.5px; background: var(--navy-soft, #eef3fb); color: var(--navy); margin-right: 4px; }
.hot-tag { background: #fdecec; color: var(--red); }
.hl-tag { background: #fff3e6; color: #d96b17; }
.th-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #cfd8e8; margin-right: 4px; }
.th-dot.hot { background: var(--red); }
.th-dot.hl { background: var(--accent); }
.cell-id { color: var(--muted); font-size: 12px; }
.title-cell { max-width: 340px; font-weight: 600; color: #33415e; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.empty-tip { text-align: center; padding: 46px 10px; color: var(--muted); }
.empty-tip b { font-size: 20px; display: block; color: #b7c0d6; margin-bottom: 6px; }

/* 频道缩略图 */
.cat-thumb { width: 46px; height: 32px; object-fit: cover; border-radius: 6px; vertical-align: middle; display: inline-block; background: #eef2fa; }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; z-index: 100; background: rgba(12,24,48,.5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 20px; overflow: auto; }
.mask.hidden { display: none; }
.modal { width: 100%; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(6,16,38,.35); }
.modal.wide { max-width: 780px; }
.modal.sm { max-width: 420px; padding: 22px; }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 0; }
.m-head h3 { font-size: 17px; color: var(--navy); }
.x { width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--muted); }
.x:hover { background: #eef1f7; color: var(--navy); }
form { padding: 14px 22px 20px; }
.f-row { display: flex; gap: 14px; margin-bottom: 13px; }
.f-cell { flex: 1; min-width: 0; }
.f-cell.grow { flex: 1.6; }
.f-cell.full { flex-basis: 100%; }
.f-cell label { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
.f-cell label b, .lbl b { color: var(--red); }
.f-cell input, .f-cell select, .f-cell textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px;
  background: #fbfcfe; outline: none; transition: .2s; font-size: 13.5px;
}
.f-cell textarea { resize: vertical; line-height: 1.7; }
.f-cell input:focus, .f-cell select:focus, .f-cell textarea:focus {
  border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(255,138,61,.13);
}
.check-line { display: flex; align-items: center; gap: 8px; height: 38px; font-size: 13px; color: #5a6884; }
.check-line input { width: auto; accent-color: var(--accent); }
.img-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.img-line input { flex: 1; min-width: 200px; }
.img-prev { width: 88px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f2f5fb; }
.img-prev.blank { opacity: .35; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.mask .modal form > .tip { margin: 2px 0 8px; }
.cfm-text { color: #55617e; font-size: 13.5px; line-height: 1.8; margin: 14px 2px 18px; }

/* ---------- 站点设置 ---------- */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.set-item h4 { font-size: 13.5px; color: var(--navy); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.set-item h4::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.set-item textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fbfcfe; resize: vertical; line-height: 1.8; font-size: 13.5px; outline: none; }
.set-item textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.13); background: #fff; }
.hl-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eef1f7; flex-wrap: wrap; }
.hl-row:last-child { border-bottom: 0; }
.hl-row .hl-name { width: 90px; font-weight: 600; color: #44506e; font-size: 13px; }
.hl-row select { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; outline: none; font-size: 13px; }
.danger-card { border: 1px dashed #f2c4c6; background: #fff8f8; }
.mode-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: #e6f6ee; color: #14844a; margin-left: 8px; }
.mode-tag.static { background: #eef1f7; color: var(--muted); }

/* ---------- 留言 ---------- */
.msg-card { display: flex; gap: 14px; padding: 13px 4px; border-bottom: 1px dashed #eef1f7; }
.msg-card:last-child { border-bottom: 0; }
.msg-left { min-width: 150px; }
.msg-name { font-weight: 700; color: var(--navy); font-size: 14px; }
.msg-meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.7; word-break: break-all; }
.msg-right { flex: 1; min-width: 0; }
.msg-content { font-size: 13.5px; line-height: 1.8; color: #3d4966; }
.msg-phone { color: #d96b17; font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 200;
  background: rgba(16,42,82,.94); color: #fff; padding: 11px 22px; border-radius: 22px;
  font-size: 13.5px; box-shadow: 0 12px 30px rgba(6,16,38,.3); max-width: 86vw;
}
.toast.ok { background: rgba(20,132,74,.94); }
.toast.err { background: rgba(214,53,60,.94); }

@media (max-width: 760px) {
  .f-row { flex-direction: column; gap: 10px; }
  .top-side { gap: 6px; }
  .tabs { padding: 0 8px; }
  .tab { padding: 11px 10px; font-size: 13.5px; }
  .toolbar input.kw { width: 100%; }
  .title-cell { max-width: 190px; }
}
