Files
DecomEval/web/src/styles.css
T

317 lines
7.5 KiB
CSS

:root {
color: var(--ink);
background: var(--bg);
font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
font-size: 14px;
}
* { box-sizing: border-box; }
html, body, #app, .n-config-provider, .n-message-provider, .n-dialog-provider, .app-root { margin: 0; height: 100%; }
body { background: var(--bg); }
button, input, select { font: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { height: 100%; background: var(--bg); color: var(--ink); }
.shell .n-layout,
.shell .n-layout-scroll-container,
.content { background: var(--bg); }
.shell .n-layout-sider { background: var(--sidebar); }
.shell .n-layout-sider > .n-scrollbar,
.shell .n-layout-sider .n-scrollbar-container,
.shell .n-layout-sider .n-scrollbar-content { height: 100%; }
.sider-body {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
}
.sider-brand {
height: 56px;
display: flex;
align-items: center;
gap: 10px;
padding: 0 16px;
border-bottom: 1px solid var(--line);
flex: none;
}
.sider-brand.compact { justify-content: center; padding: 0; }
.sider-brand strong { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }
.sider-brand .brand-mark { width: 28px; height: 28px; font-size: 14px; }
.sider-body .n-menu { flex: 1; min-height: 0; padding-top: 8px; }
.shell .n-menu .n-menu-item-content--selected::before {
background-color: transparent !important;
border-left: 2px solid var(--accent);
border-radius: 0;
}
.sider-user {
margin-top: auto;
padding: 12px;
border-top: 1px solid var(--line);
display: flex;
align-items: center;
gap: 8px;
}
.sider-user.compact { flex-direction: column; padding: 8px 0 12px; }
.sider-user .who { min-width: 0; flex: 1; }
.sider-user strong,
.sider-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sider-user span { color: var(--muted); font-size: 12px; }
.logout-btn.n-button {
color: var(--danger);
--n-text-color: var(--danger);
--n-text-color-hover: var(--danger);
--n-text-color-pressed: var(--danger);
--n-text-color-focus: var(--danger);
}
.sider-user .theme-switch { position: static; }
.content {
min-width: 0;
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.content > .n-layout-scroll-container,
.content > .n-scrollbar,
.content > .n-scrollbar > .n-scrollbar-container {
height: 100%;
overflow: hidden;
}
.page {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
padding: 0;
box-sizing: border-box;
}
.page-head {
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex: none;
margin: 0;
padding: 0 16px 0 20px;
border-bottom: 1px solid var(--line);
background: var(--bg);
}
.page-head h2 {
margin: 0;
font-size: 16px;
font-weight: 650;
letter-spacing: -0.02em;
line-height: 1.2;
}
.admin-page { overflow: hidden; }
.admin-alert { flex: none; margin-bottom: 12px; }
.admin-scroll {
flex: 1;
min-height: 0;
overflow: auto;
padding: 20px 24px 24px;
}
.admin-status { margin: 0; color: var(--muted); }
.admin-table {
width: 100%;
border-collapse: collapse;
}
.admin-table th,
.admin-table td {
padding: 10px 16px 10px 0;
border-bottom: 1px solid var(--line);
text-align: left;
vertical-align: middle;
}
.admin-table th {
position: sticky;
top: 0;
z-index: 1;
background: var(--bg);
color: var(--muted);
font-size: 12px;
font-weight: 400;
}
.form-row {
display: grid;
grid-template-columns: max-content minmax(160px, 280px);
gap: 8px 12px;
align-items: center;
justify-content: start;
margin-bottom: 12px;
}
.form-row .n-input,
.form-row .n-select,
.form-row .n-input-number { width: 100%; }
.late { color: var(--danger); }
.settings-form {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
.settings-fields { max-width: 640px; }
.settings-form .form-row label { min-width: 8em; }
.setting-control {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.setting-control .n-input-number { flex: 1; width: 100%; min-width: 0; }
.setting-unit { flex: none; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); }
.filters, .form-grid { display: grid; grid-template-columns: 112px minmax(0, 280px); gap: 8px 12px; align-items: center; }
.gate-card.wide .form-grid { grid-template-columns: 112px minmax(0, 1fr); }
.hint {
width: 16px;
height: 16px;
border: 1px solid var(--line);
border-radius: 50%;
color: var(--muted);
font-size: 11px;
line-height: 14px;
text-align: center;
cursor: default;
}
.app-root { height: 100%; }
.gate {
position: relative;
height: 100%;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: auto;
background: var(--bg);
}
.gate .theme-switch { position: absolute; top: 16px; right: 16px; }
.sider-foot .theme-switch { position: static; align-self: flex-start; }
.gate-card {
width: min(440px, 100%);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 4px;
padding: 28px 28px 22px;
}
.gate-card.wide { width: min(560px, 100%); }
.gate-submit.n-button {
width: 100%;
height: 40px;
margin-top: 24px;
font-weight: 600;
letter-spacing: 0.12em;
}
.lv-side {
width: max-content;
max-width: calc(100% - 32px);
box-sizing: border-box;
background: var(--panel);
color: var(--ink);
border: 1px solid var(--line);
border-radius: 4px;
padding: 28px 24px 20px;
}
.lv-side .lv-brand {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 18px;
}
.lv-side .lv-mark {
width: 28px;
height: 28px;
display: grid;
place-items: center;
border: 1px solid var(--accent);
color: var(--accent);
border-radius: 4px;
font-weight: 650;
font-size: 13px;
}
.lv-side h1 { margin: 0; font-size: 18px; }
.lv-side form,
.lv-embed form {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
column-gap: 8px;
row-gap: 10px;
align-items: center;
}
.lv-side form { grid-template-columns: max-content 220px; }
.lv-side label,
.lv-embed label { margin: 0; justify-self: end; }
.lv-side .n-alert,
.lv-embed .n-alert { grid-column: 1 / -1; }
.lv-side .n-button,
.lv-embed .n-button { grid-column: 2; width: 100%; }
.lv-side .lv-go,
.lv-embed .lv-go {
height: 36px;
margin-top: 4px;
font-weight: 600;
letter-spacing: 0.08em;
}
.lv-captcha { display: flex; gap: 8px; align-items: center; min-width: 0; }
.lv-captcha .n-input { flex: 1; min-width: 0; }
.lv-captcha-box {
width: 112px;
height: 36px;
flex: none;
display: grid;
place-items: center;
padding: 0;
border: 1px solid var(--line);
border-radius: 4px;
background: var(--bg);
cursor: pointer;
overflow: hidden;
}
.lv-captcha-box img {
width: 100%;
height: 100%;
object-fit: cover;
border: 0;
}
.lv-captcha-box img[src="/__captcha_broken__"] {
width: auto;
height: auto;
object-fit: none;
}
.lv-embed {
width: 100%;
background: transparent;
border: 0;
padding: 0;
}
.sms-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 12px;
}
.gate-brand {
display: flex;
gap: 14px;
align-items: center;
justify-content: center;
margin-bottom: 22px;
}
.gate-brand h1 { margin: 0; font-size: 20px; }
.brand-mark {
width: 36px;
height: 36px;
border-radius: 4px;
border: 1px solid var(--accent);
color: var(--accent);
display: grid;
place-items: center;
font-weight: 650;
}
.captcha { height: 40px; cursor: pointer; }
.row-actions { display: flex; gap: 8px; }