Files
NetBirdMSP-Appliance/static/css/styles.css
Sascha Lustenberger | techlan gmbh 13408225b4 feat(ui): add dark mode toggle to navbar
Uses Bootstrap 5.3 native data-bs-theme with localStorage persistence.
Inline script in <head> prevents flash on page load.
Moon/sun icon in top-right navbar switches between light and dark.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 20:08:18 +01:00

224 lines
4.1 KiB
CSS

/* NetBird MSP Appliance - Custom Styles */
/* i18n FOUC prevention */
body.i18n-loading #login-page,
body.i18n-loading #app-page {
visibility: hidden;
}
/* Login */
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.login-card {
width: 100%;
max-width: 420px;
border-radius: 12px;
}
/* Stats cards */
.stat-card {
border-radius: 10px;
transition: transform 0.15s;
}
.stat-card:hover {
transform: translateY(-2px);
}
.stat-icon {
width: 48px;
height: 48px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
/* Table */
.table th {
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #6c757d;
}
.table td {
vertical-align: middle;
}
/* Log viewer */
.log-viewer {
max-height: 600px;
overflow-y: auto;
}
.log-entry {
padding: 4px 8px;
border-bottom: 1px solid #f0f0f0;
font-size: 0.85rem;
font-family: 'Consolas', 'Monaco', monospace;
}
.log-entry:last-child {
border-bottom: none;
}
.log-time {
color: #6c757d;
margin-right: 8px;
}
.log-pre {
background: #1e1e1e;
color: #d4d4d4;
padding: 12px;
border-radius: 6px;
max-height: 300px;
overflow-y: auto;
font-size: 0.8rem;
white-space: pre-wrap;
word-wrap: break-word;
}
/* Toast notification */
.toast-notification {
position: fixed;
bottom: 20px;
right: 20px;
background: #198754;
color: white;
padding: 12px 24px;
border-radius: 8px;
font-size: 0.9rem;
z-index: 9999;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s;
}
@keyframes toast-in {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
from { opacity: 1; }
to { opacity: 0; }
}
/* Badge improvements */
.badge {
font-weight: 500;
font-size: 0.75rem;
padding: 0.35em 0.65em;
}
/* Page transitions */
.page-content {
animation: fade-in 0.15s ease;
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* Progress bars in monitoring */
.progress {
border-radius: 6px;
}
.progress-bar {
font-size: 0.75rem;
font-weight: 600;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.stat-card .fs-3 {
font-size: 1.5rem !important;
}
.btn-group-sm .btn {
padding: 0.2rem 0.4rem;
}
}
/* Custom scrollbar */
.log-pre::-webkit-scrollbar,
.log-viewer::-webkit-scrollbar {
width: 6px;
}
.log-pre::-webkit-scrollbar-thumb,
.log-viewer::-webkit-scrollbar-thumb {
background: #555;
border-radius: 3px;
}
/* Navbar brand */
.navbar-brand {
font-weight: 700;
letter-spacing: 0.5px;
}
.navbar-brand img {
object-fit: contain;
}
/* Login logo */
#login-logo img {
object-fit: contain;
}
/* Card improvements */
.card {
border-radius: 10px;
border: 1px solid rgba(0, 0, 0, 0.08);
}
.card-header {
font-weight: 600;
background: rgba(0, 0, 0, 0.02);
}
/* ---------------------------------------------------------------------------
Dark mode overrides (Bootstrap 5.3 data-bs-theme="dark")
Bootstrap handles most components automatically; only custom elements need
explicit overrides here.
--------------------------------------------------------------------------- */
[data-bs-theme="dark"] .card {
border-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .card-header {
background: rgba(255, 255, 255, 0.04);
}
[data-bs-theme="dark"] .log-entry {
border-bottom-color: rgba(255, 255, 255, 0.07);
}
[data-bs-theme="dark"] .log-time {
color: #9ca3af;
}
[data-bs-theme="dark"] .table th {
color: #9ca3af;
}
[data-bs-theme="dark"] .login-container {
background: linear-gradient(135deg, #0d0d1a 0%, #0a1020 50%, #071525 100%);
}
[data-bs-theme="dark"] .stat-card {
background: var(--bs-card-bg);
}