* { box-sizing: border-box; }
body { margin:0; font-family:"PingFang SC","Microsoft YaHei",sans-serif; background:#f1f5f9; color:#1e293b; font-size:14px; }
a { color:#0b3d3a; text-decoration:none; }
.layout { display:flex; min-height:100vh; }
.sidebar { width:220px; flex:0 0 220px; background:#0b3d3a; color:#cbd5e1; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.sidebar .brand { display:flex; align-items:center; gap:10px; padding:18px 16px; border-bottom:1px solid rgba(255,255,255,.08); }
.sidebar .brand img { width:38px; height:38px; border-radius:8px; background:#fff; object-fit:contain; }
.sidebar .brand strong { display:block; color:#fff; font-size:14px; white-space:nowrap; }
.sidebar .brand span { display:block; font-size:11px; color:#94a3b8; margin-top:2px; }
.sidebar nav { flex:1; overflow:auto; padding:12px 8px; }
.sidebar nav a { display:block; padding:10px 12px; border-radius:8px; color:#cbd5e1; margin-bottom:2px; font-size:13px; }
.sidebar nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.sidebar nav a.active { background:#14b8a6; color:#062e2b; font-weight:700; }
.side-foot { padding:12px 16px; border-top:1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; font-size:12px; }
.side-foot a { color:#94a3b8; }
.side-foot a:hover { color:#fff; }
.main { flex:1; min-width:0; }
.topbar { height:64px; background:#fff; border-bottom:1px solid #e2e8f0; display:flex; align-items:center; justify-content:space-between; padding:0 24px; position:sticky; top:0; z-index:10; }
.topbar h1 { font-size:18px; margin:0; font-weight:800; }
.user { color:#64748b; font-size:13px; }
.user a { color:#0b3d3a; }
.content { padding:24px; width:100%; }
.panel { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:20px; box-shadow:0 2px 8px rgba(15,23,42,.03); }
.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.panel-head h2 { font-size:16px; margin:0; font-weight:800; }
.panel-head a { font-size:13px; }
.table { width:100%; border-collapse:collapse; font-size:13px; }
.table th { text-align:left; background:#f8fafc; color:#475569; font-weight:700; padding:10px 12px; border-bottom:1px solid #e2e8f0; white-space:nowrap; }
.table td { padding:10px 12px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.table tr:hover td { background:#fafcfd; }
.table .empty { text-align:center; color:#94a3b8; padding:40px; }
.ops a { margin-right:10px; }
.ops .danger { color:#dc2626; }
.tag { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; }
.tag.ok { background:#d1fae5; color:#047857; }
.tag.off { background:#f1f5f9; color:#64748b; }
.thumb { width:64px; height:36px; object-fit:cover; border-radius:6px; border:1px solid #e2e8f0; }
.price { color:#e11d48; font-weight:800; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:20px; }
.stat-num { font-size:30px; font-weight:900; color:#0b3d3a; }
.stat-label { color:#64748b; font-size:13px; margin-top:4px; }
.grid-2 { display:grid; grid-template-columns:1.3fr 1fr; gap:20px; }
.quick { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.quick a { display:flex; align-items:center; gap:8px; padding:12px; border:1px solid #e2e8f0; border-radius:10px; font-size:13px; }
.quick a:hover { border-color:#14b8a6; background:#f0fdfa; }
.quick span { color:#14b8a6; }
.tip-box { margin-top:18px; padding:14px; background:#fffbeb; border:1px solid #fde68a; border-radius:10px; font-size:12px; color:#92400e; }
.tip-box p { margin:6px 0 0; }
.form-panel { max-width:100%; }
.form-panel.narrow { max-width:480px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field-row.full { grid-column:1/-1; }
.field-row label { display:block; font-size:13px; font-weight:700; color:#475569; margin-bottom:6px; }
.field { width:100%; border:1px solid #cbd5e1; border-radius:8px; padding:9px 12px; font:inherit; font-size:13px; background:#fff; outline:none; }
.field:focus { border-color:#14b8a6; box-shadow:0 0 0 3px rgba(20,184,166,.12); }
textarea.field { resize:vertical; line-height:1.7; }
.code-area { font-family:Consolas,Monaco,monospace; font-size:12px; }
.checkboxes { display:flex; gap:18px; align-items:center; height:38px; }
.checkboxes label { margin:0; font-weight:400; display:flex; align-items:center; gap:6px; }
.hint { color:#94a3b8; font-size:12px; margin:6px 0 0; }
.form-actions { margin-top:20px; padding-top:16px; border-top:1px solid #f1f5f9; display:flex; gap:10px; }
.btn { display:inline-block; padding:9px 18px; border-radius:8px; border:1px solid #cbd5e1; background:#fff; color:#334155; font:inherit; font-size:13px; cursor:pointer; }
.btn:hover { border-color:#14b8a6; color:#0b3d3a; }
.btn-primary { background:#0b3d3a; border-color:#0b3d3a; color:#fff; font-weight:700; }
.btn-primary:hover { background:#0f514c; color:#fff; }
.btn-sm { padding:6px 12px; font-size:12px; }
.btn-block { width:100%; }
.alert { padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:13px; }
.alert-ok { background:#d1fae5; color:#047857; }
.alert-err { background:#fee2e2; color:#b91c1c; }
.seo-item { border:1px solid #e2e8f0; border-radius:10px; padding:16px; margin-bottom:14px; background:#fafcff; }
.seo-title { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.seo-title code { color:#64748b; font-size:12px; }
.pager { margin-top:16px; display:flex; gap:6px; justify-content:center; }
.pager a { padding:6px 11px; border:1px solid #e2e8f0; border-radius:6px; font-size:12px; }
.pager a.active { background:#0b3d3a; color:#fff; border-color:#0b3d3a; }
.login-page { display:flex; align-items:center; justify-content:center; min-height:100vh; background:linear-gradient(135deg,#0b3d3a,#115e59); }
.login-box { width:400px; max-width:calc(100vw - 32px); background:#fff; border-radius:18px; padding:36px; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.login-logo { text-align:center; margin-bottom:26px; }
.login-logo img { width:64px; height:64px; object-fit:contain; }
.login-logo h1 { font-size:20px; margin:12px 0 4px; }
.login-logo p { margin:0; color:#94a3b8; font-size:13px; }
.login-box form label { display:block; font-size:13px; font-weight:700; color:#475569; margin:14px 0 6px; }
.login-tip { text-align:center; color:#94a3b8; font-size:12px; margin:18px 0 0; }
/* ===== 图片路径：上传 / 预览 / 选择 ===== */
.img-picker { display:flex; align-items:center; gap:8px; }
.img-picker .img-preview { width:76px; height:48px; object-fit:cover; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; flex:0 0 76px; }
.img-picker .field { flex:1; min-width:0; }
.img-pick-btn { white-space:nowrap; }

.rh-modal-mask { position:fixed; top:0; right:0; bottom:0; left:0; background:rgba(15,23,42,.55); z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; }
.rh-modal { width:920px; max-width:100%; max-height:90vh; background:#fff; border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 80px rgba(0,0,0,.3); }
.rh-modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #e2e8f0; }
.rh-modal-head h3 { margin:0; font-size:16px; }
.rh-modal-close { border:0; background:transparent; font-size:24px; line-height:1; cursor:pointer; color:#64748b; padding:0 4px; }
.rh-modal-body { padding:16px 20px; overflow:auto; }
.rh-modal-foot { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:14px 20px; border-top:1px solid #e2e8f0; }
.img-selected-info { margin-right:auto; font-size:12px; color:#64748b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:50%; }
.img-tabs { display:flex; gap:22px; border-bottom:1px solid #e2e8f0; margin-bottom:14px; }
.img-tabs button { border:0; background:none; padding:8px 2px; cursor:pointer; font:inherit; font-size:14px; color:#64748b; border-bottom:2px solid transparent; }
.img-tabs button.active { color:#0b3d3a; font-weight:700; border-bottom-color:#14b8a6; }
.img-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.img-groups { display:flex; gap:6px; flex-wrap:wrap; }
.img-groups button { border:1px solid #e2e8f0; background:#fff; border-radius:6px; padding:5px 10px; font:inherit; font-size:12px; cursor:pointer; color:#475569; }
.img-groups button.active { background:#0b3d3a; color:#fff; border-color:#0b3d3a; }
.img-search { width:170px; }
.img-upload-btn { position:relative; overflow:hidden; }
.img-upload-btn input[type=file] { position:absolute; top:0; right:0; bottom:0; left:0; opacity:0; cursor:pointer; }
.img-note { font-size:12px; color:#94a3b8; margin:0 0 12px; }
.img-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; min-height:180px; }
.img-item { border:2px solid transparent; border-radius:8px; overflow:hidden; cursor:pointer; background:#f8fafc; position:relative; }
.img-del { position:absolute; top:3px; right:3px; width:20px; height:20px; line-height:18px; text-align:center; border:0; border-radius:50%; background:rgba(15,23,42,.6); color:#fff; font-size:14px; cursor:pointer; padding:0; }
.img-del:hover { background:#dc2626; }
.img-item img { width:100%; height:84px; object-fit:cover; display:block; }
.img-item span { display:block; font-size:11px; color:#64748b; padding:4px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.img-item:hover { border-color:#99f6e4; }
.img-item.selected { border-color:#14b8a6; box-shadow:0 0 0 2px rgba(20,184,166,.2); }
.img-empty { grid-column:1/-1; text-align:center; color:#94a3b8; padding:55px 0; }
.img-pager { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-top:14px; }
.img-pager button { border:1px solid #e2e8f0; background:#fff; border-radius:6px; padding:5px 10px; font-size:12px; cursor:pointer; }
.img-pager button.active { background:#0b3d3a; color:#fff; border-color:#0b3d3a; }
.remote-pane .field { margin-bottom:10px; }

/* ===== 栏目树形列表 / 批量操作 ===== */
.tree-toggle { display:inline-block; width:22px; height:22px; line-height:20px; text-align:center; border:1px solid #e2e8f0; border-radius:5px; background:#fff; color:#475569; cursor:pointer; font-size:13px; margin-right:4px; user-select:none; }
.tree-toggle.leaf { visibility:hidden; }
.tree-label { display:inline-flex; align-items:center; vertical-align:middle; }
.tree-line { color:#cbd5e1; margin-right:3px; }
.col-model { display:inline-block; padding:2px 8px; border-radius:999px; background:#f1f5f9; color:#475569; font-size:11px; }
.switch-dot { display:inline-block; width:34px; height:19px; border-radius:999px; background:#cbd5e1; position:relative; cursor:pointer; vertical-align:middle; transition:background .2s; }
.switch-dot::after { content:""; position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%; background:#fff; transition:left .2s; box-shadow:0 1px 2px rgba(0,0,0,.15); }
.switch-dot.on { background:#14b8a6; }
.switch-dot.on::after { left:17px; }
.col-sort { width:64px; padding:5px 6px; border:1px solid #e2e8f0; border-radius:6px; font-size:12px; text-align:center; }
.bulk-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.bulk-panel { display:none; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:14px; margin-bottom:14px; }
.bulk-panel.open { display:block; }
.bulk-panel .field { max-width:420px; }
/* ===== 内容管理：栏目树 + 编辑区 ===== */
.cm-layout { display:flex; gap:16px; align-items:flex-start; }
.cm-tree { width:236px; flex:0 0 236px; background:#fff; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; position:sticky; top:16px; }
.cm-tree-head { padding:14px 16px; font-weight:700; font-size:14px; color:#0b3d3a; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.cm-tree-body { padding:8px 0; max-height:calc(100vh - 140px); overflow-y:auto; }
.cm-tree-item { display:flex; align-items:center; min-height:34px; padding-right:10px; cursor:pointer; font-size:13px; color:#334155; border-left:3px solid transparent; }
.cm-tree-item:hover { background:#f1f5f9; }
.cm-tree-item.active { background:#ecfdf5; border-left-color:#14b8a6; color:#0b3d3a; font-weight:600; }
.cm-tree-item a { flex:1; text-decoration:none; color:inherit; padding:6px 0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cm-tree-leaf { display:inline-block; width:22px; flex:0 0 22px; }
.cm-tree-count { min-width:20px; text-align:center; font-size:11px; color:#94a3b8; background:#f1f5f9; border-radius:999px; padding:1px 6px; }
.cm-tree-item.active .cm-tree-count { background:#ccfbf1; color:#0b3d3a; }
.cm-main { flex:1; min-width:0; }
.cm-crumb { font-size:13px; color:#64748b; margin-bottom:14px; }
.cm-crumb a { color:#0b7668; text-decoration:none; }
.cm-crumb a:hover { text-decoration:underline; }
.cm-crumb span { margin:0 8px; color:#cbd5e1; }
.cm-crumb strong { color:#334155; }
.cm-editor-head { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e2e8f0; margin-bottom:0; }
.cm-editor-head h2 { font-size:16px; color:#0b3d3a; padding:0 0 12px; margin:0; }
.cm-editor-tabs { display:flex; gap:4px; }
.cm-editor-tabs button { border:1px solid #e2e8f0; border-bottom:none; background:#f8fafc; border-radius:8px 8px 0 0; padding:8px 18px; font-size:13px; color:#64748b; cursor:pointer; }
.cm-editor-tabs button.active { background:#fff; color:#0b3d3a; font-weight:700; border-color:#e2e8f0; }
.cm-editor-tabs button:disabled { opacity:.5; cursor:not-allowed; }
.cm-editor-opts { display:flex; flex-wrap:wrap; align-items:center; gap:16px; background:#fff; border:1px solid #e2e8f0; border-top:none; padding:10px 16px; font-size:12px; color:#475569; }
.cm-editor-opts label { display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.cm-editor-tip { margin-left:auto; color:#94a3b8; }
.cm-edit-form { border-top:none; border-radius:0 0 12px 12px; }
.rich-editor-wrap { width:100%; }
.rich-editor-wrap .edui-editor { max-width:100%; }
.cm-list-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.cm-filter-form { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.cm-filter-form .field { width:auto; min-width:130px; margin:0; }
.cm-filter-form .field[type=date] { min-width:150px; }
.cm-bulk-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:10px 12px; margin-bottom:12px; font-size:13px; color:#475569; }
.cm-bulk-bar .field { margin:0; }
.cm-bulk-count { margin-left:auto; color:#94a3b8; }
.btn-danger { background:#fff; color:#dc2626; border:1px solid #fecaca; }
.btn-danger:hover { background:#fef2f2; }
.cm-article-table th, .cm-article-table td { white-space:nowrap; }
.cm-article-table td:nth-child(3) { white-space:normal; min-width:220px; }
@media(max-width:900px){.sidebar{width:64px;flex-basis:64px}.sidebar .brand div,.sidebar nav a,.side-foot{font-size:0}.sidebar nav a{text-align:center;font-size:0}.sidebar nav a::first-letter{font-size:16px}.grid-2{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.content{padding:16px}.cm-layout{flex-direction:column}.cm-tree{width:100%;flex:auto;position:static}.cm-tree-body{max-height:220px}}

/* ===== 全局删除确认弹窗 ===== */
.rh-confirm-mask { position:fixed; left:0; top:0; right:0; bottom:0; background:rgba(15,23,42,.45); z-index:9999; display:none; align-items:center; justify-content:center; }
.rh-confirm { width:340px; max-width:calc(100vw - 40px); background:#fff; border-radius:14px; padding:26px 24px 22px; text-align:center; box-shadow:0 24px 60px rgba(15,23,42,.28); }
.rh-confirm-icon { width:46px; height:46px; margin:0 auto 12px; border-radius:50%; background:#fee2e2; color:#dc2626; font-size:22px; font-weight:900; display:flex; align-items:center; justify-content:center; }
.rh-confirm-title { margin:0 0 8px; font-size:16px; font-weight:800; color:#0f172a; }
.rh-confirm-msg { margin:0 0 18px; font-size:13px; color:#64748b; line-height:1.7; }
.rh-confirm-actions { display:flex; gap:10px; justify-content:center; }
.rh-confirm-actions .btn { min-width:96px; margin:0; }
.rh-confirm-ok { background:#dc2626; color:#fff; border:1px solid #dc2626; }
.rh-confirm-ok:hover { background:#b91c1c; }

/* ===== 登录页底部链接 ===== */
.login-tip a { color:#0d9488; font-weight:700; }
.login-tip a:hover { text-decoration:underline; }
