Files
railwaysystem/docs/visual/assets/docs.css

1040 lines
20 KiB
CSS

/* ==============================================================================
* RailwaySystem - Visual Portal Design System v2.0
* 风格:现代企业级 · 铁路工业数字化 · 克制 · 高可读性
* 调色:Deep Navy / Rail Blue / Cyan 点缀 / 浅灰白底色
* 离线纯静态支持,无任何外部 CDN 依赖
* ============================================================================== */
:root {
/* 调色板 - 铁路工业色系 */
--navy-950: #090d16;
--navy-900: #0f172a;
--navy-800: #1e293b;
--navy-700: #334155;
--navy-600: #475569;
--rail-blue-900: #1e3a8a;
--rail-blue-800: #1e40af;
--rail-blue: #1d4ed8;
--rail-blue-light: #3b82f6;
--rail-blue-subtle: #eff6ff;
--rail-blue-border: #bfdbfe;
--rail-cyan: #0284c7;
--rail-cyan-light: #06b6d4;
--cyan-subtle: #f0f9ff;
--cyan-border: #bae6fd;
/* 背景系统 */
--bg-canvas: #f8fafc;
--bg-surface: #ffffff;
--bg-subtle: #f1f5f9;
--bg-muted: #e2e8f0;
/* 文本系统 */
--text-primary: #0f172a;
--text-secondary: #334155;
--text-muted: #64748b;
--text-inverse: #ffffff;
/* 状态颜色 */
--pass-color: #059669;
--pass-bg: #ecfdf5;
--pass-border: #a7f3d0;
--pending-color: #d97706;
--pending-bg: #fffbeb;
--pending-border: #fde68a;
--danger-color: #dc2626;
--danger-bg: #fef2f2;
--danger-border: #fecaca;
--info-color: #0284c7;
--info-bg: #f0f9ff;
--info-border: #bae6fd;
/* 边框与阴影 */
--border-light: #e2e8f0;
--border-medium: #cbd5e1;
--border-strong: #94a3b8;
--radius-xs: 4px;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--radius-full: 9999px;
--shadow-subtle: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
--shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
--shadow-card-hover: 0 8px 16px -2px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
--shadow-drawer: -4px 0 24px rgba(15, 23, 42, 0.12);
--shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
/* 排版尺寸 */
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--container-max: 1240px;
--prose-max: 780px;
}
/* Reset & Base */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
scroll-behavior: smooth;
}
body {
background-color: var(--bg-canvas);
color: var(--text-primary);
font-family: var(--font-sans);
line-height: 1.75;
font-size: 0.95rem;
min-height: 100vh;
display: flex;
flex-direction: column;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
color: var(--rail-blue);
text-decoration: none;
transition: color 0.15s ease;
}
a:hover {
color: var(--rail-blue-800);
}
/* 顶部导航栏 (Navbar) */
.navbar {
background: rgba(255, 255, 255, 0.94);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border-light);
position: sticky;
top: 0;
z-index: 100;
padding: 0.65rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow-subtle);
}
.nav-brand-wrap {
display: flex;
align-items: center;
gap: 1rem;
}
.nav-brand {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
color: var(--text-primary);
}
.nav-brand svg {
width: 28px;
height: 28px;
fill: var(--rail-blue);
flex-shrink: 0;
}
.brand-title {
font-size: 1.15rem;
font-weight: 700;
color: var(--navy-900);
letter-spacing: -0.01em;
display: flex;
align-items: baseline;
gap: 0.4rem;
}
.brand-sub {
font-size: 0.78rem;
color: var(--text-muted);
font-weight: 500;
}
.brand-pill {
font-size: 0.72rem;
color: var(--pass-color);
background: var(--pass-bg);
border: 1px solid var(--pass-border);
padding: 2px 8px;
border-radius: var(--radius-full);
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 4px;
}
.brand-pill::before {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--pass-color);
}
.nav-menu {
display: flex;
gap: 0.25rem;
align-items: center;
list-style: none;
flex-wrap: wrap;
}
.nav-link {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.38rem 0.65rem;
font-size: 0.83rem;
font-weight: 500;
color: var(--text-secondary);
border-radius: var(--radius-sm);
transition: all 0.15s ease;
border: 1px solid transparent;
white-space: nowrap;
}
.nav-link:hover {
color: var(--rail-blue);
background: var(--bg-subtle);
}
.nav-link.active {
color: var(--rail-blue);
background: var(--rail-blue-subtle);
border-color: var(--rail-blue-border);
font-weight: 600;
}
.nav-handbook-link {
font-size: 0.82rem;
color: var(--navy-800);
background: var(--bg-subtle);
border: 1px solid var(--border-light);
padding: 0.38rem 0.65rem;
border-radius: var(--radius-sm);
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 0.2rem;
white-space: nowrap;
transition: all 0.15s ease;
}
.nav-handbook-link:hover {
background: var(--rail-blue-subtle);
color: var(--rail-blue);
border-color: var(--rail-blue-border);
}
/* 下拉菜单 (Dropdown) */
.nav-dropdown {
position: relative;
}
.dropdown-trigger {
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 0.3rem;
padding: 0.45rem 0.85rem;
font-size: 0.88rem;
font-weight: 500;
color: var(--text-secondary);
border-radius: var(--radius-sm);
border: 1px solid transparent;
background: transparent;
}
.dropdown-trigger:hover,
.nav-dropdown:hover .dropdown-trigger {
color: var(--rail-blue);
background: var(--bg-subtle);
}
.dropdown-trigger svg {
width: 14px;
height: 14px;
fill: currentColor;
transition: transform 0.2s ease;
}
.nav-dropdown:hover .dropdown-trigger svg {
transform: rotate(180deg);
}
.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: 0.35rem;
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
box-shadow: var(--shadow-modal);
min-width: 200px;
padding: 0.4rem 0;
list-style: none;
opacity: 0;
visibility: hidden;
transform: translateY(-6px);
transition: all 0.18s ease;
z-index: 200;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-item a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.55rem 1rem;
font-size: 0.85rem;
color: var(--text-secondary);
}
.dropdown-item a:hover {
background: var(--rail-blue-subtle);
color: var(--rail-blue);
}
.dropdown-divider {
height: 1px;
background: var(--border-light);
margin: 0.35rem 0;
}
.nav-back-link {
font-size: 0.82rem;
color: var(--text-muted);
padding: 0.4rem 0.75rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
background: var(--bg-surface);
}
.nav-back-link:hover {
background: var(--bg-subtle);
color: var(--text-primary);
}
/* 页面主布局 */
.page-container {
max-width: var(--container-max);
margin: 0 auto;
padding: 2.5rem 1.75rem 4rem;
width: 100%;
flex: 1;
}
/* 页面 Hero 头部 */
.page-hero {
margin-bottom: 2.75rem;
}
.hero-pretitle {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--rail-blue);
background: var(--rail-blue-subtle);
border: 1px solid var(--rail-blue-border);
padding: 0.25rem 0.75rem;
border-radius: var(--radius-full);
margin-bottom: 0.85rem;
}
.hero-title-main {
font-size: 2.4rem;
font-weight: 700;
line-height: 1.25;
color: var(--navy-900);
letter-spacing: -0.02em;
margin-bottom: 0.75rem;
}
.hero-lead-text {
font-size: 1.05rem;
line-height: 1.8;
color: var(--text-secondary);
max-width: var(--prose-max);
}
.hero-meta-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1.25rem;
margin-top: 1.25rem;
padding-top: 1.25rem;
border-top: 1px solid var(--border-light);
font-size: 0.85rem;
color: var(--text-muted);
}
.hero-meta-item {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
.hero-meta-item strong {
color: var(--text-primary);
font-weight: 600;
}
/* 状态徽章 (Badge System) - 克制规范 */
.badge {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
font-weight: 600;
padding: 0.2rem 0.6rem;
border-radius: var(--radius-full);
line-height: 1.2;
white-space: nowrap;
}
.badge-pass, .badge-success {
color: var(--pass-color);
background: var(--pass-bg);
border: 1px solid var(--pass-border);
}
.badge-pending, .badge-warning {
color: var(--pending-color);
background: var(--pending-bg);
border: 1px solid var(--pending-border);
}
.badge-blocked, .badge-danger {
color: var(--danger-color);
background: var(--danger-bg);
border: 1px solid var(--danger-border);
}
.badge-info {
color: var(--info-color);
background: var(--info-bg);
border: 1px solid var(--info-border);
}
.badge-neutral {
color: var(--navy-700);
background: var(--bg-subtle);
border: 1px solid var(--border-light);
}
.badge-reserved {
color: #6366f1;
background: #eef2ff;
border: 1px solid #c7d2fe;
}
/* 指标卡片网格 (Dashboard KPI Grid) */
.kpi-dashboard {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
margin-bottom: 2.5rem;
}
.kpi-card {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 1.2rem 1.25rem;
transition: transform 0.15s ease, box-shadow 0.15s ease;
box-shadow: var(--shadow-card);
}
.kpi-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
}
.kpi-value {
font-size: 1.85rem;
font-weight: 700;
line-height: 1.2;
color: var(--navy-900);
font-feature-settings: "tnum";
font-variant-numeric: tabular-nums;
margin-bottom: 0.35rem;
}
.kpi-card.kpi-pass .kpi-value {
color: var(--pass-color);
}
.kpi-card.kpi-pending .kpi-value {
color: var(--pending-color);
}
.kpi-card.kpi-info .kpi-value {
color: var(--rail-blue);
}
.kpi-label {
font-size: 0.82rem;
color: var(--text-muted);
font-weight: 500;
}
.kpi-sub {
font-size: 0.72rem;
color: var(--text-muted);
margin-top: 0.35rem;
}
/* 核心内容分块 (Section Block) */
.content-section {
margin-bottom: 3.5rem;
}
.section-header {
margin-bottom: 1.5rem;
display: flex;
justify-content: space-between;
align-items: flex-end;
border-bottom: 1px solid var(--border-light);
padding-bottom: 0.75rem;
}
.section-title {
font-size: 1.45rem;
font-weight: 700;
color: var(--navy-900);
display: flex;
align-items: center;
gap: 0.6rem;
}
.section-subtitle {
font-size: 0.88rem;
color: var(--text-muted);
margin-top: 0.25rem;
max-width: var(--prose-max);
}
/* 卡片系统 (Card Grid) */
.card-grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
.card-grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}
.card-grid-4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.25rem;
}
@media (max-width: 1100px) {
.card-grid-4 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
.card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
.page-container { padding: 1.5rem 1rem 3rem; }
.navbar { padding: 0.65rem 1rem; }
.hero-title-main { font-size: 1.85rem; }
}
.standard-card {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 1.5rem;
box-shadow: var(--shadow-card);
transition: all 0.2s ease;
display: flex;
flex-direction: column;
}
.standard-card:hover {
border-color: var(--border-medium);
box-shadow: var(--shadow-card-hover);
}
.card-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.85rem;
}
.card-title-wrap {
display: flex;
align-items: center;
gap: 0.65rem;
}
.card-icon-box {
width: 36px;
height: 36px;
border-radius: var(--radius-sm);
background: var(--rail-blue-subtle);
color: var(--rail-blue);
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 1.1rem;
flex-shrink: 0;
}
.card-title {
font-size: 1.08rem;
font-weight: 600;
color: var(--navy-900);
}
.card-code {
font-family: var(--font-mono);
font-size: 0.76rem;
color: var(--text-muted);
}
.card-body-text {
font-size: 0.88rem;
color: var(--text-secondary);
line-height: 1.7;
margin-bottom: 1.25rem;
flex: 1;
}
.card-footer-action {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 1rem;
border-top: 1px solid var(--border-light);
font-size: 0.82rem;
}
/* 手风琴折叠面板 (Accordion) */
.accordion-item {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
margin-bottom: 0.85rem;
overflow: hidden;
transition: border-color 0.15s ease;
}
.accordion-item:hover {
border-color: var(--border-medium);
}
.accordion-header {
padding: 1rem 1.35rem;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
user-select: none;
background: var(--bg-surface);
transition: background 0.15s ease;
}
.accordion-header:hover {
background: var(--bg-subtle);
}
.accordion-title-group {
display: flex;
align-items: center;
gap: 0.85rem;
}
.accordion-arrow {
width: 18px;
height: 18px;
fill: var(--text-muted);
transition: transform 0.25s ease;
}
.accordion-item.open .accordion-arrow {
transform: rotate(180deg);
}
.accordion-body {
display: none;
padding: 1.25rem 1.35rem 1.5rem;
border-top: 1px solid var(--border-light);
background: #fafcff;
font-size: 0.9rem;
line-height: 1.75;
color: var(--text-secondary);
}
.accordion-item.open .accordion-body {
display: block;
}
/* 步骤进度条 (Progress Stepper) */
.stepper-container {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 2rem 2.25rem;
box-shadow: var(--shadow-card);
margin-bottom: 2rem;
}
.stepper-list {
display: flex;
flex-direction: column;
gap: 0;
position: relative;
}
.step-row {
display: flex;
position: relative;
padding-bottom: 2rem;
}
.step-row:last-child {
padding-bottom: 0;
}
.step-indicator {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 1.5rem;
position: relative;
}
.step-circle {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.85rem;
font-weight: 700;
z-index: 2;
background: var(--bg-surface);
border: 2px solid var(--border-medium);
color: var(--text-muted);
}
.step-row.done .step-circle {
background: var(--pass-color);
border-color: var(--pass-color);
color: #fff;
}
.step-row.in-progress .step-circle {
background: var(--rail-blue);
border-color: var(--rail-blue);
color: #fff;
box-shadow: 0 0 0 4px var(--rail-blue-subtle);
}
.step-row.pending .step-circle {
background: var(--bg-subtle);
border-color: var(--border-medium);
color: var(--text-muted);
}
.step-line {
position: absolute;
top: 32px;
bottom: 0;
width: 2px;
background: var(--border-light);
z-index: 1;
}
.step-row:last-child .step-line {
display: none;
}
.step-row.done .step-line {
background: var(--pass-border);
}
.step-content {
flex: 1;
padding-top: 0.2rem;
}
.step-header-line {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.35rem;
}
.step-name {
font-size: 1.02rem;
font-weight: 600;
color: var(--navy-900);
}
.step-desc {
font-size: 0.85rem;
color: var(--text-muted);
line-height: 1.6;
}
/* 抽屉组件 (Drawer) */
.drawer-backdrop {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(15, 23, 42, 0.45);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.25s ease;
}
.drawer-backdrop.active {
opacity: 1;
visibility: visible;
}
.drawer-panel {
position: fixed;
top: 0; right: 0; bottom: 0;
width: 540px;
max-width: 90vw;
background: var(--bg-surface);
box-shadow: var(--shadow-drawer);
z-index: 1001;
transform: translateX(100%);
transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
display: flex;
flex-direction: column;
}
.drawer-backdrop.active .drawer-panel {
transform: translateX(0);
}
.drawer-header {
padding: 1.35rem 1.75rem;
border-bottom: 1px solid var(--border-light);
display: flex;
justify-content: space-between;
align-items: center;
}
.drawer-title {
font-size: 1.25rem;
font-weight: 700;
color: var(--navy-900);
}
.drawer-close {
background: transparent;
border: 0;
font-size: 1.5rem;
line-height: 1;
color: var(--text-muted);
cursor: pointer;
padding: 0.25rem;
border-radius: var(--radius-sm);
transition: color 0.15s ease;
}
.drawer-close:hover {
color: var(--navy-900);
background: var(--bg-subtle);
}
.drawer-body {
padding: 1.75rem;
overflow-y: auto;
flex: 1;
font-size: 0.9rem;
line-height: 1.75;
color: var(--text-secondary);
}
.drawer-section {
margin-bottom: 1.5rem;
}
.drawer-section-title {
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--navy-700);
margin-bottom: 0.5rem;
border-bottom: 1px dashed var(--border-light);
padding-bottom: 0.25rem;
}
/* 代码与表格样式 */
pre, code {
font-family: var(--font-mono);
}
code {
font-size: 0.85em;
background: var(--bg-subtle);
color: var(--navy-800);
padding: 0.15em 0.4em;
border-radius: var(--radius-xs);
border: 1px solid var(--border-light);
}
pre {
background: #0f172a;
color: #e2e8f0;
padding: 1rem 1.25rem;
border-radius: var(--radius-md);
overflow-x: auto;
font-size: 0.84rem;
line-height: 1.65;
margin: 0.75rem 0;
}
pre code {
background: transparent;
color: inherit;
padding: 0;
border: 0;
}
.data-table-wrap {
width: 100%;
overflow-x: auto;
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
background: var(--bg-surface);
margin: 1rem 0;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 0.86rem;
text-align: left;
}
.data-table th {
background: var(--bg-subtle);
color: var(--navy-900);
font-weight: 600;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-light);
white-space: nowrap;
}
.data-table td {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-light);
color: var(--text-secondary);
}
.data-table tr:last-child td {
border-bottom: 0;
}
.data-table tr:hover td {
background: #fbfcfe;
}
/* 按钮规范 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.45rem;
padding: 0.55rem 1.15rem;
font-size: 0.88rem;
font-weight: 600;
border-radius: var(--radius-sm);
cursor: pointer;
transition: all 0.15s ease;
border: 1px solid transparent;
}
.btn-primary {
background: var(--rail-blue);
color: #fff;
box-shadow: 0 1px 2px rgba(29, 78, 216, 0.2);
}
.btn-primary:hover {
background: var(--rail-blue-800);
color: #fff;
}
.btn-secondary {
background: var(--bg-surface);
border-color: var(--border-medium);
color: var(--text-secondary);
}
.btn-secondary:hover {
background: var(--bg-subtle);
color: var(--navy-900);
border-color: var(--border-strong);
}
/* 页脚 */
.site-footer {
border-top: 1px solid var(--border-light);
background: var(--bg-surface);
padding: 2rem 2rem;
text-align: center;
font-size: 0.84rem;
color: var(--text-muted);
margin-top: auto;
}
.site-footer p {
line-height: 1.8;
}
.site-footer a {
color: var(--rail-blue);
text-decoration: underline;
text-underline-offset: 3px;
}