Files
zkxw/docs/unused-material-demos/_shared.css
T
2026-06-14 17:20:52 +08:00

571 lines
9.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 登记未用完物料 · 弹窗样式 Demo 共享(Fresh Mint Token) */
:root {
--primary: #10b981;
--primary-dark: #059669;
--primary-bg: #ecfdf5;
--text: #1e293b;
--text-muted: #64748b;
--border: #e2e8f0;
--bg-page: #f8fafc;
--surface: #fff;
--radius: 10px;
--radius-sm: 8px;
--danger: #ef4444;
--danger-bg: #fef2f2;
--warning: #d97706;
--warning-bg: #fffbeb;
--table-head: #f1f5f9;
--row-alt: #fafafa;
--row-hover: #f0fdf4;
--control-h: 36px;
--control-h-sm: 32px;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
font-size: 14px;
line-height: 1.5;
color: var(--text);
background: var(--bg-page);
}
/* ── 顶栏 ── */
.demo-banner {
position: sticky;
top: 0;
z-index: 300;
padding: 12px 24px;
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.demo-banner h1 {
margin: 0;
font-size: 15px;
font-weight: 600;
}
.demo-banner p {
margin: 4px 0 0;
font-size: 12px;
color: var(--text-muted);
}
.demo-banner__actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
align-items: center;
}
.demo-banner a {
padding: 6px 12px;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
text-decoration: none;
color: var(--text-muted);
border: 1px solid var(--border);
background: var(--surface);
}
.demo-banner a:hover {
border-color: var(--primary);
color: var(--primary-dark);
}
.demo-banner a.is-current {
background: var(--primary-bg);
border-color: var(--primary);
color: var(--primary-dark);
}
.demo-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 6px;
font-size: 11px;
font-weight: 600;
background: var(--primary-bg);
color: var(--primary-dark);
}
/* ── 页面 ── */
.page-wrap {
padding: 24px;
max-width: 1400px;
margin: 0 auto;
}
.style-note {
margin: 20px 0 0;
padding: 14px 18px;
background: #fffbeb;
border: 1px solid #fde68a;
border-radius: var(--radius-sm);
font-size: 13px;
color: #92400e;
}
.style-note strong {
color: #78350f;
}
.style-note ul {
margin: 8px 0 0;
padding-left: 18px;
}
/* ── 模拟弹窗 ── */
.dialog-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.45);
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
z-index: 100;
}
.dialog {
width: min(1200px, 100%);
max-height: calc(100vh - 48px);
background: var(--surface);
border-radius: var(--radius);
box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
display: flex;
flex-direction: column;
overflow: hidden;
}
.dialog--wide {
width: min(1320px, 100%);
}
.dialog__head {
padding: 16px 20px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.dialog__title {
margin: 0;
font-size: 16px;
font-weight: 600;
}
.dialog__close {
width: 32px;
height: 32px;
border: none;
border-radius: 6px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
font-size: 18px;
line-height: 1;
}
.dialog__close:hover {
background: #f1f5f9;
color: var(--text);
}
.dialog__body {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
min-height: 0;
}
.dialog__foot {
padding: 12px 20px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
gap: 8px;
flex-shrink: 0;
}
/* ── 控件 ── */
.btn {
height: var(--control-h);
padding: 0 14px;
border-radius: var(--radius-sm);
font-size: 13px;
font-weight: 500;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text);
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}
.btn:hover {
border-color: #cbd5e1;
}
.btn-primary {
background: var(--primary);
border-color: var(--primary);
color: #fff;
}
.btn-primary:hover {
background: var(--primary-dark);
border-color: var(--primary-dark);
}
.btn-ghost {
background: var(--surface);
}
.btn-sm {
height: var(--control-h-sm);
padding: 0 10px;
font-size: 12px;
}
.btn-danger-link {
border: none;
background: transparent;
color: var(--danger);
height: auto;
padding: 4px 6px;
}
.btn-danger-link:hover {
background: var(--danger-bg);
}
.input,
.select {
height: var(--control-h-sm);
width: 100%;
border: 1px solid var(--border);
border-radius: 6px;
padding: 0 10px;
font-size: 13px;
color: var(--text);
background: var(--surface);
}
.input:focus,
.select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}
.input--readonly {
background: #f8fafc;
color: var(--text-muted);
}
.input-num {
text-align: right;
font-variant-numeric: tabular-nums;
}
.field-label {
display: block;
font-size: 11px;
font-weight: 500;
color: var(--text-muted);
margin-bottom: 4px;
}
/* ── 区块头 ── */
.section-head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
flex-wrap: wrap;
}
.section-head__left {
min-width: 0;
}
.section-title {
font-size: 14px;
font-weight: 600;
color: var(--text);
}
.section-hint {
font-size: 12px;
color: var(--text-muted);
margin-top: 4px;
max-width: 720px;
}
.section-tools {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
}
.search-box {
width: 240px;
}
.stat-pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 500;
background: var(--primary-bg);
color: var(--primary-dark);
}
.tag {
display: inline-block;
padding: 2px 8px;
border-radius: 6px;
font-size: 11px;
font-weight: 600;
}
.tag--success {
background: var(--primary-bg);
color: var(--primary-dark);
}
.tag--muted {
background: #f1f5f9;
color: var(--text-muted);
}
.tag--warn {
background: var(--warning-bg);
color: var(--warning);
}
.money {
font-variant-numeric: tabular-nums;
color: var(--text);
}
.money--muted {
color: var(--text-muted);
}
.empty-state {
padding: 40px 20px;
text-align: center;
color: var(--text-muted);
font-size: 13px;
border: 1px dashed var(--border);
border-radius: var(--radius-sm);
background: #fafafa;
}
/* ── 表格通用 ── */
.table-scroll {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
overflow: auto;
max-height: 520px;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.data-table th,
.data-table td {
padding: 8px 10px;
border-bottom: 1px solid var(--border);
text-align: center;
vertical-align: middle;
white-space: nowrap;
}
.data-table th {
position: sticky;
top: 0;
z-index: 2;
background: var(--table-head);
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
}
.data-table tbody tr:hover {
background: var(--row-hover);
}
.data-table tbody tr:nth-child(even) {
background: var(--row-alt);
}
.data-table tbody tr:nth-child(even):hover {
background: var(--row-hover);
}
.data-table .col-sticky-left {
position: sticky;
left: 0;
z-index: 1;
background: inherit;
box-shadow: 2px 0 4px rgba(15, 23, 42, 0.04);
}
.data-table th.col-sticky-left {
z-index: 3;
background: var(--table-head);
}
.data-table .col-name {
text-align: left;
max-width: 180px;
overflow: hidden;
text-overflow: ellipsis;
}
.data-table .col-actions {
position: sticky;
right: 0;
z-index: 1;
background: inherit;
box-shadow: -2px 0 4px rgba(15, 23, 42, 0.04);
}
.data-table th.col-actions {
z-index: 3;
background: var(--table-head);
}
.data-table .input,
.data-table .select {
min-width: 72px;
}
.data-table .input--wide {
min-width: 120px;
}
.row-index {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
color: var(--primary-dark);
background: var(--primary-bg);
}
/* ── 索引页 ── */
.index-hero {
max-width: 960px;
margin: 0 auto;
padding: 32px 24px 16px;
}
.index-hero h1 {
margin: 0 0 8px;
font-size: 22px;
}
.index-hero p {
margin: 0;
color: var(--text-muted);
max-width: 680px;
}
.index-grid {
max-width: 960px;
margin: 0 auto;
padding: 16px 24px 48px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 16px;
}
.index-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 18px;
text-decoration: none;
color: inherit;
transition: border-color 0.2s, box-shadow 0.2s;
}
.index-card:hover {
border-color: #a7f3d0;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}
.index-card h2 {
margin: 0 0 6px;
font-size: 15px;
font-weight: 600;
color: var(--primary-dark);
}
.index-card p {
margin: 0;
font-size: 13px;
color: var(--text-muted);
line-height: 1.5;
}
.index-card .card-tag {
display: inline-block;
margin-top: 12px;
padding: 2px 8px;
border-radius: 6px;
font-size: 11px;
font-weight: 600;
background: #f1f5f9;
color: var(--text-muted);
}
.index-card .card-tag--rec {
background: var(--primary-bg);
color: var(--primary-dark);
}
.preview-strip {
margin-top: 14px;
padding: 10px;
background: #f8fafc;
border-radius: 8px;
border: 1px solid var(--border);
font-size: 11px;
color: var(--text-muted);
font-family: ui-monospace, monospace;
}