Files
mc-gateway/cmd/gateway/admin_static/app.css
tursom ecb682bb41
Some checks failed
Docker Image / docker (push) Has been cancelled
Refactor admin frontend build
2026-06-25 21:16:11 +08:00

394 lines
5.4 KiB
CSS

:root {
color-scheme: light;
--bg: #f6f7f4;
--panel: #ffffff;
--text: #1c2623;
--muted: #66716c;
--line: #d9ded8;
--accent: #1f7a5d;
--accent-dark: #145944;
--warn: #a66321;
--danger: #b42318;
--shadow: 0 16px 40px rgba(21, 32, 28, 0.08);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button,
input,
select {
font: inherit;
}
button {
min-height: 36px;
border: 0;
border-radius: 6px;
padding: 0 14px;
background: var(--accent);
color: #fff;
cursor: pointer;
}
button:hover {
background: var(--accent-dark);
}
button.ghost,
button.secondary {
border: 1px solid var(--line);
background: #fff;
color: var(--text);
}
button.ghost:hover,
button.secondary:hover {
border-color: #aeb8b2;
background: #eef2ef;
}
button.danger {
background: var(--danger);
}
button.danger:hover {
background: #8f1d15;
}
input,
select {
width: 100%;
min-height: 38px;
border: 1px solid var(--line);
border-radius: 6px;
padding: 7px 10px;
background: #fff;
color: var(--text);
}
label {
display: grid;
gap: 6px;
color: var(--muted);
font-size: 13px;
}
label.inline {
display: flex;
align-items: center;
gap: 8px;
color: var(--text);
}
label.inline input {
width: auto;
min-height: 0;
}
.shell {
width: min(1180px, calc(100vw - 32px));
margin: 0 auto;
padding: 24px 0 40px;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 18px;
}
.topbar h1 {
margin: 0;
font-size: 24px;
font-weight: 700;
}
.topbar p {
margin: 2px 0 0;
color: var(--muted);
}
.session {
display: flex;
align-items: center;
gap: 12px;
color: var(--muted);
}
.language-field {
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.language-field select {
width: auto;
min-width: 104px;
}
.auth-view {
min-height: calc(100vh - 120px);
display: grid;
place-items: center;
}
.panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: var(--shadow);
padding: 18px;
}
.panel.compact {
width: min(420px, 100%);
display: grid;
gap: 14px;
}
.panel h2 {
margin: 0 0 8px;
font-size: 18px;
}
.alert {
border: 1px solid #f0c36a;
border-radius: 6px;
background: #fff7df;
color: #5f410c;
padding: 10px 12px;
margin-bottom: 14px;
}
.hidden {
display: none !important;
}
.status-grid,
.service-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
margin-bottom: 16px;
}
.stat,
.service {
min-width: 0;
background: #fff;
border: 1px solid var(--line);
border-radius: 8px;
padding: 14px;
}
.stat span,
.service span {
display: block;
color: var(--muted);
font-size: 12px;
}
.stat strong,
.service strong {
display: block;
margin-top: 5px;
overflow-wrap: anywhere;
font-size: 17px;
}
.tabs {
display: flex;
gap: 4px;
border-bottom: 1px solid var(--line);
margin: 8px 0 16px;
}
.tabs button {
border-radius: 6px 6px 0 0;
background: transparent;
color: var(--muted);
}
.tabs button.active {
background: #fff;
color: var(--text);
border: 1px solid var(--line);
border-bottom-color: #fff;
}
.toolbar {
display: flex;
gap: 10px;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.toolbar input {
max-width: 420px;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
}
table {
width: 100%;
border-collapse: collapse;
min-width: 720px;
}
th,
td {
padding: 10px 12px;
border-bottom: 1px solid var(--line);
text-align: left;
vertical-align: top;
}
th {
color: var(--muted);
font-size: 12px;
font-weight: 600;
background: #fafbf9;
}
td {
overflow-wrap: anywhere;
}
tr:last-child td {
border-bottom: 0;
}
.actions {
width: 180px;
}
.row-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.badge {
display: inline-flex;
align-items: center;
min-height: 24px;
border-radius: 999px;
padding: 0 9px;
background: #e8f3ee;
color: var(--accent-dark);
font-size: 12px;
}
.badge.off {
background: #f4ece6;
color: var(--warn);
}
.chips {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.chip {
border: 1px solid var(--line);
border-radius: 999px;
padding: 5px 9px;
background: #fff;
}
.service {
display: grid;
gap: 10px;
}
.service form {
display: grid;
gap: 10px;
}
dialog {
width: min(460px, calc(100vw - 28px));
border: 1px solid var(--line);
border-radius: 8px;
padding: 0;
box-shadow: var(--shadow);
}
dialog::backdrop {
background: rgba(20, 27, 24, 0.36);
}
dialog form {
display: grid;
gap: 12px;
padding: 18px;
}
dialog h2 {
margin: 0;
font-size: 18px;
}
.dialog-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 4px;
}
@media (max-width: 860px) {
.status-grid,
.service-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.topbar,
.toolbar {
align-items: stretch;
flex-direction: column;
}
.session {
flex-wrap: wrap;
}
.toolbar input {
max-width: none;
}
}
@media (max-width: 560px) {
.shell {
width: min(100vw - 20px, 1180px);
padding-top: 14px;
}
.status-grid,
.service-grid {
grid-template-columns: 1fr;
}
.tabs {
overflow-x: auto;
}
}