/* =========================================================
   后台样式 admin.css（依赖 base.css 的设计令牌 + site.css 的通用件）
   ============================================================ */

/* ---------- 框架：悬浮侧栏 + 顶栏 ---------- */
body[data-admin] { background: radial-gradient(1200px 600px at 100% 0%, var(--p-50) 0%, transparent 60%), var(--bg); }
.adm-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.adm-side {
  position: sticky; top: 16px; height: calc(100vh - 32px); margin: 16px 0 16px 16px; overflow-y: auto; overflow-x: hidden;
  border-radius: var(--r-lg); color: rgba(255, 255, 255, .78);
  background: linear-gradient(180deg, var(--p-800) 0%, var(--p-950) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--sh-lg);
  scrollbar-width: thin;
}
.adm-side-in { display: flex; flex-direction: column; min-height: 100%; padding: 22px 16px 16px; }
.adm-side .brand { padding: 0 8px; }
.adm-side .brand-text strong { color: #fff; }
.adm-side .brand-text small { color: rgba(255, 255, 255, .5); }
.adm-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 26px; }
.adm-group { margin: 18px 14px 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; color: rgba(255, 255, 255, .38); }
.adm-nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 14px; font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, .76); transition: background .2s, color .2s; }
.adm-nav a svg { font-size: 19px; opacity: .85; }
.adm-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.adm-nav a.active { color: #fff; background: linear-gradient(135deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 22px -12px rgba(0, 0, 0, .7); }
.adm-nav a.active svg { color: var(--p-300); opacity: 1; }
.adm-nav .n { margin-left: auto; padding: 1px 8px; border-radius: var(--r-pill); font-family: var(--num); font-size: 12px; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .14); }
.adm-nav .n.hot { color: #fff; background: var(--danger); box-shadow: 0 4px 10px -3px rgba(240, 68, 56, .7); }
.adm-user-card { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 12px 12px 12px 10px; border-radius: 18px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.adm-user-card .avatar { background: rgba(255, 255, 255, .9); }
.adm-user-card .icon-btn { color: rgba(255, 255, 255, .7); }
.adm-user-card .icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.adm-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.adm-user-text strong { font-size: 14px; }
.adm-user-text small { font-size: 12px; color: var(--n-400); }
.adm-side .adm-user-text strong { color: #fff; }
.adm-side .adm-user-text small { color: rgba(255, 255, 255, .55); }

.adm-main { display: flex; flex-direction: column; min-width: 0; }
.adm-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; height: 72px; padding: 0 28px;
  background: rgba(245, 247, 252, .84); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(16, 24, 40, .04);
}
.adm-topbar .crumbs { display: flex; align-items: center; gap: 8px; height: auto; padding: 0; border: 0; background: none; box-shadow: none; font-size: 14px; color: var(--n-400); }
.adm-topbar .crumbs strong { color: var(--ink); font-weight: 600; }
.adm-topbar .crumbs svg { font-size: 14px; }
.adm-top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.adm-search { display: flex; align-items: center; gap: 10px; width: 320px; height: 42px; padding: 0 8px 0 14px; border-radius: var(--r-pill); color: var(--n-400); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--n-200); transition: box-shadow .2s; }
.adm-search:focus-within { box-shadow: inset 0 1px 0 #fff, 0 0 0 1.5px var(--p-400), 0 0 0 4px var(--p-100); }
.adm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.adm-search input::placeholder { color: var(--n-400); }
.adm-search kbd { padding: 3px 8px; border-radius: 8px; font-family: var(--num); font-size: 12px; color: var(--n-500); background: var(--n-100); box-shadow: inset 0 -1px 0 var(--n-200); }
.adm-user { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); color: var(--n-500); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--n-200); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.adm-user:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--p-200), 0 8px 16px -8px rgba(16, 24, 40, .2); }
.adm-menu-btn { display: none; }
.adm-content { display: grid; gap: 20px; padding: 28px; align-content: start; }
.adm-content > *, .edit-main > *, .adm-main > * { min-width: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.01em; }
.page-head p { margin-top: 2px; font-size: 14px; color: var(--n-500); }
.page-head .acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 概况 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { display: grid; gap: 14px; padding: 20px 22px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi b { display: block; font-family: var(--num); font-size: 32px; line-height: 1.1; letter-spacing: .01em; }
.kpi small { display: block; margin-top: 2px; font-size: 13px; color: var(--n-500); white-space: nowrap; }
.kpi .trend { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.trend.up { color: #027a48; background: var(--ok-bg); } .trend.down { color: #b42318; background: var(--danger-bg); } .trend.warn { color: #b54708; background: var(--warn-bg); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.dash-grid.equal { grid-template-columns: 1fr 1fr; }
.chart-wrap { padding: 8px 20px 20px; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--n-500); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4%; height: 260px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar-col .bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; flex: 1; padding-top: 4px; }
.bar { width: 18px; border-radius: 10px 10px 5px 5px; background: var(--grad-primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 18px -8px var(--p-sh); }
.bar.hit { background: var(--n-200); box-shadow: inset 0 1px 0 #fff; }
.bar-col span { font-size: 12px; color: var(--n-400); font-family: var(--num); }
.bar-col b { font-family: var(--num); font-size: 13px; color: var(--n-700); }
.donut-row { display: flex; align-items: center; gap: 28px; padding: 8px 20px 20px; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; stroke-linecap: round; }
.donut .track { stroke: var(--n-100); stroke-linecap: butt; }
.donut .c1 { stroke: var(--p-500); } .donut .c2 { stroke: var(--p-800); } .donut .c3 { stroke: var(--p-300); } .donut .c4 { stroke: var(--n-300); }
.donut .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .mid b { font-family: var(--num); font-size: 28px; line-height: 1; }
.donut .mid span { font-size: 12px; color: var(--n-400); }
.legend-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--n-700); }
.legend-list i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-list b { margin-left: auto; font-family: var(--num); font-weight: 600; color: var(--ink); }
.legend-list small { font-family: var(--num); color: var(--n-400); width: 44px; text-align: right; }
.todo-list li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; }
.todo-list li + li { border-top: 1px solid var(--n-100); }
.todo-list .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; flex: none; font-family: var(--num); font-weight: 700; font-size: 14px; }
.todo-list b { display: block; font-size: 14px; }
.todo-list small { display: block; font-size: 12px; color: var(--n-400); }
.quick-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px 20px; }
.quick-acts a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; font-size: 14px; font-weight: 600; color: var(--n-900); background: var(--n-100); box-shadow: inset 0 1px 0 #fff; transition: transform .2s, background .2s, box-shadow .2s; }
.quick-acts a:hover { transform: translateY(-2px); background: var(--p-50); box-shadow: inset 0 1px 0 #fff, 0 10px 20px -10px var(--p-sh); }

/* ---------- 列表页 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--n-100); }
.toolbar .grow > .input { height: 42px; }
.toolbar .spacer { flex: 1; }
.table-card .table td:first-child, .table-card .table th:first-child { padding-left: 22px; }
.table-card .table td:last-child, .table-card .table th:last-child { padding-right: 16px; }
.thumb { width: 88px; height: 58px; border-radius: 12px; object-fit: cover; background: var(--n-100); flex: none; }
.thumb-sq { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; background: var(--n-100); flex: none; }
.cell-main { font-weight: 600; color: var(--ink); max-width: 380px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cell-nowrap .cell-main { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: none; }
.table .tag, .table .badge { white-space: nowrap; }
.table.nowrap th, .table.nowrap td, .table .nowrap { white-space: nowrap; }
.table-hide-5 th:nth-child(5), .table-hide-5 td:nth-child(5) { display: none; }
.table td.cell-flex { white-space: nowrap; }
.table-hide-last th:last-child, .table-hide-last td:last-child { display: none; }
.cell-sub { margin-top: 1px; font-size: 12px; color: var(--n-400); }
.cell-flex { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .icon-btn { width: 32px; height: 32px; font-size: 15px; background: transparent; box-shadow: none; }
.row-actions .icon-btn:hover { background: var(--n-100); }
.row-actions .icon-btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.adm-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; font-size: 13px; color: var(--n-400); flex-wrap: wrap; }
.adm-pager .pager { margin: 0; }
.stat-pills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat-pill { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; transition: transform .2s, box-shadow .2s; text-align: left; width: 100%; }
.stat-pill:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stat-pill.on { box-shadow: inset 0 0 0 2px var(--p-400), var(--sh-md); }
.stat-pill b { display: block; font-family: var(--num); font-size: 24px; line-height: 1.1; }
.stat-pill span { display: block; font-size: 13px; color: var(--n-500); }
.stat-pill .dot { width: 10px; height: 10px; }
.batch-bar { display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 16px; border-radius: var(--r-pill); font-size: 14px; color: var(--p-700); background: var(--p-50); }

/* ---------- 编辑页 ---------- */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.edit-layout.wide-side { grid-template-columns: minmax(0, 1fr) 420px; }
.edit-main { display: grid; gap: 20px; }
.edit-side { display: grid; gap: 20px; position: sticky; top: 92px; }
.big-input { width: 100%; height: auto; padding: 6px 4px; border: 0; background: transparent; font-size: 26px; font-weight: 700; line-height: 1.35; outline: 0; box-shadow: none !important; }
.big-input::placeholder { color: var(--n-300); }
.field-row { display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-top: 1px solid var(--n-100); font-size: 14px; color: var(--n-400); flex-wrap: wrap; }
.field-row .tag { color: var(--p-700); background: var(--p-50); }
.field-row input { flex: 1; min-width: 200px; border: 0; outline: 0; font-size: 14px; color: var(--ink); background: transparent; }
.field-row .select, .field-row .input { flex: none; width: auto; min-width: 130px; height: 36px; font-size: 14px; }
.editor-toolbar { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--n-100); }
.editor-toolbar button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 17px; color: var(--n-700); transition: background .15s, color .15s; }
.editor-toolbar button:hover { background: var(--n-100); color: var(--ink); }
.editor-toolbar button.on { color: var(--p-700); background: var(--p-50); }
.editor-toolbar .sep { width: 1px; height: 22px; margin: 0 6px; background: var(--n-200); }
.editor-toolbar .pick-btn { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; gap: 6px; display: inline-flex; align-items: center; }
.editor-body { min-height: 460px; padding: 26px 30px; font-size: 16px; line-height: 1.9; color: #27344a; }
.editor-body > * + * { margin-top: 14px; }
.editor-body h2 { margin-top: 26px; padding-left: 14px; border-left: 4px solid var(--p-500); font-size: 20px; }
.editor-body ul { padding-left: 24px; list-style: disc; }
.editor-body figure { margin: 22px 0; } .editor-body figure img { border-radius: var(--r-md); } .editor-body figcaption { margin-top: 8px; font-size: 13px; color: var(--n-400); text-align: center; }
.editor-body .caret { display: inline-block; width: 2px; height: 1.2em; vertical-align: -3px; background: var(--p-500); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pick { display: grid; place-items: center; gap: 4px; aspect-ratio: 16 / 9; border-radius: var(--r-md); border: 2px dashed var(--n-300); color: var(--n-400); font-size: 13px; text-align: center; background: var(--n-100); cursor: pointer; transition: border-color .2s, background .2s; }
.pick:hover { border-color: var(--p-400); background: var(--p-50); color: var(--p-600); }
.pick.has { border: 0; padding: 0; position: relative; overflow: hidden; aspect-ratio: auto; }
.pick.has img { border-radius: var(--r-md); width: 100%; }
.pick.has .mask { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; background: rgba(16, 24, 40, .45); opacity: 0; transition: opacity .2s; }
.pick.has:hover .mask { opacity: 1; }
.side-card { padding: 22px; }
.side-card .card-title { margin-bottom: 16px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; cursor: pointer; color: var(--n-700); }
.radio-row:hover { background: var(--n-100); }
.radio-row.on { color: var(--ink); background: var(--p-50); }
.radio-row small { margin-left: auto; font-size: 12px; color: var(--n-400); }
.side-actions { display: grid; gap: 10px; }

/* ---------- 图片库 ---------- */
.media-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.album-list a { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: 12px; font-size: 14px; color: var(--n-700); font-weight: 500; transition: background .15s, color .15s; }
.album-list a svg { font-size: 18px; color: var(--n-400); }
.album-list a:hover { background: var(--n-100); }
.album-list a.active { color: var(--p-700); background: var(--p-50); font-weight: 600; }
.album-list a.active svg { color: var(--p-500); }
.album-list .n { margin-left: auto; font-family: var(--num); font-size: 12px; color: var(--n-400); }
.dropzone { display: grid; place-items: center; gap: 6px; padding: 44px 24px; border-radius: var(--r-lg); border: 2px dashed var(--p-200); background: linear-gradient(180deg, #fff, var(--p-50)); text-align: center; cursor: pointer; transition: border-color .2s, transform .2s; }
.dropzone:hover { border-color: var(--p-400); transform: translateY(-2px); }
.dropzone .tile { margin-bottom: 8px; }
.dropzone b { font-size: 16px; } .dropzone span { font-size: 13px; color: var(--n-500); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 20px; }
.media-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--n-100); cursor: pointer; box-shadow: var(--sh-xs), inset 0 0 0 1px rgba(16, 24, 40, .04); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.media-item.sel { box-shadow: 0 0 0 3px var(--p-500), var(--sh-md); }
.media-item .check { position: absolute; left: 8px; top: 8px; opacity: 0; transition: opacity .2s; }
.media-item.sel .check, .media-item:hover .check { opacity: 1; }
.media-item .acts { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 24px 8px 8px; background: linear-gradient(0deg, rgba(16, 24, 40, .62), transparent); opacity: 0; transition: opacity .2s; }
.media-item:hover .acts { opacity: 1; }
.media-item .acts span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, .92); }
.media-item .name { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 11px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; }
.media-item:hover .name { opacity: 1; }
.upload-progress { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: var(--sh-sm), 0 0 0 1px var(--n-100); }
.upload-progress .bar-line { flex: 1; height: 8px; border-radius: 99px; background: var(--n-100); overflow: hidden; }
.upload-progress .bar-line i { display: block; height: 100%; width: 68%; border-radius: inherit; background: var(--grad-primary); }

/* ---------- 留言 ---------- */
.msg-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.msg-list { padding: 10px; display: grid; gap: 4px; }
.msg-item { display: flex; gap: 12px; padding: 13px 12px; border-radius: 16px; cursor: pointer; transition: background .15s; align-items: flex-start; }
.msg-item:hover { background: var(--n-100); }
.msg-item.active { background: var(--p-50); box-shadow: inset 0 0 0 1px var(--p-100); }
.msg-item b { display: block; font-size: 14px; }
.msg-item .tag { height: 20px; padding: 0 8px; font-size: 11px; margin-left: 6px; vertical-align: 1px; }
.msg-item p { margin-top: 2px; font-size: 13px; color: var(--n-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item time { margin-left: auto; flex: none; font-family: var(--num); font-size: 12px; color: var(--n-400); }
.msg-item .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--p-500); position: absolute; }
.chat { display: flex; flex-direction: column; min-height: 520px; }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; flex: 1; }
.chat-day { text-align: center; font-size: 12px; color: var(--n-400); }
.bubble { max-width: 74%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.7; }
.bubble.in { align-self: flex-start; color: var(--n-900); background: var(--n-100); border-bottom-left-radius: 6px; box-shadow: inset 0 1px 0 #fff; }
.bubble.out { align-self: flex-end; color: #fff; background: var(--grad-primary); border-bottom-right-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -10px var(--p-sh); }
.bubble time { display: block; margin-top: 4px; font-size: 11px; opacity: .6; font-family: var(--num); }
.chat-input { display: flex; align-items: flex-end; gap: 10px; margin: 0 20px 20px; padding: 10px 10px 10px 18px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--n-200), inset 0 2px 3px rgba(16, 24, 40, .04); }
.chat-input textarea { flex: 1; min-height: 44px; max-height: 140px; border: 0; outline: 0; resize: none; font-size: 15px; line-height: 1.6; background: transparent; }
.chat-input textarea::placeholder { color: var(--n-400); }

/* ---------- 导入向导 ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 8px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--n-500); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--n-200); transition: all .25s; }
.step .no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: var(--num); font-size: 13px; background: var(--n-100); }
.step.is-active { color: var(--p-700); background: linear-gradient(180deg, #fff, var(--p-50)); box-shadow: inset 0 1px 0 #fff, 0 0 0 1.5px var(--p-400), 0 10px 20px -10px var(--p-sh); }
.step.is-active .no { color: #fff; background: var(--grad-primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 12px -4px var(--p-sh); }
.step.is-done { color: #027a48; }
.step.is-done .no { color: #fff; background: var(--ok); }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--n-200); }
.map-row:last-child { border-bottom: 0; }
.map-row .src { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--n-700); background: var(--n-100); }
.map-row .src.ok { color: var(--p-700); background: var(--p-50); }
.map-row .arrow { display: grid; place-items: center; color: var(--n-300); font-size: 18px; }
.map-row.ok .arrow { color: var(--ok); }
.table tr.is-error td { background: var(--danger-bg); }
.table tr.is-warn td { background: var(--warn-bg); }
.import-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.import-summary .card { padding: 20px 22px; }
.result-icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; color: #fff; font-size: 42px; background: var(--grad-primary); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 24px 40px -14px var(--p-sh); }

/* ---------- 证书类别与字段 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.type-card { padding: 20px; display: flex; gap: 14px; align-items: center; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.type-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.type-card.on { box-shadow: inset 0 0 0 2px var(--p-400), var(--sh-md); }
.type-card b { display: block; font-size: 16px; }
.type-card > div > span { display: block; font-size: 12px; color: var(--n-400); }
/* 紧凑表格：列多时用 */
.table-compact { font-size: 13px; }
.table-compact th { padding: 10px; white-space: nowrap; }
.table-compact td { padding: 12px 10px; }
.table-compact .cell-sub { white-space: nowrap; }
.table-compact .thumb-sq { width: 38px; height: 38px; }
.table.field-builder td:nth-child(4) { white-space: normal; }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.field-builder td { cursor: grab; }
.field-builder .grip { color: var(--n-300); font-size: 16px; }
.tpl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tpl { position: relative; padding: 10px; border-radius: var(--r-md); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--n-200); transition: box-shadow .2s, transform .2s; }
.tpl:hover { transform: translateY(-2px); }
.tpl.on { box-shadow: inset 0 0 0 2px var(--p-500), var(--sh-md); }
.tpl.on::after { content: "✓"; position: absolute; right: -8px; top: -8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700; background: var(--grad-primary); box-shadow: 0 6px 12px -4px var(--p-sh); }
.tpl .ecert { pointer-events: none; font-size: 6px; }
.rule-box { padding: 16px 18px; border-radius: 16px; background: var(--n-100); font-family: var(--num); font-size: 18px; letter-spacing: .06em; color: var(--ink); text-align: center; box-shadow: inset 0 2px 4px rgba(16, 24, 40, .06); }
.rule-box em { font-style: normal; padding: 2px 8px; border-radius: 8px; color: var(--p-700); background: var(--p-50); box-shadow: inset 0 0 0 1px var(--p-100); }

/* ---------- 证书编辑 ---------- */
.photo-pick { display: grid; place-items: center; width: 132px; height: 176px; overflow: hidden; border-radius: 18px; background: linear-gradient(180deg, #fff, var(--p-50)); box-shadow: inset 0 0 0 1.5px var(--p-200), var(--sh-sm); cursor: pointer; position: relative; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .mask { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; background: rgba(16, 24, 40, .5); opacity: 0; transition: opacity .2s; }
.photo-pick:hover .mask { opacity: 1; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 16px; font-weight: 700; }
.section-title .tile { width: 34px; height: 34px; border-radius: 11px; font-size: 17px; }
.section-title .n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; font-family: var(--num); font-size: 13px; color: #fff; background: var(--grad-primary); }
.preview-stage { padding: 22px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--p-800), var(--p-950)); overflow: hidden; position: relative; isolation: isolate; }
.preview-stage::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: var(--p-500); opacity: .45; filter: blur(60px); z-index: -1; }
.preview-stage .ecert { border-radius: 14px; box-shadow: var(--sh-xl); }
.preview-stage .cap { margin-top: 16px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .6); }

/* ---------- 登录 ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #fff; background: var(--p-950); isolation: isolate; }
.login-art img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; z-index: -2; }
.login-art .shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(16, 24, 42, .92) 0%, rgba(31, 44, 69, .6) 55%, rgba(1, 159, 230, .35) 100%); }
.login-art .quote h2 { margin-top: 28px; font-size: clamp(28px, 3vw, 42px); line-height: 1.3; }
.login-art .quote p { margin-top: 14px; max-width: 440px; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.8; }
.login-art .facts { display: flex; gap: 32px; flex-wrap: wrap; }
.login-art .facts b { display: block; font-family: var(--num); font-size: 28px; }
.login-art .facts span { font-size: 13px; color: rgba(255, 255, 255, .6); }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(700px 500px at 100% 0%, var(--p-50), transparent 70%), var(--bg); }
.login-card { width: min(440px, 100%); padding: 40px; border-radius: var(--r-xl); }
.login-card h1 { font-size: 26px; }
.login-card > p { margin-top: 6px; font-size: 14px; color: var(--n-500); }
.login-card .stack { display: grid; gap: 16px; margin-top: 28px; }
.captcha-box { display: flex; gap: 12px; }
.captcha-box .input { flex: 1; }
.captcha { width: 118px; height: 50px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); font: italic 700 24px/1 var(--num); letter-spacing: .3em; text-indent: .3em; color: var(--p-700); background: repeating-linear-gradient(115deg, #fff 0 6px, var(--p-50) 6px 12px); box-shadow: inset 0 0 0 1px var(--n-200); user-select: none; transform: skewX(-4deg); }
.login-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--n-500); }
.login-row a { color: var(--p-600); font-weight: 600; }
.login-foot { margin-top: 24px; text-align: center; font-size: 13px; color: var(--n-400); }

/* ---------- 响应式（后台以 PC 为主，窄屏时侧栏收起） ---------- */
@media (max-width: 1240px) {
  .kpi-grid, .stat-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .edit-layout, .edit-layout.wide-side { grid-template-columns: 1fr; }
  .edit-side { position: static; grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 120; width: 280px; height: auto; margin: 0; border-radius: 0 28px 28px 0; transform: translateX(-104%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sh-xl); }
  body.adm-nav-open .adm-side { transform: none; }
  .adm-menu-btn { display: inline-grid; }
  .adm-topbar { height: 64px; padding: 0 16px; }
  .adm-search { width: auto; flex: 1; min-width: 0; } .adm-search kbd, .adm-user-text { display: none; }
  .adm-content { padding: 18px; }
  .dash-grid, .dash-grid.equal { grid-template-columns: 1fr; }
  .msg-layout, .media-layout { grid-template-columns: 1fr; }
  .import-summary { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .edit-side { grid-template-columns: 1fr; }
  .bar-col span { font-size: 11px; }
}
