Files
yingqing/core/frontend/src/admin-page.css
T

713 lines
17 KiB
CSS

/* 平台后台 · 对齐影擎工作台:白顶栏、冷灰底、Klein 选中、黑胶囊分段。
选择器收敛在 .admin-app / .admin-page,不改共享 .btn/.pill/.input 定义。 */
.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 - var(--topbar-height));
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-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 {
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 10px 8px 8px;
border-radius: 999px;
background: #f3f4f7;
}
.admin-user .av {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--st-black);
color: #fff;
display: grid;
place-items: center;
font-size: 14px;
font-weight: 600;
flex-shrink: 0;
}
.admin-user-meta {
display: flex;
flex-direction: column;
min-width: 0;
flex: 1;
}
.admin-user-meta .nm {
font-size: 13px;
font-weight: 500;
color: var(--st-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.admin-user-meta .rl {
font-size: 11px;
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); }
.admin-app .topbar {
height: var(--topbar-height);
min-height: var(--topbar-height);
padding: 0 28px;
background: #fff;
border-bottom: 1px solid rgba(27, 32, 40, 0.08);
}
.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 {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
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: 1fr 1fr 1fr;
gap: 22px 18px;
align-items: start;
}
.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-toolbar {
display: flex;
align-items: center;
gap: 12px;
margin: 4px 0 16px;
}
.tabs-sub {
display: inline-flex;
gap: 2px;
background: var(--st-wash);
border: 1px solid var(--st-line);
border-radius: 8px;
padding: 3px;
}
.tab-sub {
height: 32px;
padding: 0 14px;
border: 0;
background: transparent;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
color: var(--st-muted);
cursor: pointer;
transition: background 160ms ease, color 160ms ease;
}
.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-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(--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); }
.admin-modal-desc {
font-size: 13px;
color: var(--black-alpha-64);
line-height: 1.6;
margin: 0 0 16px;
}
.modal.modal-wide { max-width: 640px; }
.admin-detail-meta {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px 24px;
margin-bottom: 20px;
}
.admin-detail-meta > div { display: flex; flex-direction: column; gap: 3px; }
.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; }
.qw-stages { display: flex; flex-direction: column; gap: 16px; }
.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(--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;
align-items: center;
gap: 6px;
height: 28px;
padding: 0 12px;
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(--klein);
}
.qw-chip.editing { background: var(--surface); border-color: var(--st-line); padding: 0 6px 0 10px; }
.qw-chip-input {
border: 0;
background: transparent;
outline: none;
font: inherit;
color: var(--accent-black);
width: 110px;
height: 26px;
font-size: 12.5px;
}
.qw-add .qw-chip-input {
width: 150px;
border: 1px dashed var(--black-alpha-24);
border-radius: var(--r-pill);
padding: 0 12px;
height: 28px;
}
.qw-del {
display: inline-grid;
place-items: center;
width: 18px;
height: 18px;
border: 0;
background: transparent;
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;
padding: 0;
margin: 0;
border: 0;
background: transparent;
cursor: zoom-in;
border-radius: var(--r-md);
line-height: 0;
}
.admin-thumb-btn:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--background-base), 0 0 0 4px rgba(0, 47, 167, 0.28);
}
.admin-thumb {
width: 40px;
height: 40px;
border-radius: var(--r-md);
object-fit: cover;
background: var(--background-lighter);
border: 1px solid var(--st-line);
display: block;
pointer-events: none;
}
.admin-thumb-empty { display: inline-block; }
.admin-review-err {
display: inline-grid;
place-items: center;
width: 16px;
height: 16px;
margin-left: 6px;
border-radius: 50%;
background: var(--crimson-bg);
color: var(--accent-crimson);
font-size: 11px;
cursor: help;
}
.admin-bulk-bar {
position: fixed;
left: 50%;
bottom: 28px;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
background: var(--surface-raised);
border: 1px solid var(--st-line);
border-radius: var(--r-md);
z-index: 50;
}
.admin-bulk-count {
font-size: 13px;
color: var(--accent-black);
font-weight: 500;
white-space: nowrap;
}
.admin-anomaly-chip { height: 28px; padding: 0 14px; font-size: 12.5px; cursor: pointer; }
.admin-drawer {
--klein: #002fa7;
--st-muted: #6f747c;
--st-text: #17181a;
--st-line: rgba(34, 42, 54, 0.10);
--st-wash: rgba(34, 42, 54, 0.045);
width: 620px;
max-width: 92vw;
z-index: 1800;
}
.drawer-bg:has(+ .admin-drawer) { z-index: 1790; }
.admin-json {
background: var(--st-wash);
border: 1px solid var(--st-line);
border-radius: var(--r-md);
padding: 12px 14px;
margin: 0 0 16px;
font-family: var(--font-mono);
font-size: 11.5px;
line-height: 1.6;
color: var(--black-alpha-72, var(--accent-black));
white-space: pre-wrap;
overflow-wrap: anywhere;
word-break: break-word;
max-height: 260px;
overflow: auto;
}
.admin-json-err { color: var(--accent-crimson); background: var(--crimson-bg); border-color: var(--crimson-bd); }
.admin-attempt-list {
margin: 0 0 20px;
background: var(--surface);
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(--st-line); }
.admin-attempt-head {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.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;
gap: 6px;
color: var(--accent-black);
font-size: 13.5px;
line-height: 1.5;
}
.admin-attempt-model strong { font-weight: 500; }
.admin-attempt-sep { color: var(--black-alpha-24); }
.admin-attempt-meta {
display: flex;
flex-wrap: wrap;
gap: 4px 14px;
margin-top: 6px;
color: var(--st-muted);
font-size: 11px;
}
.admin-attempt-error {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 10px;
padding: 8px 10px;
background: var(--crimson-bg);
border-radius: var(--r-sm);
color: var(--accent-crimson);
font-size: 12px;
line-height: 1.6;
word-break: break-word;
}
@media (max-width: 640px) {
.admin-attempt-head { align-items: flex-start; flex-wrap: wrap; }
.admin-attempt-kind { width: 100%; margin-left: 0; }
}
.admin-switch-row {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: var(--accent-black);
cursor: pointer;
user-select: none;
margin-top: 4px;
}
.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));
gap: 12px;
margin-bottom: 4px;
}
.gov-card {
display: flex;
flex-direction: column;
gap: 4px;
padding: 16px 18px;
background: #fff;
border: 1px solid var(--st-line);
border-radius: 8px;
}
.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(--klein); }
.gov-label { font-size: 12px; color: var(--st-muted); }
.gov-total { margin-left: auto; font-size: 12px; color: var(--st-muted); }
.pt-list { display: flex; flex-direction: column; gap: 14px; }
.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(--st-muted); }
.pt-head .spacer { flex: 1; }
.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(--st-muted); }
.pt-ratios { display: inline-flex; gap: 6px; }
.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; }
}