/* Modul I: Informationsregister (ServiceNow Vendor Risk, OneTrust), API-Monitoring
   (Datadog, Azure API Management, dunkel), Quartalsbericht (Berichtseditor mit Papier)
   und Ergebnisansicht. Nur Tokens und Bausteine aus design.css; die Werkzeugfarbe kommt
   als --accent aus der Registry. Alle drei Werkzeuge fuellen ihr Fenster (fill): Kopf,
   Reiter und Befehlsleiste stehen, darunter scrollt nur der Inhalt. Fortschrittsring
   (.iam-ring) aus tool-iam.css. */

.ix-dim { color: var(--ds-text-3); font-size: var(--fs-s); }
.ix-bad { color: var(--ds-bad-text); font-weight: var(--fw-semibold); }
.ix-app { height: 100%; min-height: 0; overflow: hidden; }
.ix-app button { margin: 0; }
.ix-app table { margin: 0; }
.ix-app [hidden] { display: none !important; }
.ix-scroll { overflow-y: auto; min-height: 0; }
/* Bogennummer der ITS (RT.05.02) vor Reitern und Abschnitten */
.ix-rt {
  display: inline-block; margin-right: var(--sp-2); padding: 1px 5px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: 0;
  color: var(--ds-text-3); background: var(--ds-bg-sunken); border-radius: var(--r-xs);
  vertical-align: 1px; text-transform: none;
}
.ds-tab.is-active .ix-rt { color: var(--ds-text); background: color-mix(in srgb, var(--accent) 14%, var(--ds-bg-surface)); }

/* ================= Informationsregister ================= */
.ix-tabs { padding: 0 var(--sp-4); }
.ix-tabs .ds-tab { height: 40px; }
.ix-tabs .ds-tab.is-active { border-bottom-color: var(--accent); }
.ix-cmdbar { gap: var(--sp-1); }
.ix-voll { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); font-size: var(--fs-s); color: var(--ds-text-2); }
.ix-voll-ring .iam-ring-bg, .ix-voll-ring .iam-ring-fg { stroke-width: 4; }
.ix-voll-z { font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-stand { display: inline-flex; align-items: center; gap: 6px; }
.ix-stand svg { width: 14px; height: 14px; color: var(--ds-icon); }

.ix-body { flex: 1; min-height: 0; display: flex; }
.ix-main { flex: 1; min-width: 0; background: var(--ds-bg-surface); }
.ix-sek { border-bottom: 1px solid var(--ds-border-subtle); }
.ix-sek-kopf {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  min-height: 44px; padding: var(--sp-2) var(--sp-5);
}
.ix-sek-t { display: flex; align-items: center; margin: 0; font-size: var(--fs-m); font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-leg { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.ix-leg .ds-state { font-size: var(--fs-xs); }

/* Graph der Kette: Spalten fuer Institut, Rang 1 und Rang 2, Verbindungen als Linien */
.ix-graph { background: var(--ds-bg-subtle); }
.ix-kette {
  display: grid; grid-template-columns: minmax(170px, 210px) minmax(190px, 240px) minmax(0, 1fr);
  column-gap: 36px; row-gap: var(--sp-2); align-items: center;
  padding: var(--sp-2) var(--sp-5) var(--sp-5);
}
.ix-k-spalte { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); align-self: end; }
.ix-k-spalte:nth-child(3) { padding-left: 28px; }
.ix-k-fest, .ix-k-knoten {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  min-height: 48px; padding: 6px var(--sp-3); box-sizing: border-box;
  background: var(--ds-bg-surface); border: 1px solid var(--ds-border); border-radius: var(--r-m);
  box-shadow: 0 1px 2px rgba(19, 26, 33, 0.05);
}
.ix-k-fest::after { content: ''; position: absolute; left: 100%; top: 50%; width: 37px; height: 2px; margin-top: -1px; background: var(--ds-gray-400); }
.ix-k-haupt { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.ix-k-ic {
  width: 30px; height: 30px; border-radius: var(--r-s); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ds-bg-muted); color: var(--ds-text-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 0.02em;
}
.ix-k-ic svg { width: 16px; height: 16px; }
.ix-k-ic--inst { background: var(--ds-gray-700); color: #fff; }
.ix-k-ic--haupt { background: var(--accent); color: #fff; }
.ix-k-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; text-align: left; }
.ix-k-name { font-size: var(--fs-s); font-weight: var(--fw-semibold); color: var(--ds-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-k-svc { font-size: var(--fs-xs); color: var(--ds-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-k-svc .ds-mono { font-size: var(--fs-xs); }
.ix-k-fest .ix-k-name { white-space: normal; line-height: var(--lh-snug); }
.ix-k-liste { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; grid-row: 2; grid-column: 3; }
.ix-k-li { position: relative; padding: 4px 0; }
.ix-k-li::before { content: ''; position: absolute; left: -28px; top: 50%; width: 28px; height: 2px; margin-top: -1px; background: var(--ds-gray-400); }
.ix-k-li::after { content: ''; position: absolute; left: -28px; top: 0; bottom: 0; width: 2px; background: var(--ds-gray-400); }
.ix-k-li:first-child::after { top: 50%; }
.ix-k-li:last-child::after { bottom: 50%; }
.ix-k-li.is-alt::before { background: repeating-linear-gradient(90deg, var(--ds-gray-400) 0 4px, transparent 4px 7px); }
.ix-k-knoten { width: 100%; cursor: pointer; font-family: inherit; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.ix-k-knoten:hover { border-color: var(--ds-gray-400); background: var(--ds-bg-hover); }
.ix-k-knoten:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.ix-k-knoten.is-sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--ds-bg-surface)); box-shadow: inset 3px 0 0 var(--accent), 0 2px 8px -2px rgba(19, 26, 33, 0.18); }
.ix-k-bestand { border-style: dashed; box-shadow: none; }
.ix-k-bestand .ix-k-name { color: var(--ds-text-2); }
.ix-k-status { flex-shrink: 0; }
.ix-k-genehmigen .ix-k-ic { background: var(--ds-ok-soft); color: var(--ds-ok-text); }
.ix-k-eskalieren .ix-k-ic { background: var(--ds-warn-soft); color: var(--ds-warn-text); }
.ix-k-ablehnen .ix-k-ic { background: var(--ds-bad-soft); color: var(--ds-bad-text); }
.ix-pill-offen::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* Positionen */
.ix-tabelle { border-bottom: 0; }
.ix-table thead th { background: var(--ds-bg-surface); border-top: 1px solid var(--ds-border-subtle); }
.ix-table th:first-child, .ix-table td:first-child { padding-left: var(--sp-5); }
.ix-table tbody td { height: 56px; }
.ix-row { cursor: pointer; }
.ix-row.is-selected, .ix-row.is-selected:hover { box-shadow: inset 3px 0 0 var(--accent) !important; }
.ix-row.is-alt td { color: var(--ds-text-2); }
.ix-org { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.ix-org-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ix-org-av {
  width: 30px; height: 30px; border-radius: var(--r-s); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--ds-bg-surface)); color: color-mix(in srgb, var(--accent) 70%, black);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 0.02em;
}
.ix-org-av--lg { width: 44px; height: 44px; font-size: var(--fs-m); border-radius: var(--r-m); background: var(--accent); color: #fff; }
.ix-org-av--xl { width: 52px; height: 52px; border-radius: var(--r-m); background: var(--accent); color: #fff; }
.ix-org-av--xl svg { width: 24px; height: 24px; }
.ix-row.is-alt .ix-org-av { background: var(--ds-bg-muted); color: var(--ds-text-2); }
.ix-name { display: block; font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-row.is-alt .ix-name { font-weight: var(--fw-medium); color: var(--ds-text-2); }
.ix-svc { display: block; font-size: var(--fs-xs); color: var(--ds-text-3); line-height: var(--lh-snug); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.ix-land { display: inline-block; padding: 1px 6px; border-radius: var(--r-xs); background: var(--ds-bg-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ds-text-2); }
.ix-c-anz { max-width: 220px; white-space: normal; }
.ix-table .ix-c-more { width: 44px; padding: 0 var(--sp-2) 0 0; text-align: right; }
.ix-rowmore { opacity: 0; transition: opacity var(--dur-1) var(--ease); }
.ix-row:hover .ix-rowmore, .ix-row.is-selected .ix-rowmore, .ix-rowmore:focus-visible, .ix-rowmore.ds-menu-anker { opacity: 1; }

/* Detailpanel */
.ix-panel {
  display: flex; flex-direction: column; min-height: 0; flex-shrink: 0;
  width: 380px; background: var(--ds-bg-surface); border-left: 1px solid var(--ds-border-subtle);
}
.ix-panel .ds-empty-v3 { height: auto; flex: 1; }
.ix-panel-kopf {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5) var(--sp-2);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--ds-bg-surface)), var(--ds-bg-surface));
}
.ix-panel-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ix-panel-titel strong { font-size: var(--fs-l); font-weight: var(--fw-semibold); color: var(--ds-text); line-height: var(--lh-tight); }
.ix-panel-titel span { font-size: var(--fs-s); color: var(--ds-text-3); line-height: var(--lh-snug); }
.ix-panel-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--sp-1) var(--sp-5) var(--sp-3); border-bottom: 1px solid var(--ds-border-subtle); }
.ix-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--sp-5) var(--sp-4); }
.ix-panel-sek { display: flex; align-items: center; margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.ix-panel .ds-dl { grid-template-columns: 96px 1fr; }
.ix-entscheid { flex-shrink: 0; padding: var(--sp-3) var(--sp-5) var(--sp-1); border-top: 1px solid var(--ds-border-subtle); background: var(--ds-bg-subtle); box-shadow: 0 -6px 12px -10px rgba(19, 26, 33, 0.25); }
.ix-entscheid > .ds-label { display: block; margin-bottom: 6px; }
.ix-dec { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-3); }
.ix-dec-opt {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%; height: 34px; padding: 0 var(--sp-3);
  background: var(--ds-bg-surface); border: 1px solid var(--ds-border); border-radius: var(--r-s); cursor: pointer;
  font-family: inherit; font-size: var(--fs-s); color: var(--ds-text); text-align: left;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.ix-dec-opt span:not(.ix-dec-dot) { flex: 1; }
.ix-dec-opt svg { width: 15px; height: 15px; }
.ix-dec-opt:hover { background: var(--ds-bg-hover); border-color: var(--ds-border-strong); }
.ix-dec-opt:focus-visible { outline: var(--focus-outline); outline-offset: 1px; }
.ix-dec-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--ds-gray-400); }
.ix-dec-opt--ok .ix-dec-dot { background: var(--ds-ok); }
.ix-dec-opt--warn .ix-dec-dot { background: var(--ds-warn); }
.ix-dec-opt--bad .ix-dec-dot { background: var(--ds-bad); }
.ix-dec-opt.is-on { font-weight: var(--fw-semibold); }
.ix-dec-opt--ok.is-on { background: var(--ds-ok-soft); border-color: var(--ds-ok); color: var(--ds-ok-text); }
.ix-dec-opt--warn.is-on { background: var(--ds-warn-soft); border-color: var(--ds-warn); color: var(--ds-warn-text); }
.ix-dec-opt--bad.is-on { background: var(--ds-bad-soft); border-color: var(--ds-bad); color: var(--ds-bad-text); }

/* Vertrag als Datenblatt */
.ix-doc { flex: 1; background: var(--ds-bg-subtle); padding: var(--sp-5); }
.ix-blatt {
  max-width: 1040px; margin: 0 auto; box-sizing: border-box;
  background: var(--ds-bg-surface); border: 1px solid var(--ds-border-subtle); border-radius: var(--r-l); box-shadow: var(--sh-1);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
}
.ix-blatt-kopf { display: flex; align-items: center; gap: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--ds-border-subtle); }
.ix-blatt-titel { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ix-blatt-k { display: flex; align-items: center; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.ix-blatt-titel strong { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); color: var(--ds-text); }
.ix-vkpis { padding: var(--sp-4) 0; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ix-vkpi { background: var(--ds-bg-subtle); border-color: var(--ds-border-subtle); box-shadow: none; }
.ix-vkpi .ds-kpi-label { display: flex; align-items: center; gap: 6px; white-space: normal; }
.ix-vkpi .ds-kpi-label svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.ix-vkpi .ds-kpi-value { font-size: var(--fs-l); line-height: var(--lh-snug); }
.ix-vkpi .ds-kpi-sub { line-height: var(--lh-snug); }
.ix-blatt-sek { margin-top: var(--sp-2); }
.ix-vertrag-dl { grid-template-columns: 220px 1fr; gap: 0; font-size: var(--fs-m); }
.ix-vertrag-dl dt, .ix-vertrag-dl dd { padding: 9px 0; border-top: 1px solid var(--ds-border-subtle); line-height: var(--lh-base); }
.ix-vertrag-dl dt { color: var(--ds-text-3); font-size: var(--fs-s); }

/* Rueckmeldung als Briefentwurf */
.ix-brief-tisch { flex: 1; background: var(--ds-bg-sunken); padding: var(--sp-6) var(--sp-5); }
.ix-brief {
  width: 100%; max-width: 780px; margin: 0 auto; box-sizing: border-box;
  background: var(--ds-bg-surface); border: 1px solid var(--ds-border-subtle); border-radius: var(--r-xs); box-shadow: var(--sh-2);
  padding: var(--sp-6) var(--sp-8) var(--sp-8);
}
.ix-brief-kopf { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.ix-brief-dl { grid-template-columns: 80px 1fr; font-size: var(--fs-m); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--ds-border-subtle); }
.ix-brief-text { margin-top: var(--sp-5); font-size: var(--fs-m); line-height: var(--lh-relaxed); color: var(--ds-text); }
.ix-brief-text p { margin: 0 0 var(--sp-3); }
.ix-brief-tab { margin: var(--sp-2) 0 var(--sp-5); border: 1px solid var(--ds-border-subtle); border-radius: var(--r-s); overflow: hidden; }

/* Breite des Fensters, nicht des Bildschirms */
.ix.ix-app { container-type: inline-size; container-name: ixreg; }
@container ixreg (max-width: 1250px) {
  .ix-panel { width: 340px; }
  .ix-kette { grid-template-columns: 170px 190px minmax(0, 1fr); column-gap: 30px; }
  .ix-k-fest::after { width: 31px; }
  .ix-k-knoten .ix-k-svc { display: none; }
  .ix-c-anz { display: none; }
  .ix-svc { max-width: 260px; }
}
@container ixreg (max-width: 1060px) {
  .ix-kette { grid-template-columns: minmax(0, 1fr); }
  .ix-k-spalte:not(:nth-child(3)), .ix-k-fest { display: none; }
  .ix-k-spalte:nth-child(3) { padding-left: 0; }
  .ix-k-liste { grid-row: auto; grid-column: auto; padding-left: 0; }
  .ix-k-li::before, .ix-k-li::after { display: none; }
}

/* ================= API-Monitoring (dunkel) ================= */
.ix-mon { background: var(--ds-bg-app); }
.ix-mon-body { flex: 1; min-height: 0; display: flex; }
.ix-mon-nav { width: 268px; flex-shrink: 0; overflow-y: auto; background: var(--ds-dk-bg); border-right: 1px solid var(--ds-dk-border); }
.ix-mon .ds-navitem { color: var(--ds-dk-text-2); height: auto; min-height: 34px; }
.ix-mon .ds-navitem:hover { background: var(--ds-dk-hover); color: var(--ds-dk-text); }
.ix-mon .ds-navitem.is-on { background: var(--ds-primary-soft); color: var(--ds-dk-text); }
.ix-mon .ds-navitem svg { color: var(--ds-dk-icon); }
.ix-mon .ds-navitem.is-on svg { color: var(--accent); }
.ix-mon .ds-navhead { color: var(--ds-dk-text-3); }
.ix-mon-ep { padding-top: 7px; padding-bottom: 7px; align-items: flex-start; }
.ix-mon-ep .ds-navitem-lbl { display: flex; flex-direction: column; gap: 1px; white-space: normal; }
.ix-mon-ep-n { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ds-dk-text); line-height: var(--lh-snug); }
.ix-mon-ep-p { font-size: var(--fs-xs); color: var(--ds-dk-text-3); }
.ix-mon-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: var(--ds-ok-dk); box-shadow: 0 0 0 3px rgba(53, 179, 126, 0.18); }
.ix-mon-dot.is-bad { background: var(--ds-bad-dk); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.2); }
.ix-mon-ok { display: inline-flex; color: var(--ds-ok-text); }
.ix-mon .ix-mon-ok svg { width: 15px; height: 15px; color: var(--ds-ok-text); }
.ix-mon .ds-navitem-n { margin-top: 2px; }
.ix-mon-main { flex: 1; min-width: 0; overflow-y: auto; }
.ix-mon-cmd { position: sticky; top: 0; z-index: 2; }
.ix-mon .ds-crumbs > :last-child { color: var(--ds-dk-text); }
.ix-mon-seite { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5) var(--sp-6); }
.ix-mon-titel { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.ix-mon-titel h3 { margin: 0; font-size: var(--fs-l); font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-mon-titel .ds-state { gap: 0; }
.ix-api-ziel { margin-left: auto; font-size: var(--fs-s); color: var(--ds-text-3); }
.ix-api-ziel strong { color: var(--ds-text); font-weight: var(--fw-semibold); }
.ix-mkarte { background: var(--ds-bg-surface); border: 1px solid var(--ds-border); border-radius: var(--r-m); overflow: hidden; }
.ix-mk-t { margin: 0 0 var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.ix-mkpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ix-mkpis .ds-kpi { position: relative; overflow: hidden; padding-bottom: 34px; }
.ix-mkpis .ix-funke { position: absolute; left: 0; right: 0; bottom: 4px; width: 100%; height: 26px; }
.ix-funke { display: block; width: 100%; height: 24px; overflow: visible; }
.ix-funke path { fill: none; stroke: var(--ds-primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ix-funke.is-bad path { stroke: var(--ds-bad); }
.ix-dienste thead th { background: var(--ds-bg-surface); }
.ix-dienste tbody tr { cursor: pointer; }
.ix-dienste td .ds-mono { color: var(--ds-text); }
.ix-dienste tbody td { height: 52px; }
.ix-c-funke { width: 140px; }
.ix-c-funke .ix-funke { width: 120px; }

/* Zeitreihen: SVG ohne Seitenverhaeltnis, Schrift und Punkte als HTML */
.ix-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.ix-chart { margin: 0; padding: var(--sp-3) var(--sp-3) var(--sp-2); background: var(--ds-bg-surface); border: 1px solid var(--ds-border); border-radius: var(--r-m); }
.ix-chart figcaption { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); font-weight: var(--fw-semibold); }
.ix-chart figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-chart figcaption strong { color: var(--ds-text); font-family: var(--font-mono); font-size: var(--fs-s); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.ix-chart figcaption strong.is-bad { color: var(--ds-bad-text); }
.ix-chart-plot { position: relative; height: 150px; margin-top: var(--sp-3); }
.ix-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.ix-c-gitter { stroke: var(--ds-border); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.ix-c-linie { fill: none; stroke: var(--ds-primary); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ix-c-g0 { stop-color: var(--ds-primary); stop-opacity: 0.28; }
.ix-c-g1 { stop-color: var(--ds-primary); stop-opacity: 0; }
.ix-c-ref { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--ds-bad); }
.ix-c-reft { position: absolute; right: 0; bottom: 2px; font-size: var(--fs-xs); color: var(--ds-bad-text); white-space: nowrap; background: color-mix(in srgb, var(--ds-bg-surface) 80%, transparent); padding: 0 3px; border-radius: 2px; }
.ix-c-bad { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ds-bad); box-shadow: 0 0 0 2px var(--ds-bg-surface), 0 0 0 5px rgba(229, 72, 77, 0.28); }
.ix-c-y { position: absolute; left: 0; font-size: var(--fs-xs); color: var(--ds-text-3); line-height: 1; background: color-mix(in srgb, var(--ds-bg-surface) 70%, transparent); padding: 1px 2px; z-index: 1; }
.ix-c-y--oben { top: 9.7%; transform: translateY(-50%); }
.ix-c-y--unten { bottom: 9.7%; transform: translateY(50%); }
.ix-chart-x { display: flex; justify-content: space-between; margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--ds-text-3); }
.ix-chart-x span { white-space: nowrap; }
.ix-chart-x span:not(:nth-child(3n+1)) { visibility: hidden; }
/* Jedes Etikett ist ein Punkt ohne Breite unter seiner Woche; der Text steht mittig darueber,
   am Rand buendig nach innen. So laeuft nichts ueber die Karte oder in die Nachbarkarte. */
.ix-chart-x span { flex: 0 0 0; width: 0; display: flex; justify-content: center; }
.ix-chart-x span:first-child { justify-content: flex-start; }
.ix-chart-x span:last-child { justify-content: flex-end; }
.ix-api-unten { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-4) var(--sp-5); }
.ix-api-dl { grid-template-columns: 150px 1fr; align-content: start; }
.ix-vq { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.ix-einordnung { margin: 0; padding: var(--sp-4) var(--sp-5) var(--sp-3); min-width: 0; }
.ix-einordnung legend { float: left; width: 100%; padding: 0; }
.ix-mon.ix-app { container-type: inline-size; container-name: ixmon; }
@container ixmon (max-width: 1150px) {
  .ix-mon-nav { width: 220px; }
  .ix-api-unten { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .ix-c-funke { display: none; }
}

/* Auswahlzeile (Einordnung, Ampel) */
.ix-opt {
  display: flex; align-items: flex-start; gap: var(--sp-3); clear: both;
  padding: var(--sp-2) var(--sp-3); margin: 0 0 6px;
  border: 1px solid var(--ds-border); border-radius: var(--r-s); background: var(--ds-bg-surface);
  line-height: var(--lh-snug); cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.ix-opt input { margin-top: 1px; }
.ix-opt:hover { background: var(--ds-bg-hover); border-color: var(--ds-border-strong); }
.ix-opt:has(input:checked) { background: var(--ds-primary-soft); border-color: var(--ds-primary); }

/* ================= Quartalsbericht (Berichtseditor) ================= */
.ix-ber { background: var(--ds-bg-surface); }
.ix-ber-cmd { background: #faf8f4; border-bottom-color: #e8e3d8; }
.ix-ber-cmd .ds-cmd--primary { background: var(--accent); }
.ix-ber-cmd .ds-cmd--primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.ix-ber-cmd .ds-cmd--primary:disabled { background: var(--accent); }
.ix-ber-body { flex: 1; min-height: 0; display: flex; }
.ix-gliederung { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto; background: #faf8f4; border-right: 1px solid #e8e3d8; }
.ix-gl .ix-gl-nr { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--ds-bg-surface)); }
.ix-gl .ix-gl-ok { display: inline-flex; opacity: 0; }
.ix-gl .ix-gl-ok svg { width: 15px; height: 15px; color: var(--ds-ok); }
.ix-gl.is-done .ix-gl-ok { opacity: 1; }
.ix-gl.is-done .ix-gl-nr { background: var(--ds-ok-soft); color: var(--ds-ok-text); }
.ix-gl-offen { padding: 0 var(--sp-3) var(--sp-3); }
.ix-gl-offen .ds-banner { font-size: var(--fs-s); line-height: var(--lh-snug); }
.ix-tisch { flex: 1; min-width: 0; overflow-y: auto; padding: var(--sp-6) var(--sp-5) var(--sp-10); background: #ebe7df; }
.ix-seite {
  max-width: 780px; margin: 0 auto; box-sizing: border-box;
  background: var(--ds-bg-surface); border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(60, 50, 30, 0.08), 0 1px 3px rgba(60, 50, 30, 0.10), 0 12px 32px -12px rgba(60, 50, 30, 0.30);
  padding: var(--sp-10) var(--sp-10) var(--sp-8);
}
.ix-seite-kopf { padding-bottom: var(--sp-4); border-bottom: 2px solid var(--accent); margin-bottom: var(--sp-6); }
.ix-seite-kopf h2 { margin: var(--sp-2) 0 var(--sp-4); font-size: var(--fs-xxl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); color: var(--ds-text); }
.ix-kennzahlen { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-8); }
.ix-kennzahlen > span { display: flex; flex-direction: column; gap: 2px; }
.ix-kz-l { font-size: var(--fs-xs); color: var(--ds-text-3); text-transform: uppercase; letter-spacing: var(--ls-caps); font-weight: var(--fw-semibold); }
.ix-kennzahlen strong { font-size: var(--fs-l); font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-kap { margin-bottom: var(--sp-6); }
.ix-kap h3 { display: flex; align-items: baseline; gap: var(--sp-3); margin: 0 0 var(--sp-3); font-size: var(--fs-l); font-weight: var(--fw-semibold); color: var(--ds-text); }
.ix-kap-nr { font-family: var(--font-mono); font-size: var(--fs-m); font-weight: var(--fw-bold); color: var(--accent); min-width: 1.5em; }
.ix-kap-nr--klein { font-size: var(--fs-s); min-width: 2.5em; display: inline-block; }
.ix-auftrag { margin-bottom: var(--sp-4); }
.ix-satz { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.ix-satz-label { font-size: var(--fs-s); font-weight: var(--fw-semibold); color: var(--ds-text-2); }
/* Absatz im Dokument statt Formularfeld: ruhige, warme Flaeche */
.ix-satz-text {
  min-height: 88px; font-size: var(--fs-m); line-height: var(--lh-relaxed); resize: vertical;
  background: #fbfaf7; border-color: #e3ddd0; border-radius: var(--r-xs); padding: var(--sp-2) var(--sp-3);
}
.ix-satz-text:hover { border-color: var(--ds-border-strong); }
.ix-satz-text:focus { background: var(--ds-bg-surface); }
.ix-satz-zaehler { align-self: flex-end; font-size: var(--fs-xs); color: var(--ds-text-3); }

/* Ampel als Ampel: Gehaeuse mit drei Lampen, rechts die Einschaetzungen */
.ix-ampel { display: flex; align-items: stretch; gap: var(--sp-5); margin-bottom: var(--sp-4); }
.ix-ampel-geh {
  display: flex; flex-direction: column; justify-content: space-around; align-items: center; gap: 6px;
  width: 52px; padding: 8px 0; flex-shrink: 0; border-radius: 14px;
  background: linear-gradient(180deg, #2b3138, #1c2127); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(19, 26, 33, 0.25);
}
.ix-lampe {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.ix-lampe--bad { background: #4a2526; }
.ix-lampe--warn { background: #4a3d1f; }
.ix-lampe--ok { background: #1f3d2e; }
.ix-lampe--bad.is-an { background: radial-gradient(circle at 40% 35%, #ff8a80, #e5484d 60%); box-shadow: 0 0 12px 2px rgba(229, 72, 77, 0.65); }
.ix-lampe--warn.is-an { background: radial-gradient(circle at 40% 35%, #ffe08a, #e0a020 60%); box-shadow: 0 0 12px 2px rgba(224, 160, 32, 0.65); }
.ix-lampe--ok.is-an { background: radial-gradient(circle at 40% 35%, #8af0bd, #2fa36b 60%); box-shadow: 0 0 12px 2px rgba(53, 179, 126, 0.6); }
.ix-ampel-opts { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.ix-ampel-opts .ix-opt { margin: 0; align-items: center; }
.ix-opt--ok:has(input:checked) { background: var(--ds-ok-soft); border-color: var(--ds-ok); }
.ix-opt--warn:has(input:checked) { background: var(--ds-warn-soft); border-color: var(--ds-warn); }
.ix-opt--bad:has(input:checked) { background: var(--ds-bad-soft); border-color: var(--ds-bad); }
.ix-ber.ix-app { container-type: inline-size; container-name: ixber; }
@container ixber (max-width: 1000px) {
  .ix-gliederung { width: 210px; }
  .ix-seite { padding: var(--sp-8) var(--sp-6); }
}

/* ================= Ergebnisansicht ================= */
.ixr { max-width: 920px; margin: 0 auto; padding: var(--sp-6) var(--sp-6) 0; box-sizing: border-box; width: 100%; }
.ixr-karte { background: var(--ds-bg-surface); border: var(--bd); border-radius: var(--r-l); box-shadow: var(--sh-2); overflow: hidden; }
.ixr-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-5); padding: var(--sp-5) var(--sp-6) var(--sp-4); }
.ixr-titel { margin: 4px 0 0; font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); color: var(--ds-text); }
.ixr-sitzung { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ixr-sitzung strong { font-size: var(--fs-l); font-weight: var(--fw-semibold); }
.ixr-bericht { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-5); padding: 0 var(--sp-6) var(--sp-5); border-bottom: var(--bd-subtle); }
.ixr-seite { background: var(--ds-bg-subtle); border: var(--bd-subtle); border-left: 3px solid var(--ds-border-strong); border-radius: var(--r-s); padding: var(--sp-4) var(--sp-5); }
.ixr-saetze { margin: var(--sp-2) 0 0; padding-left: 22px; font-size: var(--fs-m); line-height: var(--lh-relaxed); color: var(--ds-text); }
.ixr-saetze li { margin-bottom: var(--sp-2); }
.ixr-leer { margin: var(--sp-2) 0 0; font-size: var(--fs-m); color: var(--ds-bad-text); font-weight: var(--fw-semibold); }
.ixr-ampel { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: var(--bd-subtle); }
.ixr-ampel p { margin: var(--sp-2) 0 0; font-size: var(--fs-m); line-height: var(--lh-base); color: var(--ds-text-2); }
.ixr-kern ul { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.ixr-kern li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: 7px 0; border-top: var(--bd-subtle); }
.ixr-kern li:first-child { border-top: 0; }
.ixr-kern .ds-state { white-space: normal; font-size: var(--fs-s); color: var(--ds-text); align-items: baseline; }
.ixr-kern .ds-state::before { transform: translateY(-1px); }
.ixr-kern-z { font-size: var(--fs-xs); color: var(--ds-text-3); white-space: nowrap; }
.ixr-chronik { list-style: none; margin: 0; padding: var(--sp-2) var(--sp-6) var(--sp-3); }
.ixr-zeile {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: 9px 0; border-top: var(--bd-subtle);
  font-size: var(--fs-m); line-height: var(--lh-base); color: var(--ds-text-2);
}
.ixr-zeile:first-child { border-top: 0; }
.ixr-zeile-punkt { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--ds-gray-400); }
.ixr-zeile--ok .ixr-zeile-punkt { background: var(--ds-ok); }
.ixr-zeile--warn .ixr-zeile-punkt { background: var(--ds-warn); }
.ixr-zeile--bad .ixr-zeile-punkt { background: var(--ds-bad); }
.ixr-zeile--bad { color: var(--ds-text); }
.ixr-fuss {
  display: flex; justify-content: flex-end; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6); border-top: var(--bd-subtle); background: var(--ds-bg-subtle);
}
.ixr-fuss [hidden] { display: none; }

/* ================= Zwei Fenster nebeneinander (Container wz) ================= */
/* Informationsregister: Reiter verdichten (Bogennummer entfaellt), notfalls rollt die Leiste */
@container wz (max-width: 760px) {
  .ix-tabs { padding: 0 var(--sp-2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .ix-tabs .ds-tab { flex-shrink: 0; padding: 0 var(--sp-2); }
  .ix-tabs .ix-rt { display: none; }
}
/* Detailpanel: schmaler. Das leere Panel entfaellt bis 1400 px, die Liste hat dann die volle Breite.
   Was die Tabelle weglaesst (Rang, Gruppe, bei offenem Panel auch Land), steht oben im Panel. */
@container wz (max-width: 980px) {
  .ix-panel { width: 320px; }
  .ix-panel-kopf { padding: var(--sp-3) var(--sp-4) var(--sp-2); }
  .ix-panel-tags { padding: var(--sp-1) var(--sp-4) var(--sp-3); }
  .ix-panel-body { padding: 0 var(--sp-4) var(--sp-4); }
  .ix-entscheid { padding: var(--sp-3) var(--sp-4) var(--sp-1); }
  .ix-table th:nth-child(2), .ix-table td:nth-child(2),
  .ix-table th:nth-child(4), .ix-table td:nth-child(4) { display: none; }
  .ix-body:has(.ix-panel-kopf) .ix-table th:nth-child(3), .ix-body:has(.ix-panel-kopf) .ix-table td:nth-child(3) { display: none; }
  .ix-svc { max-width: 200px; }
  .ix-sek-kopf { padding: var(--sp-2) var(--sp-4); }
  .ix-table th:first-child, .ix-table td:first-child { padding-left: var(--sp-4); }
  .ix-kette { padding: var(--sp-2) var(--sp-4) var(--sp-4); }
}
/* Liste neben offenem Panel: Leistungsbeschreibung kuerzer, damit die Bewertung sichtbar bleibt */
@container wz (max-width: 820px) {
  .ix-body:has(.ix-panel-kopf) .ix-svc { max-width: 120px; }
  .ix-table thead th:first-child { white-space: normal; line-height: var(--lh-snug); padding-top: 4px; padding-bottom: 4px; }
}
/* Mit offenem Panel entfaellt die Spalte Anzeige frueher; sie steht im Panel unter Kette und Zugriff */
@container wz (max-width: 1400px) {
  .ix-body:has(.ix-panel-kopf) .ix-c-anz { display: none; }
  .ix-panel:has(> .ds-empty-v3) { display: none; }
}
@container wz (max-width: 1250px) {
  .ix-body:has(.ix-panel-kopf) .ix-table th:nth-child(2), .ix-body:has(.ix-panel-kopf) .ix-table td:nth-child(2),
  .ix-body:has(.ix-panel-kopf) .ix-table th:nth-child(4), .ix-body:has(.ix-panel-kopf) .ix-table td:nth-child(4) { display: none; }
}
/* Sehr schmal: Panel unter der Liste (wie der Lesebereich unten im Posteingang), es rollt als
   Ganzes; die Liste hat wieder die volle Breite, Land steht wieder in der Tabelle. */
@container wz (max-width: 720px) {
  .ix-body { flex-direction: column; }
  .ix-main { flex: 1 1 0; min-height: 120px; }
  .ix-panel {
    width: auto; flex: 0 0 auto; max-height: 58%; overflow-y: auto;
    border-left: 0; border-top: 1px solid var(--ds-border);
    box-shadow: 0 -6px 12px -10px rgba(19, 26, 33, 0.25);
  }
  .ix-panel-body { flex: none; overflow: visible; }
  .ix-entscheid { box-shadow: none; }
  .ix-body:has(.ix-panel-kopf) .ix-table th:nth-child(3), .ix-body:has(.ix-panel-kopf) .ix-table td:nth-child(3) { display: table-cell; }
  .ix-svc, .ix-body:has(.ix-panel-kopf) .ix-svc { max-width: 260px; }
  /* Vertrag und Rueckmeldung: weniger Rand um das Blatt */
  .ix-doc { padding: var(--sp-3); }
  .ix-blatt { padding: var(--sp-4); }
  .ix-blatt-kopf { flex-wrap: wrap; align-items: flex-start; gap: var(--sp-3); }
  .ix-blatt-titel { flex: 1 1 200px; }
  .ix-blatt-titel strong { font-size: var(--fs-l); }
  .ix-vertrag-dl { grid-template-columns: 140px minmax(0, 1fr); column-gap: var(--sp-3); }
  .ix-brief-tisch { padding: var(--sp-4) var(--sp-3); }
  .ix-brief { padding: var(--sp-5) var(--sp-4) var(--sp-6); }
}
@container wz (max-width: 600px) {
  .ix-svc, .ix-body:has(.ix-panel-kopf) .ix-svc { max-width: 150px; }
}

/* API-Monitoring: Endpunkttabelle rollt seitlich statt abzuschneiden, Namen brechen um */
.ix-mkarte:has(> .ix-dienste) { overflow-x: auto; }
.ix-dienste td .ds-state { white-space: normal; align-items: baseline; }
.ix-dienste td .ds-state::before { transform: translateY(-1px); }
.ix-dienste td:first-child { min-width: 190px; }
.ix-dienste tbody td { padding-top: 6px; padding-bottom: 6px; }
@container wz (max-width: 1000px) {
  .ix-dienste th:nth-child(2), .ix-dienste td:nth-child(2) { display: none; }
  .ix-charts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .ix-mkpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
/* Endpunkt-Navigation als waagerechte Leiste ueber dem Inhalt (Eintraege ohne Symbol und title) */
@container wz (max-width: 760px) {
  .ix-mon-body { flex-direction: column; }
  .ix-mon-nav { width: auto; flex: none; overflow: visible; border-right: 0; border-bottom: 1px solid var(--ds-dk-border); }
  .ix-mon-nav .ds-navlist { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: var(--sp-2); }
  .ix-mon-nav .ds-navhead { display: none; }
  .ix-mon-nav .ds-navitem { flex: 1 1 220px; width: auto; min-height: 32px; }
  .ix-mon-nav .ds-navitem:first-child { flex: 0 0 auto; }
  .ix-mon-nav .ix-mon-ep { padding-top: 5px; padding-bottom: 5px; align-items: center; }
  .ix-mon-nav .ix-mon-dot { margin-top: 0; }
  .ix-mon-nav .ix-mon-ep-p { display: none; }
  .ix-mon-nav .ds-navitem-n { margin-top: 0; }
  .ix-mon-main { flex: 1; min-height: 0; }
  .ix-mkpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
/* Fehlerrate und Latenz stehen auf der Seite des Endpunkts */
@container wz (max-width: 900px) {
  .ix-dienste th:nth-child(6), .ix-dienste td:nth-child(6),
  .ix-dienste th:nth-child(7), .ix-dienste td:nth-child(7) { display: none; }
}
@container wz (max-width: 640px) {
  .ix-mon-seite { padding: var(--sp-3) var(--sp-4) var(--sp-5); gap: var(--sp-3); }
  .ix-api-unten { padding: var(--sp-3) var(--sp-4); }
  .ix-api-dl { grid-template-columns: 120px minmax(0, 1fr); }
  .ix-einordnung { padding: var(--sp-3) var(--sp-4) var(--sp-2); }
  .ix-dienste td:first-child { min-width: 140px; }
  /* Vier Kacheln der Endpunktseite als 2 x 2 statt 3 + 1 */
  .ix-mkpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Quartalsbericht: Gliederung als Leiste ueber dem Blatt, Blatt mit weniger Rand */
@container wz (max-width: 820px) {
  .ix-ber-body { flex-direction: column; }
  .ix-gliederung { width: auto; flex: none; overflow: visible; border-right: 0; border-bottom: 1px solid #e8e3d8; }
  .ix-gliederung .ds-navlist { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: var(--sp-2) var(--sp-3); }
  .ix-gliederung .ds-navhead { display: none; }
  .ix-gliederung .ds-navitem { width: auto; flex: 0 1 auto; }
  .ix-gl-offen { padding: 0 var(--sp-3) var(--sp-2); }
  .ix-tisch { flex: 1 1 0; min-height: 0; padding: var(--sp-4) var(--sp-3) var(--sp-8); }
  .ix-seite { padding: var(--sp-6) var(--sp-5); }
  .ix-seite-kopf h2 { font-size: var(--fs-xl); }
  .ix-kennzahlen { gap: var(--sp-2) var(--sp-5); }
  .ix-ampel { gap: var(--sp-3); }
}
