:root {
  color-scheme: dark;
  --bg: #050b14;
  --sidebar: #071221;
  --panel: #0c1726;
  --panel-strong: #101f31;
  --surface: #12243a;
  --text: #f5f8ff;
  --muted: #97a8bf;
  --line: #263b54;
  --primary: #e91e63;
  --primary-strong: #c2185b;
  --secondary: #9c27b0;
  --success: #38d996;
  --warning: #ffbb4d;
  --danger: #fb5b75;
  --shadow: 0 1.25rem 3.5rem rgb(0 0 0 / .22);
  --space-1: .35rem;
  --space-2: .6rem;
  --space-3: .85rem;
  --space-4: 1.1rem;
  --control-height: 2.65rem;
}

* { box-sizing: border-box; }

html { min-width: 20rem; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 98% -6%, rgb(156 39 176 / .22), transparent 30rem), var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: #ff7eb2; }

.app-shell { display: grid; grid-template-columns: 16.25rem minmax(0, 1fr); grid-template-rows: 4.65rem minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 4.65rem;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 4.65rem);
  padding: 1rem .85rem 1.1rem;
  background: linear-gradient(180deg, #071625, var(--sidebar));
  border-right: 1px solid #1d334c;
  overflow-y: auto;
  scrollbar-color: #405777 transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand { padding: .2rem .7rem; }
.brand-mark { color: var(--primary); font-size: 1.65rem; line-height: 1; text-shadow: 0 0 1.35rem rgb(233 30 99 / .5); }

.sidebar nav { display: grid; min-width: 0; max-width: 100%; gap: .18rem; }

.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  overflow: hidden;
  padding: .7rem .8rem .7rem 1rem;
  border-radius: .5rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar nav a::after { display: grid; order: -1; width: 1rem; height: 1rem; place-items: center; color: #b7c7dc; font-size: .92rem; line-height: 1; }
.sidebar nav a[href="/dashboard"]::after { content: "⌂"; }
.sidebar nav a[href="/kunden"]::after { content: "♙"; }
.sidebar nav a[href="/standorte"]::after { content: "⌖"; }
.sidebar nav a[href="/geraete"]::after { content: "▣"; }
.sidebar nav a[href="/netze"]::after { content: "⌁"; }
.sidebar nav a[href="/racks"]::after { content: "▤"; }
.sidebar nav a[href="/racks/verkabelung"]::after { content: "⌇"; }
.sidebar nav a[href="/racks/netzwerkdosen"]::after { content: "⊙"; }
.sidebar nav a[href="/virtualisierung"]::after { content: "◫"; }
.sidebar nav a[href="/virtualisierung/hosts"]::after { content: "◧"; }
.sidebar nav a[href="/dienste"]::after { content: "◌"; }
.sidebar nav a[href="/domains"]::after { content: "◎"; }
.sidebar nav a[href="/vertraege"]::after { content: "§"; }
.sidebar nav a[href="/vertraege/kosten"]::after { content: "€"; }
.sidebar nav a[href="/vertraege/anbieter"]::after { content: "♧"; }
.sidebar nav a[href="/termine"]::after { content: "◷"; }
.sidebar nav a[href="/termine/fristen"]::after { content: "!"; }
.sidebar nav a[href="/auswertungen"]::after { content: "▥"; }
.sidebar nav a[href="/datenschutz"]::after { content: "⌑"; }

.sidebar nav a:hover, .sidebar nav a:focus-visible { background: rgb(255 255 255 / .06); color: var(--text); outline: 0; }
.sidebar nav a[aria-current="page"] { background: linear-gradient(90deg, rgb(233 30 99 / .27), rgb(156 39 176 / .15)); color: #fff; }
.sidebar nav a[aria-current="page"]::after { color: #fff; }
.sidebar nav a[aria-current="page"]::before { position: absolute; top: .5rem; bottom: .5rem; left: 0; width: .2rem; border-radius: 99px; background: var(--primary); content: ""; }

.user-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: auto;
  padding: .85rem .7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.user-card strong, .user-card small { display: block; }
.user-card strong { max-width: 10.5rem; overflow: hidden; color: var(--text); font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.user-card small { font-size: .73rem; }
.user-avatar, .toolbar-user { display: grid; flex: 0 0 auto; width: 2rem; height: 2rem; place-items: center; border: 1px solid rgb(255 255 255 / .25); border-radius: 50%; background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #fff; font-size: .73rem; font-weight: 800; }

.app-frame { grid-column: 2; grid-row: 2; display: flex; min-width: 0; flex-direction: column; }
.app-toolbar { grid-column: 1 / -1; grid-row: 1; display: flex; min-height: 4.65rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1.25rem, 3vw, 3.4rem); border-bottom: 1px solid var(--line); background: rgb(5 11 20 / .76); backdrop-filter: blur(16px); }
.toolbar-search { display: flex; width: min(31rem, 58vw); align-items: center; gap: .65rem; padding: .6rem .85rem; border: 1px solid #2a405b; border-radius: .5rem; background: #0a1625; color: #6f839e; }
.toolbar-search:first-letter { color: #c2cfdf; font-size: 1.25rem; }

.app-content { width: min(100% - clamp(2rem, 5vw, 5.75rem), 94rem); margin: 2rem auto 3rem; }
.page-surface { min-width: 0; }
.page-surface > * { min-width: 0; }
.module-page { min-width: 0; padding: clamp(1rem, 2.2vw, 1.55rem); border: 1px solid var(--line); border-radius: .85rem; background: linear-gradient(145deg, rgb(12 27 45 / .94), rgb(7 18 31 / .98)); box-shadow: var(--shadow); }

.app-footer { display: flex; gap: 1.25rem; margin-top: auto; padding: 1rem clamp(1.25rem, 3vw, 3.4rem); border-top: 1px solid var(--line); color: #71839b; font-size: .78rem; }

/* Fachmodule liefern semantisches HTML. Diese Regeln machen es zu den
   kompakten, dunkel hinterlegten Oberflächen des freigegebenen Designs. */
.page-surface h1, .page-surface h2, .page-surface h3 { color: var(--text); letter-spacing: -.025em; }
.page-surface h1 { margin: 0 0 .35rem; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.18; }
.page-surface h2 { margin-top: 0; font-size: 1.15rem; }
.page-surface p { color: var(--muted); }
.page-surface > section, .page-surface > article, .page-surface > form, .page-surface > div { border-radius: .8rem; }
.module-page > section, .module-page > article, .module-page > form { padding: clamp(1rem, 2.2vw, 1.55rem); border: 1px solid var(--line); background: linear-gradient(145deg, rgb(18 36 58 / .9), rgb(10 23 39 / .96)); box-shadow: var(--shadow); }
.module-page > * + * { margin-top: 1rem; }

button, .button, input[type="submit"] { border: 0; border-radius: .45rem; background: linear-gradient(135deg, var(--primary), #d81b60); color: #fff; cursor: pointer; font: inherit; font-weight: 750; padding: .62rem .95rem; text-decoration: none; }
button:hover, .button:hover, input[type="submit"]:hover { background: var(--primary-strong); }
.button-quiet { border: 1px solid #45617f; background: rgb(8 21 36 / .72); color: #d9e5f3; }
.button-quiet:hover { background: #182e48; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #f96caa; outline-offset: 2px; }

input, select, textarea { min-height: var(--control-height); border: 1px solid #314a67; border-radius: .45rem; background: #081524; color: var(--text); font: inherit; padding: .62rem .7rem; }
input, select, textarea { max-width: 100%; }
label { color: #c1cede; font-weight: 650; }

table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: .7rem; background: #0a1727; scrollbar-color: #586e89 transparent; }
.table-wrap > table { min-width: 42rem; }
th { color: #8ea2bb; font-size: .73rem; font-weight: 750; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
th, td { padding: .82rem .75rem; border-bottom: 1px solid rgb(54 78 106 / .72); }
tbody tr:hover { background: rgb(255 255 255 / .035); }
th, td { overflow-wrap: anywhere; }
.table-content-top th, .table-content-top td { vertical-align: top; }

/* Gemeinsame Formstruktur für Modulformulare. Sie ersetzt die bisherigen
   zufälligen Inline-Zeilen, ohne fachliche Templates mit Seitenspezialfällen
   zu belasten. Formulare in Tabellen bleiben kompakt und werden nicht zu
   Grids umgebaut. */
.module-page > article form:not(.component-remove):not(.admin-delete),
.module-page > section form:not(.component-remove):not(.admin-delete),
.detail-card > form,
details > form:not(.component-editor) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-3) 1rem;
  align-items: end;
}
.module-page form > p { display: contents; }
.module-page form > label, .module-page form > p > label,
.detail-card form > label, .detail-card form > p > label,
details > form > label, details > form > p > label {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
  color: #b9c9db;
  font-size: .8rem;
  font-weight: 750;
}
.module-page form > label input, .module-page form > label select, .module-page form > label textarea,
.module-page form > p > label input, .module-page form > p > label select, .module-page form > p > label textarea { width: 100%; }
.module-page form > button, .module-page form > p > button { justify-self: start; }
.module-page form > small { grid-column: 1 / -1; color: var(--muted); }
.module-page form input[type="checkbox"] { min-height: auto; width: 1rem; accent-color: var(--primary); }
.module-page form label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: 58rem; }
.form-field { display: grid; min-width: 0; gap: var(--space-1); }
.form-field > input, .form-field > select, .form-field > textarea { width: 100%; }
.form-field:has(> input[type="checkbox"]) { grid-template-columns: 1.2rem minmax(0, 1fr); align-items: center; padding: .7rem; border: 1px solid #314a67; border-radius: .55rem; background: rgb(8 21 36 / .65); }
.form-field:has(> input[type="checkbox"]) > label { grid-column: 2; grid-row: 1; }
.form-field:has(> input[type="checkbox"]) > input { grid-column: 1; grid-row: 1; min-height: auto; width: 1rem; accent-color: var(--primary); }
.form-field:has(> input[type="checkbox"]) > .form-help { grid-column: 2; }
.form-help { margin: 0; color: var(--muted); font-size: .8rem; }
.form > button { justify-self: start; }
.table-filters { display: flex !important; flex-wrap: wrap; gap: var(--space-2); align-items: end; margin-bottom: 1rem; }
.table-filters label { display: grid; gap: var(--space-1); }
td > form, .admin-actions form, .doku-werkzeuge form { display: inline-flex !important; gap: .4rem; margin: 0; }
td > form button, .admin-actions button { padding: .4rem .62rem; font-size: .78rem; }
button.danger, .button-danger, .admin-delete button, form[action*="delete"] button { background: linear-gradient(135deg, #d34561, #a92c49); }
button.danger:hover, .button-danger:hover, .admin-delete button:hover, form[action*="delete"] button:hover { background: #94243e; }
details { border: 1px solid #405777; border-radius: .65rem; background: #0a192a; }
details > summary { padding: .75rem .9rem; cursor: pointer; color: #f0d3e3; font-weight: 800; }
details[open] > summary { border-bottom: 1px solid #405777; background: rgb(156 39 176 / .1); }
details > form { margin: .85rem; padding: 0; border: 0; background: transparent; }

.dashboard-page { display: grid; gap: 1.35rem; }
.page-heading { position: relative; overflow: hidden; padding: clamp(1.3rem, 3vw, 2.2rem); border: 1px solid #344b68; border-radius: .9rem; background: linear-gradient(118deg, #172b47, #10213b 62%, #331b4c); box-shadow: var(--shadow); }
.page-heading::after { position: absolute; right: -4rem; bottom: -7rem; width: 17rem; height: 17rem; border: 1px solid rgb(233 30 99 / .28); border-radius: 50%; content: ""; }
.page-heading h1 { margin: 0; }
.page-heading p { max-width: 42rem; margin: .6rem 0 0; color: #c3d0df; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric-card, .dashboard-widget { display: flex; gap: .75rem; padding: 1.05rem; border: 1px solid var(--line); border-radius: .72rem; background: linear-gradient(145deg, #102137, #0a1727); box-shadow: var(--shadow); }
.metric-card > span { color: var(--success); font-size: 1.7rem; line-height: 1; }
.metric-card strong { display: block; margin-top: .2rem; font-size: 1.75rem; letter-spacing: -.04em; }
.metric-card small, .dashboard-widget h2 { color: var(--muted); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.metric-card p { margin: .1rem 0 0; font-size: .78rem; }
.dashboard-widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.dashboard-widget { display: block; }
.dashboard-widget h2 { margin: 0 0 .85rem; }
.dashboard-widget ul { display: grid; gap: .55rem; margin: 0; padding-left: 1.1rem; color: #c6d2e0; }
.dashboard-page .page-heading { min-height: 0; padding: 1.15rem clamp(1.25rem, 2.5vw, 1.7rem); }
.dashboard-page .page-heading h1 { font-size: clamp(1.55rem, 2.4vw, 2rem); }
.dashboard-page .page-heading p { margin-top: .32rem; }
/* Die vier Widgets kommen aus net_reports in dieser festen, dokumentierten
   Reihenfolge: Bestand, Fristen, Datenqualität, Änderungen. Das Theme ordnet
   nur vorhandene Fachinformationen wie die freigegebene Dashboard-Variante B
   an; es erzeugt weder Monitoring- noch Steuerdaten. */
.dashboard-page .dashboard-widget:first-child { grid-column: 1 / -1; }
.dashboard-page .dashboard-widget:first-child ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; padding: 0; list-style: none; }
.dashboard-page .dashboard-widget:first-child li { min-height: 4.65rem; padding: .85rem; border: 1px solid #304866; border-radius: .55rem; background: linear-gradient(145deg, rgb(26 47 72 / .82), rgb(12 28 46 / .9)); }
.dashboard-page .dashboard-widget:first-child li a { display: block; color: #f1f5fa; font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.dashboard-page .dashboard-widget:first-child li a::before { display: block; margin-bottom: .35rem; color: #ef70aa; font-size: .72rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; content: "Dokumentiert"; }
.dashboard-page .dashboard-widget:first-child > p { margin: .8rem 0 0; }
.dashboard-page .dashboard-widget:nth-child(2) { grid-column: 8 / -1; grid-row: 2; }
.dashboard-page .dashboard-widget:nth-child(3) { grid-column: 1 / span 7; grid-row: 2; }
.dashboard-page .dashboard-widget:nth-child(4) { grid-column: 1 / -1; }
.dashboard-page .dashboard-widget:nth-child(n+2) ul { padding: 0; list-style: none; }
.dashboard-page .dashboard-widget:nth-child(n+2) li { padding: .48rem 0; border-bottom: 1px solid rgb(54 78 106 / .72); }
.dashboard-page .dashboard-widget:nth-child(n+2) li:last-child { border-bottom: 0; }
.dashboard-page .dashboard-widget:nth-child(3) li::before { display: inline-block; width: 1.35rem; color: #ef70aa; content: "□"; }
.dashboard-page .dashboard-widget:nth-child(4) li::before { display: inline-block; width: 1.35rem; color: #8ab4df; content: "◦"; }

.device-detail { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.device-detail > *, .rack-detail > *, .network-detail > *, .virtual-detail > *, .contract-detail > * { min-width: 0; max-width: 100%; }
.device-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #142a47, #10213b 58%, #302049); }
.device-hero::after { position: absolute; top: -7rem; right: -5rem; width: 18rem; height: 18rem; border: 1px solid rgb(156 39 176 / .36); border-radius: 50%; content: ""; }
.device-hero > * { position: relative; z-index: 1; }
.device-hero h1 { margin: .12rem 0; }
.device-hero p { margin: 0; color: #c0cee0; }
.eyebrow { color: #f37cab !important; font-size: .73rem; font-weight: 800; letter-spacing: .095em; text-transform: uppercase; }
.device-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.detail-tabs { display: flex; width: 100%; min-width: 0; overflow-x: auto; gap: .35rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.detail-tabs { scrollbar-color: #586e89 transparent; scroll-snap-type: x proximity; }
.detail-tabs a { flex: 0 0 auto; padding: .55rem .75rem; border-radius: .4rem .4rem 0 0; color: var(--muted); font-size: .83rem; font-weight: 700; text-decoration: none; }
.detail-tabs a { scroll-snap-align: start; }
.detail-tabs a.active, .detail-tabs a:hover, .detail-tabs a:focus-visible { border-bottom: 2px solid var(--primary); background: rgb(233 30 99 / .12); color: #fff; outline: 0; }
.detail-card { padding: 1.1rem; border: 1px solid var(--line); border-radius: .7rem; background: linear-gradient(145deg, #102137, #0a1727); }
.detail-card h2 { margin-bottom: 1rem; }
.device-summary { display: grid; grid-template-columns: minmax(13rem, .78fr) minmax(0, 1.22fr); align-items: start; gap: 1.1rem; }
.device-photo { display: grid; gap: .55rem; margin: 0; padding: .7rem; border: 1px solid #314a67; border-radius: .6rem; background: #081524; }
.device-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: .38rem; object-fit: contain; background: radial-gradient(circle at center, #1d3148, #081524 72%); }
.device-photo figcaption { color: #8fa3bc; font-size: .75rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.detail-card dl { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); gap: .55rem 1rem; margin: 0; }
.detail-card dt { color: #8fa3bc; font-size: .78rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.detail-card dd { margin: 0; color: #dbe5ef; }
.hardware-summary-item { display: block; margin-bottom: .35rem; padding: .35rem .5rem; border-left: 3px solid #e91e63; border-radius: .25rem; background: rgb(156 39 176 / .12); color: #e4edf7; }
.device-secrets table { margin-bottom: 1rem; }.device-secret-form { padding: .9rem 1rem; border: 1px solid #405777; border-radius: .65rem; background: #0a192a; }.device-secret-form summary { cursor: pointer; color: #f2d9e8; font-weight: 800; }.device-secret-form form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin-top: .8rem; }.device-secret-form label, .secret-reveal label { display: grid; gap: .35rem; color: #b9c9db; font-size: .8rem; font-weight: 750; }.device-secret-form input, .secret-reveal input { width: 100%; box-sizing: border-box; }.secret-reveal { max-width: 42rem; }.secret-reveal input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.device-form-page { display: grid; gap: 1rem; }
.device-form-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 1.8rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #142a47, #10213b 60%, #302049); }
.device-form-hero::after { position: absolute; top: -8rem; right: -4rem; width: 19rem; height: 19rem; border: 1px solid rgb(156 39 176 / .35); border-radius: 50%; content: ""; }
.device-form-hero > * { position: relative; z-index: 1; }
.device-form-hero h1 { margin: .1rem 0 .35rem; }
.device-form-hero p:last-child { max-width: 46rem; margin: 0; color: #c0cee0; }
.module-page > article form.device-form:not(.component-remove):not(.admin-delete) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 68rem; }
.device-form fieldset { min-width: 0; margin: 0; padding: clamp(1rem, 2vw, 1.3rem); border: 1px solid var(--line); border-radius: .72rem; background: linear-gradient(145deg, #102137, #0a1727); }
.device-form legend { padding: 0 .38rem; color: #f2f6fb; font-size: .9rem; font-weight: 800; }
.device-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.device-form label { display: grid; gap: .42rem; min-width: 0; color: #b9c9db; font-size: .8rem; font-weight: 750; }
.device-form input, .device-form select, .device-form textarea { width: 100%; box-sizing: border-box; }
.device-form textarea { resize: vertical; }
.form-span-2 { grid-column: span 2; }
.device-form-actions { display: flex; justify-content: flex-end; gap: .7rem; padding-top: .2rem; }
.device-check { display: flex !important; align-items: center; gap: .55rem; min-height: var(--control-height); }
.device-check input { width: auto !important; min-height: auto; accent-color: var(--primary); }
.ram-component-form { margin-bottom: 1rem; padding: 1rem; border: 1px solid #4b3d72; border-radius: .7rem; background: linear-gradient(145deg, rgb(38 27 68 / .72), rgb(16 31 53 / .92)); }
.ram-component-form h3 { margin: 0; }
.ram-component-form p { margin: .35rem 0 .8rem; }
.hardware-component-chooser { padding: 0; overflow: hidden; }
.hardware-component-chooser + .hardware-component-chooser { margin-top: .65rem; }
.hardware-component-chooser summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; cursor: pointer; list-style: none; }
.hardware-component-chooser summary::-webkit-details-marker { display: none; }
.hardware-component-chooser summary::after { color: #f17aae; content: "+"; font-size: 1.25rem; font-weight: 700; }
.hardware-component-chooser[open] summary { border-bottom: 1px solid #4b3d72; background: rgb(156 39 176 / .11); }
.hardware-component-chooser[open] summary::after { content: "−"; }
.hardware-component-chooser summary span { color: #f4f7fb; font-weight: 800; }
.hardware-component-chooser summary small { margin-right: auto; color: #9aafc5; }
.hardware-component-content { padding: 1rem; }
.component-actions { width: 8.5rem; min-width: 8.5rem; vertical-align: top; }
.component-actions { white-space: nowrap; }
.detail-card#hardware th, .detail-card#hardware td { vertical-align: top; }
.component-editor-row > td { padding: 0 0 .9rem; border-bottom: 1px solid rgb(54 78 106 / .72); background: rgb(156 39 176 / .07); }
.component-editor-row details { margin: .75rem; }
.component-editor-row details > summary { display: none; }
.component-editor-row .component-editor { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); max-width: none; margin: 0; padding: 1rem; }
.component-editor-row .component-editor button { grid-column: 1 / -1; }
.component-actions details > summary { width: max-content; cursor: pointer; color: #e3ecf6; font-weight: 700; }
.component-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin: .6rem 0; padding: .9rem; border: 1px solid #405777; border-radius: .6rem; background: #0a192a; }
.component-editor label { display: grid; gap: .35rem; min-width: 0; color: #b9c9db; font-size: .78rem; font-weight: 700; }
.component-editor input { width: 100%; box-sizing: border-box; }
.component-editor button { justify-self: start; align-self: end; }
.component-remove { margin-top: .45rem; }
.component-attributes { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .22rem .55rem; margin: 0; }
.component-attributes dt { color: #8fa3bc; font-size: .72rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.component-attributes dd { margin: 0; color: #dbe5ef; }
.interface-list { display: grid; gap: .75rem; }
.interface-card { padding: 1rem; border: 1px solid #314a67; border-radius: .65rem; background: #0a192a; }
.interface-card > header { display: flex; flex-wrap: wrap; align-items: start; gap: .75rem 1rem; }
.interface-card h3, .interface-card h4 { margin: 0; }
.interface-card code { color: #b7c7dc; }
.interface-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-right: auto; }
.interface-meta span { padding: .2rem .5rem; border-radius: 99px; background: rgb(156 39 176 / .16); color: #dbe5ef; font-size: .78rem; }
.interface-card > p { margin: .65rem 0 0; }
.interface-card section { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.interface-card h4 { color: #8fa3bc; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.schnittstellen-adressen { display: grid; gap: .45rem; margin-top: .6rem; }
.schnittstellen-adressen li { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .5rem .65rem; border-radius: .45rem; background: rgb(255 255 255 / .035); font-family: inherit; }
.schnittstellen-adressen li small { flex: 1 1 16rem; }
.interface-card details { margin-top: .75rem; }
.empty-inline { margin: .55rem 0; color: var(--muted); }
.detail-card > form + details, .detail-card > details + form, .detail-card > form + form { margin-top: 1rem; }
.detail-card > details { margin-top: 1rem; }
.detail-card > details > summary { padding-inline: 1rem; }
.danger-zone { display: grid; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgb(251 91 117 / .55); border-radius: .7rem; background: rgb(134 31 56 / .16); }
.module-page > article form.contract-form:not(.component-remove):not(.admin-delete) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 68rem; }
.contract-form > fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: rgb(8 21 36 / .45); }
.contract-form > fieldset > p { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .85rem 1rem; margin: 0 0 .85rem; }
.contract-form > fieldset legend { padding: 0 .35rem; color: #f2f6fb; font-weight: 800; }
.contract-attributes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.contract-attributes-grid label { display: grid; gap: .4rem; min-width: 0; }
.contract-attributes-grid input { width: 100%; }
@media (max-width: 42rem) { .contract-attributes-grid { grid-template-columns: 1fr; } }
.ram-component-form form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; align-items: end; }
.ram-component-form label { display: grid; gap: .35rem; min-width: 0; font-size: .8rem; }
.ram-component-form input { width: 100%; box-sizing: border-box; }
.form-error { padding: .8rem 1rem; border: 1px solid #a43e66; border-radius: .6rem; background: rgb(163 38 77 / .2); color: #ffd9e6 !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

.rack-detail { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.rack-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #122b44, #10213b 60%, #312047); }
.rack-hero::after { position: absolute; right: -3rem; bottom: -8rem; width: 19rem; height: 19rem; border: 1px solid rgb(233 30 99 / .32); border-radius: 50%; content: ""; }
.rack-hero > * { position: relative; z-index: 1; }
.rack-hero h1 { margin: .12rem 0; }
.rack-hero p { margin: 0; color: #c0cee0; }
.rack-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.rack-face { overflow: hidden; padding: 1rem; border: 1px solid #3c526d; border-radius: .75rem; background: linear-gradient(145deg, #101f32, #0a1727); }
.rack-face h2 { margin: 0 0 .8rem; }
.rack-face caption { padding: 0 0 .7rem; color: #90a5bf; font-size: .76rem; text-align: left; caption-side: top; }
.rack-face tbody tr { height: 2.35rem; }
.rack-face tbody td:first-child { width: 4.2rem; color: #91a5bd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
.rack-face tbody td:nth-child(2) { border-left: 3px solid #405b78; }
.rack-face tbody tr:has(td:nth-child(2) a), .rack-face tbody tr:has(td:nth-child(2) :not(small)) { background: linear-gradient(90deg, rgb(156 39 176 / .18), transparent); }
.rack-face .rack-unit-free td { color: #7c90a8; background: repeating-linear-gradient(135deg, transparent 0 .55rem, rgb(104 133 161 / .045) .55rem .62rem); }
.rack-face .rack-unit-occupied td { border-top: 1px solid #815099; border-bottom: 1px solid #815099; background: linear-gradient(90deg, rgb(145 41 132 / .38), rgb(42 38 84 / .35) 58%, transparent); }
.rack-face .rack-unit-occupied td:first-child { color: #f3a4ca; font-weight: 800; }
.rack-face .rack-unit-occupied td:nth-child(2) { border-left-color: #e91e63; color: #f4f7fb; font-weight: 700; }
.rack-face .rack-unit-continued td { background: linear-gradient(90deg, rgb(88 44 114 / .22), transparent); }
.rack-face .rack-unit-continued td:nth-child(2) { border-left-color: #9c27b0; color: #d9a7e7; }
.rack-component-form { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #405777; border-radius: .65rem; background: #0b1a2c; }
.rack-component-form summary { cursor: pointer; color: #f0d3e3; font-weight: 800; }
.rack-component-form form { display: grid; gap: .75rem; margin-top: .8rem; }
.port-occupancy { display: grid; gap: .38rem; min-width: 16rem; }
.port-occupancy-item { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: .5rem; align-items: baseline; padding: .38rem .5rem; border-left: 3px solid #50657d; border-radius: .32rem; background: rgb(255 255 255 / .035); }
.port-occupancy-item strong { color: #9aafc5; font-size: .74rem; letter-spacing: .035em; text-transform: uppercase; }
.port-occupancy-item > span { min-width: 0; overflow-wrap: anywhere; color: #c7d4e3; }
.port-occupancy-item.is-connected { border-left-color: var(--success); background: rgb(56 217 150 / .08); }
.port-occupancy-item.is-connected strong { color: #75e4b5; }

.domains-page, .domain-detail, .providers-page { display: grid; gap: 1rem; min-width: 0; }
.domain-hero, .provider-hero { padding: clamp(1.15rem, 3vw, 1.8rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #142a47, #10213b 60%, #302049); }
.domain-hero h1, .provider-hero h1 { margin: .15rem 0 .35rem; }
.domain-hero p, .provider-hero p { margin: 0; color: #c0cee0; }
.domains-page > table, .domain-detail > table, .providers-page > table { overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: #0a1727; }
.domains-page > form, .domain-detail > form, .providers-page > form, .providers-page details form { display: grid; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: linear-gradient(145deg, #102137, #0a1727); }
.providers-page details { min-width: 16rem; }
.providers-page details summary { cursor: pointer; font-weight: 700; }
.table-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-width: 10rem; }
.table-actions .table-edit { display: inline-flex; padding: .4rem .62rem; border: 1px solid #45617f; border-radius: .42rem; color: #d9e5f3; font-size: .78rem; font-weight: 700; text-decoration: none; }
.provider-editor { margin-top: .75rem; }
.provider-editor > form { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

/* Administration nutzt dieselben Oberflächen wie die Fachmodule statt einer
   separaten, unformatierten Linkliste. */
.admin-dashboard { display: grid; gap: 1rem; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.admin-dashboard-grid > a { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; align-items: start; min-height: 8rem; padding: 1rem; border: 1px solid var(--line); border-radius: .72rem; background: linear-gradient(145deg, #102137, #0a1727); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.admin-dashboard-grid > a:hover, .admin-dashboard-grid > a:focus-visible { border-color: #6c4a86; transform: translateY(-2px); outline: 0; }
.admin-dashboard-grid > a > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .5rem; background: rgb(156 39 176 / .18); color: #f37cab; }
.admin-dashboard-grid strong { display: block; margin-bottom: .2rem; }
.admin-dashboard-grid small { color: var(--muted); }
.admin-new { display: inline-flex; margin: .25rem 0 1rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .45rem; }


.network-detail { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.network-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #102a47, #10213b 58%, #202d53); }
.network-hero::after { position: absolute; top: -6rem; right: -3rem; width: 18rem; height: 18rem; border: 1px solid rgb(77 166 255 / .32); border-radius: 50%; box-shadow: 0 0 0 2.5rem rgb(156 39 176 / .05), 0 0 0 5rem rgb(233 30 99 / .04); content: ""; }
.network-hero > * { position: relative; z-index: 1; }
.network-hero h1 { margin: .12rem 0; }
.network-hero p { margin: 0; color: #c0cee0; }
.network-form-page { display: grid; gap: 1rem; }
.network-form-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 1.8rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #102a47, #10213b 60%, #202d53); }
.network-form-hero h1 { margin: .1rem 0 .35rem; }.network-form-hero p { margin: 0; color: #c0cee0; }
.network-form { display: grid; gap: 1rem; }.network-form fieldset { min-width: 0; margin: 0; padding: 1.05rem; border: 1px solid var(--line); border-radius: .72rem; background: linear-gradient(145deg, #102137, #0a1727); }.network-form legend { padding: 0 .38rem; color: #f2f6fb; font-size: .9rem; font-weight: 800; }.network-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem 1rem; }.network-form label { display: grid; gap: .38rem; min-width: 0; color: #b9c9db; font-size: .8rem; font-weight: 750; }.network-form input, .network-form select, .network-form textarea { width: 100%; box-sizing: border-box; }.network-form textarea { resize: vertical; }.network-check { display: flex !important; align-items: center; gap: .55rem; margin-bottom: .85rem; }.network-check input { width: auto; }.network-span-2 { grid-column: span 2; }.network-form-actions { display: flex; justify-content: flex-end; gap: .7rem; }
.network-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

.virtual-detail { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.virtual-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #112746, #10213b 57%, #252657); }
.virtual-hero::after { position: absolute; right: -2rem; bottom: -7rem; width: 18rem; height: 18rem; border: 1px solid rgb(156 39 176 / .35); border-radius: 42% 58% 58% 42%; box-shadow: 0 0 0 2.5rem rgb(233 30 99 / .05); content: ""; }
.virtual-hero > * { position: relative; z-index: 1; }
.virtual-hero h1 { margin: .12rem 0; }
.virtual-hero p { margin: 0; color: #c0cee0; }
.virtual-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

.contract-detail { display: grid; width: 100%; min-width: 0; gap: 1rem; }
.contract-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #282041, #172342 58%, #143142); }
.contract-hero::after { position: absolute; top: -8rem; right: -3rem; width: 20rem; height: 20rem; border: 1px solid rgb(233 30 99 / .35); border-radius: 50%; box-shadow: 0 0 0 2.7rem rgb(156 39 176 / .06); content: ""; }
.contract-hero > * { position: relative; z-index: 1; }
.contract-hero h1 { margin: .12rem 0; }
.contract-hero p { margin: 0; color: #c0cee0; }
.contract-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

/* Wiederverwendbare Bereichsnavigation für zusammengehörende Unterseiten. */
.section-nav { display: flex; flex-wrap: wrap; gap: .55rem; padding: .7rem; border: 1px solid var(--line); border-radius: .72rem; background: rgb(8 21 36 / .58); }
.section-nav a { display: inline-flex; align-items: center; min-height: 2.45rem; padding: .45rem .78rem; border: 1px solid transparent; border-radius: .48rem; color: #c8d6e5; font-size: .84rem; font-weight: 750; text-decoration: none; }
.section-nav a:hover, .section-nav a:focus-visible { border-color: #4c6684; background: #182e48; color: #fff; outline: 0; }
.section-nav .section-nav-active { border-color: #8d466c; background: rgb(233 30 99 / .16); color: #fff; }
.section-nav .section-nav-primary { margin-left: auto; border-color: transparent; background: linear-gradient(135deg, var(--primary), #d81b60); color: #fff; }
.section-nav .section-nav-primary:hover, .section-nav .section-nav-primary:focus-visible { border-color: transparent; background: var(--primary-strong); }
.contracts-page { display: grid; gap: 1rem; }
.contracts-hero { position: relative; overflow: hidden; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #282041, #172342 58%, #143142); }
.contracts-hero::after { position: absolute; top: -7rem; right: -3rem; width: 18rem; height: 18rem; border: 1px solid rgb(233 30 99 / .3); border-radius: 50%; box-shadow: 0 0 0 2.7rem rgb(156 39 176 / .06); content: ""; }
.contracts-hero > * { position: relative; z-index: 1; }
.contracts-hero h1, .contracts-hero p { margin: 0; }
.contracts-hero > div > p:last-child { max-width: 42rem; margin-top: .35rem; color: #c0cee0; }
.contract-filters { margin: 0; padding: .95rem; border: 1px solid var(--line); border-radius: .72rem; background: rgb(8 21 36 / .45); }
.contract-filters > label:first-child { flex: 1 1 17rem; }

/* Kostenübersicht: dieselben Oberflächen und Abstände wie Dashboard und
   Detailseiten, ergänzt um ohne Fremdskript gerenderte Balkendiagramme. */
.costs-page { display: grid; gap: 1rem; }
.costs-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #3b5270; border-radius: .8rem; background: linear-gradient(115deg, #282041, #172342 58%, #143142); }
.costs-hero h1, .costs-hero p { margin: 0; }
.costs-hero > div > p:last-child { margin-top: .35rem; color: #c0cee0; }
.eyebrow { margin: 0 0 .3rem !important; color: #ef70aa !important; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.cost-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.cost-metrics article { display: grid; gap: .18rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: linear-gradient(145deg, #102137, #0a1727); }
.cost-metrics span, .cost-metrics small { color: var(--muted); font-size: .73rem; letter-spacing: .04em; text-transform: uppercase; }
.cost-metrics strong { overflow-wrap: anywhere; font-size: clamp(1.25rem, 2vw, 1.65rem); letter-spacing: -.035em; }
.cost-metrics .cost-metric-primary { border-color: #93476f; background: linear-gradient(140deg, rgb(174 40 110 / .35), rgb(59 34 87 / .82)); }
.cost-metrics .cost-metric-primary strong { color: #fff; }
.cost-section { padding: clamp(1rem, 2.2vw, 1.35rem); border: 1px solid var(--line); border-radius: .75rem; background: linear-gradient(145deg, rgb(16 33 55 / .9), rgb(10 23 39 / .96)); }
.section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.section-heading > span { color: var(--muted); font-size: .78rem; }
.cost-summary-table, .cost-detail-table { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; background: #0a1727; }
.cost-summary-table table, .cost-detail-table table { min-width: 38rem; }
.cost-summary-table tbody tr:last-child { background: rgb(233 30 99 / .1); }
.cost-note { max-width: 78rem; margin: .85rem 0 0; font-size: .82rem; }
.cost-chart { display: grid; gap: .7rem; margin-bottom: 1rem; }
.cost-chart-row { display: grid; grid-template-columns: minmax(9rem, 15rem) minmax(8rem, 1fr) minmax(6.5rem, auto); align-items: center; gap: .85rem; }
.cost-chart-label { display: grid; min-width: 0; gap: .1rem; }
.cost-chart-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-chart-label span { color: var(--muted); font-size: .77rem; }
.cost-chart-track { min-width: 0; height: .75rem; overflow: hidden; border-radius: 99px; background: #081524; box-shadow: inset 0 0 0 1px #29415e; }
.cost-chart-bar { display: block; width: var(--cost-share); min-width: .28rem; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e91e63, #b14ac3); box-shadow: 0 0 .7rem rgb(233 30 99 / .35); }
.cost-chart-bar-customer { background: linear-gradient(90deg, #527dff, #8d5ee8); box-shadow: 0 0 .7rem rgb(82 125 255 / .3); }
.cost-chart-value { justify-self: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-history-section form { display: flex !important; margin-top: .85rem; }
.cost-snapshots-heading { margin-top: 1.5rem; }

@media (max-width: 52rem) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: .75rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .user-card { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: .25rem; }
  .sidebar nav a { flex: 0 0 auto; padding: .5rem .7rem; font-size: .82rem; }
  .sidebar nav a[aria-current="page"]::before { top: auto; right: .55rem; bottom: 0; left: .55rem; width: auto; height: .16rem; }
  .app-toolbar { min-height: 4rem; }
  .toolbar-search { width: auto; flex: 1; max-width: 20rem; }
  .app-content { width: min(100% - 1.5rem, 94rem); margin-top: 1.2rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .cost-metrics { grid-template-columns: 1fr 1fr; }
  .section-nav .section-nav-primary { margin-left: 0; }
  .dashboard-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card dl { grid-template-columns: 1fr; gap: .15rem; }
  .device-summary { grid-template-columns: 1fr; }
  .device-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .network-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card dd { margin-bottom: .6rem; }
}

@media (max-width: 42rem) {
  table { display: block; overflow-x: auto; }
  .table-wrap > table { min-width: 36rem; }
  .rack-face { overflow-x: auto; }
  .rack-face > table { min-width: 28rem; }
}

@media (max-width: 34rem) {
  .toolbar-search span { display: none; }
  .app-toolbar { padding-inline: .8rem; }
  .metric-grid, .dashboard-widgets { grid-template-columns: 1fr; }
  .cost-metrics { grid-template-columns: 1fr; }
  .cost-chart-row { grid-template-columns: minmax(0, 1fr) minmax(5rem, 1fr); gap: .45rem .75rem; }
  .cost-chart-label { grid-column: 1 / -1; }
  .cost-chart-value { grid-column: 2; grid-row: 2; }
  .dashboard-page .dashboard-widget:first-child, .dashboard-page .dashboard-widget:nth-child(2), .dashboard-page .dashboard-widget:nth-child(3), .dashboard-page .dashboard-widget:nth-child(4) { grid-column: auto; grid-row: auto; }
  .dashboard-page .dashboard-widget:first-child ul { grid-template-columns: 1fr; }
  .device-form-grid { grid-template-columns: 1fr; }
  .network-form-grid { grid-template-columns: 1fr; }
  .ram-component-form form { grid-template-columns: 1fr; }
  .device-secret-form form { grid-template-columns: 1fr; }
  .component-actions { min-width: 18rem; }
  .component-editor { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: auto; }
  .network-span-2 { grid-column: auto; }
  .device-form-actions { justify-content: stretch; flex-direction: column-reverse; }
  .network-form-actions { justify-content: stretch; flex-direction: column-reverse; }
  .module-page > article form:not(.component-remove):not(.admin-delete), .module-page > section form:not(.component-remove):not(.admin-delete), .detail-card > form, details > form:not(.component-editor), .form { grid-template-columns: 1fr; }
  .module-page form > button, .module-page form > p > button, .form > button { width: 100%; }
  .device-form-actions .button, .device-form-actions button { text-align: center; }
  .app-footer { justify-content: space-between; gap: .5rem; padding-inline: .8rem; }
}

/* Gerenderte Dokumentation (net_docs, über themecontracts.RenderMarkdown).
   Der Renderer gibt h2…h4, p, ul/ol, blockquote, pre/code und a aus; hier
   steht, wie das in dieser Oberfläche aussieht. Ein Codeblock scrollt in
   sich, statt die Seite breit zu machen — dieselbe Regel wie bei
   Tabellen. */
.doku-abschnitt { border: 1px solid var(--line); border-radius: .6rem; background: var(--panel); margin: 0 0 1rem; padding: 1rem 1.15rem; }
.doku-abschnitt > header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.doku-abschnitt > header h3 { margin: 0; font-size: 1.05rem; }
.doku-abschnitt > header .doku-werkzeuge { display: flex; gap: .4rem; align-items: center; }
.doku-abschnitt > header .doku-werkzeuge form { display: inline; margin: 0; }
.doku-text { color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.doku-text h2 { margin: 1.4rem 0 .5rem; font-size: 1.15rem; }
.doku-text h3 { margin: 1.2rem 0 .45rem; font-size: 1.02rem; }
.doku-text h4 { margin: 1rem 0 .4rem; font-size: .95rem; color: var(--muted); }
.doku-text p { margin: .5rem 0; }
.doku-text ul, .doku-text ol { margin: .5rem 0; padding-left: 1.4rem; }
.doku-text li { margin: .2rem 0; }
.doku-text blockquote { margin: .6rem 0; border-left: 3px solid var(--line); padding: .1rem 0 .1rem .8rem; color: var(--muted); }
.doku-text hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.doku-text a { color: var(--primary); }
.doku-text code { background: #081524; border: 1px solid var(--line); border-radius: .3rem; padding: .05rem .3rem; font-size: .9em; }
.doku-text pre { background: #081524; border: 1px solid var(--line); border-radius: .45rem; margin: .6rem 0; padding: .7rem .85rem; overflow-x: auto; }
.doku-text pre code { background: none; border: 0; padding: 0; font-size: .88rem; line-height: 1.5; white-space: pre; }
.doku-leer { color: var(--muted); }
.doku-bearbeiten textarea { width: 100%; min-height: 22rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.55; }

/* Auslastung eines Virtualisierungshosts (net_virtualization).
   Der Balken ist eine Ampel, keine Messung: Er zeigt, was die
   konfigurierten Systeme fordern, nicht was gerade läuft (E-12). */
.host-karte { margin: 0 0 1.25rem; }
.host-karte > header h2 { margin: 0 0 .25rem; }
.host-ressourcen { margin: .75rem 0 1rem; }
.ampel { display: inline-block; position: relative; width: 7rem; height: .55rem; border-radius: .3rem; background: var(--panel-strong); border: 1px solid var(--line); vertical-align: middle; margin-right: .45rem; overflow: hidden; }
.ampel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--anteil, 0%); border-radius: .3rem; }
.ampel-frei::before { background: var(--success); }
.ampel-eng::before { background: var(--warning); }
.ampel-ueberbucht::before { background: var(--danger); width: 100%; }
.ampel-unbekannt { border-style: dashed; }
/* Sortierbare Tabellenüberschriften: der Pfeil zeigt die Richtung. */
thead th a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line); }
thead th a:hover, thead th a:focus-visible { color: var(--primary); }
thead th[aria-sort] a { color: var(--primary); border-bottom-color: var(--primary); }
.table-sort { width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-align: inherit; text-transform: inherit; }
.table-sort::after { display: inline-block; margin-left: .35rem; color: #71839b; content: "↕"; }
th[aria-sort="ascending"] .table-sort, th[aria-sort="descending"] .table-sort { color: var(--primary); }
th[aria-sort="ascending"] .table-sort::after { color: currentColor; content: "↑"; }
th[aria-sort="descending"] .table-sort::after { color: currentColor; content: "↓"; }

/* IP-Adressen an einer Schnittstelle (net_devices, net_virtualization).
   Sie stehen in einer Tabellenzelle, sollen dort aber nicht wie eine
   Aufzählung wirken — eine Adresse je Zeile, der Entfernen-Knopf
   daneben und nicht darunter. */
.schnittstellen-adressen { list-style: none; margin: 0; padding: 0; }
.schnittstellen-adressen li { display: flex; align-items: baseline; gap: .45rem; margin-bottom: .25rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.schnittstellen-adressen small { color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.schnittstellen-adressen form { display: inline; }
.schnittstellen-adressen button { padding: .1rem .45rem; font-size: .72rem; }

/* Namen, unter denen ein Dienst läuft (net_services). Das Zeichen sagt,
   ob es die Domain unter „Domains“ gibt — gefüllt heißt gepflegt. */
.domain-marke { color: var(--muted); font-size: 1rem; cursor: help; }
.domain-marke-gepflegt { color: var(--success); }
