/* skillomat Zentrale 1.15.0 · Listen für viele Einträge (ui/liste115.js) – nur Tokens des Designsystems (app.css), hell und dunkel.
   1) Jede Tabelle der Zentrale: Kopf bleibt beim Scrollen oben sichtbar (deckender Hintergrund --surface2, Trennlinie), direkt unter der
      Kopfzeile (--zhead115 aus liste115.js). Gilt, wenn die Tabelle in ihren Rahmen passt (.fit115) – sonst scrollt der Rahmen seitlich.
   2) Dichte „Kompakt“ (html[data-dichte115="kompakt"]): weniger Abstand in Tabellenzeilen, mehr Zeilen auf einen Blick.
   3) Z.liste115: feste Spaltenbreiten, Auslassung mit vollem Text im title, Sortierköpfe, Gruppen, „Mehr laden“, Karten bis 640 px. */

/* ---------- 1) Kopf beim Scrollen sichtbar ---------- */
.tablewrap.fit115 { overflow-x: clip; contain: inline-size; } /* ohne eigene Mindestbreite: passt die Tabelle nicht mehr, scrollt der Rahmen wieder (liste115.js) */
:is(.tablewrap.fit115, .l115-wrap) > table > thead th { position: sticky; top: var(--zhead115, 0px); z-index: 3; background: var(--surface2); box-shadow: inset 0 -1px 0 var(--line-strong); background-clip: padding-box; }
:is(.tablewrap.fit115, .l115-wrap).sc115 > table > thead th { top: 0; } /* in einem eigenen Scrollbereich (Dialog, Leiste) */
html[data-theme="dark"] :is(.tablewrap.fit115, .l115-wrap) > table > thead th { background: var(--surface2); color: var(--muted); }

/* ---------- 2) Dichte ---------- */
html[data-dichte115="kompakt"] :is(.tablewrap, .l115-wrap) > table > :is(thead, tbody) > tr > :is(th, td) { padding-top: 5px; padding-bottom: 5px; }
html[data-dichte115="kompakt"] .l115-t > tbody > tr > td { font-size: 13.5px; line-height: 1.4; }
html[data-dichte115="kompakt"] .l115-t .tname span { font-size: 12px; }
html[data-dichte115="kompakt"] .l115-t .pill { padding-top: 0; padding-bottom: 0; }
html[data-dichte115="kompakt"] .demo-tiles { gap: 10px; }
html[data-dichte115="kompakt"] .demo-tile.card { padding: 14px 16px; }
.l115-dens button { min-height: 34px; }

/* ---------- 3) Liste ---------- */
.l115-bar { margin-bottom: 12px; }
.l115-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.l115-chips .chip .n { margin-left: 2px; }
.l115-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.l115-wrap { overflow-x: clip; contain: inline-size; margin: 0 -22px; border-top: 1px solid var(--line); }
.card > .l115:last-child .l115-wrap:last-child, .card > .l115:last-child .l115-foot[hidden] { margin-bottom: -22px; }
.l115-t { table-layout: fixed; width: 100%; }
.l115-t > tbody > tr > td { overflow-wrap: anywhere; }
.l115-w-xs { width: 5.5rem; } .l115-w-s { width: 7.5rem; } .l115-w-m { width: 9rem; } .l115-w-l { width: 12rem; } .l115-w-xl { width: 18rem; }
html[data-dichte115="kompakt"] .l115-t :is(th, td):not(:first-child):not(:last-child) { padding-left: 10px; padding-right: 10px; }
.l115-t td.ell115 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l115-t td.ell115 > :is(b, span, a, div) { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l115-t td.ell115 > .mt0 { display: flex; gap: 4px; }
.l115-t td.ell115 > .mt0 > .pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.l115-t td.ell115 > a { display: inline-block; }
.l115-t tr.click:hover { background: var(--hover); }
.l115-t tr.click:focus-visible, .l115-t tr[tabindex="-1"]:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; }
.l115-t tr[tabindex="-1"]:focus { outline: 3px solid var(--ring); outline-offset: -3px; }
/* Sortierköpfe: Schaltfläche, Pfeil zeigt die Richtung (nicht nur Farbe), aria-sort für Vorleser */
.l115-sort { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: -6px -6px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: inherit; white-space: nowrap; max-width: calc(100% + 12px); overflow: hidden; text-overflow: ellipsis; }
.l115-sort::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
.l115-sort:focus-visible { outline: 3px solid var(--ring); outline-offset: 0; }
@media (hover: hover) { .l115-sort:hover { color: var(--ink); background: var(--hover); } }
.l115-ar { width: 14px; height: 14px; flex: none; opacity: .5; }
th[aria-sort] .l115-sort { color: var(--ink); font-weight: 600; }
th[aria-sort] .l115-ar { opacity: 1; }
th[aria-sort="ascending"] .l115-dn, th[aria-sort="descending"] .l115-up { opacity: 0; }
/* Gruppen */
.l115-gh > tr > th { padding: 0 !important; background: var(--card); border-bottom: 1px solid var(--line); position: static; }
.l115-gbtn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 22px; border: 0; background: var(--hover); color: var(--ink); font: 500 13.5px "Poppins", sans-serif; text-align: left; cursor: pointer; flex-wrap: wrap; }
.l115-gbtn:focus-visible { outline: 3px solid var(--ring); outline-offset: -3px; }
.l115-gbtn b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.l115-gn { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.l115-gi { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.l115-chev { width: 16px; height: 16px; flex: none; transition: transform 150ms var(--ease-out, ease-out); }
.l115-gbtn[aria-expanded="true"] .l115-chev { transform: rotate(90deg); }
.l115-gmore > td { text-align: center; }
.l115-gmore .btn { margin-left: 8px; }
/* Fuß: „Mehr laden“ */
.l115-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; padding-top: 14px; }
.l115-cut { display: none !important; }
/* Telefon: Karten statt Tabelle (ohne seitliches Scrollen); Sortierköpfe werden zu Schaltflächen über der Liste */
@media (max-width: 640px) {
  .l115-wrap { margin: 0 -18px; }
  .card > .l115:last-child .l115-wrap:last-child, .card > .l115:last-child .l115-foot[hidden] { margin-bottom: -18px; }
  .l115-t, .l115-t > tbody, .l115-t > tbody > tr > td, .l115-t > thead { display: block; width: auto; }
  .l115-t > colgroup { display: none; }
  .l115-t > thead > tr { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
  .l115-wrap > .l115-t > thead th { position: static !important; display: block; padding: 0 !important; background: none !important; box-shadow: none !important; border: 0; flex: none; }
  .l115-chips, .l115-group, .l115-t > thead > tr { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; max-width: 100%; }
  .l115-chips { flex: 1 1 100%; padding: 4px 2px; margin: -4px -2px; } .l115-chips > .chip, .l115-group > button { flex: none; }
  .l115-chips::-webkit-scrollbar, .l115-group::-webkit-scrollbar, .l115-t > thead > tr::-webkit-scrollbar { display: none; }
  .l115-t > thead th:not(.l115-sortable) { display: none; }
  .l115-t .l115-sort { min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--card); font-size: 13px; }
  th.num .l115-sort { flex-direction: row; }
  .l115-t > tbody > tr:not(.l115-gmore) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .l115-t > tbody > tr > td { padding: 0 !important; border: 0; min-width: 0; text-align: left; }
  .l115-t > tbody > tr > td.l115-main, .l115-t > tbody > tr > td.l115-wide, .l115-t > tbody > tr > td.empty, .l115-t > tbody > tr > td:has(> .rowacts) { grid-column: 1 / -1; }
  .l115-t > tbody > tr > td.l115-nocard { display: none; }
  .l115-t > tbody > tr > td.l115-main { order: -1; }
  .l115-t > tbody > tr > td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
  .l115-t td.ell115, .l115-t td.ell115 > :is(b, span, a, div) { white-space: normal; }
  .l115-gh > tr { display: block; } .l115-gh > tr > th { display: block; }
  .l115-gbtn { padding: 6px 18px; }
  .l115-gmore { display: block; padding: 10px 18px; }
  .l115-bar .l115-dens { order: 5; }
  .l115-bar .spacer { display: none; }
  .l115-count { order: 6; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .l115-chev { transition: none; } }
/* Mittlere Breiten: weniger wichtige Spalten ausblenden (in der Karte am Telefon wieder sichtbar) */
@media (max-width: 1460px) and (min-width: 641px) { .l115-t :is(col, th, td).l115-hm { display: none; } }
@media (max-width: 1100px) and (min-width: 641px) { .l115-t :is(col, th, td).l115-hs { display: none; } }
/* Kompakt: Kunde/Name in höchstens zwei Zeilen (Kennung und Hinweise in einer Zeile) */
html[data-dichte115="kompakt"] .l115-t td.ell115 > span + .mt0 { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
html[data-dichte115="kompakt"] .l115-t td.ell115 > span:has(+ .mt0) { display: inline; }
/* Seiten mit breiten Listen nutzen die Breite der Kopfzeile (1480 px) statt 1320 px */
main:has(.l115.l115-widepage) { max-width: 1480px; }
/* Übersicht: Kacheln je Art und Version */
.tiles115 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile115 { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); color: var(--ink); text-decoration: none; }
.tile115::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ok); }
.tile115.warn::before { background: var(--warn); } .tile115.bad::before { background: var(--bad); }
.tile115:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
@media (hover: hover) { .tile115:hover { border-color: var(--line-strong); background: var(--hover); } }
.tile115-h { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.tile115-v { font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile115-v small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.tile115 .legend { font-size: 11.5px; gap: 4px 10px; }
html[data-dichte115="kompakt"] .tile115 { padding: 10px 12px; gap: 4px; }
html[data-dichte115="kompakt"] .tile115-v { font-size: 20px; }
@media (max-width: 640px) { .tiles115 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .tile115 { padding: 12px; } .tile115-v { font-size: 20px; } }
