/*
 * LGMW Kompass – Oberfläche
 * Design-Werte aus dem Corporate Design von leon-goetz.media (siehe docs/design.md).
 * Bewusst ohne Build-Schritt: diese Datei wird direkt ausgeliefert.
 */

@font-face {
    font-family: "Roboto Condensed";
    src: url("/assets/fonts/RobotoCondensed-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Varela Round";
    src: url("/assets/fonts/VarelaRound-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

:root {
    --lg-blau: #00387A;
    --lg-nacht: #07182F;
    --lg-amber: #FFB224;
    --lg-papier: #F6F8FB;
    --lg-eis: #C9D9EE;
    --lg-hell: #E8EFF8;
    --lg-g2: #D9DEE7;
    --lg-g5: #5F677A;
    --lg-g7: #454C5A;
    --lg-g9: #1C2330;
    --lg-it: #3E7BFA;
    --lg-web: #0F9C95;
    --lg-design: #F2665A;
    --lg-rot: #B83A2F;
    --lg-gruen: #0B6F6A;
    --lg-head: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    --lg-body: "Varela Round", Nunito, Arial, sans-serif;
    --lg-radius: 9px;
    --lg-radius-klein: 4px;
    --lg-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--lg-papier);
    color: var(--lg-g9);
    font: 16px/1.55 var(--lg-body);
}

h1, h2, h3 { font-family: var(--lg-head); color: var(--lg-nacht); line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
a { color: var(--lg-blau); }
.leise { color: var(--lg-g5); font-size: .9rem; }

/* Kopfzeile */
.kopf { background: var(--lg-nacht); color: #fff; }
.kopf__innen { max-width: var(--lg-max); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.kopf__logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--lg-head); font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; }
.kopf__logo img { height: 28px; }
.kopf__logo span { border-left: 1px solid rgba(255,255,255,.3); padding-left: 12px; }
.kopf nav { display: flex; gap: 6px; flex-wrap: wrap; }
.kopf nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.kopf nav a:hover, .kopf nav a[aria-current="page"] { background: rgba(255,255,255,.12); }
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.kopf__rechts form { margin: 0; }
.kopf__rechts button { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; }
.kopf__projekt { color: var(--lg-amber); font-family: var(--lg-head); font-weight: 600; }

/* Inhalt */
main { max-width: var(--lg-max); margin: 0 auto; padding: 32px 20px 64px; }
.karte { background: #fff; border: 1px solid var(--lg-g2); border-radius: var(--lg-radius); padding: 24px; margin-bottom: 24px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.kachel { display: block; background: #fff; border: 1px solid var(--lg-g2); border-top: 4px solid var(--farbe, var(--lg-blau)); border-radius: var(--lg-radius); padding: 20px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.kachel:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(7,24,47,.08); }
.kachel h2 { margin-bottom: .3em; }
.kachel p { margin: 0; color: var(--lg-g5); font-size: .92rem; }

/* Meldungen */
.meldung { border-radius: var(--lg-radius-klein); padding: 12px 16px; margin-bottom: 20px; }
.meldung--ok { background: #E3F4F2; color: var(--lg-gruen); }
.meldung--fehler { background: #FDECEA; color: var(--lg-rot); }
.meldung ul { margin: 0; padding-left: 1.2em; }

/* Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 4px; color: var(--lg-g7); }
input[type=text], input[type=email], input[type=password], select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--lg-g2); border-radius: var(--lg-radius-klein);
    font: inherit; background: #fff; color: var(--lg-g9);
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--lg-amber); outline-offset: 1px; }
.feld { margin-bottom: 16px; }
.feld--inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.feld--inline > div { flex: 1 1 180px; }
.haken { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.hilfe { color: var(--lg-g5); font-size: .85rem; margin-top: 4px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--lg-blau); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: 600 1rem var(--lg-head); letter-spacing: .02em; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--lg-nacht); }
.knopf--hell { background: #fff; color: var(--lg-nacht); border: 1px solid var(--lg-g2); }
.knopf--hell:hover { background: var(--lg-hell); }
.knopf--klein { padding: 5px 12px; font-size: .85rem; }
.knopf--gefahr { background: none; color: var(--lg-rot); border: 1px solid currentColor; }
.knopf--gefahr:hover { background: #FDECEA; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--lg-g2); vertical-align: middle; }
th { font-family: var(--lg-head); font-weight: 600; color: var(--lg-g7); font-size: .9rem; }
td form { display: inline; margin: 0; }
.marke { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--lg-hell); color: var(--lg-blau); font-size: .8rem; }
.marke--amber { background: #FFF3DA; color: #8A5A00; }
.marke--aus { background: var(--lg-g2); color: var(--lg-g7); }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--lg-nacht), var(--lg-blau)); }
.anmeldung__box { width: min(420px, 100%); background: #fff; border-radius: 14px; padding: 36px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.anmeldung__box img { height: 36px; margin-bottom: 20px; }
.trenner { display: flex; align-items: center; gap: 12px; color: var(--lg-g5); font-size: .85rem; margin: 20px 0; }
.trenner::before, .trenner::after { content: ""; flex: 1; border-top: 1px solid var(--lg-g2); }
.ms-logo { width: 18px; height: 18px; }

@media (max-width: 640px) {
    h1 { font-size: 1.6rem; }
    .kopf__rechts { margin-left: 0; width: 100%; justify-content: space-between; }
    .karte { padding: 18px; }
}

/* Hilfsklassen */
.nowrap { white-space: nowrap; }
.rechts { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.kopfzeile h1, .kopfzeile h2 { margin: 0; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fusszeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: -8px; }
.fusszeile form { margin: 0; }
.pfad { font-size: .9rem; color: var(--lg-g5); margin-bottom: 8px; }
.pfad a { text-decoration: none; }
details summary { cursor: pointer; }
.aenderungen { margin: 6px 0 0; padding-left: 1.2em; font-size: .85rem; color: var(--lg-g7); word-break: break-word; }
.seiten { margin-top: 16px; }
.seiten nav ul { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
textarea { width: 100%; padding: 12px; border: 1px solid var(--lg-g2); border-radius: var(--lg-radius-klein); font: 14px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--lg-g9); resize: vertical; }
textarea:focus { outline: 3px solid var(--lg-amber); outline-offset: 1px; }
input[type=search] { width: 100%; padding: 9px 12px; border: 1px solid var(--lg-g2); border-radius: 999px; font: inherit; }

/* Wiki */
.wiki { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.wiki__seite { position: sticky; top: 16px; background: #fff; border: 1px solid var(--lg-g2); border-top: 4px solid var(--lg-web); border-radius: var(--lg-radius); padding: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.wiki__suche { margin-bottom: 12px; }
.wiki__start { display: block; font-family: var(--lg-head); font-weight: 600; color: var(--lg-nacht); text-decoration: none; margin-bottom: 6px; }
.wiki__aktionen { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--lg-g2); font-size: .9rem; }
.baum { list-style: none; margin: 0; padding: 0 0 0 12px; font-size: .93rem; }
.wiki__seite > .baum { padding-left: 0; }
.baum li { margin: 2px 0; }
.baum a { display: block; padding: 3px 8px; border-radius: var(--lg-radius-klein); color: var(--lg-g9); text-decoration: none; }
.baum a:hover { background: var(--lg-hell); }
.baum a[aria-current="page"] { background: #E3F4F2; color: var(--lg-web-t, #0B6F6A); font-weight: 600; }
.hilfekarte { background: var(--lg-hell); border-color: var(--lg-eis); }
.treffer h2 { font-size: 1.1rem; margin-bottom: .3em; }
.treffer p { margin: 0; }

/* Editor */
.editor { margin-bottom: 16px; }
.editor__reiter { display: flex; gap: 4px; margin-bottom: -1px; }
.editor__reiter button { background: var(--lg-papier); border: 1px solid var(--lg-g2); border-bottom: 0; border-radius: var(--lg-radius-klein) var(--lg-radius-klein) 0 0; padding: 6px 14px; font: inherit; cursor: pointer; color: var(--lg-g7); }
.editor__reiter button[aria-selected="true"] { background: #fff; color: var(--lg-nacht); font-weight: 600; }
.editor__vorschau { border: 1px solid var(--lg-g2); border-radius: 0 var(--lg-radius-klein) var(--lg-radius-klein); padding: 16px; min-height: 200px; }

/* Markdown-Inhalt */
.markdown { line-height: 1.65; overflow-wrap: anywhere; }
.markdown h1 { font-size: 1.7rem; } .markdown h2 { font-size: 1.35rem; margin-top: 1.4em; } .markdown h3 { font-size: 1.12rem; margin-top: 1.2em; }
.markdown img { max-width: 100%; }
.markdown code { background: var(--lg-hell); padding: 1px 5px; border-radius: 4px; font: .9em ui-monospace, "Cascadia Mono", Consolas, monospace; }
.markdown pre { background: var(--lg-nacht); color: #E8EFF8; padding: 14px 16px; border-radius: var(--lg-radius-klein); overflow-x: auto; }
.markdown pre code { background: none; padding: 0; color: inherit; }
.markdown blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--lg-amber); background: #FFF8E8; }
.markdown table { margin: 1em 0; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--lg-g2); }
.markdown th { background: var(--lg-papier); }
.markdown a[title="Seite existiert noch nicht"] { color: var(--lg-rot); text-decoration-style: dashed; }
.markdown > :first-child { margin-top: 0; }

/* Versionsvergleich */
.diff { padding: 0; overflow-x: auto; font: 13px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.diff__zeile { display: flex; white-space: pre-wrap; word-break: break-word; padding: 0 12px; }
.diff__zeichen { flex: 0 0 18px; color: var(--lg-g5); user-select: none; }
.diff__zeile--weg { background: #FDECEA; color: #8C2A21; }
.diff__zeile--neu { background: #E3F4F2; color: #0B5550; }
.diff__zeile--gleich { color: var(--lg-g7); }

@media (max-width: 860px) {
    .wiki { grid-template-columns: 1fr; }
    .wiki__seite { position: static; max-height: none; }
}

/* Unternavigation in Modulen */
.unternav { display: flex; gap: 4px; flex-wrap: wrap; margin: -8px 0 24px; border-bottom: 1px solid var(--lg-g2); }
.unternav a { padding: 8px 14px; text-decoration: none; color: var(--lg-g7); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.unternav a:hover { color: var(--lg-nacht); }
.unternav a[aria-current="page"] { color: var(--lg-nacht); border-bottom-color: var(--lg-design); font-weight: 600; }

/* Kennzahlen */
.zahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.zahl { display: block; text-decoration: none; color: inherit; background: var(--lg-papier); border: 1px solid var(--lg-g2); border-radius: var(--lg-radius); padding: 14px; }
.zahl:hover { border-color: var(--lg-design); }
.zahl strong { display: block; font: 700 1.8rem/1 var(--lg-head); color: var(--lg-nacht); }
.zahl span { font-size: .88rem; color: var(--lg-g5); }

/* Layout-Helfer */
.raster-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.tabelle-scroll { overflow-x: auto; }
.feld-knopf { flex: 0 0 auto !important; align-self: end; }
.auswahlliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin-bottom: 16px; }
.vorformatiert { white-space: pre-wrap; }
.marke--rot { background: #FDECEA; color: var(--lg-rot); }
.knopf-link { background: none; border: 0; padding: 0 4px; color: var(--lg-blau); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }

/* Datenliste */
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.daten dt { color: var(--lg-g5); font-size: .9rem; }
.daten dd { margin: 0; overflow-wrap: anywhere; }
.daten--eng { gap: 2px 12px; margin-top: 6px; }
.daten code { background: var(--lg-hell); padding: 1px 6px; border-radius: 4px; }

/* Zugangsdaten */
.zugang { border: 1px solid var(--lg-g2); border-radius: var(--lg-radius-klein); padding: 12px; margin-bottom: 12px; }
.zugang .kopfzeile { margin-bottom: 2px; }
.zugang__form { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--lg-g2); }
.zugang details form { display: block; margin-bottom: 8px; }
.zugang__neu summary { display: inline-flex; list-style: none; }
.zugang__neu summary::-webkit-details-marker { display: none; }

@media (max-width: 860px) {
    .raster-2 { grid-template-columns: 1fr; }
}

/* Netzwerk */
.unternav--netz a[aria-current="page"] { border-bottom-color: var(--lg-it); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
form.inline { display: inline; }
.balken { display: inline-block; width: 70px; height: 6px; background: var(--lg-g2); border-radius: 3px; vertical-align: middle; margin-left: 6px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--lg-it); }
.inline-bearbeiten { display: inline-block; text-align: left; }
.inline-bearbeiten[open] { display: block; background: var(--lg-papier); border: 1px solid var(--lg-g2); border-radius: var(--lg-radius-klein); padding: 10px; margin: 6px 0; }
.inline-bearbeiten summary { list-style: none; display: inline-flex; }
.inline-bearbeiten summary::-webkit-details-marker { display: none; }
.inline-bearbeiten form { margin-top: 8px; }

/* IP-Belegungsplan */
.ipraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 3px; }
.ip { display: inline-block; text-align: center; font: 11px/22px ui-monospace, Consolas, monospace; border-radius: 3px; background: #EEF8EE; color: #2D6A2D; min-width: 22px; }
.ip--statisch { background: var(--lg-it); color: #fff; }
.ip--reservierung { background: #8FB2FF; color: #0B2A6B; }
.ip--reserviert { background: var(--lg-amber); color: #5A3B00; }
.ip--gateway { background: var(--lg-nacht); color: #fff; }
.ip--dhcp { background: var(--lg-hell); color: var(--lg-g5); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 12px; }
.legende .ip { width: 14px; min-width: 14px; height: 14px; line-height: 14px; }

/* Kabel */
.kabelenden { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.kabelenden fieldset { border: 1px solid var(--lg-g2); border-radius: var(--lg-radius-klein); padding: 12px 14px 0; }
.kabelenden legend { font-family: var(--lg-head); font-weight: 600; padding: 0 6px; }
.kabelweg { list-style: none; margin: 16px 0 0; padding: 0; }
.kabelweg__station { position: relative; padding: 10px 14px; border: 2px solid var(--lg-g2); border-radius: var(--lg-radius); background: #fff; }
.kabelweg__station--aktiv { border-color: var(--lg-it); }
.kabelweg__station--passiv { border-style: dashed; }
.kabelweg__station--start { box-shadow: 0 0 0 3px var(--lg-amber); }
.kabelweg__art { display: block; font-size: .78rem; color: var(--lg-g5); text-transform: uppercase; letter-spacing: .04em; }
.kabelweg__kabel { margin: 0 0 0 28px; padding: 10px 0 10px 20px; border-left: 4px solid var(--lg-it); font-size: .92rem; }

/* Rack */
.racks { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.rack { margin: 0; flex: 1 1 300px; max-width: 460px; }
.rack figcaption { font-family: var(--lg-head); font-weight: 600; margin-bottom: 6px; }
.rack__schrank { display: grid; grid-template-columns: 34px 1fr; background: var(--lg-g9); border: 6px solid var(--lg-g9); border-radius: 6px; gap: 1px 4px; }
.rack__he { grid-column: 1; color: #8A93A6; font: 10px/22px ui-monospace, Consolas, monospace; text-align: right; padding-right: 4px; border-top: 1px solid #2E3647; }
.rack__geraet { grid-column: 2; display: flex; align-items: center; gap: 8px; background: #DDE3EC; border-radius: 3px; padding: 0 8px; font-size: .82rem; overflow: hidden; white-space: nowrap; }
.rack__geraet a { color: var(--lg-nacht); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.rack__geraet--aktiv { background: #C9DAFF; border-left: 4px solid var(--lg-it); }
.rack__geraet--passiv { background: #E6E9EF; border-left: 4px solid var(--lg-g5); }
.rack__groesse { margin-left: auto; color: var(--lg-g5); font-size: .75rem; }

@media (max-width: 700px) {
    .kabelenden { grid-template-columns: 1fr; }
}

/* Raumplan */
.raumplan__leiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.raumplan__flaeche { background: var(--lg-papier); border-radius: var(--lg-radius-klein); overflow: auto; }
.raumplan__svg { display: block; width: 100%; height: auto; max-height: 70vh; touch-action: none; user-select: none; }
.raumplan__svg--klein { max-height: 150px; margin-bottom: 10px; pointer-events: none; }
.raumplan__boden { fill: #fff; }
.raumplan__raster { fill: none; stroke: #E3E8F0; stroke-width: 1; }
.raumplan__wand { fill: none; stroke: var(--lg-g9); stroke-width: 8; }
.raumplan__mass { fill: var(--lg-g5); text-anchor: middle; dominant-baseline: middle; font-family: var(--lg-body); }
.plan-el { cursor: pointer; }
[data-editierbar] .plan-el { cursor: grab; }
[data-editierbar] .plan-el:active { cursor: grabbing; }
.plan-el__flaeche { fill: #E6E9EF; stroke: var(--lg-g5); stroke-width: 2; }
.plan-el__name, .plan-el__info { text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-family: var(--lg-head); fill: var(--lg-nacht); }
.plan-el__info { fill: var(--lg-g7); font-family: var(--lg-body); }
.plan-el--rack .plan-el__flaeche { fill: #DCE6FF; stroke: var(--lg-it); }
.plan-el__belegung { fill: var(--lg-it); opacity: calc(var(--belegung, 0) * .35); pointer-events: none; }
.plan-el__front { stroke: var(--lg-nacht); stroke-width: 7; stroke-linecap: square; }
.plan-el--tuer .plan-el__flaeche { fill: #F7E7C6; stroke: #B5832B; }
.plan-el--fenster .plan-el__flaeche { fill: #D9F1FF; stroke: #4BA3D9; }
.plan-el--klima .plan-el__flaeche { fill: #E0F6F4; stroke: var(--lg-web); }
.plan-el--usv .plan-el__flaeche { fill: #FFF1D6; stroke: var(--lg-amber); }
.plan-el--saeule .plan-el__flaeche { fill: #C8CDD6; stroke: var(--lg-g7); }
.plan-el--tisch .plan-el__flaeche, .plan-el--schrank .plan-el__flaeche { fill: #F1EEE8; stroke: #9C8F7A; }
.plan-el--gewaehlt .plan-el__flaeche { stroke: var(--lg-amber); stroke-width: 5; }
.plan-el:hover .plan-el__flaeche { filter: brightness(.97); }
.raumplan__koordinaten { margin-top: 12px; }
.raumplan__koordinaten input, .raumplan__koordinaten select { padding: 4px 6px; min-width: 70px; }
.raumplan__koordinaten td { padding: 4px; }
.raumkachel { padding-top: 12px; }
.abschnitt { margin-top: 8px; }
.racks--reihe { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
.rackkarte { flex: 0 0 220px; background: #fff; border: 1px solid var(--lg-g2); border-radius: var(--lg-radius); padding: 12px; }
.rackkarte .kopfzeile a { text-decoration: none; }

/* Rack-Grafik: Gerätearten, freie Einheiten, kompakt */
.rack__leer { grid-column: 2; border-top: 1px dashed #3A4357; }
.rack__geraet--server { background: #D7E3FF; border-left: 4px solid #2457C5; }
.rack__geraet--netz { background: #D3F1EE; border-left: 4px solid var(--lg-web); }
.rack__geraet--passiv { background: #E6E9EF; border-left: 4px solid var(--lg-g5); }
.rack__geraet--usv { background: #FFEFC9; border-left: 4px solid var(--lg-amber); }
.rack__geraet--sonstig { background: #EDE3F7; border-left: 4px solid #7A52B3; }
.rack__geraet--blende { background: #2E3647; color: #A6AFC0; border-left: 4px solid #2E3647; }
.rack__aus { color: var(--lg-rot); }
.rack--klein { max-width: none; }
.rack--klein figcaption { font-size: .8rem; color: var(--lg-g5); font-weight: 400; }
.rack--klein .rack__schrank { grid-template-columns: 18px 1fr; border-width: 4px; }
.rack--klein .rack__he { font-size: 8px; line-height: 12px; padding-right: 2px; }
.rack--klein .rack__geraet { font-size: .7rem; padding: 0 4px; border-left-width: 3px; }
.legende-rack, .legende-patch { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-left: 10px; }
.legende-rack i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }

/* Patchen */
.patchfeld { position: relative; }
.patchfeld__linie { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; z-index: 5; overflow: visible; }
.patchfeld__linie--aktiv { display: block; }
.patchfeld__linie line { stroke: var(--lg-amber); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 8 6; }
.patchgeraet { background: #fff; border: 1px solid var(--lg-g2); border-left: 5px solid var(--lg-it); border-radius: var(--lg-radius-klein); padding: 10px 12px; margin-bottom: 8px; }
.patchgeraet--passiv { border-left-color: var(--lg-g5); }
.patchgeraet header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.patchgeraet header a { text-decoration: none; }
.patchgeraet__he { font: 12px ui-monospace, Consolas, monospace; color: var(--lg-g5); }
.patchgeraet__ports { display: flex; flex-wrap: wrap; gap: 4px; }
.patchport { width: 34px; height: 30px; border-radius: 4px; border: 2px solid var(--lg-g5); background: #F4F6FA; font: 11px ui-monospace, Consolas, monospace; color: var(--lg-g9); cursor: pointer; touch-action: none; user-select: none; padding: 0; overflow: hidden; }
.patchport--frei:hover { border-color: var(--lg-it); }
[data-editierbar] .patchport--frei { cursor: grab; }
.patchport--belegt { background: var(--lg-it); border-color: var(--lg-it-t, #2457C5); color: #fff; }
.patchport--hinten { background: #E9EEF7; border-style: dashed; }
.patchport--quelle { box-shadow: 0 0 0 3px var(--lg-amber); }
.patchport--ziel { box-shadow: 0 0 0 3px var(--lg-web); background: #D3F1EE; }
.patchport--nein { box-shadow: 0 0 0 3px var(--lg-rot); }
.patchport--laedt { opacity: .5; }
.legende-patch .patchport { width: 14px; height: 12px; border-width: 1px; cursor: default; display: inline-block; }
.patchinfo { position: sticky; bottom: 16px; z-index: 6; box-shadow: 0 10px 30px rgba(7,24,47,.18); margin: 12px 0 0; }
.patchinfo p { margin-top: 0; }
.patchmeldung { position: sticky; bottom: 16px; z-index: 7; background: #FDECEA; color: var(--lg-rot); padding: 10px 14px; border-radius: var(--lg-radius-klein); margin-top: 8px; }
