Files
homelab/userbot/panel/frontend/src/styles.css
T
forust 71cddd6a91 feat(userbot): add Kubernetes control panel
Manage Telegram instances through Kubernetes with legacy adoption for forust and anna. Build and deploy the panel image alongside the runtime.
2026-09-06 20:39:12 +02:00

1236 lines
19 KiB
CSS

:root {
font-family:
Inter,
"SF Pro Display",
"Helvetica Neue",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
sans-serif;
color: #f5f5f5;
background: #080808;
font-synthesis: none;
--bg: #080808;
--sidebar: #0b0b0b;
--surface: #101010;
--surface-2: #151515;
--surface-3: #1a1a1a;
--line: #2b2b2b;
--line-soft: rgba(255, 255, 255, 0.09);
--text: #f5f5f5;
--text-2: #b7b7b7;
--muted: #747474;
--accent-soft: rgba(255, 255, 255, 0.08);
--radius-sm: 6px;
--radius-md: 8px;
--sidebar-width: 204px;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
min-width: 320px;
min-height: 100%;
margin: 0;
}
body {
min-height: 100vh;
background: var(--bg);
color: var(--text);
font-size: 13px;
}
button,
input,
select,
textarea {
font: inherit;
}
button {
color: inherit;
}
button,
select {
cursor: pointer;
}
button:disabled {
cursor: not-allowed;
opacity: 0.42;
}
.app-shell {
display: grid;
min-height: 100vh;
grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
aside[aria-label="Навигация"] {
position: fixed;
z-index: 20;
inset: 0 auto 0 0;
display: flex;
width: var(--sidebar-width);
flex-direction: column;
border-right: 1px solid var(--line);
background: var(--sidebar);
padding: 17px 10px 15px;
}
.brand {
display: flex;
align-items: center;
gap: 10px;
min-height: 43px;
padding: 0 9px;
}
.brand div {
display: grid;
gap: 2px;
}
.brand strong {
font-size: 16px;
font-weight: 700;
letter-spacing: -0.02em;
}
.brand span,
.cluster-state span {
color: var(--muted);
font-size: 11px;
}
.brand .mobile-close {
display: none;
margin-left: auto;
}
nav {
display: grid;
gap: 7px;
margin-top: 29px;
}
.nav-item {
display: flex;
height: 45px;
align-items: center;
gap: 11px;
border: 1px solid transparent;
border-radius: var(--radius-sm);
background: transparent;
color: #9b9b9b;
padding: 0 12px;
text-align: left;
font-size: 12px;
font-weight: 600;
}
.nav-item:hover {
color: var(--text);
background: rgba(255, 255, 255, 0.035);
}
.nav-item.active {
border-color: #3b3b3b;
color: var(--text);
background: var(--accent-soft);
}
.cluster-state {
display: flex;
align-items: flex-start;
gap: 9px;
margin-top: auto;
border-top: 1px solid var(--line);
padding: 14px 9px 0;
}
.cluster-state div {
display: grid;
gap: 3px;
}
.cluster-state strong {
font-size: 11px;
font-weight: 600;
}
.cluster-dot {
width: 9px;
height: 9px;
margin-top: 2px;
border-radius: 50%;
background: #8fce63;
box-shadow: 0 0 0 3px rgba(143, 206, 99, 0.05);
}
.workspace {
min-width: 0;
grid-column: 2;
}
.topbar {
position: sticky;
z-index: 10;
top: 0;
display: flex;
height: 57px;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--line);
background: rgba(8, 8, 8, 0.96);
padding: 0 22px;
backdrop-filter: blur(12px);
}
.live-state {
display: flex;
align-items: center;
gap: 9px;
color: var(--text-2);
font-size: 11px;
font-weight: 600;
}
.live-state span {
width: 8px;
height: 8px;
border-radius: 50%;
background: #bdbdbd;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 10px;
}
.namespace {
display: flex;
height: 35px;
align-items: center;
gap: 7px;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
color: var(--text-2);
padding: 0 12px;
}
button.primary,
.primary {
display: inline-flex;
min-height: 35px;
align-items: center;
justify-content: center;
gap: 8px;
border: 1px solid #e9e9e9;
border-radius: var(--radius-sm);
background: #ededed;
color: #111;
padding: 0 14px;
font-size: 12px;
font-weight: 650;
}
button.primary:hover {
background: #fff;
}
.content {
width: 100%;
max-width: 1280px;
margin: 0 auto;
padding: 21px 22px 48px;
}
.page-heading h1 {
margin: 0;
font-size: 23px;
font-weight: 700;
letter-spacing: -0.025em;
}
.page-heading p,
.drawer-header p {
margin: 5px 0 0;
color: var(--muted);
font-size: 11px;
}
.summary-strip {
display: grid;
min-height: 62px;
grid-template-columns: repeat(4, 1fr);
margin-top: 18px;
border: 1px solid var(--line);
border-radius: var(--radius-md);
background: var(--surface);
}
.summary-strip div {
display: flex;
align-items: center;
justify-content: space-between;
border-right: 1px solid var(--line);
padding: 0 22px;
}
.summary-strip div:last-child {
border-right: 0;
}
.summary-strip span {
color: var(--muted);
font-size: 11px;
}
.summary-strip strong {
font-size: 18px;
font-weight: 650;
}
.toolbar {
display: grid;
grid-template-columns: minmax(230px, 330px) 160px 36px;
gap: 10px;
margin-top: 17px;
}
.search-field,
.toolbar select {
height: 36px;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-2);
}
.search-field {
display: flex;
align-items: center;
gap: 9px;
padding: 0 12px;
}
.search-field input {
width: 100%;
border: 0;
outline: 0;
background: transparent;
color: var(--text);
}
.search-field input::placeholder {
color: var(--muted);
}
.toolbar select {
appearance: none;
background-image:
linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%);
background-position:
calc(100% - 15px) 15px,
calc(100% - 11px) 15px;
background-repeat: no-repeat;
background-size: 4px 4px;
padding: 0 30px 0 12px;
}
.icon-button {
display: inline-flex;
width: 32px;
height: 32px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-2);
padding: 0;
}
.icon-button:hover:not(:disabled) {
border-color: #4a4a4a;
color: var(--text);
background: var(--surface-2);
}
.icon-button.borderless {
border-color: transparent;
background: transparent;
}
.refresh {
width: 36px;
height: 36px;
}
.table-frame {
overflow: hidden;
margin-top: 14px;
border: 1px solid var(--line);
border-radius: var(--radius-md);
background: var(--surface);
}
.table-grid {
display: grid;
grid-template-columns:
minmax(125px, 1.15fr) minmax(100px, 0.8fr) minmax(170px, 1.45fr)
70px 85px 105px 132px;
align-items: center;
gap: 10px;
}
.table-head {
min-height: 35px;
border-bottom: 1px solid var(--line);
color: var(--muted);
padding: 0 12px;
font-size: 9px;
font-weight: 650;
}
.table-head .right {
text-align: right;
}
.instance-row {
width: 100%;
min-height: 58px;
border: 0;
border-bottom: 1px solid var(--line);
background: transparent;
color: var(--text-2);
padding: 0 10px 0 12px;
text-align: left;
font-size: 11px;
}
.instance-row:last-child {
border-bottom: 0;
}
.instance-row:hover,
.instance-row:focus-visible {
outline: 0;
background: rgba(255, 255, 255, 0.045);
}
.instance-row.error-row {
background: rgba(255, 255, 255, 0.025);
}
.instance-name {
display: grid;
gap: 4px;
min-width: 0;
}
.instance-name strong {
overflow: hidden;
color: var(--text);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.instance-name small {
overflow: hidden;
color: var(--muted);
font-size: 10px;
text-overflow: ellipsis;
white-space: nowrap;
}
.pod-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row-actions {
display: flex;
justify-content: flex-end;
gap: 5px;
}
.row-actions .icon-button {
width: 29px;
height: 29px;
}
.status {
display: inline-flex;
align-items: center;
gap: 7px;
color: var(--text-2);
font-size: 11px;
}
.status-dot {
width: 8px;
height: 8px;
border: 1px solid #8b8b8b;
border-radius: 50%;
}
.status-running .status-dot {
border-color: #d0d0d0;
background: #d0d0d0;
}
.status-pending .status-dot {
border-color: #9a9a9a;
background: linear-gradient(90deg, #9a9a9a 50%, transparent 50%);
}
.status-error {
color: #ddd;
}
.status-error .status-dot {
border-color: #eee;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.center-state,
.empty-state {
display: flex;
min-height: 300px;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--muted);
gap: 9px;
text-align: center;
}
.empty-state h2 {
margin: 4px 0 0;
color: var(--text);
font-size: 15px;
}
.empty-state p {
margin: 0 0 8px;
}
.error-banner {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 13px;
border: 1px solid #414141;
border-radius: var(--radius-sm);
background: #151515;
padding: 10px 12px;
color: #d8d8d8;
}
.error-banner button,
.text-button,
.back-link {
border: 0;
background: transparent;
color: var(--text-2);
padding: 0;
font-size: 11px;
text-decoration: underline;
text-underline-offset: 3px;
}
.drawer-backdrop {
position: fixed;
z-index: 39;
inset: 0;
background: rgba(0, 0, 0, 0.58);
}
.drawer {
position: fixed;
z-index: 40;
top: 0;
right: 0;
display: flex;
width: min(460px, 100vw);
height: 100dvh;
flex-direction: column;
border-left: 1px solid var(--line);
background: #0d0d0d;
box-shadow: -20px 0 60px rgba(0, 0, 0, 0.42);
animation: drawer-in 160ms ease-out;
}
.details-drawer {
width: min(420px, 100vw);
}
.drawer-header {
display: flex;
min-height: 76px;
align-items: flex-start;
justify-content: space-between;
border-bottom: 1px solid var(--line);
padding: 20px 22px 16px;
}
.drawer-header h2 {
margin: 0;
font-size: 20px;
letter-spacing: -0.025em;
}
.drawer-header .status {
margin-top: 8px;
}
.steps {
display: grid;
grid-template-columns: repeat(3, 1fr);
margin: 0;
border-bottom: 1px solid var(--line);
padding: 0 22px;
list-style: none;
}
.steps li {
position: relative;
display: flex;
height: 55px;
align-items: center;
gap: 7px;
border-bottom: 2px solid transparent;
color: var(--muted);
font-size: 10px;
font-weight: 600;
}
.steps li span {
display: inline-flex;
width: 17px;
height: 17px;
align-items: center;
justify-content: center;
border: 1px solid #4a4a4a;
border-radius: 50%;
font-size: 9px;
}
.steps li.active {
border-color: #ededed;
color: var(--text);
}
.steps li.active span,
.steps li.complete span {
border-color: #ededed;
background: #ededed;
color: #111;
}
.drawer-form {
overflow-y: auto;
padding: 17px 22px 20px;
}
fieldset {
display: grid;
gap: 11px;
margin: 0;
border: 0;
border-bottom: 1px solid var(--line);
padding: 0 0 15px;
}
fieldset + fieldset {
margin-top: 15px;
}
legend,
.drawer-scroll h3,
.auth-step h3,
.creating-state h3 {
margin: 0 0 10px;
color: var(--text);
font-size: 12px;
font-weight: 650;
}
label {
display: grid;
gap: 6px;
color: var(--text-2);
font-size: 10px;
font-weight: 550;
}
label small {
color: var(--muted);
font-size: 9px;
font-weight: 400;
line-height: 1.45;
}
input,
select,
textarea {
width: 100%;
border: 1px solid #343434;
border-radius: var(--radius-sm);
outline: 0;
background: #121212;
color: var(--text);
padding: 0 11px;
font-size: 11px;
transition: border-color 120ms ease;
}
input,
select {
height: 37px;
}
textarea {
resize: vertical;
min-height: 68px;
padding-top: 10px;
}
input:focus,
select:focus,
textarea:focus {
border-color: #777;
}
.two-columns,
.three-columns {
display: grid;
gap: 10px;
}
.two-columns {
grid-template-columns: 0.75fr 1.25fr;
}
.three-columns {
grid-template-columns: repeat(3, 1fr);
}
.input-with-action {
position: relative;
display: block;
}
.input-with-action input {
padding-right: 38px;
}
.input-with-action button {
position: absolute;
top: 1px;
right: 1px;
display: inline-flex;
width: 36px;
height: 35px;
align-items: center;
justify-content: center;
border: 0;
background: transparent;
color: var(--muted);
}
.segmented {
display: grid;
grid-template-columns: 1fr 1fr;
overflow: hidden;
border: 1px solid #343434;
border-radius: var(--radius-sm);
}
.segmented button {
height: 35px;
border: 0;
border-right: 1px solid #343434;
background: transparent;
color: var(--muted);
font-size: 10px;
font-weight: 600;
}
.segmented button:last-child {
border-right: 0;
}
.segmented button.active {
background: var(--accent-soft);
color: var(--text);
box-shadow: inset 0 0 0 1px #777;
}
.form-actions {
display: grid;
grid-template-columns: 0.8fr 1.2fr;
gap: 10px;
margin-top: 16px;
}
.form-actions > button:not(.primary),
.drawer-actions > button,
.danger-button {
display: flex;
min-height: 37px;
align-items: center;
justify-content: center;
gap: 8px;
border: 1px solid #343434;
border-radius: var(--radius-sm);
background: #111;
color: var(--text-2);
font-size: 10px;
font-weight: 600;
}
.form-error {
margin: 12px 0 0;
border-left: 2px solid #ddd;
color: #ddd;
padding-left: 9px;
font-size: 10px;
line-height: 1.45;
}
.auth-step {
padding: 24px 22px;
}
.auth-step h3 {
margin-top: 34px;
font-size: 17px;
}
.auth-step > p {
margin: -3px 0 20px;
color: var(--muted);
font-size: 11px;
}
.back-link {
display: inline-flex;
align-items: center;
gap: 6px;
text-decoration: none;
}
.auth-step form {
display: grid;
gap: 13px;
}
.code-input {
height: 51px;
letter-spacing: 0.35em;
font-size: 20px;
text-align: center;
}
.full {
width: 100%;
}
.creating-state {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--muted);
text-align: center;
}
.creating-state h3 {
margin: 16px 0 0;
font-size: 16px;
}
.creating-state p {
max-width: 270px;
line-height: 1.55;
}
.drawer-scroll {
overflow-y: auto;
flex: 1;
padding: 0 22px;
}
.drawer-scroll section {
border-bottom: 1px solid var(--line);
padding: 19px 0;
}
.resource-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.resource {
display: grid;
gap: 8px;
min-height: 69px;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: var(--surface);
padding: 11px;
}
.resource > span,
.resource small {
color: var(--muted);
font-size: 9px;
font-weight: 500;
}
.resource strong {
font-size: 12px;
}
.metadata-list {
display: grid;
gap: 10px;
margin: 0;
}
.metadata-list div {
display: grid;
gap: 5px;
}
.metadata-list dt {
color: var(--muted);
font-size: 9px;
}
.metadata-list dd {
display: flex;
min-width: 0;
min-height: 34px;
align-items: center;
justify-content: space-between;
gap: 8px;
margin: 0;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-2);
padding: 0 10px;
font-size: 10px;
}
.metadata-list dd span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.metadata-list dd.wrap {
overflow-wrap: anywhere;
padding-block: 8px;
}
.copy-button {
display: inline-flex;
align-items: center;
border: 0;
background: transparent;
color: var(--muted);
padding: 0;
}
.section-title {
display: flex;
align-items: center;
justify-content: space-between;
}
.logs-section pre {
overflow: auto;
max-height: 250px;
margin: 0;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: #080808;
color: #aaa;
padding: 11px;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
font-size: 9px;
line-height: 1.55;
white-space: pre-wrap;
}
.danger-zone p {
color: var(--muted);
font-size: 10px;
line-height: 1.5;
}
.checkbox-row {
display: flex;
grid-template-columns: auto 1fr;
align-items: center;
gap: 8px;
margin-top: 10px;
}
.checkbox-row input {
width: 14px;
height: 14px;
}
.danger-button {
width: 100%;
margin-top: 11px;
}
.drawer-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
border-top: 1px solid var(--line);
padding: 13px 22px 16px;
}
.drawer-actions .primary {
min-height: 37px;
}
.drawer-actions .delete-trigger {
grid-column: span 2;
color: #8b8b8b;
}
.mobile-menu,
.mobile-overlay {
display: none;
}
.spin {
animation: spin 850ms linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes drawer-in {
from {
transform: translateX(18px);
opacity: 0.6;
}
}
@media (max-width: 980px) {
.table-grid {
grid-template-columns: minmax(120px, 1fr) 100px minmax(145px, 1.25fr) 60px 75px 116px;
}
.table-grid > :nth-child(6) {
display: none;
}
.summary-strip div {
padding: 0 14px;
}
}
@media (max-width: 760px) {
.app-shell {
display: block;
}
aside[aria-label="Навигация"] {
width: 240px;
transform: translateX(-100%);
transition: transform 160ms ease;
}
aside[aria-label="Навигация"].open {
transform: translateX(0);
}
.brand .mobile-close {
display: inline-flex;
border: 0;
background: transparent;
color: var(--muted);
}
.mobile-overlay {
position: fixed;
z-index: 19;
inset: 0;
display: block;
border: 0;
background: rgba(0, 0, 0, 0.65);
}
.workspace {
width: 100%;
}
.mobile-menu {
display: inline-flex;
}
.topbar {
height: 55px;
padding: 0 13px;
}
.live-state {
display: none;
}
.namespace {
display: none;
}
.topbar-actions {
margin-left: auto;
}
.content {
padding: 18px 13px 32px;
}
.summary-strip {
grid-template-columns: 1fr 1fr;
}
.summary-strip div {
min-height: 53px;
border-bottom: 1px solid var(--line);
}
.summary-strip div:nth-child(2) {
border-right: 0;
}
.summary-strip div:nth-child(3),
.summary-strip div:nth-child(4) {
border-bottom: 0;
}
.toolbar {
grid-template-columns: 1fr 120px 36px;
}
.table-head {
display: none;
}
.table-frame {
border-radius: var(--radius-sm);
}
.instance-row.table-grid {
display: grid;
min-height: 75px;
grid-template-columns: minmax(0, 1fr) auto;
gap: 7px 12px;
padding: 10px 9px 10px 12px;
}
.instance-row > :nth-child(2) {
justify-self: end;
}
.instance-row > :nth-child(3) {
grid-column: 1;
color: var(--muted);
font-size: 9px;
}
.instance-row > :nth-child(4),
.instance-row > :nth-child(5),
.instance-row > :nth-child(6) {
display: none;
}
.row-actions {
grid-column: 2;
grid-row: 2;
}
.row-actions .icon-button:first-child,
.row-actions .icon-button:last-child {
display: none;
}
.drawer,
.details-drawer {
width: 100vw;
}
}
@media (max-width: 480px) {
.toolbar {
grid-template-columns: 1fr 36px;
}
.toolbar select {
grid-column: 1;
grid-row: 2;
}
.toolbar .refresh {
grid-column: 2;
grid-row: 1;
}
.two-columns {
grid-template-columns: 1fr;
}
.three-columns {
gap: 7px;
}
.drawer-header,
.drawer-form,
.auth-step,
.drawer-actions {
padding-inline: 16px;
}
.steps,
.drawer-scroll {
padding-inline: 16px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}