/* Überblick, Ressortseiten und Bereiche in Glasoptik (seit 27.10.2026). Moritz: „optisch so mit cooler glass optic“.
   Glas braucht etwas dahinter: die Glasbühne legt zarte Farbflächen in den Markentönen (Türkis, Mint, Sand) und eine
   feine Körnung unter die Seite, darauf liegen milchige Karten mit hellem Lichtrand. Ohne Transparenz-Wunsch des
   Systems werden die Karten massiv.
   Überblick seit der zweiten Fassung (Moritz: „viel zu voll … nur die wichtigsten metriken … zum durchsliden“): je
   Thema eine Folie, am Telefon zum Wischen mit Einrasten und Punkten, am Mac alle auf einmal in zwei Reihen. */

:root {
  --glas: linear-gradient(150deg, oklch(1 0 0 / 0.8), oklch(1 0 0 / 0.6));
  --glas-zart: oklch(1 0 0 / 0.56);
  --glas-schatten:
    inset 0 1px 0 oklch(1 0 0 / 0.95),
    0 20px 44px -28px oklch(0.25 0.04 225 / 0.42),
    0 0 0 1px oklch(0.2 0.02 228 / 0.06);
  --glas-schatten-hoch:
    inset 0 1px 0 oklch(1 0 0 / 0.95),
    0 28px 56px -28px oklch(0.25 0.04 225 / 0.5),
    0 0 0 1px oklch(0.2 0.02 228 / 0.08);
  --koernung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)' opacity='.07'/%3E%3C/svg%3E");
}

.glasbuehne {
  min-height: 100dvh;
  background:
    var(--koernung),
    radial-gradient(52rem 34rem at 6% -8%, oklch(0.9 0.08 195 / 0.55), transparent 64%),
    radial-gradient(44rem 30rem at 102% 6%, oklch(0.93 0.06 165 / 0.45), transparent 62%),
    radial-gradient(50rem 32rem at 58% 104%, oklch(0.94 0.05 85 / 0.42), transparent 64%),
    var(--grund);
  background-attachment: fixed;
}

/* Der Pfad steht über der Bühne: dieselben Flächen, damit kein Rand entsteht. */
.pfadleiste + .glasbuehne {
  min-height: calc(100dvh - 64px);
}

.glas {
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
}

.liste.glas {
  background: var(--glas);
}

/* Kleiner türkiser Punkt vor Abschnitten: das Zeichen der Marke, auch im Pfad und in der Seitenleiste. */
.ub-punkt {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--marke);
  box-shadow: 0 0 0 3px oklch(0.8 0.12 195 / 0.2);
}

.ub-mehr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  color: var(--marke-tief);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Kopf: Lage in einem Satz ---------- */

.ub-lage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--glas-schatten);
  color: var(--tinte);
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out);
}

.ub-lage:active {
  transform: scale(0.97);
}

.ub-lage-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 4px oklch(0.52 0.13 155 / 0.16);
}

.ub-lage[data-ton='warnung'] .ub-lage-punkt {
  background: var(--gelb);
  box-shadow: 0 0 0 4px oklch(0.6 0.13 65 / 0.18);
}

.ub-lage[data-ton='kritisch'] .ub-lage-punkt {
  background: var(--rot);
  box-shadow: 0 0 0 4px oklch(0.56 0.2 25 / 0.16);
}

/* ---------- Was brennt: Telefonate und Mitteilungen ---------- */

.ub-oben {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.ub-oben:empty {
  display: none;
}

/* Vereinbarte Telefonate bleiben in Signalorange (anrufe.css), hier nur kompakter: eine Zeile je Praxis. */
.ub-seite .ub-tel {
  margin: 0;
}

.ub-tel .anr-fix-mitte strong {
  white-space: nowrap;
}

.ub-tel-mehr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0 4px;
  color: var(--anr-fix-tief);
  font-size: 13.5px;
  font-weight: 640;
  text-decoration: none;
}

.ub-hinweis {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-l);
  background: var(--gelb-zart);
  color: oklch(0.38 0.07 65);
  font-size: 14px;
  font-weight: 560;
}

.ub-hinweis > svg {
  flex: none;
}

.ub-hinweis > span {
  flex: 1;
  min-width: 0;
}

.ub-hinweis .knopf {
  flex: none;
  min-height: 36px;
}

/* ---------- Folien: am Telefon zum Wischen ---------- */

.ub-bahn {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(-1 * (var(--seite) + var(--rechts))) 0 calc(-1 * (var(--seite) + var(--links)));
  padding: 4px calc(var(--seite) + var(--rechts)) 12px calc(var(--seite) + var(--links));
  scroll-padding-inline: calc(var(--seite) + var(--links));
}

.ub-bahn::-webkit-scrollbar {
  display: none;
}

/* Die nächste Folie schaut 16 px herein: so sieht man, dass es weitergeht. */
.ub-folie {
  flex: 0 0 calc(100% - 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-xl);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.ub-folie-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ub-folie-kopf h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

/* Für dich: dunkles Glas, die eine große Zahl der Seite */
.ub-folie.dunkel {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 110% at 104% 112%, oklch(0.56 0.1 198 / 0.6), transparent 60%),
    radial-gradient(90% 90% at -12% -24%, oklch(0.4 0.06 230 / 0.7), transparent 62%),
    linear-gradient(160deg, oklch(0.25 0.035 235 / 0.95), oklch(0.19 0.03 230 / 0.93));
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.14),
    0 24px 48px -24px oklch(0.2 0.05 225 / 0.6);
}

/* Die Körnung auch auf dem dunklen Glas, damit es nicht wie eine Plastikfläche wirkt. */
.ub-folie.dunkel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--koernung);
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.ub-folie.dunkel > * {
  position: relative;
  z-index: 1;
}

.ub-folie.dunkel .ub-folie-kopf h2 {
  color: oklch(0.92 0.03 205);
}

.ub-folie.dunkel .ub-mehr {
  color: oklch(0.86 0.1 195);
}

.ub-gross {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.ub-gross-zahl {
  font-size: 56px;
  line-height: 0.95;
  font-weight: 640;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Nur eine Zahl ist groß (Aufgaben für dich); der Kontostand ordnet sich darunter ein. */
.ub-folie[data-art='finanzen'] .ub-gross-zahl {
  font-size: 40px;
  letter-spacing: -0.04em;
}

.ub-gross-text {
  color: var(--tinte-2);
  font-size: 16px;
  font-weight: 540;
}

.ub-folie.dunkel .ub-gross-text {
  color: oklch(0.93 0.02 210);
}

.ub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.ub-folie.dunkel .chip {
  background: oklch(1 0 0 / 0.1);
  color: oklch(0.95 0.01 210);
}

.ub-folie.dunkel .chip.dringend {
  background: oklch(0.6 0.2 25 / 0.3);
  color: oklch(0.93 0.06 25);
}

/* Kleine Kennzahlen in einer Reihe, jede führt zu ihrem Teil */
.ub-mini-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
  margin-top: auto;
}

.ub-mini {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-l);
  background: var(--glas-zart);
  box-shadow: inset 0 0 0 1px oklch(0.2 0.02 228 / 0.06);
  color: inherit;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    transform 140ms var(--ease-out);
}

.ub-mini:active {
  transform: scale(0.97);
}

.ub-mini b {
  overflow: hidden;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 680;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ub-mini b small {
  color: var(--tinte-3);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0;
}

.ub-mini-name {
  color: var(--tinte-2);
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1.3;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Zustand nie nur als Farbe: Punkt plus Worte („2 überfällig“). */
.ub-mini-neben {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tinte-3);
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}

.ub-mini[data-ton='kritisch'] .ub-mini-neben {
  color: var(--rot);
}

.ub-mini[data-ton='kritisch'] .ub-mini-neben::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ub-folie.dunkel .ub-mini {
  background: oklch(1 0 0 / 0.07);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.08);
}

.ub-folie.dunkel .ub-mini-name {
  color: oklch(0.9 0.02 210);
}

.ub-folie.dunkel .ub-mini[data-ton='kritisch'] .ub-mini-neben {
  color: oklch(0.82 0.11 25);
}

/* Vertrieb heute: die Pipeline als liegende Balken, eine Farbe, dünn, runde Enden. */
.ub-trichter {
  display: grid;
  gap: 2px;
}

.ub-t-zeile {
  display: grid;
  grid-template-columns: minmax(88px, 112px) minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: var(--radius-m);
  color: inherit;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.ub-t-name {
  display: grid;
  color: var(--tinte-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.15;
}

.ub-t-name small {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 520;
}

.ub-t-balken {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: oklch(0.2 0.02 228 / 0.07);
}

.ub-t-balken > span {
  display: block;
  width: calc(var(--anteil, 0) * 100%);
  height: 100%;
  border-radius: 4px;
  background: var(--marke-tief);
}

.ub-t-zahl {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ub-folie-fuss {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 12px;
  border-radius: var(--radius-m);
  background: var(--glas-zart);
  box-shadow: inset 0 0 0 1px oklch(0.2 0.02 228 / 0.06);
  color: var(--tinte-2);
  font-size: 13.5px;
  font-weight: 580;
  text-decoration: none;
}

.ub-folie-fuss svg {
  flex: none;
  color: var(--gruen);
}

.ub-folie-fuss span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Betrieb: Ring mit der Gesamtlage, daneben der Satz wie im Reiter Lage */
.ub-lagezeile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-l);
  color: inherit;
  text-decoration: none;
}

.ub-lagetext {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ub-lagetext strong {
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -0.015em;
}

.ub-lagetext span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--tinte-3);
  font-size: 13px;
  line-height: 1.4;
}

/* Punkte unter den Folien: welche vorne ist, ein Tipp springt hin. */
.ub-punkte {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: -4px;
}

.ub-punkte:empty {
  display: none;
}

.ub-punkte button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.ub-punkte button::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: oklch(0.2 0.02 228 / 0.2);
  transition:
    transform 200ms var(--ease-out),
    background-color 200ms ease;
}

.ub-punkte button[aria-selected='true']::before {
  background: var(--nacht);
  transform: scaleX(2.25);
}

/* Mac: alle Folien auf einmal, Für dich und Vertrieb oben, der Rest darunter (Spalten aus start.js). */
@media (min-width: 900px) {
  .ub-bahn {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
    margin: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .ub-folie {
    grid-column: span var(--spalten, 4);
    padding: 24px;
  }

  .ub-punkte {
    display: none;
  }

  .ub-gross-zahl {
    font-size: 64px;
  }
}

.ub-ring {
  --ring: var(--gruen);
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.ub-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--wert, 0) * 1%), oklch(0.2 0.02 228 / 0.08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}

[data-ton='warnung'] .ub-ring {
  --ring: var(--gelb);
}

[data-ton='kritisch'] .ub-ring {
  --ring: var(--rot);
}

/* ---------- Kopf der Ressortkarten (Seite Bereiche) ---------- */

.bn-kopf {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-l);
  color: inherit;
  text-decoration: none;
}

.bn-kopf > svg:last-child,
.bn-teil > svg:last-child {
  color: var(--tinte-3);
}

.bn-kopf-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bn-kopf-text strong {
  font-size: 17px;
  font-weight: 660;
  letter-spacing: -0.015em;
}

.bn-kopf-text span {
  color: var(--tinte-3);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Sprungmarken in einen Teil oder Unterbereich (Überblick, Ressortseiten, Bereiche) */
.rs-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.72);
  box-shadow: inset 0 0 0 1px oklch(0.2 0.02 228 / 0.08);
  color: var(--tinte-2);
  font-size: 13.5px;
  font-weight: 580;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms var(--ease-out);
}

.rs-chip svg {
  color: var(--tinte-3);
}

.rs-chip:active {
  transform: scale(0.96);
}

.rs-chip .zaehler {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
}

.rs-extern svg {
  margin-left: -2px;
}

.ub-platzhalter {
  height: 220px;
  border-radius: var(--radius-xl);
}

/* ---------- Ressortseiten (Vertrieb, Produktion, Verwaltung, Technik) ---------- */

.rs-gruppe {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 12px;
  font-size: 18px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.rs-inhalt > .rs-gruppe:first-child {
  margin-top: 8px;
}

.rs-seite .rs-raster {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.rs-seite .vt-karte {
  position: relative;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 160ms ease;
}

.rs-link {
  color: inherit;
  text-decoration: none;
  outline: none;
}

/* Der Titel deckt die ganze Karte ab; Unterbereiche liegen als eigene Links darüber. */
.rs-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.rs-link:focus-visible::after {
  outline: 2px solid var(--marke-tief);
  outline-offset: 2px;
  border-radius: var(--radius-xl);
}

.rs-unter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.rs-kritisch .vt-unter {
  color: var(--rot);
  font-weight: 560;
}

.rs-warnung .vt-unter {
  color: oklch(0.47 0.11 65);
  font-weight: 560;
}

/* ---------- Bereiche (Seite) ---------- */

.bn-seite .suche {
  margin-bottom: 20px;
}

.bn-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.bn-ressort {
  padding: 8px;
  border-radius: var(--radius-xl);
}

.bn-kopf {
  padding: 12px;
}

.bn-teile {
  display: grid;
  gap: 2px;
  padding-bottom: 4px;
}

.bn-teil {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: var(--radius-m);
  color: var(--tinte);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.bn-teil:active {
  background: oklch(1 0 0 / 0.7);
}

.bn-teil-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bn-unter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 12px 54px;
  scrollbar-width: none;
}

.bn-unter::-webkit-scrollbar {
  display: none;
}

.bn-einstellungen {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  color: inherit;
  text-decoration: none;
}

.bn-einstellungen > svg:last-child {
  color: var(--tinte-3);
}

/* ---------- Mac ---------- */

@media (min-width: 900px) {
  /* Bereiche als ruhiges Raster: zwei Ressorts nebeneinander, gleich hoch; Unterbereiche brechen um statt abzuschneiden. */
  .bn-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .bn-unter {
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (min-width: 2000px) {
  .bn-raster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Telefon: Kopf und Telefonate dichter, damit die Folien im ersten Blick stehen; Pipeline-Namen etwas schmaler */
@media (max-width: 599px) {
  .ub-seite .grosstitel {
    font-size: 28px;
  }

  .ub-seite .titelzeile {
    margin-bottom: 16px;
  }

  .ub-tel .anr-fix-titel span {
    display: none;
  }

  .ub-mini {
    padding: 10px;
  }

  .ub-t-zeile {
    grid-template-columns: 96px minmax(0, 1fr) 40px;
    gap: 8px;
  }
}

/* ---------- Zeiger am Mac: Hover ---------- */

@media (hover: hover) and (pointer: fine) {
  .ub-mini:hover,
  .ub-folie-fuss:hover,
  .ub-t-zeile:hover {
    background: oklch(1 0 0 / 0.82);
  }

  .ub-folie.dunkel .ub-mini:hover {
    background: oklch(1 0 0 / 0.13);
  }

  .ub-gross:hover .ub-gross-text,
  .ub-lagezeile:hover strong {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .rs-chip:hover {
    background: #fff;
    color: var(--tinte);
  }

  .rs-seite .vt-karte:hover {
    transform: translateY(-2px);
    box-shadow: var(--glas-schatten-hoch);
  }

  .bn-kopf:hover strong {
    color: var(--marke-tief);
  }

  .bn-teil:hover {
    background: oklch(1 0 0 / 0.6);
  }

  .ub-lage:hover {
    box-shadow: var(--glas-schatten-hoch);
  }

  .ub-mehr:hover {
    text-decoration: underline;
  }
}

/* ---------- Bewegung: einmal beim Aufbau, nacheinander ---------- */

@media (prefers-reduced-motion: no-preference) {
  .glasbuehne:not([data-erschienen]) .ub-folie,
  .glasbuehne:not([data-erschienen]) .ub-erscheinen,
  .bn-seite .ub-erscheinen {
    animation: ub-rein 280ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 50ms);
  }

  .ub-folie:nth-child(2) {
    --i: 1;
  }

  .ub-folie:nth-child(3) {
    --i: 2;
  }

  .ub-folie:nth-child(4) {
    --i: 3;
  }

  .ub-folie:nth-child(5) {
    --i: 4;
  }
}

@keyframes ub-rein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Ohne Transparenz: massive Flächen ---------- */

@media (prefers-reduced-transparency: reduce) {
  .glas,
  .liste.glas,
  .rs-seite .vt-karte,
  .ub-lage,
  .suche-fenster {
    background: var(--flaeche);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .ub-folie.dunkel {
    background: var(--nacht);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Ressortseiten seit 02.11.2026: reine Linkgruppen (Kundensysteme, Cockpit) als eine ruhige Zeile unter den Karten. */
.rs-linkzeilen {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.rs-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rs-links-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tinte-3);
  margin-right: 4px;
}

/* ---------- Überblick, dritte Fassung (02.11.2026) ----------
   Moritz: „nicht drei minuten scrollen … auf dem screen darf gleichzeitig nicht zuviel sein … genau weiß was man tun
   muss“. Drei Blöcke in fester Reihenfolge: Jetzt dran (Liste), Vertrieb heute (eine Zeile), Lage (drei Kacheln).
   Am Mac steht alles auf einem Schirm, am Telefon untereinander ohne Wischen. */

.ub-schlicht {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 980px;
}

/* Ohne das zieht eine lange Zeile (nowrap) das ganze Raster breiter als den Schirm. */
.ub-schlicht > * {
  min-width: 0;
}

.ub-titel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.ub-kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Jetzt dran */
.ub-dran {
  padding: 18px 18px 10px;
  border-radius: var(--radius-xl);
}

.ub-dran-liste {
  display: grid;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.ub-dran-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  border-top: 1px solid var(--haarlinie);
}

.ub-dran-zeile:first-child {
  border-top: 0;
}

.ub-dran-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 4px;
  color: inherit;
  text-decoration: none;
}

.ub-dran-symbol {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--marke-zart);
  color: var(--marke-tief);
}

.ub-dran-zeile[data-ton='kritisch'] .ub-dran-symbol {
  background: var(--rot-zart);
  color: var(--rot);
}

.ub-dran-zeile[data-ton='warnung'] .ub-dran-symbol {
  background: var(--anr-fix-zart, oklch(0.95 0.06 55));
  color: var(--anr-fix-tief, oklch(0.5 0.15 45));
}

.ub-dran-zeile[data-ton='marke'] .ub-dran-symbol {
  background: var(--marke);
  color: var(--nacht);
}

.ub-dran-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.ub-dran-text strong {
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ub-dran-text span {
  overflow: hidden;
  color: var(--tinte-3);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ub-dran-zeile[data-ton='kritisch'] .ub-dran-text span {
  color: var(--rot);
}

.ub-dran-link > svg:last-child {
  flex: none;
  color: var(--tinte-3);
}

.ub-dran-knopf {
  flex: none;
  min-height: 38px;
  gap: 6px;
}

.ub-dran-leer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 4px 10px;
  color: var(--gruen);
  font-weight: 600;
}

.ub-dran-mehr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 4px 8px;
  color: var(--marke-tief);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Vertrieb heute: fünf Stufen in einer Zeile, die Zahl groß, der Name klein darunter. */
.ub-vertrieb {
  padding: 18px;
  border-radius: var(--radius-xl);
}

.ub-stufen {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ub-stufe {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--glas-zart);
  box-shadow: 0 0 0 1px var(--haarlinie);
  color: inherit;
  text-decoration: none;
}

.ub-stufe b {
  font-size: 26px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ub-stufe span {
  overflow: hidden;
  color: var(--tinte-2);
  font-size: 13px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ub-stufe small {
  color: var(--tinte-3);
  font-size: 11.5px;
  font-weight: 500;
}

/* Lage: drei kleine Kacheln nebeneinander. */
.ub-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.ub-kachel {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-l);
  background: var(--glas);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glas-schatten);
  color: inherit;
  text-decoration: none;
}

.ub-kachel-name {
  color: var(--tinte-3);
  font-size: 13px;
  font-weight: 600;
}

.ub-kachel b {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ub-kachel-satz {
  overflow: hidden;
  color: var(--tinte-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ub-kachel[data-ton='kritisch'] .ub-kachel-satz {
  color: var(--rot);
  font-weight: 600;
}

.ub-kachel[data-ton='warnung'] .ub-kachel-satz {
  color: oklch(0.45 0.1 65);
}

.ub-schlicht .ub-hinweis {
  min-height: 44px;
  background: var(--glas-zart);
  color: var(--tinte-2);
  box-shadow: 0 0 0 1px var(--haarlinie);
}

@media (max-width: 720px) {
  .ub-schlicht {
    gap: 12px;
  }
  .ub-dran {
    padding: 14px 12px 6px;
  }
  .ub-dran-zeile {
    min-height: 56px;
  }
  .ub-dran-knopf span {
    display: none;
  }
  .ub-dran-knopf {
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
  }
  /* Am Telefon zum Wischen: dreieinhalb Stufen sichtbar, die nächste schaut herein, die Namen bleiben lesbar. */
  .ub-stufen {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .ub-stufen > li {
    scroll-snap-align: start;
  }
  .ub-stufe {
    padding: 8px 10px;
  }
  .ub-stufe b {
    font-size: 22px;
  }
  .ub-kacheln {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ub-kachel {
    grid-template-columns: auto 1fr;
    grid-template-areas: 'name wert' 'satz satz';
    align-items: baseline;
    padding: 12px 14px;
  }
  .ub-kachel-name {
    grid-area: name;
  }
  .ub-kachel b {
    grid-area: wert;
    justify-self: end;
    font-size: 19px;
  }
  .ub-kachel-satz {
    grid-area: satz;
  }
}

@media (hover: hover) {
  .ub-dran-link:hover strong,
  .ub-stufe:hover b,
  .ub-kachel:hover b {
    color: var(--marke-tief);
  }
}
