feat: redesign the web console with Vue and isolated account workspaces

This commit is contained in:
AttilaNet
2026-11-11 09:35:54 +08:00
parent 99aff423d8
commit ff6a828f58
46 changed files with 4549 additions and 748 deletions
+204
View File
@@ -0,0 +1,204 @@
/* Application frame: web navigation and document scrolling. */
.console-shell { min-width: 0; min-height: 100dvh; }
.skip-link { position: fixed; top: 10px; left: 240px; z-index: 100; padding: 8px 14px; border-radius: 5px; background: var(--accent); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; width: var(--sidebar-width); height: 100dvh; overflow: hidden; overscroll-behavior: contain; background: var(--sidebar); color: var(--sidebar-text); scrollbar-width: auto; scrollbar-color: #43516a transparent; }
.sidebar-brand { display: flex; align-items: center; flex: 0 0 auto; gap: 11px; min-height: 84px; padding: 18px 20px; color: #fff; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.brand-mark { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 36px; border-radius: 7px; background: #2563eb; color: #fff; }
.brand-mark .icon { width: 23px; height: 23px; }
.sidebar-brand strong { display: block; font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.sidebar-brand small { display: block; margin-top: 2px; color: #b3bfd2; font-size: 11px; }
.sidebar > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 9px 12px 20px; scrollbar-width: auto; }
.nav-group { margin: 14px 0 0; }
.nav-group h2 { margin: 0 12px 6px; color: #99a9bf; font-size: 12px; font-weight: 500; }
.nav-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; margin: 2px 0; padding: 8px 12px; border: 0; border-radius: 5px; color: var(--sidebar-text); background: transparent; text-decoration: none; line-height: 1.5; text-align: left; }
.nav-link span { min-width: 0; overflow-wrap: anywhere; }
.nav-link .icon { width: 17px; height: 17px; flex-basis: 17px; opacity: .9; }
.nav-link:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.nav-link.selected, .nav-link.active, .nav-link[aria-current="page"] { color: #fff; background: #2563eb; font-weight: 550; }
.sidebar :focus-visible { outline-color: #9ec4ff; outline-offset: 2px; }
.sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; flex: 0 0 auto; margin-top: auto; padding: 16px 20px; border-top: 1px solid rgb(255 255 255 / 10%); color: #aab9cf; font-size: 11px; }
.sidebar-footer > :last-child { margin-left: auto; }
.sidebar-footer .status-dot { background: #77c897; }
.console-main { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; min-height: var(--topbar-height); padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.context-bar { display: flex; align-items: center; flex: 1 1 auto; gap: 16px; min-width: 0; }
.context-divider { height: 22px; width: 1px; background: var(--border); flex: 0 0 1px; }
.workspace-name { flex: 0 0 auto; white-space: nowrap; font-weight: 600; }
.account-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-picker { flex: 0 1 260px; }
.account-picker > .icon { color: var(--muted); }
.account-picker select { width: 100%; min-width: 0; }
.user-actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: 10px; }
.user-actions > .text-button { color: var(--muted); font-size: 13px; }
.user-actions > .danger-text { color: var(--danger); }
.content-area { flex: 1 1 auto; width: 100%; min-width: 0; padding: 20px 24px 0; }
.content-area > * { min-width: 0; max-width: 100%; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-heading > div { min-width: 0; }
.page-description { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.page-heading > .button-row { flex: 0 0 auto; padding-top: 2px; }
.global-view { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.global-view.panel { gap: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-card > span { color: var(--muted); font-size: 13px; }
.metric-card > strong, .metric-value { margin: 7px 0 6px; font-size: 30px; line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.metric-card > small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.metric-attention > strong { color: var(--warning); }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-width: 0; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.panel-heading > div { min-width: 0; }
.panel-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.panel-heading > .icon { color: var(--muted); }
.panel > .filter-bar { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.overview-grid, .info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.overview-note { display: flex; align-items: flex-start; gap: 10px; padding: 0 2px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.overview-note > .icon { margin-top: 2px; color: #697c98; }
.attention-list { list-style: none; margin: 0; padding: 0 20px; }
.attention-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.attention-list li:last-child { border-bottom: 0; }
.attention-list li > span { flex: 1 1 180px; color: var(--danger); overflow-wrap: anywhere; }
.account-resource-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.resource-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding-right: 20px; border-right: 1px solid var(--border); }
.resource-identity strong { max-width: 220px; overflow-wrap: anywhere; }
.resource-identity > span:last-child { color: var(--muted); font-size: 12px; }
.resource-item { display: flex; flex-direction: column; min-width: 48px; font-variant-numeric: tabular-nums; }
.resource-item > span { color: var(--muted); font-size: 12px; }
.resource-item strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.context-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.inline-label, .checkbox-label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 13px; }
.inline-label select { color: var(--text); }
.workspace-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 18px; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; max-width: 100%; padding: 2px 8px; border-radius: 4px; background: #edf1f6; color: #526079; font-size: 12px; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.status-pill.success { color: #17613c; background: var(--green-tint); }
.status-pill.warning { color: #80510b; background: var(--warning-tint); }
.status-pill.danger { color: #a32634; background: var(--danger-tint); }
.status-pill.neutral { color: #526079; background: #edf1f6; }
.status-pill .icon { width: 13px; height: 13px; flex-basis: 13px; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.empty-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 216px; padding: 32px 20px; text-align: center; }
.empty-block p { max-width: 60ch; color: var(--muted); font-size: 13px; }
.empty-block > .icon, .empty-icon { color: #8293ad; }
.empty-block > .icon { width: 30px; height: 30px; flex-basis: 30px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 3px; border-radius: 50%; background: #f0f4fa; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-block button { margin-top: 4px; }
.account-table-scroll { width: 100%; min-width: 0; max-width: 100%; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); scrollbar-width: auto; }
.account-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; font-size: 13px; }
.account-table th { padding: 11px 20px; background: var(--surface-subtle); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--border); }
.account-table td { padding: 15px 20px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.account-table tr:last-child td { border-bottom: 0; }
.account-table tbody tr:hover { background: #f8faff; }
.account-table .current-account-row { background: #fbfcff; }
.account-name-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #dce7fb; border-radius: 7px; background: #edf3ff; color: #315fa8; font-size: 14px; font-weight: 600; }
button.account-name { justify-content: flex-start; min-height: auto; max-width: 210px; padding: 0; font-weight: 600; overflow-wrap: anywhere; text-align: left; }
.current-label, .table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.current-label { color: var(--accent); }
.account-player { display: block; max-width: 200px; overflow-wrap: anywhere; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; white-space: nowrap; }
.row-actions-heading { text-align: right; }
.row-actions .icon { width: 14px; height: 14px; flex-basis: 14px; }
.system-card { display: flex; flex-direction: column; min-width: 0; padding-bottom: 20px; }
.system-card > p, .system-card > .button-row, .system-card > dl { margin: 16px 20px 0; }
.system-card > p { color: var(--muted); font-size: 13px; }
.system-card > .button-row { margin-top: auto; padding-top: 18px; }
.system-facts { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px 16px; font-size: 13px; }
.system-facts dt { color: var(--muted); }
.system-facts dd { margin: 0; overflow-wrap: anywhere; }
.log-dock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 10px; }
.log-dock > button { font-size: 12px; }
.activity-panel { margin-top: 12px; }
.activity-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.search-field { display: block; min-width: 0; }
.search-field input { width: 240px; max-width: 100%; }
.activity-lines { max-height: 380px; min-height: 160px; margin: 0; padding: 6px 0; overflow: auto; list-style: none; border-radius: 0 0 var(--radius) var(--radius); background: #fcfdff; }
.activity-line { display: grid; grid-template-columns: 72px 38px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 6px 20px; border-bottom: 1px solid #f0f3f7; font-size: 12px; line-height: 1.7; }
.activity-line:last-child { border-bottom: 0; }
.log-time { color: #68768c; font-variant-numeric: tabular-nums; }
.log-level { color: #526079; font-size: 11px; }
.log-message { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
button.log-message { justify-content: flex-start; min-height: 0; padding: 0 3px; border: 0; background: transparent; font: inherit; color: var(--accent); text-align: left; }
button.log-message .icon { width: 13px; height: 13px; flex-basis: 13px; }
.activity-line.error .log-level, .activity-line.error .log-message { color: var(--danger); }
.activity-line.warning .log-level, .activity-line.warning .log-message { color: #855509; }
.activity-line.debug .log-message { color: var(--muted); }
.pending-jobs { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 0; color: var(--muted); font-size: 12px; }
.pending-jobs > span { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.console-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 28px; padding: 16px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.connection-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid #ebc48d; border-radius: 6px; background: var(--warning-tint); color: #80510b; font-size: 13px; }
.connection-error > span { flex: 1 1 200px; overflow-wrap: anywhere; }
.startup-error, .console-loading { width: min(560px, calc(100% - 32px)); margin: 12vh auto; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.startup-error p, .console-loading p { margin: 12px 0 20px; color: var(--muted); }
.mobile-sidebar-toggle, .drawer-scrim, .sidebar-close { display: none; }
@media (max-width: 1180px) and (min-width: 901px) {
.topbar { padding-inline: 20px; gap: 10px; }
.context-bar { gap: 10px; }
.account-picker { flex-basis: 190px; }
.user-actions { gap: 5px; }
.user-actions #save-status { display: none; }
.resource-identity { flex-basis: 100%; border: 0; padding: 0; }
}
@media (max-width: 900px) {
.console-main { margin-left: 0; }
.sidebar { transform: translateX(-100%); visibility: hidden; transition: transform 180ms ease, visibility 180ms ease; }
.console-shell.drawer-open .sidebar { transform: translateX(0); visibility: visible; }
.drawer-scrim { display: block; position: fixed; inset: 0; z-index: 40; width: 100%; max-width: none; height: 100dvh; min-height: 0; padding: 0; border: 0; border-radius: 0; background: rgb(15 26 43 / 48%); }
.drawer-scrim:hover:not(:disabled) { background: rgb(15 26 43 / 48%); border: 0; }
.mobile-sidebar-toggle { display: inline-flex; }
.sidebar-close { display: flex; justify-content: space-between; min-height: 40px; margin: 10px 12px 0; padding-inline: 12px; border-color: #485771; background: #1e2e47; color: #e2e9f4; }
.sidebar-close:hover:not(:disabled) { background: #2b3e5b; border-color: #7385a1; }
.desktop-only { display: none !important; }
.topbar { padding-inline: 16px; gap: 12px; }
.context-bar { gap: 10px; }
.content-area { padding-inline: 20px; }
.skip-link { left: 16px; }
.resource-identity { border: 0; padding: 0; }
}
@media (max-width: 600px) {
:root { --control-height: 38px; }
.topbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
.context-bar { flex: 1 1 100%; gap: 8px; }
.account-picker { flex: 1 1 120px; gap: 5px; }
.account-picker > .icon, .context-divider { display: none; }
.account-picker select { font-size: 12px; }
.user-actions { justify-content: flex-end; width: 100%; gap: 8px; }
.user-actions .icon-button { width: 34px; }
.user-actions > .text-button { font-size: 12px; }
.content-area { padding: 16px 14px 0; }
.breadcrumb { gap: 5px; margin-bottom: 12px; font-size: 11px; }
.page-heading { flex-direction: column; gap: 12px; margin-bottom: 16px; }
h1 { font-size: 22px; }
.page-heading > .button-row { flex: 0 1 auto; padding: 0; }
.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric-card { padding: 14px; }
.metric-card > strong { font-size: 27px; }
.metric-card > small { font-size: 11px; }
.global-view { gap: 14px; }
.panel-heading { padding: 14px; gap: 10px; }
.panel-heading > .button-row { width: 100%; }
.panel > .filter-bar { padding: 12px 14px; }
.overview-grid, .info-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.account-resource-bar { gap: 14px 18px; padding: 14px; }
.resource-identity { flex-basis: 100%; }
.resource-identity strong { max-width: 180px; }
.context-actions { flex-basis: 100%; justify-content: space-between; margin-left: 0; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.context-actions .inline-label { flex-wrap: wrap; }
.empty-block { padding: 28px 16px; }
.system-card > p, .system-card > .button-row, .system-card > dl { margin-inline: 14px; }
.activity-filters { padding: 12px 14px; gap: 10px 12px; }
.activity-filters .search-field { width: 100%; }
.activity-filters .search-field input { width: 100%; }
.activity-filters .flex-spacer { display: none; }
.activity-line { grid-template-columns: 62px 30px minmax(0, 1fr); gap: 6px; padding-inline: 12px; font-size: 11px; }
.console-status { margin-top: 20px; }
.sidebar-close, .mobile-sidebar-toggle, .dialog-close { min-height: 40px; }
}
@media (max-width: 600px) { .activity-line { font-size: 12px; } }
+119
View File
@@ -0,0 +1,119 @@
/* Account views share data contracts, but use the web console's visual system. */
.page-host, .page-panel, .page-content { width: 100%; min-width: 0; max-width: 100%; }
.page-panel { display: flex; flex-direction: column; gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.page-header { display: flex; align-items: center; min-height: 14px; }
.page-header h2 { display: none; }
.page-loading { margin-left: auto; color: var(--muted); font-size: 12px; }
.page-loading[data-loading=true]::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); }
.page-summary { margin: 0; color: var(--muted); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-summary:empty, .page-toolbar:empty, .policy-form:empty { display: none; }
.page-error { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border: 1px solid #ecc3c7; border-radius: 7px; background: #fff5f5; color: #a42a37; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-toolbar, .filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.filter-bar { padding: 12px 0; border-block: 1px solid var(--border); }
.filter-bar label { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.filter-bar label > span { flex: 0 0 auto; white-space: nowrap; }
.filter-bar label:has(input[type=search]) { flex: 1 1 300px; max-width: 600px; }
.filter-bar input[type=search] { flex: 1 1 auto; min-width: 0; width: 280px; max-width: 100%; }
.filter-bar select { max-width: min(100%, 360px); }
.subtabs { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; border-bottom: 1px solid var(--border); }
.subtab { flex: 0 0 auto; padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); }
.subtab[aria-selected=true] { border-bottom-color: var(--accent); background: var(--tint); color: var(--accent); font-weight: 600; }
.page-content { display: flex; flex-direction: column; gap: 14px; }
.policy-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-section { margin: 0; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; }
.form-section legend { padding: 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px 24px; min-width: 0; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; max-width: 100%; }
.field-label { min-width: 0; color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.field-input { min-width: 0; max-width: 100%; }
.field.checkbox-field { flex-direction: row; align-items: center; justify-content: flex-start; }
.field.checkbox-field .field-label { flex: 1; }
.field-wide, .field-help { grid-column: 1 / -1; }
.field-help, .inline-note, .info-note { color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.info-note { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--surface-subtle); }
.field[data-dirty=true] .field-label::after { content: ' ·'; color: var(--warning); }
.field.invalid input { border-color: var(--danger); }
.inline-editor, .multi-select, .member-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.multi-select label { display: inline-flex; align-items: center; gap: 6px; }
.member-selects select { width: 190px; max-width: 100%; }
.member-draft-note { flex-basis: 100%; font-size: 12px; color: var(--warning); }
.counts-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.counts-editor { min-width: 0; }
.count-id { width: 110px; }
.login-layout { display: flex; flex-direction: column; gap: 20px; max-width: 800px; padding: 4px 0; }
.login-layout > form { padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-subtle); }
.login-layout input[type=text], .login-layout input[type=password] { width: 100%; }
.login-options, .login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.login-options label { display: flex; align-items: center; gap: 6px; }
.server-row { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.server-row select { flex: 1 1 220px; min-width: 0; }
.session-block { padding-top: 20px; border-top: 1px solid var(--border); }
.initial-state, .empty-state { padding: 32px 20px; color: var(--muted); line-height: 1.8; text-align: center; }
.empty-state button { margin-top: 14px; }
.table-scroll { position: relative; width: 100%; max-width: 100%; min-width: 0; max-height: 65vh; min-height: 80px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); scrollbar-width: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; border-bottom: 1px solid var(--border-strong); background: #f3f6fb; color: #41516c; font-weight: 600; text-align: center; }
.data-table th button { display: flex; align-items: center; justify-content: center; width: 100%; gap: 6px; min-height: 26px; padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; }
.data-table th .sort-mark { color: var(--accent); font-size: 10px; }
.data-table td { height: 44px; max-width: 280px; padding: 7px 12px; overflow: hidden; border-bottom: 1px solid #e9edf3; text-align: center; text-overflow: ellipsis; }
.data-table th:first-child, .data-table th:nth-child(2), .data-table td:first-child, .data-table td:nth-child(2) { text-align: left; }
.data-table th:first-child button, .data-table th:nth-child(2) button { justify-content: flex-start; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:nth-child(even) td { background: #fafbfd; }
.data-table tr:hover td { background: #f2f6fd; }
.data-table tr[aria-selected=true] td { background: #eaf2ff; }
.data-table .selection-cell { position: sticky; left: 0; z-index: 1; width: 40px; min-width: 40px; padding: 8px; text-align: center !important; background: var(--surface); }
.data-table th.selection-cell { z-index: 3; background: #f3f6fb; }
.data-table td.cell-edit { padding: 5px 8px; }
.data-table .cell-edit input[type=number] { width: 90px; min-width: 64px; min-height: 32px; text-align: center; }
.data-table .cell-edit select { max-width: 260px; min-height: 32px; }
.data-table .cell-edit input[type=text] { width: 150px; }
.data-table .cell-edit .inline-editor { justify-content: center; }
.data-table .cell-wrap { min-width: 190px; white-space: normal; overflow-wrap: anywhere; line-height: 1.7; }
.data-table .cell-ellipsis { max-width: 280px; }
.table-footer, .table-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0 0; color: var(--muted); font-size: 12px; }
.table-page-size, .table-page-controls, .table-page-current, .table-selection-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.table-page-controls { margin-left: auto; }
.table-page-current input { width: 58px; text-align: center; }
.table-selection-summary { color: var(--accent); }
.table-footer button { font-size: 12px; }
.grouped-tables { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; }
.table-group { min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); overflow: hidden; }
.table-group > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; background: #f6f8fb; }
.table-group > summary small { margin-left: 12px; color: var(--muted); font-weight: 400; }
.group-table { min-width: 0; padding: 12px; }
.statistics-layout { display: flex; align-items: stretch; gap: 18px; min-width: 0; }
.statistics-picker { flex: 0 0 245px; min-width: 0; max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 7px; }
.statistics-picker button { display: block; width: 100%; border: 0; border-radius: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.statistics-picker button[aria-selected=true] { color: var(--accent); background: var(--tint); }
.statistics-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.statistics-table-host { min-width: 0; max-width: 100%; }
.statistics-city > summary, .statistics-stage > summary { padding: 10px; font-size: 13px; line-height: 1.6; cursor: pointer; overflow-wrap: anywhere; }
.statistics-city > summary { font-weight: 600; background: #f6f8fb; }
.statistics-stage { margin-left: 10px; }
.statistics-levels { padding: 0 0 8px 12px; }
.chart-scroll { min-width: 0; min-height: 130px; max-height: 400px; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 7px; }
.drop-chart { display: block; width: 100%; min-width: 420px; height: auto; }
.chart-label { fill: var(--text); font-size: 12px; }
.chart-axis, .chart-value { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-bar { fill: var(--accent); }
.chart-grid { stroke: #e2e8f0; stroke-width: 1; }
.detail-list { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 10px 20px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-sections { display: flex; flex-direction: column; gap: 18px; }
.debug-json { margin: 0; font: 12px/1.8 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .statistics-picker { flex-basis: 200px; } }
@media (max-width: 760px) {
.page-panel { padding: 14px; gap: 14px; }
.form-section { padding: 12px; }
.form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.filter-bar label { flex-wrap: wrap; }
.filter-bar label:has(input[type=search]), .filter-bar input[type=search] { width: 100%; }
.table-page-controls { margin-left: 0; }
.statistics-layout { flex-direction: column; }
.statistics-picker { flex: 0 0 auto; width: 100%; max-height: 230px; }
.login-layout > form { padding: 14px; }
.detail-list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.detail-list dd { margin-bottom: 10px; }
}
+87
View File
@@ -0,0 +1,87 @@
:root {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
font-size: 14px;
color: #17243b;
background: #f4f6fa;
color-scheme: light;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
--canvas: #f4f6fa;
--surface: #fff;
--surface-subtle: #f8fafc;
--text: #17243b;
--muted: #526079;
--border: #dbe2ec;
--border-strong: #bdc9d9;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--tint: #edf3ff;
--green: #187447;
--green-tint: #edf8f1;
--danger: #bf3540;
--danger-tint: #fff1f2;
--warning: #94630e;
--warning-tint: #fff8e7;
--sidebar: #162235;
--sidebar-text: #bac6d8;
--sidebar-width: 224px;
--topbar-height: 64px;
--control-height: 34px;
--radius: 8px;
--radius-sm: 5px;
--shadow: 0 1px 3px rgb(26 42 65 / 4%);
--shadow-overlay: 0 12px 36px rgb(16 32 56 / 18%);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-padding-top: 80px; }
body { margin: 0; min-width: 0; font-size: 14px; line-height: 1.6; }
#app { min-width: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.4; font-weight: 650; letter-spacing: -.4px; }
h2 { font-size: 16px; line-height: 1.5; font-weight: 600; }
h3, h4 { font-size: 14px; line-height: 1.5; font-weight: 600; }
p { overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]) { min-height: var(--control-height); max-width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; line-height: 1.5; font-weight: 500; text-align: center; cursor: pointer; vertical-align: middle; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
button:hover:not(:disabled) { border-color: #9bacc4; background: #f2f5fa; }
button:active:not(:disabled) { background: #e8edf5; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select { padding: 5px 9px; min-width: 0; }
input[type="number"] { width: 112px; font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; accent-color: var(--accent); vertical-align: middle; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #68768c; opacity: 1; }
textarea { padding: 8px 10px; min-width: 0; min-height: 88px; resize: vertical; }
input, textarea { caret-color: var(--accent); }
select { overflow: hidden; text-overflow: ellipsis; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; scroll-margin-block: 12px; }
::selection { background: #dbe8ff; color: #153b7e; }
button.primary, a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled), a.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: #a32634; border-color: #e5b3b8; background: #fff; }
button.danger:hover:not(:disabled) { color: #932330; border-color: #cc7680; background: var(--danger-tint); }
.danger-text { color: #ae2d39; }
button.start-button, button.run-button { background: var(--green); border-color: var(--green); color: #fff; }
button.start-button:hover:not(:disabled), button.run-button:hover:not(:disabled) { background: #135d39; border-color: #135d39; }
button.stop-button, button.run-button.running { background: var(--danger); border-color: var(--danger); color: #fff; }
button.stop-button:hover:not(:disabled), button.run-button.running:hover:not(:disabled) { background: #a72b36; border-color: #a72b36; }
button.start-outline { color: var(--green); border-color: #a9cfb9; }
button.start-outline:hover:not(:disabled) { background: var(--green-tint); border-color: var(--green); }
button.stop-outline { color: var(--danger); border-color: #e5b3b8; }
button.stop-outline:hover:not(:disabled) { background: var(--danger-tint); border-color: var(--danger); }
button.text-button { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 5px; }
button.text-button:hover:not(:disabled) { background: var(--tint); border-color: transparent; }
button.text-button.danger-text { color: var(--danger); }
button.small, button.compact, .small, .compact { min-height: 34px; padding: 4px 9px; font-size: 13px; }
.icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
.icon-button { width: 34px; height: 34px; padding: 6px; flex: 0 0 34px; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); white-space: pre-wrap; overflow-wrap: anywhere; }
.spacer, .flex-spacer { flex: 1 1 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}