Files
Dashboard/src/index.css
T
Syco 638c7d524f
ci/woodpecker/push/woodpecker Pipeline was successful
Make header sticky at top of viewport
2026-05-16 18:06:17 +02:00

588 lines
16 KiB
CSS

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0d0f14;
--surface: #13151c;
--surface2: #1a1d27;
--border: #22263a;
--accent: #4f8ef7;
--accent2: #7c5ff5;
--green: #34d399;
--yellow: #fbbf24;
--red: #f87171;
--muted: #4a5068;
--text: #e2e6f3;
--text2: #8890aa;
--radius: 12px;
}
body {
background: var(--bg);
color: var(--text);
font-family: 'Syne', sans-serif;
min-height: 100vh;
overflow-x: hidden;
}
body::before {
content: '';
position: fixed;
inset: 0;
background-image:
linear-gradient(var(--border) 1px, transparent 1px),
linear-gradient(90deg, var(--border) 1px, transparent 1px);
background-size: 40px 40px;
opacity: 0.25;
pointer-events: none;
z-index: 0;
}
.blob {
position: fixed;
border-radius: 50%;
filter: blur(120px);
pointer-events: none;
z-index: 0;
opacity: 0.07;
}
.blob-1 { width: 500px; height: 500px; background: var(--accent); top: -150px; left: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--accent2); bottom: -100px; right: -80px; }
/* ── Layout ── */
.shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 0 28px 48px; }
/* ── Header ── */
header {
position: sticky;
top: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 22px 0 18px;
background: var(--bg);
border-bottom: 1px solid var(--border);
margin-bottom: 28px;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
width: 32px; height: 32px;
border-radius: 8px;
object-fit: contain;
}
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.logo-sub { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.clock-widget { text-align: right; }
.clock-time { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 500; letter-spacing: 1px; }
.clock-date { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text2); margin-top: 2px; }
.weather-inline { display: flex; align-items: center; gap: 8px; }
.weather-emoji { font-size: 22px; line-height: 1; }
.weather-temp { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 500; letter-spacing: 1px; }
.weather-desc { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text2); margin-top: 2px; }
/* ── Section label ── */
.section-label {
font-family: 'JetBrains Mono', monospace;
font-size: 10px; font-weight: 500;
letter-spacing: 2px; text-transform: uppercase;
color: var(--muted);
margin-bottom: 12px;
display: flex; align-items: center; gap: 8px;
cursor: pointer;
user-select: none;
}
.section-label:hover { color: var(--text2); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-chevron {
font-size: 12px;
transition: transform 0.2s ease;
margin-left: -4px;
letter-spacing: 0;
}
.section-chevron.collapsed { transform: rotate(-90deg); }
/* ── Grid ── */
.infra-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 14px;
margin-bottom: 28px;
}
/* ── Card ── */
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
position: relative;
overflow: hidden;
transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #2e3452; transform: translateY(-1px); }
.card::before {
content: '';
position: absolute; inset: 0;
background: linear-gradient(135deg, rgba(255,255,255,0.015) 0%, transparent 60%);
pointer-events: none;
}
@keyframes fadeUp {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeUp 0.4s ease both; }
/* ── Staggered card entrance ── */
.infra-grid > *:nth-child(1) { animation-delay: 0ms; }
.infra-grid > *:nth-child(2) { animation-delay: 60ms; }
.infra-grid > *:nth-child(3) { animation-delay: 120ms; }
.infra-grid > *:nth-child(4) { animation-delay: 180ms; }
.infra-grid > *:nth-child(5) { animation-delay: 240ms; }
.infra-grid > *:nth-child(6) { animation-delay: 300ms; }
.infra-grid > *:nth-child(7) { animation-delay: 360ms; }
.infra-grid > *:nth-child(8) { animation-delay: 420ms; }
.infra-grid > *:nth-child(9) { animation-delay: 480ms; }
.infra-grid > *:nth-child(10) { animation-delay: 540ms; }
/* ── Widget header ── */
.widget-header {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 14px;
}
.widget-title {
font-size: 11px; font-weight: 600; letter-spacing: 1px;
text-transform: uppercase; color: var(--text2);
display: flex; align-items: center; gap: 6px;
}
.widget-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.widget-badge {
font-family: 'JetBrains Mono', monospace;
font-size: 9px; padding: 2px 6px; border-radius: 4px;
background: rgba(79,142,247,0.12); color: var(--accent);
}
/* ── Node meta ── */
.node-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.node-uptime { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-bottom: 14px; }
/* ── Progress bars ── */
.progress-group { display: flex; flex-direction: column; gap: 10px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 5px; }
.progress-name { font-size: 11px; color: var(--text2); }
.progress-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text); }
.progress-track { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.progress-fill {
height: 100%; border-radius: 2px;
background: linear-gradient(90deg, var(--accent), var(--accent2));
transition: width 0.6s ease;
}
.progress-fill.green { background: linear-gradient(90deg, var(--green), #6ee7b7); }
.progress-fill.yellow { background: linear-gradient(90deg, var(--yellow), #f59e0b); }
.progress-fill.red { background: linear-gradient(90deg, var(--red), #fca5a5); }
/* ── Stat row ── */
.stat-row { display: flex; gap: 12px; }
.stat-item { flex: 1; }
.stat-value {
font-family: 'JetBrains Mono', monospace;
font-size: 22px; font-weight: 500; line-height: 1;
background: linear-gradient(135deg, var(--text), var(--text2));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-value.green { background: linear-gradient(135deg, var(--green), #6ee7b7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value.yellow { background: linear-gradient(135deg, var(--yellow), #fcd34d); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value.accent { background: linear-gradient(135deg, var(--accent), #93c5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value.red { background: linear-gradient(135deg, var(--red), #fca5a5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 10px; color: var(--muted); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
/* ── Pill / list item ── */
.list-item {
display: flex; align-items: center; justify-content: space-between;
padding: 7px 0;
border-bottom: 1px solid var(--border);
font-size: 12px;
}
.list-item:last-child { border-bottom: none; }
.list-item-left { display: flex; align-items: center; gap: 8px; color: var(--text2); }
.pill { padding: 2px 8px; border-radius: 20px; font-size: 10px; font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.pill-green { background: rgba(52,211,153,0.12); color: var(--green); }
.pill-yellow { background: rgba(251,191,36,0.12); color: var(--yellow); }
.pill-red { background: rgba(248,113,113,0.12); color: var(--red); }
.pill-blue { background: rgba(79,142,247,0.12); color: var(--accent); }
/* ── AdGuard bar chart ── */
.ag-chart { display: flex; align-items: flex-end; gap: 3px; height: 40px; margin-top: 10px; }
.ag-bar { flex: 1; border-radius: 2px 2px 0 0; background: var(--accent); opacity: 0.5; min-height: 2px; }
.ag-bar.blocked { background: var(--red); opacity: 0.6; }
.ag-legend { display: flex; gap: 10px; margin-top: 8px; }
.ag-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.ag-legend-swatch { width: 8px; height: 8px; border-radius: 1px; }
/* ── CrowdSec ── */
.crowdsec-big { font-family: 'JetBrains Mono', monospace; font-size: 36px; font-weight: 500; color: var(--red); line-height: 1; margin: 6px 0 2px; }
.crowdsec-sub { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
/* ── Loading / error states ── */
.widget-loading {
display: flex; align-items: center; justify-content: center;
min-height: 80px; color: var(--muted);
font-family: 'JetBrains Mono', monospace; font-size: 11px;
}
.widget-loading::before {
content: '';
width: 14px; height: 14px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.widget-error {
font-family: 'JetBrains Mono', monospace; font-size: 11px;
color: var(--red); padding: 12px 0;
display: flex; align-items: flex-start; gap: 6px;
}
/* ── Responsive ── */
@media (max-width: 540px) {
.shell { padding: 0 14px 32px; }
.stat-value { font-size: 18px; }
.clock-time { font-size: 16px; }
.topbar-right { gap: 12px; }
}
/* ── Nav tabs ── */
.nav-tabs {
display: flex;
gap: 4px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 3px;
}
.nav-tab {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
font-weight: 500;
padding: 5px 14px;
border-radius: 6px;
text-decoration: none;
color: var(--text2);
transition: background 0.15s, color 0.15s;
}
.nav-tab:hover { color: var(--text); }
.nav-tab-active { background: var(--surface2); color: var(--text); }
/* ── Apps Section ── */
.app-group { margin-bottom: 28px; }
.app-group-label {
font-family: 'JetBrains Mono', monospace;
font-size: 10px; font-weight: 500;
letter-spacing: 2px; text-transform: uppercase;
color: var(--muted);
margin-bottom: 12px;
}
.app-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.app-tile {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 14px 12px;
width: 90px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
text-decoration: none;
color: var(--text2);
font-size: 11px;
text-align: center;
transition: border-color 0.2s, transform 0.2s, color 0.2s;
cursor: pointer;
}
.app-tile:hover {
border-color: var(--accent);
transform: translateY(-2px);
color: var(--text);
}
.app-icon {
width: 36px;
height: 36px;
object-fit: contain;
}
.app-icon-fallback {
width: 36px;
height: 36px;
border-radius: 8px;
background: var(--surface2);
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 700;
color: var(--accent);
}
.app-name {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: inherit;
line-height: 1.3;
word-break: break-word;
}
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
/* ── Mobile Home ── */
.mobile-home {
display: flex;
flex-direction: column;
gap: 14px;
padding-bottom: 24px;
}
.mobile-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 18px;
animation: fadeUp 0.4s ease both;
}
.mobile-loading {
color: var(--muted);
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
min-height: 80px;
display: flex;
align-items: center;
justify-content: center;
}
/* Weather */
.mobile-weather-card {}
.mobile-weather-main {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 10px;
}
.mobile-weather-emoji { font-size: 48px; line-height: 1; }
.mobile-temp {
font-family: 'JetBrains Mono', monospace;
font-size: 42px;
font-weight: 500;
line-height: 1;
background: linear-gradient(135deg, var(--text), var(--text2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.mobile-weather-desc {
font-size: 13px;
color: var(--text2);
margin-top: 4px;
}
.mobile-weather-minmax {
margin-left: auto;
text-align: right;
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
display: flex;
flex-direction: column;
gap: 2px;
color: var(--text2);
}
.mobile-weather-stats {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
color: var(--muted);
margin-bottom: 14px;
display: flex;
flex-wrap: wrap;
gap: 4px;
align-items: center;
}
.mobile-stat-sep { color: var(--border); }
.mobile-hourly-scroll {
display: flex;
gap: 4px;
overflow-x: auto;
padding-bottom: 4px;
scrollbar-width: none;
}
.mobile-hourly-scroll::-webkit-scrollbar { display: none; }
.mobile-hour-slot {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 10px;
border-radius: 8px;
background: var(--surface2);
min-width: 52px;
}
.mobile-hour-now {
background: rgba(79,142,247,0.15);
border: 1px solid rgba(79,142,247,0.3);
}
.mobile-hour-time {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: var(--muted);
}
.mobile-hour-now .mobile-hour-time { color: var(--accent); }
.mobile-hour-emoji { font-size: 18px; }
.mobile-hour-temp {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 500;
color: var(--text);
}
/* Transit */
.mobile-transit-card {}
.mobile-transit-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 12px;
}
.mobile-transit-stop {
font-size: 14px;
font-weight: 700;
letter-spacing: 0.5px;
margin-bottom: 2px;
}
.mobile-transit-updated {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: var(--muted);
}
.mobile-refresh-btn {
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text2);
border-radius: 6px;
width: 30px;
height: 30px;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.15s;
}
.mobile-refresh-btn:hover { color: var(--text); }
.mobile-notices {
margin-bottom: 12px;
display: flex;
flex-direction: column;
gap: 6px;
}
.mobile-notice {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: var(--yellow);
background: rgba(251,191,36,0.08);
border: 1px solid rgba(251,191,36,0.2);
border-radius: 6px;
padding: 6px 8px;
line-height: 1.4;
}
.mobile-departures-list {
display: flex;
flex-direction: column;
}
.mobile-departure-row {
display: flex;
align-items: center;
gap: 12px;
padding: 9px 0;
border-bottom: 1px solid var(--border);
}
.mobile-departure-row:last-child { border-bottom: none; }
.mobile-line-badge {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
color: #fff;
border-radius: 6px;
padding: 3px 8px;
min-width: 36px;
text-align: center;
flex-shrink: 0;
}
.mobile-departure-dir {
flex: 1;
font-size: 13px;
color: var(--text);
}
.mobile-departure-time {
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
font-weight: 500;
color: var(--green);
flex-shrink: 0;
display: flex;
align-items: center;
gap: 8px;
}
.mobile-departure-time.delayed { color: var(--yellow); }
.mobile-departure-clock {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
color: var(--muted);
width: 40px;
text-align: right;
}
.mobile-departure-mins {
min-width: 54px;
text-align: right;
white-space: nowrap;
}