完善后台样式

This commit is contained in:
Azmat@qq.com
2026-08-20 11:06:22 +08:00
parent b883fed981
commit c7520e93b7
2 changed files with 537 additions and 188 deletions
+406 -100
View File
@@ -1,44 +1,130 @@
/* 平台超管后台 · 仅补充 admin 专属的少量样式;外壳/导航/卡片全部复用 design-restraint.css 共享类。
遵守铁律:只用 token,不写裸 hex,8px 圆角,单橙 accent。 */
/* 平台后台 · 对齐影擎工作台:白顶栏、冷灰底、Klein 选中、黑胶囊分段。
选择器收敛在 .admin-app / .admin-page,不改共享 .btn/.pill/.input 定义。 */
/* 品牌下方的超管标记(mono 品牌签名) */
.admin-badge {
margin: 2px 0 14px;
padding: 0 4px;
font-size: 11px;
color: var(--black-alpha-48);
.admin-app {
--klein: #002fa7;
--klein-hover: #002680;
--st-black: #101012;
--st-muted: #6f747c;
--st-text: #17181a;
--st-line: rgba(34, 42, 54, 0.10);
--st-wash: rgba(34, 42, 54, 0.045);
--st-hover: rgba(34, 42, 54, 0.08);
}
.admin-app .sidebar .nav-panel {
display: flex;
flex-direction: column;
height: calc(100vh - 116px);
min-height: 0;
padding: 10px 0 0;
overflow: hidden;
}
.admin-rail {
flex: 1;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
padding: 0 16px 12px;
}
.admin-rail-mark {
margin: 4px 8px 10px;
font-size: 12px;
font-weight: 500;
color: var(--st-muted);
letter-spacing: 0.04em;
}
.admin-nav-group {
margin-bottom: 2px;
.admin-nav-group { margin-top: 10px; }
.admin-group {
margin: 0 8px 4px;
padding: 8px 4px 2px;
font-size: 12px;
font-weight: 500;
color: var(--st-muted);
}
.admin-link {
width: 100%;
min-height: 38px;
display: flex;
align-items: center;
gap: 10px;
padding: 0 12px;
border: 0;
border-radius: 10px;
background: transparent;
color: rgba(39, 42, 47, 0.62);
font: inherit;
font-size: 13px;
font-weight: 600;
text-align: left;
cursor: pointer;
transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.admin-link svg {
width: 16px;
height: 16px;
flex: 0 0 auto;
color: currentColor;
}
.admin-link:hover {
color: var(--klein);
background: rgba(0, 47, 167, 0.055);
transform: translateX(2px);
}
.admin-link.active {
color: var(--klein);
background: rgba(0, 47, 167, 0.09);
}
/* 侧栏底部:返回工作台 + 超管身份 + 退出 */
.admin-foot {
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px 16px 16px;
border-top: 1px solid var(--st-line);
background: rgba(28, 34, 43, 0.02);
}
.admin-back {
align-self: flex-start;
display: inline-flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--st-muted);
font: inherit;
font-size: 13px;
font-weight: 500;
cursor: pointer;
}
.admin-back:hover { color: var(--st-text); background: var(--st-hover); }
.admin-back svg { width: 16px; height: 16px; }
.admin-user {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
border-radius: var(--r-md);
padding: 8px 10px 8px 8px;
border-radius: 999px;
background: #f3f4f7;
}
.admin-user .av {
width: 30px;
height: 30px;
border-radius: 6px;
background: var(--heat-12);
color: var(--heat);
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--st-black);
color: #fff;
display: grid;
place-items: center;
font-size: 13px;
font-size: 14px;
font-weight: 600;
flex-shrink: 0;
}
@@ -51,74 +137,267 @@
.admin-user-meta .nm {
font-size: 13px;
font-weight: 500;
color: var(--accent-black);
color: var(--st-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.admin-user-meta .rl {
font-size: 11px;
color: var(--black-alpha-48);
letter-spacing: 0.02em;
color: var(--st-muted);
}
.admin-logout {
width: 32px;
height: 32px;
display: grid;
place-items: center;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--st-muted);
cursor: pointer;
flex-shrink: 0;
}
.admin-logout:hover { color: var(--st-text); background: var(--st-hover); }
/* 概览页快捷入口网格(复用 .shortcut 卡片) */
.admin-tip {
margin-bottom: 0;
.admin-app .topbar {
height: 116px;
min-height: 116px;
padding: 0 28px;
background: #fff;
border-bottom: 1px solid rgba(27, 32, 40, 0.08);
}
.admin-shortcut-grid {
.admin-crumb {
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
color: var(--st-muted);
}
.admin-crumb button {
border: 0;
background: transparent;
color: var(--st-muted);
font: inherit;
font-size: 14px;
cursor: pointer;
padding: 0;
}
.admin-crumb button:hover { color: var(--st-text); }
.admin-crumb span {
color: var(--st-text);
font-weight: 500;
}
.admin-crumb span::before {
content: "/";
margin-right: 10px;
color: var(--st-muted);
font-weight: 400;
}
.admin-mode {
display: inline-flex;
align-items: center;
height: 32px;
padding: 0 12px;
border-radius: 999px;
background: rgba(0, 47, 167, 0.08);
color: var(--klein);
font-size: 12px;
font-weight: 600;
}
.admin-page {
width: 100%;
max-width: none;
box-sizing: border-box;
margin: -24px -28px -60px;
padding: 52px clamp(40px, 3.2vw, 68px) 48px;
}
.admin-page .page-head {
margin-bottom: 28px;
}
.admin-page .page-head h1 {
margin: 0;
font-size: 32px;
line-height: 1.2;
letter-spacing: -.02em;
font-weight: 600;
color: var(--accent-black);
}
.admin-page .page-head .sub,
.admin-page .page-head p {
margin: 10px 0 0;
font-size: 15px;
color: var(--st-muted);
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.admin-page .page-head .sub .mono {
color: var(--st-muted);
letter-spacing: 0;
}
.admin-overview {
width: min(1220px, 100%);
margin: 0;
}
.admin-welcome {
width: 100%;
margin-bottom: 22px;
}
.admin-welcome h1 {
margin: 0 0 8px;
font-size: 28px;
line-height: 1.2;
font-weight: 600;
letter-spacing: -.02em;
color: var(--accent-black);
}
.admin-welcome p {
margin: 0;
color: #363a41;
font-size: 14px;
}
.admin-groups {
width: 100%;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 14px;
margin-top: 24px;
grid-template-columns: 1fr 1fr 1fr;
gap: 22px 18px;
align-items: start;
}
.admin-shortcut-text {
.admin-col {
display: grid;
gap: 18px;
align-content: start;
}
.admin-group-block { display: grid; gap: 8px; }
.admin-group-label {
display: flex;
align-items: baseline;
gap: 8px;
padding-left: 2px;
}
.admin-group-label strong {
font-size: 13px;
font-weight: 600;
color: var(--accent-black);
}
.admin-group-label span {
color: var(--st-muted);
font-size: 12px;
line-height: 1.4;
}
.admin-entry-pair {
display: grid;
gap: 8px;
}
.admin-entry {
width: 100%;
height: 68px;
display: grid;
grid-template-columns: 24px minmax(0, 1fr) 16px;
align-items: center;
gap: 10px;
padding: 0 14px;
border: 1px solid rgba(203, 208, 216, 0.72);
border-radius: 10px;
background: rgba(249, 250, 252, 0.9);
color: #263247;
font: inherit;
text-align: left;
cursor: pointer;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.96),
0 6px 16px rgba(20, 27, 38, 0.07);
transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.admin-entry:hover {
transform: translateY(-2px);
background: rgba(252, 253, 254, 0.94);
box-shadow:
inset 0 1px 0 #fff,
0 10px 22px rgba(42, 53, 74, 0.12);
}
.admin-entry svg {
display: block;
width: 20px;
height: 20px;
flex-shrink: 0;
color: var(--klein);
}
.admin-entry svg:last-child { color: #263247; width: 16px; height: 16px; }
.admin-entry-copy {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
text-align: left;
}
.admin-entry-copy strong {
font-size: 14px;
font-weight: 600;
letter-spacing: -.01em;
}
.admin-entry-copy small {
overflow: hidden;
color: #727b8a;
font-size: 11px;
font-weight: 400;
line-height: 1.35;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 顶栏面包屑链接可点 */
.admin-app .topbar .crumbs a {
cursor: pointer;
}
/* ── 邀请码页:筛选条 + 表格 + 弹窗 ── */
.admin-toolbar {
display: flex;
align-items: center;
gap: 12px;
margin: 4px 0 16px;
}
/* 类型筛选 = 模式切换段控(模式切换用黑激活,不抢主橙) */
.tabs-sub {
display: inline-flex;
gap: 2px;
background: var(--surface);
border: 1px solid var(--border-faint);
border-radius: var(--r-md);
background: var(--st-wash);
border: 1px solid var(--st-line);
border-radius: 8px;
padding: 3px;
}
.tab-sub {
height: 28px;
height: 32px;
padding: 0 14px;
border: 0;
background: transparent;
border-radius: 6px;
font-size: 12.5px;
color: var(--black-alpha-56);
font-size: 13px;
font-weight: 500;
color: var(--st-muted);
cursor: pointer;
transition: background var(--t-base), color var(--t-base);
transition: background 160ms ease, color 160ms ease;
}
.tab-sub:hover { background: var(--black-alpha-4); color: var(--accent-black); }
.tab-sub.active { background: var(--accent-black); color: var(--accent-white); }
.tab-sub:hover { background: var(--st-hover); color: var(--st-text); }
.tab-sub.active { background: var(--st-black); color: #fff; }
.admin-search { width: 220px; margin-left: auto; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; }
.admin-page table.t.admin-table {
background: #fff;
border-color: var(--st-line);
border-radius: 8px;
}
.admin-page table.t.admin-table thead th {
background: var(--st-wash);
border-bottom-color: var(--st-line);
text-transform: none;
letter-spacing: 0;
font-family: inherit;
font-size: 12px;
color: var(--st-muted);
}
.admin-table .admin-code { font-size: 12.5px; color: var(--accent-black); letter-spacing: 0.02em; }
.admin-table .col-time { color: var(--black-alpha-56); font-size: 12px; }
.admin-table .col-time { color: var(--st-muted); font-size: 12px; }
.admin-table .col-actions { text-align: right; white-space: nowrap; }
.admin-table td .muted { color: var(--black-alpha-32); }
.admin-table .btn-ghost.danger:hover { color: var(--accent-crimson); }
@@ -130,8 +409,6 @@
margin: 0 0 16px;
}
/* ── 团队 / 用户管理 ── */
.admin-search { width: 220px; margin-left: auto; }
.modal.modal-wide { max-width: 640px; }
.admin-detail-meta {
display: grid;
@@ -140,18 +417,19 @@
margin-bottom: 20px;
}
.admin-detail-meta > div { display: flex; flex-direction: column; gap: 3px; }
.admin-detail-meta .k { font-size: 11.5px; color: var(--black-alpha-48); font-family: var(--font-mono); }
.admin-detail-meta .k { font-size: 11.5px; color: var(--st-muted); }
.admin-detail-meta .v { font-size: 14px; color: var(--accent-black); }
.admin-detail-subhead { font-size: 13px; font-weight: 500; color: var(--accent-black); margin: 8px 0 10px; }
.admin-inline-pill { margin-left: 8px; }
/* ── 质量词:按 stage 分组 + 编辑模式 chip ── */
.qw-stages { display: flex; flex-direction: column; gap: 16px; }
.qw-stage { padding: 18px 20px; }
.qw-stage {
padding: 18px 20px;
}
.qw-stage-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.qw-stage-title { font-size: 14px; font-weight: 500; color: var(--accent-black); }
.qw-stage-hint { font-size: 11px; color: var(--black-alpha-48); }
.qw-empty { font-size: 12px; color: var(--black-alpha-48); }
.qw-stage-hint { font-size: 11px; color: var(--st-muted); }
.qw-empty { font-size: 12px; color: var(--st-muted); }
.qw-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qw-chip {
display: inline-flex;
@@ -159,13 +437,13 @@
gap: 6px;
height: 28px;
padding: 0 12px;
background: var(--heat-12);
border: 1px solid var(--heat-20);
background: rgba(0, 47, 167, 0.07);
border: 1px solid rgba(0, 47, 167, 0.16);
border-radius: var(--r-pill);
font-size: 12.5px;
color: var(--heat);
color: var(--klein);
}
.qw-chip.editing { background: var(--surface); border-color: var(--border-faint); padding: 0 6px 0 10px; }
.qw-chip.editing { background: var(--surface); border-color: var(--st-line); padding: 0 6px 0 10px; }
.qw-chip-input {
border: 0;
background: transparent;
@@ -190,13 +468,12 @@
height: 18px;
border: 0;
background: transparent;
color: var(--black-alpha-48);
color: var(--st-muted);
cursor: pointer;
border-radius: 50%;
}
.qw-del:hover { color: var(--accent-crimson); background: var(--black-alpha-4); }
/* ── 资产审核队列 ── */
.admin-table .col-check { width: 36px; text-align: center; }
.admin-thumb-btn {
display: block;
@@ -210,7 +487,7 @@
}
.admin-thumb-btn:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px var(--heat-40);
box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px rgba(0, 47, 167, 0.28);
}
.admin-thumb {
width: 40px;
@@ -218,7 +495,7 @@
border-radius: var(--r-md);
object-fit: cover;
background: var(--background-lighter);
border: 1px solid var(--border-faint);
border: 1px solid var(--st-line);
display: block;
pointer-events: none;
}
@@ -235,8 +512,6 @@
font-size: 11px;
cursor: help;
}
/* 独立类名,避开商品库/项目页全局黑底 `.bulk-bar button`(白字透明边),
否则管理台白底浮条上按钮文字不可见,只剩一条扁边框。 */
.admin-bulk-bar {
position: fixed;
left: 50%;
@@ -247,9 +522,8 @@
gap: 12px;
padding: 10px 16px;
background: var(--surface-raised);
border: 1px solid var(--border-faint);
border: 1px solid var(--st-line);
border-radius: var(--r-md);
box-shadow: var(--shadow-floating);
z-index: 50;
}
.admin-bulk-count {
@@ -259,12 +533,11 @@
white-space: nowrap;
}
/* ── 任务监控 ── */
.admin-anomaly-chip { height: 28px; padding: 0 14px; font-size: 12.5px; cursor: pointer; }
.admin-drawer { width: 620px; max-width: 92vw; }
.admin-json {
background: var(--background-lighter);
border: 1px solid var(--border-faint);
background: var(--st-wash);
border: 1px solid var(--st-line);
border-radius: var(--r-md);
padding: 12px 14px;
margin: 0 0 16px;
@@ -281,22 +554,20 @@
.admin-attempt-list {
margin: 0 0 20px;
background: var(--surface);
border: 1px solid var(--border-muted);
border: 1px solid var(--st-line);
border-radius: var(--r-md);
overflow: hidden;
}
.admin-attempt {
padding: 14px 16px;
}
.admin-attempt + .admin-attempt { border-top: 1px solid var(--border-faint); }
.admin-attempt { padding: 14px 16px; }
.admin-attempt + .admin-attempt { border-top: 1px solid var(--st-line); }
.admin-attempt-head {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.admin-attempt-seq { color: var(--black-alpha-48); font-size: 11px; }
.admin-attempt-kind { margin-left: auto; color: var(--black-alpha-56); font-size: 11px; }
.admin-attempt-seq { color: var(--st-muted); font-size: 11px; }
.admin-attempt-kind { margin-left: auto; color: var(--st-muted); font-size: 11px; }
.admin-attempt-model {
display: flex;
align-items: baseline;
@@ -312,7 +583,7 @@
flex-wrap: wrap;
gap: 4px 14px;
margin-top: 6px;
color: var(--black-alpha-48);
color: var(--st-muted);
font-size: 11px;
}
.admin-attempt-error {
@@ -334,7 +605,6 @@
.admin-attempt-kind { width: 100%; margin-left: 0; }
}
/* ── 计费 / 额度策略 ── */
.admin-switch-row {
display: flex;
align-items: center;
@@ -345,9 +615,8 @@
user-select: none;
margin-top: 4px;
}
.admin-switch-row input { width: 14px; height: 14px; accent-color: var(--heat); }
.admin-switch-row input { width: 14px; height: 14px; accent-color: var(--klein); }
/* ── 治理:数据体检卡 + 项目监控 ── */
.gov-integrity {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
@@ -359,32 +628,69 @@
flex-direction: column;
gap: 4px;
padding: 16px 18px;
background: var(--surface);
border: 1px solid var(--border-faint);
border-radius: var(--r-md);
background: #fff;
border: 1px solid var(--st-line);
border-radius: 8px;
}
.gov-card.warn { border-color: var(--heat-20); background: var(--heat-12); }
.gov-card.warn { border-color: rgba(0, 47, 167, 0.22); background: rgba(0, 47, 167, 0.06); }
.gov-count { font-size: 28px; font-weight: 500; color: var(--accent-black); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gov-card.warn .gov-count { color: var(--heat); }
.gov-label { font-size: 12px; color: var(--black-alpha-56); }
.gov-total { margin-left: auto; font-size: 12px; color: var(--black-alpha-48); }
.gov-card.warn .gov-count { color: var(--klein); }
.gov-label { font-size: 12px; color: var(--st-muted); }
.gov-total { margin-left: auto; font-size: 12px; color: var(--st-muted); }
/* 提示词模板页(仅 token,8px 圆角,单橙 accent) */
.pt-list { display: flex; flex-direction: column; gap: 14px; }
.pt-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.pt-card {
padding: 16px 18px;
display: flex;
flex-direction: column;
gap: 12px;
}
.pt-card.pt-off { opacity: .6; }
.pt-head { display: flex; align-items: center; gap: 10px; }
.pt-title { font-size: 14px; font-weight: 600; color: var(--accent-black); }
.pt-key { font-size: 11.5px; color: var(--black-alpha-40); }
.pt-key { font-size: 11.5px; color: var(--st-muted); }
.pt-head .spacer { flex: 1; }
.pt-enabled { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--black-alpha-56); cursor: pointer; }
.pt-vars { font-size: 11.5px; color: var(--black-alpha-48); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pt-vars code { background: var(--heat-12); color: var(--heat); border-radius: var(--r-sm); padding: 1px 6px; }
.pt-vars-hint { color: var(--black-alpha-40); }
.pt-textarea { width: 100%; box-sizing: border-box; background: var(--background-base); border: 1px solid var(--border-faint); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; line-height: 1.6; color: var(--accent-black); font-family: var(--font-mono); resize: vertical; outline: none; transition: border-color var(--t-base), box-shadow var(--t-base); }
.pt-textarea:focus { border-color: var(--heat); box-shadow: 0 0 0 3px var(--heat-12); }
.pt-enabled { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-muted); cursor: pointer; }
.pt-vars { font-size: 11.5px; color: var(--st-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pt-vars code {
background: rgba(0, 47, 167, 0.08);
color: var(--klein);
border-radius: var(--r-sm);
padding: 1px 6px;
}
.pt-vars-hint { color: var(--st-muted); }
.pt-textarea {
width: 100%;
box-sizing: border-box;
background: var(--st-wash);
border: 1px solid var(--st-line);
border-radius: var(--r-sm);
padding: 10px 12px;
font-size: 13px;
line-height: 1.6;
color: var(--accent-black);
font-family: var(--font-mono);
resize: vertical;
outline: none;
}
.pt-textarea:focus { border-color: var(--klein); box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.12); }
.pt-foot { display: flex; align-items: center; gap: 8px; }
.pt-ratio-label { font-size: 11.5px; color: var(--black-alpha-48); }
.pt-ratio-label { font-size: 11.5px; color: var(--st-muted); }
.pt-ratios { display: inline-flex; gap: 6px; }
.pt-ratio-na { font-size: 12px; color: var(--black-alpha-40); }
.pt-ratio-na { font-size: 12px; color: var(--st-muted); }
.pt-foot .spacer { flex: 1; }
.admin-page .card-hard {
background: #fff;
border-color: var(--st-line);
}
.admin-page .empty-state {
padding: 56px 24px;
background: var(--st-wash);
border: 1px dashed var(--st-line);
}
@media (max-width: 1100px) {
.admin-page { margin: -28px -24px -48px; padding: 28px 24px 40px; }
.admin-groups { grid-template-columns: 1fr; }
}