Files
linumiq_net-web_app/app/globals.css
T
Gerhard Scheikl d317e8c758 feat(admin): live redis kill-switch on tunnel actions, sortable columns + CSV export + bulk actions, Node 24 LTS
WS1: pin all Docker stages to node:24.16.0-alpine; add engines node>=20.
WS2: lib/redis.ts gains TTL-backed redisSet, redisDel, setTunnelActive (writes tunnel:active:<sub>=1/0 EX 30, TUNNEL_ACTIVE_TTL override, no-op without REDIS_URL); wired into tunnel active/delete/reassign routes.
WS3: sortable columns, CSV export routes (token excluded), and bulk actions (self-account guard) across users/tunnels/audit admin tables.
2026-05-31 14:46:22 +02:00

431 lines
7.1 KiB
CSS

:root {
--bg: #0f172a;
--fg: #f8fafc;
--muted: #94a3b8;
--card: #1e293b;
--border: #334155;
--accent: #3b82f6;
--accent-fg: #ffffff;
--danger: #ef4444;
--success: #22c55e;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family:
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
line-height: 1.5;
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.container {
max-width: 720px;
margin: 0 auto;
padding: 2rem 1rem;
}
.nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
border-bottom: 1px solid var(--border);
}
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
margin: 1rem 0;
}
h1,
h2,
h3 {
margin: 0 0 1rem;
}
label {
display: block;
margin: 0.75rem 0 0.25rem;
font-size: 0.875rem;
color: var(--muted);
}
input[type='text'],
input[type='email'],
input[type='password'] {
width: 100%;
padding: 0.6rem 0.75rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
color: var(--fg);
font-size: 1rem;
}
button,
.btn {
display: inline-block;
padding: 0.6rem 1rem;
border: 1px solid var(--accent);
background: var(--accent);
color: var(--accent-fg);
border-radius: 6px;
font-size: 1rem;
cursor: pointer;
text-decoration: none;
}
button:hover,
.btn:hover {
opacity: 0.9;
text-decoration: none;
}
button.secondary,
.btn.secondary {
background: transparent;
color: var(--fg);
border-color: var(--border);
}
.token {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.5rem 0.75rem;
word-break: break-all;
font-size: 0.875rem;
}
.error {
color: var(--danger);
margin: 0.5rem 0;
font-size: 0.875rem;
}
.success {
color: var(--success);
margin: 0.5rem 0;
font-size: 0.875rem;
}
.muted {
color: var(--muted);
font-size: 0.875rem;
}
.progress {
width: 100%;
height: 8px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 4px;
overflow: hidden;
}
.progress > div {
height: 100%;
background: var(--accent);
}
.kv {
display: grid;
grid-template-columns: 160px 1fr;
gap: 0.5rem 1rem;
align-items: start;
margin: 0.5rem 0;
}
.kv .k {
color: var(--muted);
font-size: 0.875rem;
}
.row {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* ----------------------------------------------------------------------- */
/* Admin interface */
/* ----------------------------------------------------------------------- */
.admin-shell {
display: flex;
min-height: calc(100vh - 65px);
align-items: stretch;
}
.admin-sidebar {
width: 220px;
flex: 0 0 220px;
border-right: 1px solid var(--border);
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.admin-brand {
font-weight: 700;
font-size: 1.1rem;
letter-spacing: 0.02em;
}
.admin-nav {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.admin-nav-link {
display: block;
padding: 0.5rem 0.75rem;
border-radius: 6px;
color: var(--fg);
}
.admin-nav-link:hover {
background: var(--card);
text-decoration: none;
}
.admin-nav-link.active {
background: var(--accent);
color: var(--accent-fg);
}
.admin-sidebar-footer {
margin-top: auto;
display: flex;
flex-direction: column;
gap: 0.5rem;
border-top: 1px solid var(--border);
padding-top: 1rem;
}
.admin-back {
font-size: 0.875rem;
}
.admin-content {
flex: 1 1 auto;
padding: 2rem;
min-width: 0;
}
.admin-cols {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
@media (max-width: 800px) {
.admin-shell {
flex-direction: column;
}
.admin-sidebar {
width: auto;
flex: none;
border-right: none;
border-bottom: 1px solid var(--border);
}
.admin-sidebar-footer {
margin-top: 0;
}
.admin-cols {
grid-template-columns: 1fr;
}
.admin-content {
padding: 1.25rem;
}
}
/* KPI cards */
.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 0.75rem;
margin: 1rem 0 1.5rem;
}
.kpi-card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
}
.kpi-value {
font-size: 1.5rem;
font-weight: 700;
}
.kpi-label {
color: var(--muted);
font-size: 0.8rem;
margin-top: 0.25rem;
}
/* Tables */
.admin-table-wrap {
overflow-x: auto;
border: 1px solid var(--border);
border-radius: 8px;
}
.admin-table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
text-align: left;
padding: 0.6rem 0.75rem;
border-bottom: 1px solid var(--border);
vertical-align: top;
}
.admin-table th {
color: var(--muted);
font-weight: 600;
background: var(--card);
white-space: nowrap;
}
.admin-table tr:last-child td {
border-bottom: none;
}
.admin-table tbody tr:hover {
background: rgba(255, 255, 255, 0.02);
}
.admin-table code {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.8rem;
word-break: break-all;
}
/* Badges */
.badge {
display: inline-block;
padding: 0.15rem 0.5rem;
border-radius: 999px;
font-size: 0.75rem;
border: 1px solid var(--border);
background: var(--bg);
color: var(--muted);
white-space: nowrap;
}
.badge-admin {
background: rgba(59, 130, 246, 0.15);
border-color: var(--accent);
color: #93c5fd;
}
.badge-banned {
background: rgba(239, 68, 68, 0.15);
border-color: var(--danger);
color: #fca5a5;
}
.badge-ok {
background: rgba(34, 197, 94, 0.15);
border-color: var(--success);
color: #86efac;
}
/* Button variants */
.btn-sm {
padding: 0.35rem 0.6rem;
font-size: 0.8rem;
}
.btn-danger {
background: var(--danger);
border-color: var(--danger);
color: #fff;
}
.btn-danger:hover {
opacity: 0.9;
}
button:disabled,
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
select {
font-size: 1rem;
}
/* Sortable table headers */
.th-sort {
cursor: pointer;
user-select: none;
white-space: nowrap;
}
.th-sort:hover {
color: var(--fg);
}
.th-sort .sort-ind {
margin-left: 0.3rem;
opacity: 0.5;
font-size: 0.7rem;
}
.th-sort.sorted .sort-ind {
opacity: 1;
color: var(--accent);
}
/* Checkbox / selection column */
.admin-table th.col-check,
.admin-table td.col-check {
width: 1%;
white-space: nowrap;
text-align: center;
}
.admin-table input[type='checkbox'] {
width: auto;
margin: 0;
cursor: pointer;
accent-color: var(--accent);
}
.admin-table tr.row-selected td {
background: rgba(59, 130, 246, 0.08);
}
/* Bulk action bar */
.bulk-bar {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
margin: 0 0 1rem;
padding: 0.6rem 0.85rem;
background: var(--card);
border: 1px solid var(--accent);
border-radius: 8px;
}
.bulk-bar .bulk-count {
font-weight: 600;
margin-right: 0.25rem;
}
.bulk-bar .spacer {
flex: 1 1 auto;
}
.toolbar-actions {
margin-left: auto;
display: flex;
gap: 0.5rem;
}