Files
DDI/web/src/app.css
T
sir_melonchenandClaude Opus 5.5 15bdb03c14 feat(web): clusters, TSIG keys, zones and records (M5)
- Clusters page: DNS/DHCP clusters with members, transfer key, DNS
  options and Kea HA settings; member picking limited to free agents of
  the role, client-side checks of the membership rules.
- TSIG keys page: create, edit, rotate, delete; secrets only after an
  explicit, audited retrieval and shown once.
- Zones page with derived zones ("take over") and zone detail with
  type-specific record forms and hints for dynamic zones and AD.
- Networks, agents and generator settings show/assign clusters; files,
  diffs and pending changes are grouped by target, secret files are
  never shown.
- Pages are lazy-loaded per route (main bundle 600 KB -> 480 KB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:51:26 +02:00

856 lines
12 KiB
CSS

/* SPDX-License-Identifier: LicenseRef-DDI-Proprietary */
/* ---- Layout ---------------------------------------------------------- */
a {
color: var(--accent);
}
.brand {
text-decoration: none;
}
.main-nav {
display: flex;
flex-wrap: wrap;
gap: 4px;
flex: 1;
}
.main-nav a,
.user-menu a {
padding: 6px 10px;
border-radius: 6px;
color: var(--text);
text-decoration: none;
}
.main-nav a.active,
.main-nav a:hover {
background: var(--bg);
color: var(--accent);
}
.user-menu {
display: flex;
gap: 8px;
align-items: center;
}
.app-main {
max-width: none;
width: 100%;
}
.app-footer {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 8px;
align-items: center;
}
.page {
max-width: 1100px;
}
.page-wide {
max-width: none;
}
.page-head {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 12px;
}
.page-head h1,
.page > h1 {
margin: 0 0 12px;
font-size: 1.4rem;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}
.card h2 {
margin-top: 0;
font-size: 1.1rem;
}
/* ---- Controls -------------------------------------------------------- */
button,
.button,
input,
select,
textarea {
font: inherit;
color: var(--text);
}
button,
.button {
display: inline-block;
padding: 6px 12px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
cursor: pointer;
text-decoration: none;
line-height: 1.4;
}
button:disabled {
opacity: 0.55;
cursor: not-allowed;
}
button.primary {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
button.danger {
border-color: var(--fail);
color: var(--fail);
}
button.link {
border: none;
background: none;
padding: 0 4px;
color: var(--accent);
}
button.link.danger {
color: var(--fail);
}
input,
select,
textarea {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
padding: 6px 8px;
max-width: 100%;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
.mono {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.small {
font-size: 0.8rem;
word-break: break-all;
}
.big {
font-size: 1.3rem;
}
.muted {
color: var(--text-muted);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
}
/* ---- Forms ----------------------------------------------------------- */
.form {
display: flex;
flex-direction: column;
gap: 12px;
}
.form.narrow {
max-width: 460px;
}
.grid-2 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 12px 16px;
}
.span-2 {
grid-column: 1 / -1;
}
.field {
display: flex;
flex-direction: column;
gap: 4px;
}
.field label {
font-weight: 500;
}
.field-hint {
color: var(--text-muted);
font-size: 0.85rem;
}
.field-error {
color: var(--fail);
font-size: 0.85rem;
}
.field-invalid input,
.field-invalid select,
.field-invalid textarea {
border-color: var(--fail);
}
.checkbox {
display: inline-flex;
gap: 6px;
align-items: center;
}
fieldset {
border: 1px solid var(--border);
border-radius: 8px;
padding: 12px;
}
.pool-row {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 6px;
}
/* ---- Feedback -------------------------------------------------------- */
.alert {
border-radius: 6px;
padding: 8px 12px;
border: 1px solid var(--border);
}
.alert ul {
margin: 6px 0 0;
padding-left: 18px;
}
.alert-error {
border-color: var(--fail);
color: var(--fail);
}
.alert-success {
border-color: var(--ok);
color: var(--ok);
}
.alert-warning {
border-color: var(--warn);
}
.banner {
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: space-between;
padding: 8px 16px;
border-bottom: 1px solid var(--border);
background: var(--banner-bg);
color: var(--banner-text);
}
.banner-read_only {
background: var(--banner-ro-bg);
color: var(--banner-ro-text);
}
.badge {
display: inline-block;
padding: 1px 8px;
margin: 0 4px 2px 0;
border-radius: 999px;
font-size: 0.8rem;
border: 1px solid var(--border);
background: var(--bg);
}
.badge-success {
border-color: var(--ok);
color: var(--ok);
}
.badge-warning {
border-color: var(--warn);
color: var(--warn);
}
.badge-danger {
border-color: var(--fail);
color: var(--fail);
}
.spinner,
.empty {
padding: 16px;
color: var(--text-muted);
}
/* ---- Tables ---------------------------------------------------------- */
.table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
}
.table th,
.table td {
text-align: left;
padding: 6px 8px;
border-bottom: 1px solid var(--border);
vertical-align: middle;
white-space: nowrap;
}
.table th {
font-weight: 600;
color: var(--text-muted);
font-size: 0.85rem;
}
.table tr.selected td {
background: var(--bg);
}
.table-scroll {
height: calc(100vh - 300px);
min-height: 300px;
overflow: auto;
border: 1px solid var(--border);
border-radius: 8px;
}
.table-sticky thead th {
position: sticky;
top: 0;
background: var(--surface);
z-index: 1;
}
button.sort {
border: none;
background: none;
padding: 0;
font-weight: 600;
color: inherit;
}
.row-actions {
display: inline-flex;
gap: 4px;
}
.filters {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
margin-bottom: 12px;
}
.filters input[type='search'] {
min-width: 260px;
}
.filters .short {
width: 120px;
}
.filters .count {
margin-left: auto;
color: var(--text-muted);
}
.type-filter {
border: none;
padding: 0;
display: flex;
gap: 10px;
}
.bulk-bar {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
padding: 8px;
margin-bottom: 8px;
border: 1px solid var(--accent);
border-radius: 8px;
}
.kv {
display: grid;
grid-template-columns: max-content 1fr;
gap: 4px 16px;
margin: 0;
}
.kv dt {
color: var(--text-muted);
}
.kv dd {
margin: 0;
}
.kv-row {
display: contents;
}
.effects {
margin: 0;
padding-left: 18px;
}
.diff {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.diff pre {
white-space: pre-wrap;
word-break: break-all;
font-size: 0.8rem;
margin: 0;
}
/* ---- Utilization and address map ------------------------------------- */
.usage {
display: flex;
gap: 8px;
align-items: center;
}
.usage-bar {
width: 140px;
height: 8px;
border-radius: 4px;
background: var(--bg);
border: 1px solid var(--border);
overflow: hidden;
}
.usage-bar > div {
height: 100%;
background: var(--ok);
}
.usage-mid > div {
background: var(--warn);
}
.usage-high > div {
background: var(--fail);
}
.usage-text {
font-size: 0.85rem;
color: var(--text-muted);
}
.address-map {
display: grid;
grid-template-columns: repeat(32, 1fr);
gap: 2px;
max-width: 720px;
}
.cell {
display: inline-block;
aspect-ratio: 1;
min-width: 10px;
border-radius: 2px;
background: var(--bg);
border: 1px solid var(--border);
}
.map-legend {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 8px;
font-size: 0.85rem;
}
.map-legend .cell {
width: 12px;
vertical-align: middle;
}
.cell-pool {
background: #d9ecff;
}
.cell-gateway {
background: #6b4fbb;
}
.cell-network,
.cell-broadcast {
background: #888;
}
.cell-static {
background: #1f5fbf;
}
.cell-reserved {
background: #c62828;
}
.cell-manual_dhcp {
background: #1a7f37;
}
.cell-dynamic {
background: #8fd19e;
}
.cell-leased {
outline: 2px solid var(--ok);
}
/* ---- Dialogs --------------------------------------------------------- */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgb(0 0 0 / 45%);
display: flex;
align-items: flex-start;
justify-content: center;
padding: 5vh 16px;
z-index: 10;
overflow: auto;
}
.modal {
background: var(--surface);
border-radius: 10px;
border: 1px solid var(--border);
width: min(520px, 100%);
padding: 20px;
box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
}
.modal-wide {
width: min(820px, 100%);
}
.modal h2 {
margin-top: 0;
font-size: 1.15rem;
}
.modal-body {
display: flex;
flex-direction: column;
gap: 12px;
}
.modal-body textarea {
width: 100%;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 16px;
}
/* ---- Login ----------------------------------------------------------- */
.login-page {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 16px;
}
.login-card {
width: min(380px, 100%);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 24px;
}
.login-card form {
display: flex;
flex-direction: column;
gap: 12px;
}
.login-card h1 {
margin: 0;
}
.login-sso {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
margin-top: 16px;
}
/* ---- Generated files ------------------------------------------------- */
details.file {
border-top: 1px solid var(--border);
padding: 6px 0;
}
details.file summary {
cursor: pointer;
}
div.file-secret {
border-top: 1px solid var(--border);
padding: 6px 0;
}
.target-group + .target-group {
margin-top: 12px;
}
.target-group h3 {
margin: 8px 0 4px;
font-size: 0.95rem;
}
/* ---- Clusters, zones, records ---------------------------------------- */
.member-row {
display: grid;
grid-template-columns: minmax(10rem, 2fr) minmax(7rem, 1fr) minmax(9rem, 1.5fr) auto;
gap: 8px;
align-items: start;
margin-bottom: 6px;
}
.member-list {
list-style: none;
margin: 0;
padding: 0;
}
.member-list li + li {
margin-top: 2px;
}
.text-row {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 6px;
}
.text-row input {
flex: 1;
}
.secret-value {
word-break: break-all;
white-space: pre-wrap;
}
.check-list {
display: flex;
flex-wrap: wrap;
gap: 4px 16px;
}
.file-content {
max-height: 480px;
overflow: auto;
padding: 8px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
font-size: 0.8rem;
}
/* ---- Agents and deployments ------------------------------------------ */
pre.message {
margin: 0;
max-width: 48rem;
max-height: 8rem;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
font-size: 0.8rem;
}
/* ---- Diffs, pending changes, live status ----------------------------- */
.file-diff {
border-top: 1px solid var(--border);
padding: 6px 0;
}
.file-diff-head {
display: flex;
flex-wrap: wrap;
gap: 4px 8px;
align-items: center;
}
button.file-diff-toggle {
color: var(--text);
padding: 0;
text-align: left;
}
.file-diff-counts {
font-size: 0.85rem;
}
.diff-count-add {
color: var(--ok);
}
.diff-count-del {
color: var(--fail);
}
.file-diff-body {
max-height: 520px;
overflow: auto;
margin-top: 6px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
}
.diff-table {
border-collapse: collapse;
width: 100%;
font-size: 0.8rem;
line-height: 1.4;
}
.diff-table td {
padding: 0 6px;
vertical-align: top;
}
.diff-table .diff-no {
width: 1%;
text-align: right;
color: var(--text-muted);
user-select: none;
white-space: nowrap;
}
.diff-table .diff-sign {
width: 1%;
user-select: none;
font-weight: 700;
}
.diff-table .diff-text {
white-space: pre-wrap;
word-break: break-all;
}
.diff-add td {
background: var(--diff-add-bg);
}
.diff-del td {
background: var(--diff-del-bg);
}
.diff-add .diff-sign {
color: var(--ok);
}
.diff-del .diff-sign {
color: var(--fail);
}
.diff-hunk td,
.diff-note td {
color: var(--text-muted);
background: var(--bg);
}
.banner-pending {
background: var(--bg);
color: var(--text);
}
.live-on {
color: var(--ok);
}
.live-off {
color: var(--text-muted);
}
.pick-table td:first-child {
width: 1%;
}
.mode-switch {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}