supervisor-simulator/tools/ndbs/server/web/styles.css
2026-01-18 12:38:03 +08:00

541 lines
8.9 KiB
CSS

@font-face {
font-family: "AlibabaPuHuiTi";
src: url("/static/fonts/AlibabaPuHuiTi-3-65-Medium.ttf") format("truetype");
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "AlibabaPuHuiTi";
src: url("/static/fonts/AlibabaPuHuiTi-3-85-Bold.ttf") format("truetype");
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "KenneyFuture";
src: url("/static/fonts/KenneyFuture.ttf") format("truetype");
font-weight: 700;
font-style: normal;
font-display: swap;
}
:root {
color-scheme: light;
--bg-0: #f5f1ea;
--bg-1: #fff0d6;
--bg-2: #e3f4ec;
--ink-0: #182126;
--ink-1: #2b353a;
--ink-2: #556068;
--accent-0: #f59e0b;
--accent-1: #0f766e;
--accent-2: #d1495b;
--panel: rgba(255, 255, 255, 0.86);
--panel-border: rgba(18, 33, 38, 0.12);
--shadow: 0 24px 50px rgba(12, 20, 28, 0.15);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
font-family: "AlibabaPuHuiTi", "Noto Serif", serif;
color: var(--ink-0);
background: radial-gradient(circle at 12% 18%, var(--bg-1) 0%, var(--bg-0) 50%, var(--bg-2) 100%);
}
button,
input,
textarea {
font-family: inherit;
}
button {
border: 1px solid rgba(24, 33, 38, 0.18);
background: rgba(245, 158, 11, 0.86);
color: var(--ink-0);
border-radius: 10px;
padding: 8px 14px;
cursor: pointer;
font-size: 13px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
button.ghost {
background: transparent;
}
input.text-input,
input.filter-input {
width: 100%;
border: 1px solid rgba(18, 33, 38, 0.16);
border-radius: 12px;
padding: 8px 10px;
background: rgba(255, 255, 255, 0.8);
font-size: 13px;
}
select.text-input {
width: 100%;
border: 1px solid rgba(18, 33, 38, 0.16);
border-radius: 12px;
padding: 8px 10px;
background: rgba(255, 255, 255, 0.8);
font-size: 13px;
}
.app-shell {
position: relative;
display: grid;
grid-template-columns: 320px 1fr;
gap: 24px;
min-height: 100vh;
padding: 24px;
}
.app-shell::before,
.app-shell::after {
content: "";
position: absolute;
z-index: 0;
border-radius: 999px;
filter: blur(2px);
}
.app-shell::before {
width: 420px;
height: 420px;
top: -120px;
left: -120px;
background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0) 70%);
}
.app-shell::after {
width: 520px;
height: 520px;
bottom: -200px;
right: -180px;
background: radial-gradient(circle, rgba(15, 118, 110, 0.25) 0%, rgba(15, 118, 110, 0) 72%);
}
.sidebar,
.main {
position: relative;
z-index: 1;
}
.sidebar {
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: 20px;
box-shadow: var(--shadow);
overflow: hidden;
padding: 20px 18px;
display: flex;
flex-direction: column;
gap: 16px;
}
.brand-title {
font-family: "KenneyFuture", "AlibabaPuHuiTi", serif;
font-size: 20px;
letter-spacing: 0.05em;
}
.brand-subtitle {
font-size: 12px;
color: var(--ink-2);
margin-top: 4px;
}
.quick-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.list-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--ink-2);
}
.section-count {
font-size: 11px;
background: rgba(15, 118, 110, 0.16);
padding: 2px 8px;
border-radius: 999px;
}
.nav-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 280px;
overflow: auto;
padding-right: 6px;
}
.nav-item {
border: 1px solid rgba(18, 33, 38, 0.12);
background: rgba(255, 255, 255, 0.82);
border-radius: 12px;
padding: 8px 10px;
text-align: left;
cursor: pointer;
transition: transform 0.2s ease, border-color 0.2s ease;
animation: list-in 420ms ease-out both;
}
.nav-item.active {
border-color: rgba(245, 158, 11, 0.8);
background: rgba(255, 240, 214, 0.95);
}
.nav-item:hover {
transform: translateY(-1px);
border-color: rgba(245, 158, 11, 0.5);
}
.nav-item span {
font-size: 13px;
color: var(--ink-1);
word-break: break-word;
}
.main {
display: flex;
flex-direction: column;
gap: 20px;
}
.panel {
background: var(--panel);
border-radius: 18px;
border: 1px solid var(--panel-border);
box-shadow: var(--shadow);
padding: 20px 22px;
animation: float-in 420ms ease-out both;
}
.panel-title {
font-family: "KenneyFuture", "AlibabaPuHuiTi", serif;
font-size: 18px;
letter-spacing: 0.04em;
}
.panel-subtitle {
color: var(--ink-2);
font-size: 13px;
margin-top: 4px;
}
.hero {
background: linear-gradient(135deg, rgba(255, 240, 214, 0.95) 0%, rgba(255, 255, 255, 0.9) 40%, rgba(227, 244, 236, 0.9) 100%);
}
.hero-top {
text-transform: uppercase;
letter-spacing: 0.18em;
font-size: 11px;
color: var(--ink-2);
}
.hero h1 {
font-family: "KenneyFuture", "AlibabaPuHuiTi", serif;
font-size: 34px;
margin: 10px 0 8px;
}
.hero p {
margin: 0;
color: var(--ink-1);
max-width: 540px;
}
.controls {
display: flex;
flex-direction: column;
gap: 12px;
}
.guide {
display: flex;
flex-direction: column;
gap: 10px;
}
.guide-title {
font-family: "KenneyFuture", "AlibabaPuHuiTi", serif;
font-size: 16px;
}
.guide-desc {
color: var(--ink-2);
font-size: 13px;
}
.guide-fields {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.guide-field {
padding: 3px 8px;
border-radius: 999px;
background: rgba(245, 158, 11, 0.16);
font-size: 12px;
}
.guide-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.control-row {
display: flex;
gap: 12px;
flex-wrap: wrap;
align-items: center;
}
.editor-panel {
display: flex;
flex-direction: column;
gap: 14px;
}
.editor-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
.editor-actions {
display: flex;
gap: 10px;
}
.view-toggle {
display: flex;
gap: 6px;
padding: 4px;
border-radius: 12px;
background: rgba(24, 33, 38, 0.08);
}
.view-toggle button {
padding: 6px 10px;
border-radius: 8px;
font-size: 12px;
}
.view-toggle button.active {
background: rgba(245, 158, 11, 0.86);
}
.code-area {
width: 100%;
min-height: 420px;
resize: vertical;
padding: 16px;
border-radius: 14px;
border: 1px solid rgba(24, 33, 38, 0.2);
background: rgba(247, 247, 244, 0.9);
color: var(--ink-0);
font-family: "Courier New", monospace;
font-size: 13px;
line-height: 1.5;
outline: none;
}
.structured {
display: flex;
flex-direction: column;
gap: 14px;
}
.structured-toolbar {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
}
.structured-form {
display: flex;
flex-direction: column;
gap: 16px;
}
.form-section {
border: 1px solid rgba(18, 33, 38, 0.12);
border-radius: 14px;
padding: 12px;
background: rgba(255, 255, 255, 0.7);
}
.form-section h3 {
margin: 0 0 8px;
font-size: 14px;
font-family: "KenneyFuture", "AlibabaPuHuiTi", serif;
}
.form-row {
display: grid;
grid-template-columns: 160px 1fr;
gap: 10px;
align-items: center;
margin-bottom: 8px;
}
.form-row:last-child {
margin-bottom: 0;
}
.form-label {
font-size: 12px;
color: var(--ink-2);
}
.form-input {
border: 1px solid rgba(18, 33, 38, 0.16);
border-radius: 10px;
padding: 6px 8px;
background: rgba(255, 255, 255, 0.9);
font-size: 12px;
}
.form-input[type="checkbox"] {
width: auto;
}
.array-row {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 6px;
}
.array-row input {
flex: 1;
}
.array-row button {
padding: 4px 8px;
font-size: 11px;
}
.schema-summary {
display: flex;
gap: 10px;
align-items: center;
flex-wrap: wrap;
}
.schema-summary span {
padding: 3px 8px;
border-radius: 999px;
background: rgba(15, 118, 110, 0.15);
color: var(--ink-1);
font-size: 12px;
}
.schema-summary.hidden {
display: none;
}
.status-message {
font-size: 13px;
color: var(--ink-2);
}
.status-message.error {
color: var(--accent-2);
}
.build-output {
padding: 12px;
border-radius: 12px;
background: rgba(23, 37, 44, 0.06);
max-height: 200px;
overflow: auto;
font-size: 12px;
white-space: pre-wrap;
}
.hidden {
display: none;
}
@keyframes float-in {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes list-in {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (max-width: 960px) {
.app-shell {
grid-template-columns: 1fr;
}
.nav-list {
max-height: 220px;
}
}
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}