/* =====================================================================================================================
   RUESS Hub 3.3.0 - Redesign "Lageplan" (Claude Design Konzept 3c, Marvin 16.11.). Gilt NUR mit html[data-ui="lageplan"].
   1. Tokens: das bestehende Design-System (--ds-*) bekommt die Werte des neuen Designs; die Markenfarbe folgt dem Bereich
      (html[data-area=...]). Feste Altfarben der Modul-Stylesheets stellt public/lageplan-farben.css (erzeugt) auf diese Tokens um.
   2. Rahmen: Kopfleiste, Tabs, Bereichsleiste, Lageplan-Startseite. Das Seitenmenue bleibt im DOM (Funktionen/IDs), ist nur ausgeblendet.
   Dunkelmodus bleibt der bisherige Invert-Filter (Stufe 5 spaeter).
   ===================================================================================================================== */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/figtree-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---- 1. Tokens ---------------------------------------------------------------------------------------------------- */
html[data-ui="lageplan"] {
  --lp-font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lp-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --lp-kopf-h: 68px;
  --lp-leiste-h: 50px;
  --lp-rand: 24px;
  /* RUESS-Farben (Marvin 16.11.: "in unseren Farben" = Anthrazit + Lime) - fuer alle Bereiche gleich.
     Lime ist hell: Schrift darauf immer Anthrazit (on-brand), nie Weiss (2,1:1). */
  --lp-anthrazit: #202526;
  --lp-anthrazit-2: #323a3b;
  --ds-brand: #a2bf13;
  --ds-brand-hover: #93ad11;
  --ds-brand-press: #86a00f;
  --ds-brand-soft: #f3f7df;
  --lp-akzent-rand: #cfe08c;
  --lp-akzent-text: #4d6b0a;
  --ds-on-brand: #202526;
  --ds-focus: #5e7a08;
  --ds-focus-ring: 0 0 0 3px rgba(94, 122, 8, .22);
  /* neutrale Flaechen und Texte */
  --ds-ink: #16171a;
  --ds-text: #16171a;
  --ds-muted: #5a5d63;
  --ds-line: #d8d8d3;
  --ds-line-strong: #b9bab4;
  --ds-surface: #ffffff;
  --ds-surface-2: #f4f4f2;
  --ds-surface-hover: #ecece9;
  --ds-bg: #ffffff; /* Marvin 16.11.: Hintergrund weiss */
  /* Status */
  --ds-success: #1a6438; --ds-success-soft: #e1f1e6;
  --ds-warning: #7a4f00; --ds-warning-soft: #fbf0d6;
  --ds-danger: #a02c1a; --ds-danger-hover: #87230f; --ds-danger-soft: #fbe6e1;
  --ds-backdrop: rgba(10, 12, 14, .45);
  /* Flaechen mit 1-px-Rand statt Schatten; Schatten nur fuer Suche, Dialog, Meldung */
  --ds-shadow-1: 0 0 0 1px var(--ds-line);
  --ds-shadow-2: 0 8px 28px rgba(10, 12, 14, .14);
  --ds-shadow-3: 0 20px 60px rgba(10, 12, 14, .28);
}

html[data-ui="lageplan"] body,
html[data-ui="lageplan"] body.app-active { font-family: var(--lp-font); background: var(--ds-bg) !important; color: var(--ds-text); } /* ohne den alten Gruenschimmer (radial-gradient) */
html[data-ui="lageplan"] :is(button, input, select, textarea) { font-family: inherit; }
html[data-ui="lageplan"] :is(code, kbd, pre, .mono, td.num, .ticket-info-technical-key) { font-family: var(--lp-mono); }

/* ---- 2. Rahmen: altes Menue und alte Kopfzeilen aus ------------------------------------------------------------------ */
html[data-ui="lageplan"] body.app-active { --app-sidebar-width: 0px; --shell-gap: 0px; }
html[data-ui="lageplan"] body.app-active > .header,
html[data-ui="lageplan"] #appBox .app-sidebar,
html[data-ui="lageplan"] #appBox .mobile-app-header,
html[data-ui="lageplan"] #sidebarBackdrop { display: none !important; }
html[data-ui="lageplan"] #appBox .app-shell { display: block; }
html[data-ui="lageplan"] #appBox .app-content { margin-left: 0 !important; width: auto !important; max-width: none; padding: 20px var(--lp-rand) 32px !important; }
html[data-ui="lageplan"] body.app-active main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
html[data-ui="lageplan"] body.app-active #appBox { margin: 0; padding: 0; max-width: none; }
.lp-kopf, .lp-bereich, .lp-unter { display: none; }
html[data-ui="lageplan"] .lp-kopf { display: flex; }
html[data-ui="lageplan"] .lp-bereich:not(.hidden), html[data-ui="lageplan"] .lp-unter:not(.hidden) { display: block; }
html:not([data-ui="lageplan"]) #lpStart, html:not([data-ui="lageplan"]) .lp-titel-stern { display: none !important; }
html[data-ui="lageplan"] #startPage { display: none; }

/* Kopfleiste */
html[data-ui="lageplan"] #appBox .lp-kopf {
  position: sticky; top: 0; z-index: 40; height: var(--lp-kopf-h); align-items: center; gap: var(--ds-space-4);
  padding: 0 var(--lp-rand); background: var(--ds-surface); border-bottom: 1px solid var(--ds-line);
}
html[data-ui="lageplan"] #appBox .lp-marke { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; font-size: 24px; letter-spacing: -.03em; color: var(--ds-ink); padding: 4px 2px; border-radius: var(--ds-radius-sm); flex: none; }
html[data-ui="lageplan"] #appBox .lp-marke b { font-weight: 800; }
html[data-ui="lageplan"] #appBox .lp-marke span { font-weight: 400; color: var(--ds-muted); }
html[data-ui="lageplan"] #appBox .lp-marke:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
html[data-ui="lageplan"] #appBox .lp-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
html[data-ui="lageplan"] #appBox .lp-tabs::-webkit-scrollbar { display: none; }
html[data-ui="lageplan"] #appBox .lp-tab { display: inline-flex; align-items: center; flex: none; height: 36px; border-radius: var(--ds-radius-pill); border: 1px solid transparent; }
html[data-ui="lageplan"] #appBox .lp-tab.aktiv { border-color: var(--ds-line); background: var(--ds-surface); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 34px; font-size: var(--ds-font-md); color: var(--ds-text); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-ziel { padding: 0 6px 0 12px; border-radius: var(--ds-radius-pill) 0 0 var(--ds-radius-pill); max-width: 220px; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-ziel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-ziel i { width: 10px; height: 10px; border-radius: 3px; background: var(--ds-brand); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-zu { width: 26px; justify-content: center; color: var(--ds-muted); border-radius: var(--ds-radius-pill); margin-right: 4px; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-zu:hover { background: var(--ds-surface-hover); color: var(--ds-ink); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab:not(.aktiv):hover { background: var(--ds-surface-hover); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab button:focus-visible, html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab-neu:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab-neu { all: unset; cursor: pointer; flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--ds-radius-pill); color: var(--ds-muted); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab-neu:hover { background: var(--ds-surface-hover); color: var(--ds-ink); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche {
  all: unset; cursor: pointer; box-sizing: border-box; flex: 0 1 440px; min-width: 200px; height: 44px; display: flex; align-items: center; gap: 12px;
  padding: 0 8px 0 18px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-pill); background: var(--ds-surface); color: var(--ds-muted); font-size: 15px;
}
html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche span { flex: 1; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche kbd { font-family: var(--lp-font); font-size: var(--ds-font-xs); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); padding: 2px 8px; color: var(--ds-muted); background: var(--ds-surface); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche:hover { border-color: var(--ds-line-strong); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
html[data-ui="lageplan"] #appBox .lp-symbole { display: flex; align-items: center; gap: 4px; flex: none; position: relative; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-symbol, html[data-ui="lageplan"] #appBox .lp-kopf .lp-konto {
  all: unset; cursor: pointer; box-sizing: border-box; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--ds-radius-pill); color: var(--ds-text);
}
html[data-ui="lageplan"] #appBox .lp-kopf .lp-symbol:hover { background: var(--ds-surface-hover); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-symbol.an svg { fill: currentColor; color: var(--ds-warning); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-symbol:disabled { opacity: .4; cursor: default; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-konto { margin-left: 6px; background: var(--ds-ink); color: #fff; font-weight: 600; font-size: 13px; }
html[data-ui="lageplan"] #appBox .lp-kopf :is(.lp-symbol, .lp-konto):focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
html[data-ui="lageplan"] #appBox .lp-konto-menue {
  position: absolute; top: calc(var(--lp-kopf-h) - 6px); right: var(--lp-rand); z-index: 60; min-width: 240px; padding: 6px;
  background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-2);
}
html[data-ui="lageplan"] #appBox .lp-konto-kopf { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--ds-line); margin-bottom: 4px; }
html[data-ui="lageplan"] #appBox .lp-konto-kopf small { color: var(--ds-muted); }
html[data-ui="lageplan"] #appBox .lp-konto-menue button { all: unset; cursor: pointer; box-sizing: border-box; display: block; width: 100%; padding: 9px 10px; border-radius: var(--ds-radius-md); font-size: var(--ds-font-md); color: var(--ds-text); }
html[data-ui="lageplan"] #appBox .lp-konto-menue button:hover, html[data-ui="lageplan"] #appBox .lp-konto-menue button:focus-visible { background: var(--ds-surface-hover); }
html[data-ui="lageplan"] #appBox .lp-konto-menue .lp-gefahr { color: var(--ds-danger); }

/* Bereichsleiste (Farbe des Bereichs) + Unterseiten */
html[data-ui="lageplan"] #appBox .lp-bereich { position: sticky; top: var(--lp-kopf-h); z-index: 39; background: var(--ds-brand); color: var(--lp-anthrazit); }
html[data-ui="lageplan"] #appBox .lp-bereich-innen { display: flex; align-items: center; gap: var(--ds-space-4); height: var(--lp-leiste-h); padding: 0 var(--lp-rand); }
html[data-ui="lageplan"] #appBox .lp-bereich .lp-zurueck {
  all: unset; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; font-size: var(--ds-font-md); font-weight: 600;
  border: 1.5px solid var(--lp-anthrazit); border-radius: var(--ds-radius-pill); color: var(--lp-anthrazit);
}
html[data-ui="lageplan"] #appBox .lp-bereich .lp-zurueck:hover { background: rgba(32, 37, 38, .1); }
html[data-ui="lageplan"] #appBox .lp-bereich-name { flex: none; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
html[data-ui="lageplan"] #appBox .lp-bereich-punkte { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
html[data-ui="lageplan"] #appBox .lp-bereich-punkte::-webkit-scrollbar { display: none; }
html[data-ui="lageplan"] #appBox .lp-bereich-punkte button {
  all: unset; cursor: pointer; flex: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--ds-radius-pill);
  font-size: var(--ds-font-md); font-weight: 500; color: var(--lp-anthrazit); white-space: nowrap;
}
html[data-ui="lageplan"] #appBox .lp-bereich-punkte button:hover { background: rgba(32, 37, 38, .1); }
html[data-ui="lageplan"] #appBox .lp-bereich-punkte button.aktiv { background: var(--lp-anthrazit); color: #fff; font-weight: 600; }
html[data-ui="lageplan"] #appBox .lp-bereich :is(button):focus-visible { outline: 2px solid var(--lp-anthrazit); outline-offset: 2px; }
html[data-ui="lageplan"] #appBox .lp-unter {
  position: sticky; top: calc(var(--lp-kopf-h) + var(--lp-leiste-h)); z-index: 38; gap: 4px; padding: 8px var(--lp-rand);
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-line); overflow-x: auto; white-space: nowrap; scrollbar-width: thin;
}
html[data-ui="lageplan"] .lp-unter:not(.hidden) { display: flex; }
html[data-ui="lageplan"] #appBox .lp-unter button {
  all: unset; cursor: pointer; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--ds-radius-pill);
  font-size: var(--ds-font-sm); color: var(--ds-text); border: 1px solid transparent;
}
html[data-ui="lageplan"] #appBox .lp-unter button:hover { background: var(--ds-surface-hover); }
html[data-ui="lageplan"] #appBox .lp-unter button.aktiv { background: var(--ds-brand-soft); border-color: var(--lp-akzent-rand); color: var(--lp-akzent-text); font-weight: 600; }
html[data-ui="lageplan"] #appBox .lp-unter button:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }

/* Seitentitel ruhig: Titel + Stern + Untertitel in einer Zeile, ohne Karte */
html[data-ui="lageplan"] .app-page-hero.box {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 4px 0 0 !important; margin: 0 0 16px !important; min-height: 0;
}
html[data-ui="lageplan"] .app-page-hero > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
html[data-ui="lageplan"] #appViewEyebrow, html[data-ui="lageplan"] #appHeaderClock, html[data-ui="lageplan"] #hilfeKnopf { display: none !important; }
html[data-ui="lageplan"] #appViewTitle { font-size: var(--ds-font-xl); font-weight: 600; letter-spacing: -.01em; color: var(--ds-ink); margin: 0; }
html[data-ui="lageplan"] #appViewSubtitle { display: block !important; margin: 0; color: var(--ds-muted); font-size: var(--ds-font-md); }
html[data-ui="lageplan"] #appBox .lp-titel-stern { all: unset; cursor: pointer; width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: var(--ds-radius-pill); color: var(--lp-akzent-text); align-self: center; }
html[data-ui="lageplan"] #appBox .lp-titel-stern svg { width: 18px; height: 18px; }
html[data-ui="lageplan"] #appBox .lp-titel-stern.an svg { fill: currentColor; }
html[data-ui="lageplan"] #appBox .lp-titel-stern:hover { background: var(--ds-surface-hover); }
html[data-ui="lageplan"] #appBox .lp-titel-stern:focus-visible { outline: 2px solid var(--ds-focus); }
html[data-ui="lageplan"] #appBox .lp-titel-stern:disabled { display: none; }
html[data-ui="lageplan"] body.lp-auf-start .app-page-hero { display: none !important; }

/* ---- 3. Lageplan (Startseite): EINE grosse Kachel (weiss, Lime-Linien), je Bereich eine Spalte (Marvin 16.11.) --------------------- */
html[data-ui="lageplan"] #appBox .lp-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html[data-ui="lageplan"] #appBox .lp-plan {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 28px; padding: 28px 30px 30px; box-sizing: border-box;
  background: var(--ds-surface); color: var(--ds-text); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); /* Marvin 16.11.: Kachel weiss */
  /* nur so breit wie noetig: wer wenige Bereiche sieht, bekommt keine ueberbreiten Spalten (ca. 250 px je Bereich) */
  max-width: calc(var(--lp-anzahl, 7) * 250px + 60px);
}
html[data-ui="lageplan"] #appBox .lp-spalte { display: flex; flex-direction: column; min-width: 0; }
html[data-ui="lageplan"] #appBox .lp-spalte header { display: flex; align-items: flex-end; min-height: 46px; }
html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel { all: unset; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 2px solid var(--ds-brand); border-radius: 0; }
html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-anthrazit); }
html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel svg { width: 16px; height: 16px; color: var(--lp-akzent-text); opacity: .9; transition: transform var(--ds-dur-fast) var(--ds-ease); }
html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel:hover svg { transform: translate(2px, -2px); }
html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 4px; }
html[data-ui="lageplan"] #appBox .lp-feld-zahl { align-self: flex-start; margin: 10px 0 2px; padding: 3px 10px; border-radius: var(--ds-radius-pill); background: var(--ds-brand); color: var(--lp-anthrazit); font-size: 12px; font-weight: 700; }
html[data-ui="lageplan"] #appBox .lp-feld-punkte { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; }
html[data-ui="lageplan"] #appBox .lp-feld-punkte li + li { border-top: 1px solid var(--ds-line); }
html[data-ui="lageplan"] #appBox .lp-feld-punkte button {
  all: unset; cursor: pointer; box-sizing: border-box; display: block; width: 100%; padding: 8px 0; font-size: 15px; font-weight: 500; color: var(--ds-text);
  white-space: normal; overflow-wrap: break-word; line-height: 1.3; transition: color var(--ds-dur-fast) var(--ds-ease), transform var(--ds-dur-fast) var(--ds-ease);
}
html[data-ui="lageplan"] #appBox .lp-feld-punkte button:hover { color: var(--lp-akzent-text); transform: translateX(2px); }
html[data-ui="lageplan"] #appBox .lp-feld-punkte button:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; border-radius: 3px; }

/* ---- 4. Inhaltsseiten: ruhig, Akzent nur fuer Hauptaktion und Auswahl --------------------------------------------------- */
html[data-ui="lageplan"] .box { border-radius: var(--ds-radius-lg); box-shadow: none; border: 1px solid var(--ds-line); }
html[data-ui="lageplan"] .ap-table th, html[data-ui="lageplan"] table th { font-family: var(--lp-mono); font-weight: 500; font-size: var(--ds-font-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--ds-muted); }

/* ---- 5. Handy / Tablet -------------------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  html[data-ui="lageplan"] { --lp-rand: 16px; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche { flex: 0 0 44px; min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche :is(span, kbd) { display: none; }
  html[data-ui="lageplan"] #appBox .lp-symbole > [data-lp="verlauf"], html[data-ui="lageplan"] #appBox .lp-symbole > [data-lp="dunkel"] { display: none; }
}
@media (max-width: 640px) {
  html[data-ui="lageplan"] { --lp-kopf-h: 56px; --lp-leiste-h: 46px; }
  html[data-ui="lageplan"] #appBox .lp-tabs { display: none; }
  html[data-ui="lageplan"] #appBox .lp-kopf { gap: 8px; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-suche { margin-left: auto; }
  html[data-ui="lageplan"] #appBox .lp-symbole > [data-lp="stern"] { display: none; }
  html[data-ui="lageplan"] #appBox .lp-bereich-name { display: none; }
  html[data-ui="lageplan"] #appBox .lp-bereich .lp-zurueck span { display: none; }
  html[data-ui="lageplan"] #appBox .lp-bereich .lp-zurueck { padding: 0 10px; }
  html[data-ui="lageplan"] #appBox .lp-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; padding: 20px 18px 22px; }
    html[data-ui="lageplan"] #appBox .lp-feld-punkte button { font-size: 15px; padding: 10px 0; }
}

/* Dunkelmodus: Invert-Filter wie bisher; Bereichsleiste behaelt ihre Farbe (die weisse Kachel wird mit dem Rest dunkel) (zurueck invertiert) */
html[data-ui="lageplan"][data-theme="dark"] :is(.lp-bereich, .lp-konto) { filter: invert(.92) hue-rotate(180deg); }

/* Alt-Regeln fuer Schliessen-Knoepfe (button[aria-label$=" schließen"], 2px-Rand) gelten nicht fuer die Tabs */
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-zu { border: 0 !important; box-shadow: none !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; }


/* Reiter laufen ueber: Raender weich ausblenden statt hart abschneiden */
html[data-ui="lageplan"] #appBox .lp-tabs.ueberlauf { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); }

/* 3.3.0-Audit (WCAG 2.2 AA, Marvin 16.11. "Enterprise Quality"): gezielte Kontrast-/Bedien-Korrekturen im neuen Design */
html[data-ui="lageplan"] #appBox .badge.prio-mittel { color: var(--ds-warning); }            /* war #bd7a15 auf Hellgelb = 3,3:1 */
html[data-ui="lageplan"] #appBox #tikosAddCount { min-width: 64px; }                          /* Zahlenfeld war 18 px breit (Touch-Ziel) */
html[data-ui="lageplan"] #appBox .ticket-table-head span { color: var(--ds-muted); }          /* Spaltenkoepfe waren 3,5:1 */
html[data-ui="lageplan"] #appBox .ticket-number { color: var(--ds-muted); }                   /* Ticketnummer war 4,1:1 */
html[data-ui="lageplan"] #appBox .badge.status-arbeit { color: var(--ds-warning); }            /* "In Arbeit" war 3,8:1 */

/* 3.3.0: Spruenge an Stellen (scrollIntoView, Anker) landen UNTER den festen Leisten statt dahinter (Kopfleiste + Bereichsleiste + Unterleiste) */
html[data-ui="lageplan"] { scroll-padding-top: calc(var(--lp-kopf-h) + var(--lp-leiste-h) + 56px); }

/* 17.11. Reiter-Leiste mit Pfeilen (Marvin: „Pfeile, dass sich nix schließt“): Rahmen nimmt den Platz der Leiste, Pfeile nur bei Überlauf */
html[data-ui="lageplan"] #appBox .lp-tabs-rahmen { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 auto; }
html[data-ui="lageplan"] #appBox .lp-tabs-rahmen > .lp-tabs { flex: 1 1 auto; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tabs-pfeil {
  all: unset; display: none; flex: none; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; text-align: center;
  font: 600 18px/28px var(--lp-font); color: var(--ds-text); border: 1px solid var(--ds-line); background: var(--ds-surface);
}
html[data-ui="lageplan"] #appBox .lp-tabs-rahmen.blaettern .lp-tabs-pfeil { display: inline-block; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tabs-pfeil:hover:not(:disabled) { background: var(--ds-surface-hover); border-color: var(--ds-line-strong); }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tabs-pfeil:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
html[data-ui="lageplan"] #appBox .lp-kopf .lp-tabs-pfeil:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) { html[data-ui="lageplan"] #appBox .lp-tabs-rahmen { display: none; } }

/* 17.11. Favoriten-Spalte im Lageplan (ganz links, nur Sterne) */
html[data-ui="lageplan"] #appBox .lp-spalte.lp-favoriten .lp-feld-titel-fest { cursor: default; }
html[data-ui="lageplan"] #appBox .lp-spalte.lp-favoriten .lp-feld-titel-fest svg { color: var(--lp-akzent-text); fill: var(--ds-brand); }
html[data-ui="lageplan"] #appBox .lp-spalte.lp-favoriten .lp-favoriten-leer { margin: 12px 0 0; font-size: var(--ds-font-sm); color: var(--ds-muted); line-height: 1.45; }
/* mit Favoriten-Spalte 8 Spalten: auf breiten Bildschirmen immer EINE Reihe (vorher rutschte die letzte Spalte bei 1440 px in Zeile 2) */
@media (min-width: 1200px) {
  html[data-ui="lageplan"] #appBox .lp-plan { grid-template-columns: repeat(var(--lp-anzahl, 8), minmax(0, 1fr)) !important; column-gap: 22px !important; }
}

/* 3.5.1 (Hub-Prüfung 25.11., Guardian-Rundgang 0.3.1: 840 „Tippfläche“-Funde nur im neuen Design): auf Tablet und Handy hatten Kopf-Reiter (34 px),
   ✕ am Reiter (26 px), „+“ (32 px), Pfeile (28 px), „Zurück“ (32 px), Bereichs-Reiter (34 px), Stern (28 px) und Spaltentitel (31 px) zu kleine
   Tippflächen. Ab hier mindestens 40 px (Rundgang: < 36 = schwer, < 40 = Hinweis). Am Desktop (Maus) bleibt alles wie bisher. */
@media (max-width: 1099px) {
  html[data-ui="lageplan"] #appBox .lp-tab { height: 42px; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab button { height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab .lp-tab-zu { width: 40px; margin-right: 0; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-tab-neu { width: 40px; height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-kopf .lp-tabs-pfeil { width: 40px; height: 40px; line-height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-bereich .lp-zurueck { height: 40px; min-width: 40px; box-sizing: border-box; justify-content: center; }
  html[data-ui="lageplan"] #appBox .lp-bereich-punkte button { height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-unter button { height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-titel-stern { width: 40px; height: 40px; }
  html[data-ui="lageplan"] #appBox .lp-spalte .lp-feld-titel { min-height: 40px; box-sizing: border-box; }
  html[data-ui="lageplan"] #appBox .lp-feld-punkte button { min-height: 40px; display: flex; align-items: center; }
  html[data-ui="lageplan"] #appBox .lp-marke { min-height: 40px; align-items: center; box-sizing: border-box; }
}
