/* DER KI HUB IN DER GESTALT VON SCALIENTO (itm-741).

   WUNSCH VON MARTIN, 07.10.2026: „unsere Console sollte auch im Stil der neuen iframes sein, also stark angepasst an
   Scaliento. Zumindest die KI-Hub-Seite, weil dort sind ja auch die Masken für Ticket drin und LIA usw. … Core, Wissen und
   Workflows kann so bleiben." Und dazu: „Wenn wir dann etwas an den Seiten im Ticketsystem oder im KI Hub ändern, dann
   sollte das eh dasselbe sein, was wir im iframe ausliefern."

   DARAUS FOLGEN ZWEI REGELN FÜR DIESE DATEI:

   1. WO ES EINE SEITE IM RAHMEN GIBT, ZEIGT DIE KONSOLE DIESELBE (ScalientoAnsicht.razor, scaliento-rahmen.js/-css). Diese
      Datei zeichnet sie NICHT nach — sie gibt der Konsole nur den Grund, auf dem `.sr` dann so steht wie im Rahmen.
   2. FÜR ALLES ANDERE IM KI HUB (Persona, Dienste, Postfach, Masken …) dieselben Werte wie `scaliento-rahmen.css`: Open Sans,
      Navy #292D5B, heller grauer Grund #E9E9EC, weisse fast eckige Karten, Tabellen mit Navy-Kopf, Pillen in Scalientos
      Farben. Orange (#F08A1C) gehört wie im Rahmen LIA — die KI, nicht der Knopf.

   WIE DER BEREICH ERKANNT WIRD: MainLayout schreibt `data-bereich` an `.shell` (aus `Bereiche.Von`, derselben Zuordnung wie
   das Menü). Alles hier hängt an `[data-bereich="apps"]` (Legacy). Tools (`kihub`) trug die Gestalt
   vom 27. bis 29.10.2026 mit und hat seitdem wieder die der übrigen Konsole (Martin: „das layout von Tools wird wieder auf das
   moderne angepasst").

   WIE ES WIRKT: zuerst über die TOKEN. Fast jede Regel der Konsole nimmt `var(--…)`; werden sie innerhalb der Schale neu
   gesetzt, folgen Tabellen, Masken und Karten ohne eine Zeile Markup. Danach die Stellen, an denen Scaliento eine andere FORM
   hat als die Konsole (Leiste, Tabellenkopf, Knöpfe, Pillen).

   IMMER HELL, auch wenn die Konsole dunkel eingestellt ist: Scaliento kennt keinen dunklen Modus, und der KI Hub soll aussehen
   wie Scaliento. Die Token stehen deshalb an der Schale und schlagen die des Dunkelmodus an `:root`.

   Die Masse sind die gemessenen von Scaliento: Kopfleiste #292D5B 42 px, Kartentitel 22 px leicht, Text 14 px, Einträge der
   Seitenleiste 13 px; Schriftraster 12/13/14/16/18/22/28/38. */

.shell[data-bereich="apps"] {
    color-scheme: light;

    --paper: #E9E9EC;
    --surface: #FFFFFF;
    --surface-2: #F1F1F4;
    --surface-3: #E3E4EB;
    --line: #D9DAE2;
    --line-soft: #ECEDF1;
    --ink: #1F2240;
    --ink-2: #3E4360;
    --ink-3: #5A5F7A;
    --brand: #292D5B;
    --on-brand: #FFFFFF;
    --accent: #F08A1C;
    --accent-soft: #FEF3E7;
    --accent-ink: #B65A06;
    --on-accent: #1F2240;
    --ok: #1F9A3A;
    --ok-soft: #E6F4E9;
    --warn: #B65A06;
    --warn-soft: #FEF3E7;
    --stop: #C4201A;
    --stop-soft: #FCE9E8;
    --draft: #292D5B;
    --draft-soft: #ECEDF5;

    /* DIE ALIASE NOCH EINMAL: Sie sind an `:root` schon zu Werten aufgelöst und folgten den neuen Token sonst nicht. */
    --navy: #292D5B;
    --navy-soft: #30356B;
    --navy-hover: #30356B;
    --orange: #F08A1C;
    --canvas: var(--paper);
    --surface-rail: #FFFFFF;
    --sunken: #FFFFFF;
    --hover: #F6F6FA;
    --border: #D9DAE2;
    --border-strong: #C6C8D4;
    --ink-muted: #3E4360;
    --ink-faint: #5A5F7A;
    --danger: #C4201A;
    --danger-soft: #FCE9E8;

    /* OPEN SANS wie Scaliento und die Seiten im Rahmen; die Konsole bleibt sonst bei Inter. */
    --font-ui: "Open Sans", "Segoe UI", Arial, sans-serif;

    /* DAS SCHRIFTRASTER VON SCALIENTO: 12/13/14/16/18/22/28/38 — nichts unter 12, Text 14. */
    --t-h1: 28px;
    --lh-h1: 34px;
    --t-h2: 22px;
    --lh-h2: 28px;
    --t-h3: 16px;
    --lh-h3: 22px;
    --t-body: 14px;
    --lh-body: 20px;
    --t-ui: 14px;
    --lh-ui: 20px;
    --t-sm: 13px;
    --lh-sm: 18px;
    --t-xs: 12px;
    --lh-xs: 16px;
    --t-2xs: 12px;
    --lh-2xs: 16px;
    --t-zahl: 22px;

    /* FELDER UND KNÖPFE IN SCALIENTOS HÖHE. */
    --h-control: 40px;
    --h-btn: 40px;
    --h-btn-sm: 32px;

    /* FAST ECKIG, WIE SCALIENTO: Karten 3 px, Felder 3 px; Pillen bleiben rund. */
    --r-sm: 2px;
    --r-md: 3px;
    --r-lg: 3px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 18px -10px rgba(31, 34, 64, .28);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, .08), 0 18px 40px -18px rgba(31, 34, 64, .38);

    --topbar: 42px;

    font-family: var(--font-ui);
    font-size: var(--t-body);
    line-height: var(--lh-body);
    color: var(--ink);
    background: var(--paper);
    font-variant-numeric: tabular-nums;
}

/* ========================= DIE KOPFLEISTE: Scalientos Navy, 42 px ========================= */

.shell[data-bereich="apps"] > .bar {
    height: 42px;
    background: #292D5B;
    border-bottom: 0;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] > .bar .path,
.shell[data-bereich="apps"] > .bar .path a,
.shell[data-bereich="apps"] > .bar .path b,
.shell[data-bereich="apps"] > .bar .path span {
    color: #FFFFFF;
    font-size: 13px;
}

.shell[data-bereich="apps"] > .bar .path a {
    color: #C9CCE6;
}

.shell[data-bereich="apps"] > .bar .path a:hover {
    color: #FFFFFF;
}

.shell[data-bereich="apps"] > .bar .sep {
    background: rgba(255, 255, 255, .22);
    margin: 10px 2px;
}

/* DIE WERKZEUGE DER LEISTE (Menügriff, Rückgängig, Hilfe): hell auf Navy, ohne Platte. */
.shell[data-bereich="apps"] > .bar button.ghost,
.shell[data-bereich="apps"] > .bar .schritte > summary {
    height: 30px;
    background: transparent;
    border-color: transparent;
    color: #FFFFFF;
    font-size: 13px;
}

.shell[data-bereich="apps"] > .bar button.ghost:hover,
.shell[data-bereich="apps"] > .bar .schritte > summary:hover {
    background: rgba(255, 255, 255, .14);
    color: #FFFFFF;
}

.shell[data-bereich="apps"] > .bar button:disabled {
    background: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, .45);
}

/* DIE HILFE BLEIBT ORANGE — als Glyph auf Navy die hellere Stufe, damit sie lesbar bleibt. */
.shell[data-bereich="apps"] > .bar .hilfegriff,
.shell[data-bereich="apps"] > .bar .hilfegriff:hover {
    color: #F7A54A;
    border-color: transparent;
}

.shell[data-bereich="apps"] > .bar .hilfegriff[aria-expanded="true"] {
    background: rgba(240, 138, 28, .22);
}

/* DER UMSCHALTER DER BEREICHE: Reiter in der Leiste wie Scalientos Kopfmenü — hell, der aktive mit weisser Kante unten. */
.shell[data-bereich="apps"] > .bar .bereichswahl {
    align-self: stretch;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.shell[data-bereich="apps"] > .bar .bereichswahl a {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    border-radius: 0;
    color: #C9CCE6;
    font-size: 13px;
}

.shell[data-bereich="apps"] > .bar .bereichswahl a:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, .08);
}

.shell[data-bereich="apps"] > .bar .bereichswahl a.on {
    background: transparent;
    box-shadow: inset 0 -3px 0 #FFFFFF;
    color: #FFFFFF;
    font-weight: 600;
}

/* DAS KONTO: Kürzel hell auf Navy; die Klappe darunter bleibt eine weisse Karte. */
.shell[data-bereich="apps"] > .bar .who {
    color: #FFFFFF;
    font-size: 13px;
}

.shell[data-bereich="apps"] > .bar .who .av {
    background: #FFFFFF;
    color: #292D5B;
}

.shell[data-bereich="apps"] > .bar .konto > .klappe {
    color: var(--ink);
}

/* ========================= DIE LINKE SPALTE: Scalientos Seitenleiste =========================
   Weiss, Einträge 13 px, der aktive mit Navy-Kante links und hellem Grund. Die Selektoren hängen an den Klassen der
   Bauteile (`.pane.left`, `nav h4`, `.node`, `.menuegruppe`) und nicht an Texten oder Adressen — das Menü wird umbenannt. */

.shell[data-bereich="apps"] .pane.left {
    background: #FFFFFF;
    border-right: 0;
    box-shadow: 1px 0 2px rgba(0, 0, 0, .06);
    padding: 14px 10px 32px;
}

.shell[data-bereich="apps"] .pane.left .brand {
    padding: 6px 8px 18px;
}

.shell[data-bereich="apps"] .pane.left .brand img {
    width: 132px;
    background: none;
    padding: 0;
}

.shell[data-bereich="apps"] .pane.left .product {
    font-size: 13px;
    font-weight: 600;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.left .tenant {
    border-color: var(--line);
    border-radius: 2px;
    background: #F6F6FA;
}

.shell[data-bereich="apps"] .pane.left .tenant b {
    font-size: 13px;
}

.shell[data-bereich="apps"] .pane.left .tenant em {
    font-size: 12px;
}

.shell[data-bereich="apps"] .pane.left nav h4 {
    margin: 18px 0 4px;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.left nav h4:first-child,
.shell[data-bereich="apps"] .pane.left nav .menuegruppe:first-of-type > summary h4 {
    margin-top: 0;
}

.shell[data-bereich="apps"] .pane.left nav .menuegruppe + .menuegruppe > summary h4 {
    margin-top: 12px;
}

.shell[data-bereich="apps"] .pane.left nav .menuegruppe > summary:hover h4 {
    background: #F6F6FA;
}

.shell[data-bereich="apps"] .pane.left nav .menuegruppe > summary:focus-visible {
    outline: 2px solid #292D5B;
}

.shell[data-bereich="apps"] .pane.left .node {
    min-height: 34px;
    margin: 0;
    padding: 0 8px 0 14px;
    border-left: 0;
    border-radius: 0;
    color: #3E4360;
    font-size: 13px;
}

.shell[data-bereich="apps"] .pane.left .node:hover {
    background: #F6F6FA;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.left .node.active {
    background: #EEF0F7;
    color: #292D5B;
    font-weight: 600;
}

.shell[data-bereich="apps"] .pane.left .node.active::before {
    left: 0;
    inset-block: 0;
    width: 3px;
    border-radius: 0;
    background: #292D5B;
}

.shell[data-bereich="apps"] .pane.left .node .n,
.shell[data-bereich="apps"] .pane.left .node .zaehler {
    font-size: 12px;
}

.shell[data-bereich="apps"] .pane.left .node .zaehler {
    border-radius: 9px;
    background: #E3E4EB;
    color: #3E4360;
}

.shell[data-bereich="apps"] .pane.left .node.active .zaehler {
    background: #292D5B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] .pane.left .bereich,
.shell[data-bereich="apps"] .pane.left .dotlegend {
    font-size: 12px;
}

.shell[data-bereich="apps"] .pane.left .newbtn {
    border-radius: 2px;
    font-size: 13px;
}

/* ========================= DIE MITTE: Scalientos Inhaltsbereich ========================= */

.shell[data-bereich="apps"] .pane.mid {
    padding: 22px 32px 48px;
    background: #E9E9EC;
}

.shell[data-bereich="apps"] .pane.mid h1:not(.sr *, .lk *) {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 300;
    letter-spacing: -.005em;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.mid h2:not(.sr *, .lk *) {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 300;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.mid h3:not(.sr *, .lk *) {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: #1F2240;
}

.shell[data-bereich="apps"] .pane.mid .lead {
    font-size: 14px;
    color: #3E4360;
}

.shell[data-bereich="apps"] .pane.mid .help,
.shell[data-bereich="apps"] .pane.right .help {
    font-size: 13px;
    line-height: 18px;
    color: #5A5F7A;
}

.shell[data-bereich="apps"] .pane.mid .meta {
    font-size: 13px;
    color: #5A5F7A;
}

.shell[data-bereich="apps"] .pane.mid a:not(.button):not(.chip):not(.node):not(.sr *, .lk *) {
    color: #292D5B;
}

/* ---------- Karten: weiss, fast eckig, ohne Rand, mit Scalientos leichtem Schatten ---------- */

.shell[data-bereich="apps"] .pane.mid .card {
    border: 0;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    padding: 20px 22px 22px;
}

.shell[data-bereich="apps"] .pane.mid .card > h2:first-child:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid .card > :first-child > h2:first-child:not(.sr *, .lk *) {
    margin-top: 0;
}

/* ---------- Tabellen: Kopf in Navy, 14 px hell; Zeilen ab 44 px, weiss mit feiner Linie — wie `.sr-tabelle` ---------- */

.shell[data-bereich="apps"] .pane.mid table.changes,
.shell[data-bereich="apps"] .pane.mid table.liste,
.shell[data-bereich="apps"] .pane.mid .liste > table,
.shell[data-bereich="apps"] .pane.mid .table-scroll > table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    font-size: 14px;
}

.shell[data-bereich="apps"] .pane.mid table.changes th,
.shell[data-bereich="apps"] .pane.mid table.liste th,
.shell[data-bereich="apps"] .pane.mid .liste > table th,
.shell[data-bereich="apps"] .pane.mid .table-scroll > table th {
    height: 40px;
    padding: 0 12px;
    background: #292D5B;
    border: 0;
    color: #F2F2F2;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.shell[data-bereich="apps"] .pane.mid table.changes th a:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid table.liste th a:not(.sr *, .lk *) {
    color: #F2F2F2 !important;
}

.shell[data-bereich="apps"] .pane.mid table.changes td,
.shell[data-bereich="apps"] .pane.mid table.liste td,
.shell[data-bereich="apps"] .pane.mid .liste > table td,
.shell[data-bereich="apps"] .pane.mid .table-scroll > table td {
    height: 44px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #ECEDF1;
    color: #3E4360;
    font-size: 14px;
    line-height: 1.35;
    vertical-align: middle;
}

.shell[data-bereich="apps"] .pane.mid table.changes tbody tr:nth-child(even) td,
.shell[data-bereich="apps"] .pane.mid table.liste tbody tr:nth-child(even) td {
    background: #FAFAFC;
}

.shell[data-bereich="apps"] .pane.mid table.changes tbody tr:hover td,
.shell[data-bereich="apps"] .pane.mid table.liste tbody tr:hover td {
    background: #EEF0F7;
}

/* EINE TABELLE IN EINER KARTE läuft bis an deren Rand, wie im Rahmen — der Navy-Kopf ist sonst ein Streifen mit Luft daneben. */
.shell[data-bereich="apps"] .pane.mid .card > table.changes,
.shell[data-bereich="apps"] .pane.mid .card > form > table.changes,
.shell[data-bereich="apps"] .pane.mid .card > .table-scroll {
    width: calc(100% + 44px);
    max-width: none;
    margin-left: -22px;
    margin-right: -22px;
}

.shell[data-bereich="apps"] .pane.mid .card > table.changes:last-child,
.shell[data-bereich="apps"] .pane.mid .card > .table-scroll:last-child {
    margin-bottom: -22px;
}

.shell[data-bereich="apps"] .pane.mid .card > table.changes th:first-child,
.shell[data-bereich="apps"] .pane.mid .card > table.changes td:first-child,
.shell[data-bereich="apps"] .pane.mid .card > form > table.changes th:first-child,
.shell[data-bereich="apps"] .pane.mid .card > form > table.changes td:first-child {
    padding-left: 22px;
}

/* ---------- Formulare: Felder 40 px, Rand #C6C8D4, fast eckig; Labels 14 px ---------- */

.shell[data-bereich="apps"] .pane.mid label:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.right label:not(.sr *, .lk *) {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #3E4360;
}

.shell[data-bereich="apps"] .pane.mid label:has(> input[type="checkbox"]):not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid label:has(> input[type="radio"]):not(.sr *, .lk *) {
    font-weight: 400;
    color: #1F2240;
}

.shell[data-bereich="apps"] .pane.mid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid textarea:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid select:not(.sr *, .lk *) {
    min-height: 40px;
    padding-inline: 12px;
    border: 1px solid #C6C8D4;
    border-radius: 3px;
    background: #FFFFFF;
    color: #1F2240;
    font-size: 14px;
}

.shell[data-bereich="apps"] .pane.mid textarea:not(.sr *, .lk *) {
    padding-block: 9px;
    line-height: 1.5;
}

.shell[data-bereich="apps"] .pane.mid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid textarea:hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid select:hover:not(.sr *, .lk *) {
    border-color: #9EA1B5;
}

.shell[data-bereich="apps"] .pane.mid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid textarea:focus:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid select:focus:not(.sr *, .lk *) {
    border-color: #292D5B;
    outline: 2px solid rgba(41, 45, 91, .18);
    outline-offset: 0;
}

.shell[data-bereich="apps"] .pane.mid input[type="checkbox"]:not(.sr *, .lk *),
.shell[data-bereich="apps"] .pane.mid input[type="radio"]:not(.sr *, .lk *) {
    accent-color: #292D5B;
}

.shell[data-bereich="apps"] .pane.mid .field {
    margin-bottom: 18px;
}

/* PFLICHTFELDER tragen ein Sternchen wie in Scaliento — aus `required` gelesen, nicht von Hand gesetzt. */
.shell[data-bereich="apps"] .pane.mid .field:has(> input[required], > textarea[required], > select[required]) > label::after {
    content: " *";
    color: #C4201A;
    font-weight: 600;
}

.shell[data-bereich="apps"] .pane.mid .form-error {
    border-radius: 2px;
    border-left: 3px solid #C4201A;
    background: #FCE9E8;
    color: #9B1712;
    font-size: 14px;
}

.shell[data-bereich="apps"] .pane.mid .validation-message {
    font-size: 13px;
}

/* ---------- Knöpfe: Scalientos Navy-Knopf, daneben der weisse mit Rand ----------
   DER EINFACHE KNOPF EINER MASKE IST IHR PRIMÄRKNOPF (Speichern, Senden, Anlegen) — im Rahmen ist das `.sr-knopf`, Navy, ohne
   Kante in Orange. `ghost` ist der zweite Rang (`.sr-knopf.o`), `caution`/`danger` behalten ihre Bedeutung.
   NUR DIE KNÖPFE DER KONSOLE SELBST: ohne eigene Klasse oder mit einer ihrer Rangklassen. Ein Knopf mit einer Bauteilklasse
   (der Haken einer Aufgabe, ein Symbolknopf) behält seine Form und bekommt nur die Farben über die Token. */

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button:not([class]):not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button:is(.primary, .ghost, .compact, .caution, .danger):not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button:not(.sr *, .lk *) {
    height: 40px;
    padding: 0 20px;
    border: 1px solid #292D5B;
    border-radius: 2px;
    background: #292D5B;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button:not([class]):hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button:is(.primary, .ghost, .compact, .caution, .danger):hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button:hover:not(.sr *, .lk *) {
    background: #30356B;
    border-color: #30356B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.ghost:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.ghost:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.ghost:not(.sr *, .lk *) {
    background: #FFFFFF;
    border-color: #C6C8D4;
    color: #292D5B;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.ghost:hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.ghost:hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.ghost:hover:not(.sr *, .lk *) {
    background: #F6F6FA;
    border-color: #9EA1B5;
    color: #292D5B;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.compact:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.compact:not(.sr *, .lk *) {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.caution:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.caution:not(.sr *, .lk *) {
    background: #FFFFFF;
    border-color: #C4201A;
    color: #C4201A;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.caution:hover:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.caution:hover:not(.sr *, .lk *) {
    background: #FCE9E8;
    color: #9B1712;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button.danger:not(.sr *, .lk *),
.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) a.button.danger:not(.sr *, .lk *) {
    background: #C4201A;
    border-color: #C4201A;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] :is(.pane.mid, .pane.right) button:disabled:not(.sr *, .lk *) {
    opacity: .55;
    cursor: default;
}

/* ---------- Chips und Laschen: wie die Filter im Rahmen (`.sr-flt`) ---------- */

.shell[data-bereich="apps"] .pane.mid .chip {
    height: 32px;
    padding: 0 14px;
    border: 1px solid #C6C8D4;
    border-radius: 16px;
    background: #FFFFFF;
    color: #3E4360;
    font-size: 14px;
    text-decoration: none;
}

.shell[data-bereich="apps"] .pane.mid .chip:hover {
    border-color: #292D5B;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.mid .chip.on,
.shell[data-bereich="apps"] .pane.mid .chip.on:hover {
    background: #292D5B;
    border-color: #292D5B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] .pane.mid .laschen {
    gap: 0;
    margin: 0 0 18px;
    border-bottom: 1px solid #D9DAE2;
}

.shell[data-bereich="apps"] .pane.mid .laschen > a:not(.sr *, .lk *) {
    padding: 10px 16px;
    border-bottom: 3px solid transparent;
    color: #3E4360;
    font-size: 14px;
    font-weight: 400;
}

.shell[data-bereich="apps"] .pane.mid .laschen > a:hover:not(.sr *, .lk *) {
    color: #292D5B;
    border-bottom-color: #C6C8D4;
}

.shell[data-bereich="apps"] .pane.mid .laschen > a.on:not(.sr *, .lk *) {
    color: #292D5B;
    font-weight: 600;
    border-bottom-color: #292D5B;
}

/* ---------- Pillen: Scalientos Statusfarben (`.sr-pill`) ---------- */

.shell[data-bereich="apps"] .zustand {
    height: 22px;
    padding: 0 10px;
    border: 0;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
}

.shell[data-bereich="apps"] .zustand::before {
    display: none;
}

.shell[data-bereich="apps"] .zustand.gut {
    background: #1F9A3A;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] .zustand.offen {
    background: #F2B632;
    color: #3A2A00;
}

.shell[data-bereich="apps"] .zustand.warn,
.shell[data-bereich="apps"] .zustand.steht {
    background: #E0251B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] .zustand.neutral {
    background: #E3E4EB;
    color: #3E4360;
}

/* „NEU" HEISST IN DER KONSOLE MEIST: DIE KI WAR ES („von der KI gesetzt", „KI-Entwurf", „mit KI") — dann LIAs Abzeichen. */
.shell[data-bereich="apps"] .zustand.neu {
    background: #FEF3E7;
    color: #B65A06;
    box-shadow: inset 0 0 0 1px #F7C99A;
}

/* Die Pillen des Ticketsystems genau wie in der Liste im Rahmen. */
.shell[data-bereich="apps"] .tk-pille {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border: 0;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.shell[data-bereich="apps"] .tk-pille.status-neu { background: #292D5B; color: #FFFFFF; }
.shell[data-bereich="apps"] .tk-pille.status-inarbeit { background: #1F9A3A; color: #FFFFFF; }
.shell[data-bereich="apps"] .tk-pille.status-wartetaufkunde { background: #6B7089; color: #FFFFFF; }
.shell[data-bereich="apps"] .tk-pille.status-erledigt { background: #FFFFFF; color: #5A5F7A; box-shadow: inset 0 0 0 1px #C6C8D4; }
.shell[data-bereich="apps"] .tk-pille.prio-dringend { background: #E0251B; color: #FFFFFF; }
.shell[data-bereich="apps"] .tk-pille.prio-hoch { background: #F2B632; color: #3A2A00; }
.shell[data-bereich="apps"] .tk-pille.prio-normal { background: #E3E4EB; color: #3E4360; }
.shell[data-bereich="apps"] .tk-pille.prio-niedrig { background: #FFFFFF; color: #5A5F7A; border: 0; box-shadow: inset 0 0 0 1px #C6C8D4; }

/* ========================= DIE RECHTE SPALTE UND DIE ZEITACHSE ========================= */

.shell[data-bereich="apps"] .pane.right {
    background: #FFFFFF;
    border-left: 0;
    box-shadow: -1px 0 2px rgba(0, 0, 0, .06);
}

.shell[data-bereich="apps"] .pane.right .wirkung > h2:not(.sr *, .lk *) {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.right .wirkung p {
    font-size: 13px;
    line-height: 18px;
}

.shell[data-bereich="apps"] .pane.right .wirkung .zahl {
    font-size: 22px;
    font-weight: 300;
    color: #292D5B;
}

.shell[data-bereich="apps"] .pane.right .wirkung .wofuer {
    font-size: 12px;
}

/* DER NÄCHSTE SCHRITT IN NAVY: Orange gehört im KI Hub der KI, nicht dem Knopf (wie im Rahmen). */
.shell[data-bereich="apps"] .naechster-schritt {
    background: #F6F6FA;
}

.shell[data-bereich="apps"] .naechster-schritt .l {
    font-size: 12px;
}

.shell[data-bereich="apps"] .naechster-schritt > a.button,
.shell[data-bereich="apps"] .naechster-schritt > button {
    background: #292D5B;
    border-color: #292D5B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] .naechster-schritt > a.button:hover,
.shell[data-bereich="apps"] .naechster-schritt > button:hover {
    background: #30356B;
    color: #FFFFFF;
}

.shell[data-bereich="apps"] > .timeline .label {
    font-size: 12px;
}

/* ========================= DIE SEITEN DES RAHMENS IN DER KONSOLE =========================
   `.sr` bringt seine Gestalt mit (scaliento-rahmen.css). In der Konsole steht es in der Mitte statt im ganzen Fenster: kein
   eigener Grund, keine eigene Höhe, kein eigener Rand — den gibt die Mitte. */

.sr.sr-konsole {
    min-height: 0;
    padding: 0;
    background: transparent;
}

.sr.sr-konsole .sr-kopf {
    margin-top: 0;
}

/* Die Laschen des Ticketsystems stehen darüber und tragen den Weg — der Titel darunter braucht keinen Abstand nach oben. */
.shell[data-bereich="apps"] .pane.mid > .tk-kopf + .sr,
.shell[data-bereich="apps"] .pane.mid > .tk-kopf {
    margin-top: 0;
}

.shell[data-bereich="apps"] .pane.mid > .tk-kopf {
    align-items: center;
    margin-bottom: 4px;
}

/* WAS DIE KONSOLE UNTER DIE GETEILTE SEITE STELLT (die Maske eines Termins) — mit Abstand, wie zwischen zwei Karten. */
.shell[data-bereich="apps"] .pane.mid > .sr + .card {
    margin-top: 16px;
}

/* DIE ZEILE DER TICKETLISTE IST EIN LINK auf das Ticket der Konsole; sie soll sich nicht wie einer anfühlen. */
.shell[data-bereich="apps"] .pane.mid .sr a.sr-zeile,
.shell[data-bereich="apps"] .pane.mid .sr a.sr-kachel,
.shell[data-bereich="apps"] .pane.mid .sr .sr-eb {
    text-decoration: none;
}

/* „Termin bearbeiten" in der Detailansicht des Kalenders (nur in der Konsole, lia-kalender.js). */
.lk-d-aktion {
    margin-top: 16px;
}

.lk-d-bearbeiten {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 2px;
    background: #292D5B;
    color: #FFFFFF !important;
    font: 600 14px/1 "Open Sans", Arial, sans-serif;
    text-decoration: none !important;
}

.lk-d-bearbeiten:hover {
    background: #30356B;
}

/* ========================= EINZELNE BAUTEILE DES KI HUB ========================= */

/* DAS KÜRZEL IM POSTFACH: hell mit Navy, wie Scalientos Rundsymbole — `--navy-soft` ist in der Konsole ein dunkler Ton. */
.shell[data-bereich="apps"] .pf-avatar {
    background: #E3E4EB;
    color: #292D5B;
}

/* „WAS LIA TUT" RECHTS NEBEN DEM GESPRÄCH steht sonst ohne Rand an der Spalte. */
.shell[data-bereich="apps"] .pane.right > .lia-aktivitaet {
    padding: 16px 16px 0;
}

/* ========================= SCHMALE FENSTER ========================= */

@media (max-width: 1100px) {
    .shell[data-bereich="apps"] .pane.mid {
        padding: 18px 16px 32px;
    }

    .shell[data-bereich="apps"] .pane.mid .card {
        padding: 16px 16px 18px;
    }

    .shell[data-bereich="apps"] .pane.mid .card > table.changes,
    .shell[data-bereich="apps"] .pane.mid .card > form > table.changes,
    .shell[data-bereich="apps"] .pane.mid .card > .table-scroll {
        width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
    }

    /* DIE SCHUBLADE (MainLayout/NavMenu, 07.10.2026) trägt Scalientos Schatten statt der feinen Kante. */
    .shell[data-bereich="apps"] .pane.left {
        box-shadow: 6px 0 24px rgba(31, 34, 64, .22);
    }
}

/* UNTER 900 PIXELN ZWEI ZEILEN (MainLayout.razor.css): Die Bereiche stehen als zweite Zeile unter der Navy-Leiste,
   in derselben Navy, mit der weissen Kante unter dem aktiven — wie Scalientos Kopfmenü. */
@media (max-width: 900px) {
    .shell[data-bereich="apps"] > .bar {
        height: auto;
    }

    .shell[data-bereich="apps"] > .bar .bereichswahl {
        height: 44px;
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, .14);
    }

    .shell[data-bereich="apps"] > .bar .bereichswahl a {
        justify-content: center;
        height: 44px;
    }

    .shell[data-bereich="apps"]:has(.bereichswahl) {
        --bar-h: calc(var(--topbar) + 44px);
    }
}
