opnsense-portal/internal/web/assets/style.css
Carsten Abele bb2bc223b9 feat(web): Sessions, Rate-Limiting, Security-Header, Templates und eingebettete Assets
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBHF4R9EAejDJUMdwr6C68
2026-08-14 09:20:45 +02:00

242 lines
5.9 KiB
CSS

/* VPN-Portal — schlichtes, neutrales Layout.
Bewusst zurückhaltend: das Portal wird pro Kunde mit eigenem Titel und Logo
ausgeliefert und soll sich nicht gegen dessen Erscheinungsbild stellen.
Keine externen Ressourcen (Schriften, Bilder) — die CSP verbietet sie. */
:root {
--bg: #f4f5f7;
--surface: #ffffff;
--text: #1c1f23;
--text-muted: #5a6472;
--border: #d3d8de;
--accent: #1f5f9e;
--accent-text: #ffffff;
--accent-hover: #17497a;
--error-bg: #fdeaea;
--error-border: #d34d4d;
--error-text: #8a1f1f;
--info-bg: #e8f1fa;
--info-border: #4a86c4;
--info-text: #14456f;
--warn-bg: #fdf3e2;
--warn-border: #d08b1e;
--warn-text: #7a4d05;
--radius: 6px;
--focus: #0b6bcb;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #16191d;
--surface: #1f242a;
--text: #e8ebef;
--text-muted: #9aa5b1;
--border: #39424c;
--accent: #4a90d9;
--accent-text: #0d1013;
--accent-hover: #6aa8e6;
--error-bg: #3a1f1f;
--error-border: #c95a5a;
--error-text: #f3c3c3;
--info-bg: #1c2d3d;
--info-border: #4a86c4;
--info-text: #bcd8f2;
--warn-bg: #3a2f18;
--warn-border: #d08b1e;
--warn-text: #f0d9a8;
--focus: #7db6f0;
}
}
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 1rem;
line-height: 1.5;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* ---------- Kopfzeile ---------- */
.topbar {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.75rem 1rem;
padding: 0.75rem 1.25rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand-title { font-weight: 600; font-size: 1.05rem; }
.logo { max-height: 2.25rem; max-width: 12rem; width: auto; height: auto; }
.topnav {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem 1rem;
}
.topnav .user { color: var(--text-muted); font-size: 0.9rem; }
/* ---------- Inhalt ---------- */
main {
flex: 1;
width: 100%;
max-width: 46rem;
margin: 0 auto;
padding: 1.5rem 1.25rem 3rem;
}
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem;
margin-bottom: 1rem;
}
.cards { list-style: none; margin: 0; padding: 0; }
.card dl {
display: grid;
grid-template-columns: minmax(6rem, auto) 1fr;
gap: 0.25rem 1rem;
margin: 0 0 1rem;
}
.card dt { color: var(--text-muted); font-size: 0.9rem; }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card .client { color: var(--text-muted); margin-bottom: 0.75rem; }
.card ol { margin: 0; padding-left: 1.25rem; }
.card ol li { margin-bottom: 0.4rem; }
.suggested { border-color: var(--info-border); }
.badge {
display: inline-block;
font-size: 0.75rem;
font-weight: 400;
vertical-align: middle;
padding: 0.15rem 0.5rem;
border-radius: 999px;
background: var(--info-bg);
color: var(--info-text);
border: 1px solid var(--info-border);
}
/* ---------- Meldungen ---------- */
.flash {
padding: 0.85rem 1rem;
border-radius: var(--radius);
border: 1px solid;
margin-bottom: 1.25rem;
}
.flash-error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }
.flash-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.warn {
background: var(--warn-bg);
border-left: 3px solid var(--warn-border);
color: var(--warn-text);
padding: 0.6rem 0.85rem;
border-radius: 0 var(--radius) var(--radius) 0;
}
.logout-hint { color: var(--text-muted); font-size: 0.9rem; }
/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; }
.form label { font-weight: 500; margin-bottom: 0.3rem; }
.form small { color: var(--text-muted); margin: 0.3rem 0 1rem; }
input[type="text"], input[type="password"] {
font: inherit;
color: var(--text);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.6rem 0.7rem;
width: 100%;
min-height: 2.75rem;
}
.toggle-wrap {
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0 0 1.25rem;
}
.toggle-wrap label { font-weight: 400; margin: 0; }
.toggle-wrap input { min-height: auto; width: auto; }
button {
font: inherit;
font-weight: 500;
min-height: 2.75rem;
padding: 0.55rem 1.1rem;
border: 1px solid var(--accent);
border-radius: var(--radius);
background: var(--accent);
color: var(--accent-text);
cursor: pointer;
}
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.secondary {
background: transparent;
color: var(--accent);
border-color: var(--border);
min-height: 2.25rem;
padding: 0.35rem 0.8rem;
}
button.secondary:hover { background: var(--info-bg); border-color: var(--accent); }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.actions .inline { display: block; }
:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
/* ---------- Fußzeile ---------- */
.footer {
padding: 1rem 1.25rem;
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 0.85rem;
text-align: center;
}
/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 40rem) {
.topbar { flex-direction: column; align-items: flex-start; }
.topnav { width: 100%; }
.actions { flex-direction: column; align-items: stretch; }
.actions button { width: 100%; }
.card dl { grid-template-columns: 1fr; gap: 0; }
.card dt { margin-top: 0.5rem; }
}