Files
gotelegram_pro/admin-web/static/styles.css
Виталий Литвинов 3b075a7ed7 v2.5.0: improve admin domain language logs
2026-04-24 22:59:21 +03:00

813 lines
14 KiB
CSS

:root {
color-scheme: light;
--bg: #f4f7fb;
--panel: #ffffff;
--panel-soft: #f8fafd;
--panel-strong: #eef3fa;
--text: #111827;
--muted: #667085;
--line: #dde5ef;
--blue: #2563eb;
--green: #0f9f6e;
--amber: #c77700;
--red: #d92d20;
--violet: #7c3aed;
--sidebar: #111827;
--sidebar-text: #dbe5f2;
--sidebar-muted: #8fa1b8;
--button: #121926;
--button-text: #ffffff;
--shadow: 0 18px 50px rgba(15, 23, 42, .08);
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #070b12;
--panel: #0f1724;
--panel-soft: #111c2d;
--panel-strong: #172235;
--text: #e7edf7;
--muted: #98a7bd;
--line: #263348;
--blue: #60a5fa;
--green: #34d399;
--amber: #fbbf24;
--red: #f87171;
--violet: #a78bfa;
--sidebar: #050810;
--sidebar-text: #eef4ff;
--sidebar-muted: #8d9bb1;
--button: #e7edf7;
--button-text: #0b1220;
--shadow: 0 18px 55px rgba(0, 0, 0, .34);
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body {
margin: 0;
min-height: 100vh;
background: var(--bg);
color: var(--text);
font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button {
min-height: 40px;
border: 0;
border-radius: 8px;
padding: 10px 14px;
background: var(--button);
color: var(--button-text);
cursor: pointer;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
button.ghost { background: var(--panel-strong); color: var(--text); }
button.soft { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
button.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
button.attention { background: var(--amber); color: #111827; }
input, select {
min-height: 42px;
min-width: 0;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
color: var(--text);
padding: 0 12px;
outline: none;
}
input:focus, select:focus {
border-color: var(--blue);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
}
h1, h2, p { margin: 0; }
h1 {
font-size: clamp(24px, 3vw, 34px);
line-height: 1.12;
letter-spacing: 0;
}
h2 {
font-size: clamp(18px, 2vw, 22px);
line-height: 1.2;
}
.app-shell {
display: grid;
grid-template-columns: 260px minmax(0, 1fr);
min-height: 100vh;
}
.sidebar {
position: sticky;
top: 0;
height: 100vh;
display: flex;
flex-direction: column;
gap: 26px;
padding: 24px 18px;
background: var(--sidebar);
color: var(--sidebar-text);
}
.brand {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.brand-mark {
display: grid;
place-items: center;
flex: 0 0 42px;
width: 42px;
height: 42px;
border-radius: 8px;
background: #29b57f;
color: white;
font-weight: 800;
}
.brand span {
display: block;
color: var(--sidebar-muted);
font-size: 12px;
}
.nav-tabs {
display: grid;
gap: 6px;
}
.nav-item {
width: 100%;
justify-content: flex-start;
text-align: left;
background: transparent;
color: var(--sidebar-muted);
box-shadow: none;
}
.nav-item:hover,
.nav-item.active {
background: rgba(255, 255, 255, .08);
color: var(--sidebar-text);
box-shadow: none;
}
.sidebar-foot {
margin-top: auto;
display: grid;
gap: 4px;
color: var(--sidebar-muted);
font-size: 12px;
}
.workspace {
min-width: 0;
}
.topbar {
position: sticky;
top: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 22px 28px;
border-bottom: 1px solid var(--line);
background: color-mix(in srgb, var(--bg) 86%, transparent);
backdrop-filter: blur(16px);
}
.title-block {
min-width: 0;
}
.title-block small {
color: var(--muted);
}
.top-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
flex-wrap: wrap;
}
.language-select {
width: 78px;
min-width: 78px;
font-weight: 800;
}
.icon-btn {
width: 42px;
padding: 0;
}
.mobile-only {
display: none;
}
.pill,
.status-pill {
display: inline-flex;
align-items: center;
min-height: 32px;
border-radius: 8px;
padding: 6px 10px;
background: var(--panel-strong);
color: var(--text);
font-weight: 700;
font-size: 12px;
}
.content {
width: min(1480px, 100%);
padding: 28px;
}
.page-panel {
display: none;
}
.page-panel.active {
display: grid;
gap: 18px;
}
.eyebrow {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
font-weight: 800;
}
.panel,
.metric-card {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.panel {
padding: 18px;
min-width: 0;
}
.panel-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
margin-bottom: 16px;
}
.panel-actions,
.inline-form {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.metric-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 14px;
}
.metric-card {
position: relative;
min-height: 126px;
padding: 18px;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.metric-card::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: 4px;
background: var(--blue);
}
.metric-card.accent-green::before { background: var(--green); }
.metric-card.accent-violet::before { background: var(--violet); }
.metric-card.accent-amber::before { background: var(--amber); }
.metric-card span,
.metric-card small {
color: var(--muted);
}
.metric-card strong {
min-width: 0;
overflow-wrap: anywhere;
font-size: clamp(24px, 3vw, 32px);
line-height: 1.05;
}
.metric-status {
display: inline-flex;
align-items: center;
width: fit-content;
margin-top: 7px;
border-radius: 8px;
padding: 4px 8px;
background: var(--panel-strong);
font-size: 12px;
font-weight: 800;
}
.metric-status.ok {
background: color-mix(in srgb, var(--green) 16%, transparent);
color: var(--green);
}
.metric-status.warn {
background: color-mix(in srgb, var(--amber) 18%, transparent);
color: var(--amber);
}
.metric-status.error {
background: color-mix(in srgb, var(--red) 16%, transparent);
color: var(--red);
}
.grid-two {
display: grid;
grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr);
gap: 18px;
}
.service-grid {
display: grid;
grid-template-columns: repeat(5, minmax(150px, 1fr));
gap: 12px;
}
.service {
display: grid;
gap: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
padding: 14px;
}
.service strong {
display: block;
margin-bottom: 6px;
}
.service span {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--muted);
}
.service i {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--muted);
}
.status-running i { background: var(--green); }
.status-failed i { background: var(--red); }
.status-inactive i,
.status-stopped i,
.status-activating i,
.status-deactivating i { background: var(--amber); }
.status-not_installed i { background: var(--muted); }
.runtime-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.runtime-grid article,
.traffic-summary article {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
padding: 12px;
}
.runtime-grid span,
.traffic-summary span,
.settings-list span {
display: block;
color: var(--muted);
font-size: 12px;
}
.runtime-grid strong,
.traffic-summary strong {
display: block;
margin-top: 3px;
overflow-wrap: anywhere;
font-size: 18px;
}
.issue-list {
margin-top: 12px;
display: grid;
gap: 8px;
}
.issue {
display: flex;
justify-content: space-between;
gap: 12px;
border-radius: 8px;
background: color-mix(in srgb, var(--amber) 12%, transparent);
color: var(--text);
padding: 10px 12px;
}
.traffic-summary {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
margin-bottom: 14px;
}
.health-ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.health-error { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.health-stale,
.health-stopped { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber); }
.health-not_installed { background: var(--panel-strong); color: var(--muted); }
.traffic-chart {
width: 100%;
min-height: 320px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
overflow: hidden;
}
.traffic-chart svg {
display: block;
width: 100%;
height: auto;
min-height: 300px;
}
.traffic-chart .grid line {
stroke: var(--line);
stroke-width: 1;
}
.traffic-chart .line {
fill: none;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
}
.traffic-chart .proxy-line { stroke: var(--blue); }
.traffic-chart .site-line { stroke: var(--green); }
.traffic-chart .proxy-area {
fill: color-mix(in srgb, var(--blue) 10%, transparent);
}
.traffic-chart .axis,
.traffic-chart .legend {
fill: var(--muted);
font: 13px system-ui, sans-serif;
}
.empty-chart,
.empty {
min-height: 160px;
display: grid;
place-items: center;
align-content: center;
gap: 6px;
color: var(--muted);
text-align: center;
padding: 18px;
}
.empty-chart strong {
color: var(--text);
}
.table-wrap {
margin-top: 14px;
overflow-x: auto;
border: 1px solid var(--line);
border-radius: 8px;
}
table {
width: 100%;
min-width: 720px;
border-collapse: collapse;
background: var(--panel);
}
th,
td {
padding: 14px 16px;
text-align: left;
border-bottom: 1px solid var(--line);
vertical-align: middle;
}
th {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
}
tr:last-child td {
border-bottom: 0;
}
td code {
display: inline-block;
max-width: 320px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
td small {
color: var(--muted);
}
.actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.empty-cell {
color: var(--muted);
text-align: center;
}
.backup-list,
.events-list,
.settings-list {
display: grid;
gap: 10px;
}
.backup-item,
.event,
.settings-list > div {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
padding: 12px;
}
.backup-item span,
.event small {
display: block;
color: var(--muted);
font-size: 12px;
overflow-wrap: anywhere;
}
.logs-meta {
min-height: 24px;
margin: -2px 0 8px;
color: var(--muted);
font-size: 12px;
font-weight: 700;
}
.logs {
min-height: 460px;
max-height: calc(100vh - 260px);
overflow: auto;
margin: 0;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
color: var(--text);
padding: 14px;
white-space: pre-wrap;
word-break: break-word;
}
.toast {
position: fixed;
right: 22px;
bottom: 22px;
z-index: 20;
min-width: 240px;
max-width: min(420px, calc(100vw - 32px));
padding: 13px 14px;
border-radius: 8px;
background: var(--button);
color: var(--button-text);
opacity: 0;
transform: translateY(10px);
pointer-events: none;
transition: opacity .18s ease, transform .18s ease;
}
.toast.show {
opacity: 1;
transform: translateY(0);
}
@media (max-width: 1280px) {
.service-grid {
grid-template-columns: repeat(3, minmax(150px, 1fr));
}
.metric-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-two {
grid-template-columns: 1fr;
}
}
@media (max-width: 980px) {
.app-shell {
grid-template-columns: 1fr;
}
.mobile-only {
display: inline-grid;
}
.sidebar {
position: fixed;
inset: 0 auto 0 0;
z-index: 10;
width: min(300px, calc(100vw - 54px));
transform: translateX(-105%);
transition: transform .2s ease;
}
.sidebar.open {
transform: translateX(0);
}
}
@media (max-width: 720px) {
.topbar {
align-items: flex-start;
padding: 16px;
}
.top-actions {
width: 100%;
justify-content: flex-start;
}
.content {
padding: 16px;
}
.panel {
padding: 14px;
}
.panel-head {
align-items: flex-start;
flex-direction: column;
}
.metric-grid,
.service-grid,
.runtime-grid,
.traffic-summary {
grid-template-columns: 1fr;
}
.inline-form,
.panel-actions {
width: 100%;
}
.inline-form input,
.inline-form select,
.inline-form button,
.panel-actions button,
.panel-actions .status-pill {
width: 100%;
}
.table-wrap {
overflow: visible;
border: 0;
}
table,
thead,
tbody,
tr,
th,
td {
display: block;
min-width: 0;
}
thead {
display: none;
}
tr {
margin-bottom: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
overflow: hidden;
}
td {
display: grid;
grid-template-columns: 120px minmax(0, 1fr);
gap: 12px;
border-bottom: 1px solid var(--line);
}
td::before {
content: attr(data-label);
color: var(--muted);
font-size: 12px;
font-weight: 800;
text-transform: uppercase;
}
td.empty-cell {
display: block;
}
td.empty-cell::before {
display: none;
}
td code {
max-width: 100%;
white-space: nowrap;
}
.actions {
justify-content: stretch;
flex-wrap: wrap;
}
.actions button {
flex: 1 1 140px;
}
.backup-item,
.event,
.settings-list > div {
grid-template-columns: 1fr;
}
}
@media (max-width: 460px) {
.topbar {
display: grid;
grid-template-columns: auto 1fr;
}
.top-actions {
grid-column: 1 / -1;
}
td {
grid-template-columns: 1fr;
gap: 4px;
}
}