/* NeoGuide 样张 — 公共样式。配色取自 global.neotel.tech：主色 #0052D9，正文 #333 */
:root {
  --brand: #0052d9;
  --brand-dark: #003fa8;
  --brand-tint: #ecf2fe;
  --text: #333;
  --text-2: #666;
  --text-3: #999;
  --line: #e5e7eb;
  --bg: #fff;
  --bg-2: #f5f6f8;
  --warn-bg: #fff7e6;
  --warn-line: #ffd591;
  --warn-text: #8a5a00;
  --ok: #1a7f37;
  --danger: #cc3366;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.6 var(--font); color: var(--text); background: var(--bg-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line); font-size: 16px; }
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 16px 0 38px; font: inherit; background: var(--bg-2); }
.search input:focus { outline: 2px solid var(--brand-tint); border-color: var(--brand); background: var(--bg); }
.search::before { content: ""; position: absolute; left: 14px; top: 12px; width: 11px; height: 11px; border: 2px solid var(--text-3); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 25px; top: 24px; width: 6px; height: 2px; background: var(--text-3); transform: rotate(45deg); }
.spacer { flex: 1; }
.lang select, .select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 14px; background: var(--bg); color: var(--text); }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; }
.user small { display: block; color: var(--text-3); font-size: 12px; line-height: 1.2; }

/* 通用 */
.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.crumbs a { color: var(--text-2); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.ghost { background: var(--bg); color: var(--brand); }
.btn.ghost:hover { background: var(--brand-tint); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.tag { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 20px; background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); }
.tag.blue { background: var(--brand-tint); color: var(--brand); border-color: #c9dafc; }
.tag.green { background: #e9f7ee; color: var(--ok); border-color: #b7e4c7; }
.tag.gray { color: var(--text-3); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); font-size: 14px; }
.notice.info { background: var(--brand-tint); border-color: #c9dafc; color: #1d3f8f; }
.mock-note { max-width: 1280px; margin: 0 auto; padding: 8px 24px; font-size: 12px; color: var(--text-3); }

/* 首页 */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.hello h1 { margin: 0 0 4px; font-size: 26px; }
.hello p { margin: 0; color: var(--text-2); }
.series { margin-top: 32px; }
.series-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.series-head h2 { margin: 0; font-size: 19px; }
.series-head p { margin: 0; color: var(--text-3); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.model { display: flex; flex-direction: column; overflow: hidden; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.model:hover { text-decoration: none; border-color: #c9dafc; box-shadow: var(--shadow); }
/* 卡片尺寸统一：图片区固定 4:3，图片在框内等比缩放；文字区固定高度，名称和简介各占一行，超出省略 */
.model .pic { position: relative; aspect-ratio: 4/3; background: linear-gradient(180deg, #f7f9fc, #eef2f8); display: grid; place-items: center; overflow: hidden; }
.model .pic img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.model .pic .ph { color: var(--text-3); font-size: 13px; }
.model .body { height: 96px; padding: 12px 14px; display: flex; flex-direction: column; }
.model h3, .model p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model h3 { margin: 0; font-size: 15px; }
.model p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.model .tag { margin-top: auto; align-self: flex-start; }

/* 型号页 */
.model-hero { display: grid; grid-template-columns: 280px 1fr; gap: 28px; padding: 24px; align-items: center; }
.model-hero .pic { background: linear-gradient(180deg, #f7f9fc, #eef2f8); border-radius: 8px; aspect-ratio: 4/3; display: grid; place-items: center; padding: 16px; }
.model-hero h1 { margin: 0 0 6px; font-size: 26px; }
.model-hero p { margin: 0 0 12px; color: var(--text-2); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 13px; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .name { font-weight: 600; }
.table .name small { display: block; font-weight: 400; color: var(--text-3); }
.langs { display: flex; flex-wrap: wrap; gap: 4px; }

/* 阅读页 */
.reader { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 60px); }
.toc { background: var(--bg); border-right: 1px solid var(--line); padding: 20px 0; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
.toc h4 { margin: 0 20px 4px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.toc .doc-title { margin: 0 20px 14px; font-weight: 700; line-height: 1.4; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 20px; color: var(--text-2); font-size: 14px; border-left: 3px solid transparent; }
.toc a:hover { background: var(--bg-2); text-decoration: none; }
.toc a.on { color: var(--brand); border-left-color: var(--brand); background: var(--brand-tint); font-weight: 600; }
.toc ol ol a { padding-left: 36px; font-size: 13px; }
.reader-main { padding: 0 0 60px; min-width: 0; }
.reader-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 32px; background: var(--bg); border-bottom: 1px solid var(--line); }
.reader-bar .crumbs { margin: 0; flex: 1; min-width: 200px; }
.reader-bar label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.reader-notices { padding: 16px 32px 0; display: grid; gap: 8px; max-width: 920px; }
.doc { max-width: 920px; margin: 16px 32px 0; padding: 36px 44px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc .meta { color: var(--text-3); font-size: 13px; margin-bottom: 24px; }
.doc h2 { font-size: 20px; margin: 32px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 20px 0 8px; }
.doc .fig { margin: 16px 0; padding: 14px; background: var(--bg-2); border-radius: 8px; text-align: center; color: var(--text-3); font-size: 13px; }
.doc .fig img { margin: 0 auto 8px; max-height: 260px; }
.doc .warn { border-left: 4px solid #f5a623; background: var(--warn-bg); padding: 10px 14px; border-radius: 0 6px 6px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc td, .doc th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.doc th { background: var(--bg-2); }
.watermark { display: none; }

/* 后台 */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 60px); }
.side { background: #0f1b33; color: #c8d3ea; padding: 18px 0; }
.side h4 { margin: 0 20px 10px; font-size: 12px; color: #7d8bab; font-weight: 600; letter-spacing: .04em; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 9px 20px; color: #c8d3ea; font-size: 14px; }
.side a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.side a.on { background: var(--brand); color: #fff; }
.side .count { background: var(--danger); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; line-height: 18px; }
.admin-main { padding: 24px 28px 60px; min-width: 0; }
.admin-main h1 { margin: 0 0 4px; font-size: 22px; }
.admin-main .sub { margin: 0 0 20px; color: var(--text-2); font-size: 14px; }
.auth { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.groups .head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.groups .head b { font-size: 14px; }
.groups .filter { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.groups .filter input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13px; }
.group { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; cursor: pointer; color: var(--text); }
.group:hover { background: var(--bg-2); }
.group.on { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.group .gname { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.group .gmeta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.panel { padding: 0; }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.panel-sec { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-sec h3 { margin: 0 0 12px; font-size: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; }
.row .lbl b { display: block; font-size: 14px; }
.row .lbl small { color: var(--text-3); font-size: 12px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c7ccd6; border-radius: 12px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(20px); }
.tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tree.disabled { opacity: .45; pointer-events: none; }
.tree fieldset { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; }
.tree legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.tree label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; cursor: pointer; }
.tree label.all { border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 4px; color: var(--text-2); font-size: 13px; }
.tree input { width: 16px; height: 16px; accent-color: var(--brand); }
.sync { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.panel-foot { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-2); border-radius: 0 0 var(--radius) var(--radius); }

/* 手机 */
@media (max-width: 860px) {
  .topbar-inner { padding: 0 16px; gap: 10px; height: 56px; }
  .brand span, .user > div, .search { display: none; }
  .wrap { padding: 20px 16px 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .model-hero { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table td { padding: 3px 0; border: 0; }
  .reader { grid-template-columns: 1fr; }
  .toc { display: none; }
  .reader-bar, .reader-notices { padding-left: 16px; padding-right: 16px; }
  .doc { margin: 12px 0 0; padding: 20px 16px; border-radius: 0; border-left: 0; border-right: 0; }
  .admin { grid-template-columns: 1fr; }
  .side { display: none; }
  .admin-main { padding: 16px; }
  .auth { grid-template-columns: 1fr; }
  .m-search { display: block !important; margin-bottom: 16px; }
}
.m-search { display: none; }
.m-search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 20px; padding: 0 16px; font: inherit; }

/* 打印：只留正文，每页带用户名 + 日期水印 */
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; }
  .topbar, .toc, .reader-bar, .reader-notices, .mock-note { display: none !important; }
  .reader { display: block; }
  .doc { margin: 0; padding: 0; border: 0; max-width: none; }
  .doc h2 { break-after: avoid; }
  .watermark { display: block; position: fixed; inset: 0; z-index: 9; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='220'><text x='20' y='130' transform='rotate(-28 180 110)' font-family='Arial' font-size='18' fill='rgba(0,0,0,0.10)'>张三 zhangsan · 2026-10-21</text></svg>");
    background-repeat: repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 登录页、错误页 */
.login { max-width: 460px; margin: 48px auto; padding: 32px; text-align: center; }
.login h1 { margin: 0 0 8px; font-size: 22px; }
.login p { color: var(--text-2); margin: 0 0 20px; }
.login .login-alt { margin: 20px 0 0; font-size: 14px; }
.user form { margin: 0; }

/* 后台管理员的预览条 */
.preview-bar { max-width: 1280px; margin: 0 auto; padding: 6px 24px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 13px; }
.preview-bar.on { max-width: none; justify-content: center; background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: var(--warn-text); }
.preview-bar form { margin: 0; }
/* 阅读页：说明书在框架里 */
.doc-frame { max-width: 960px; margin: 16px 32px 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.doc-frame iframe { display: block; width: 100%; height: 70vh; border: 0; background: #fff; }
.toc a.lv3 { padding-left: 36px; font-size: 13px; }
.m-toc { display: none; margin: 12px 16px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.m-toc summary { padding: 10px 14px; cursor: pointer; font-weight: 600; }
.m-toc ol { list-style: none; margin: 0; padding: 0 0 8px; }
.m-toc a { display: block; padding: 6px 14px; color: var(--text-2); font-size: 14px; }
.m-toc a.lv3 { padding-left: 28px; }
@media (max-width: 860px) {
  .m-toc { display: block; }
  .doc-frame { margin: 12px 0 0; border-radius: 0; border-left: 0; border-right: 0; }
}
/* 后台通用 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; }
.stat b { display: block; font-size: 26px; line-height: 1.2; }
.stat span { color: var(--text-2); font-size: 13px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.inline-form input:not([type=checkbox]), .form input:not([type=checkbox]):not([type=file]), .form textarea, .i18n-table textarea {
  height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--text); }
.inline-form .w-name { width: 160px; font-weight: 600; }
.w-sort { width: 80px; }
.inline-form label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.form { padding: 22px 24px; max-width: 720px; display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--text-3); }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form textarea { height: auto; padding: 8px 10px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
tr.muted td { color: var(--text-3); }
a.group { color: var(--text); text-decoration: none; }
.i18n-table td { vertical-align: top; }
.i18n-table code { font-size: 12px; color: var(--text-3); }
.i18n-table small { display: block; color: var(--text-2); margin-top: 2px; }
.i18n-table textarea { width: 100%; height: auto; min-height: 34px; padding: 6px 10px; resize: vertical; }
.i18n-table textarea.empty { background: var(--warn-bg); }
.i18n-table .edited { color: var(--ok); font-size: 12px; }