/* ============================================================
   Design-System — einzige Quelle für Farb-/Radius-/Schrift-/
   Schatten-Tokens und den Dark Mode. Seiten definieren hier
   nichts mehr nach; nur echt seitenspezifische Extra-Tokens
   bleiben lokal.
   Akzent: --color-accent / --color-accent-700 werden zur Laufzeit
   von shared.js applyBranding() aus mandant_branding.primary_color
   gesetzt (Inline-Style auf <html>, schlägt diese Fallbacks).
   ============================================================ */
:root{
  /* Schriften */
  --font-body:    'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-heading: var(--font-body);
  --font-display: 'Bricolage Grotesque', 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Bewegung: kraeftige Kurven statt der schwachen CSS-Standards.
     ease-out = Erscheinen/Rueckmeldung, ease-in-out = Bewegung auf dem Bildschirm,
     ease-drawer = ausfahrende Leisten (iOS-artig). */
  --ease-out:    cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);

  /* Grund / Tinte / Linien — helle, kühle Palette (Redesign C) */
  --color-bg:            #F1F2F2;
  --color-surface:       #FFFFFF;
  --color-surface-2:     #F5F6F6;
  --color-text:          #1E2424;
  --color-text-muted:    #565D5D;
  --color-border:        #E3E6E6;
  --color-border-strong: #C9CECE;

  /* ====================================================================
     GRUNDFARBTON — der EINE Regler.
     Global ändern: hier (hell) UND in den beiden Dunkel-Blöcken weiter unten
       (Dunkel braucht einen etwas helleren Ton für den Kontrast).
     Pro Mandant: /admin → Mandant → Branding → Markenfarbe. Setzt zur Laufzeit
       --color-accent/-700 per Inline-Style (shared.js::applyBranding) und
       überschreibt diese Werte — ausser bei den Default-Sentinels.
     Alles Marken-Farbige (accent-soft, Fokusring, Primär-Buttons, aktive
     Zustände) leitet sich davon ab. Der Rest (Grund/Tinte/Linien, Status-
     farben Grün/Rot/Orange) ist bewusst fix.
     ==================================================================== */
  --color-accent:      #2F5D50;
  --color-accent-700:  #264C42;
  --color-accent-soft: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
  --color-focus-ring:  color-mix(in srgb, var(--color-accent) 30%, transparent);
  --color-on-accent:   #FFFFFF;

  /* Primäraktion = der Grundfarbton (Buttons folgen der Markenfarbe je Mandant). */
  --color-loden:     var(--color-accent);
  --color-loden-700: var(--color-accent-700);
  --color-on-loden:  var(--color-on-accent);

  /* Status — 4 semantische Rollen (nicht 9 Farben) */
  --s-neutral:      #565D5D;
  --s-neutral-bg:   color-mix(in srgb, #565D5D 10%, var(--color-surface));
  --s-active:       var(--color-accent-700);
  --s-active-bg:    var(--color-accent-soft);
  --s-positive:     #15803D;
  --s-positive-bg:  color-mix(in srgb, #15803D 12%, var(--color-surface));
  --s-attention:    #B3382F;
  --s-attention-bg: color-mix(in srgb, #B3382F 10%, var(--color-surface));
  --s-warn:         #C2410C;
  --s-warn-bg:      color-mix(in srgb, #C2410C 12%, var(--color-surface));

  /* Alias, damit die geteilte .modal-icon.danger-Regel ohne seitenlokale Tokens auskommt */
  --color-danger:      var(--s-attention);
  --color-danger-tint: var(--s-attention-bg);

  /* Form */
  --radius:    14px;
  --radius-sm: 10px;
  --r-panel:   18px;
  --shadow:    0 1px 2px rgba(22,34,59,.06), 0 14px 30px -14px rgba(22,34,59,.16);
  --shadow-sm: 0 1px 3px rgba(22,34,59,.08);

  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px; --space-8:32px;

  /* App-Shell (Seitenleiste + Kopf- + untere Leiste), gebaut von shared.js::mountAppShell */
  --sidebar-w:   232px;
  --topbar-h:    56px;
  --bottombar-h: 60px;

  /* Swiss-SaaS-Grunddesign: drei Flaechenstufen (Hintergrund -> weisse Arbeitsflaeche ->
     getoente Eingabezone) + dunkles Petrol als gezielter Akzent (Seitenkopf, Totale).
     Alles aus der Mandanten-Akzentfarbe abgeleitet, darum ohne eigene Dark-Mode-Werte. */
  --color-ink:          color-mix(in srgb, var(--color-accent) 58%, #071416);
  --color-on-ink:       #ffffff;
  --color-on-ink-muted: rgba(255,255,255,.62);
  --color-ink-line:     rgba(255,255,255,.14);
  --color-canvas:       color-mix(in srgb, var(--color-accent) 3%, var(--color-bg));
  --color-well:         color-mix(in srgb, var(--color-accent) 4%, var(--color-surface-2));
  --color-field-border: color-mix(in srgb, var(--color-border-strong) 70%, var(--color-border));

  /* K20 Glas-Kopf (☰ · ⋯, Menü «⋯»): helles Glas, nicht farbig */
  --glas-1:        rgba(255,255,255,.80);
  --glas-2:        rgba(255,255,255,.56);
  --glas-rand:     rgba(255,255,255,.9);
  --glas-schatten: 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 .5px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.08);
  --glas-icon:     #1d1d1f;
}

/* Dunkel — dieselben Werte in beiden Selektoren (System-Präferenz ohne expliziten Wechsel
   + expliziter [data-theme="dark"]). Bei Änderungen BEIDE Blöcke anpassen. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --color-bg:            #0E1626;
    --color-surface:       #16203A;
    --color-surface-2:     #1B2740;
    --color-text:          #E7ECF5;
    --color-text-muted:    #93A0BC;
    --color-border:        #2A3652;
    --color-border-strong: #38466A;
    --color-accent:        #16B67F;
    --color-accent-700:    #0E9F6E;
    --color-on-accent:     #08131F;
    --color-loden:         var(--color-accent);
    --color-loden-700:     var(--color-accent-700);
    --color-on-loden:      var(--color-on-accent);
    --s-neutral:           #93A0BC;
    --s-positive:          #4ADE80;
    --s-attention:         #F87171;
    --s-warn:              #FB923C;
    --shadow:              0 1px 2px rgba(0,0,0,.5), 0 18px 40px -16px rgba(0,0,0,.6);
    --shadow-sm:           0 1px 3px rgba(0,0,0,.45);
    --glas-1:              rgba(44,44,46,.78);
    --glas-2:              rgba(28,28,30,.56);
    --glas-rand:           rgba(255,255,255,.12);
    --glas-schatten:       0 1px 0 rgba(255,255,255,.08) inset, 0 0 0 .5px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    --glas-icon:           #f5f5f7;
  }
}
:root[data-theme="dark"]{
  --color-bg:            #0E1626;
  --color-surface:       #16203A;
  --color-surface-2:     #1B2740;
  --color-text:          #E7ECF5;
  --color-text-muted:    #93A0BC;
  --color-border:        #2A3652;
  --color-border-strong: #38466A;
  --color-accent:        #16B67F;
  --color-accent-700:    #0E9F6E;
  --color-on-accent:     #08131F;
  --color-loden:         var(--color-accent);
  --color-loden-700:     var(--color-accent-700);
  --color-on-loden:      var(--color-on-accent);
  --s-neutral:           #93A0BC;
  --s-positive:          #4ADE80;
  --s-attention:         #F87171;
  --s-warn:              #FB923C;
  --shadow:              0 1px 2px rgba(0,0,0,.5), 0 18px 40px -16px rgba(0,0,0,.6);
  --shadow-sm:           0 1px 3px rgba(0,0,0,.45);
  --glas-1:              rgba(44,44,46,.78);
  --glas-2:              rgba(28,28,30,.56);
  --glas-rand:           rgba(255,255,255,.12);
  --glas-schatten:       0 1px 0 rgba(255,255,255,.08) inset, 0 0 0 .5px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  --glas-icon:           #f5f5f7;
}

html{ overflow-x: hidden; }
/* Befund 22.11. (iPhone quer, iPad): ohne text-size-adjust vergrössert iOS-Safari Text, den es als Fliesstext einstuft
   («Text Autosizing»). 100 % schaltet das ab; Pinch-Zoom bleibt möglich. */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }

/* Sichtbarer Tastaturfokus als echte outline (nicht nur box-shadow) — bleibt dadurch
   auch im Windows-Kontrastmodus / forced-colors sichtbar. :where() hat Spezifität 0,
   die Seiten dürfen den Look also weiter verfeinern (z.B. zusätzlicher Ring per
   box-shadow), sollen aber kein "outline:none" mehr setzen. */
:where(a,button,input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:2px solid var(--color-accent);
  outline-offset:2px;
}
@media (forced-colors: active){
  :where(a,button,input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{ outline-color:Highlight; }
}

/* Der Kopf ist jetzt hell (auf jeder Seite). Das mitgelieferte Wortmarken-SVG
   (logo-dark.svg, #002b2f) passt auf hellen Grund; im Dark Mode wird es zur
   weissen Silhouette. Nur das SVG betroffen — ein hochgeladenes Mandanten-Logo
   (Rasterbild via applyBranding()) bleibt unangetastet. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .logo-img[src$=".svg"]{ filter:brightness(0) invert(1); opacity:.92; }
}
:root[data-theme="dark"] .logo-img[src$=".svg"]{ filter:brightness(0) invert(1); opacity:.92; }

/* Nutzer-Feedback: die dunkle Traegerflaeche hinter hochgeladenen Mandanten-Logos (vorher
   hier, siehe Git-Historie) wirkte unpassend und wurde entfernt -- ein Mandanten-Logo zeigt
   jetzt direkt auf der hellen Kopf-/Seitenleisten-Flaeche. Mandanten mit einem hell/weiss
   gehaltenen Logo muessen fuer ausreichend Kontrast eine entsprechend eingefaerbte Logo-Datei
   hochladen (kein automatischer Hell/Dunkel-Ausgleich mehr für Rasterbilder). */

/* Gestaltete Scrollbar statt des nackten Browser-Standards (grauer Blockbalken, der auf jeder
   Seite aus dem sonst durchgestalteten Erscheinungsbild herausfällt) — folgt den Design-Tokens,
   greift dadurch automatisch die pro Seite lokal gesetzten Dark-Mode-Werte auf. Gilt seitenweit
   (Firefox: scrollbar-color auf :root vererbt sich; WebKit/Chromium/Edge: Universalselektor,
   da ::-webkit-scrollbar sich nicht vererbt) — sowohl für den Seitenscroll als auch für einzelne
   overflow:auto-Bereiche (Dropdowns, Kanban-Spalten, Modal-Listen).*/
:root{ scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
::-webkit-scrollbar{ width:11px; height:11px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background-color:var(--color-border); border-radius:999px; border:3px solid transparent; background-clip:padding-box; }
@media (hover:hover){ ::-webkit-scrollbar-thumb:hover{ background-color:var(--color-text-muted); background-clip:padding-box; } }
::-webkit-scrollbar-corner{ background:transparent; }

/* Work Sans, self-hosted instead of loaded from fonts.googleapis.com/fonts.gstatic.com —
   loading fonts directly from Google's CDN sends every visitor's IP address to Google on
   every page view (including the two public, unauthenticated forms) without a legal basis,
   a well-established GDPR issue (e.g. LG München I, 3 O 17493/20). Both files are the same
   variable-font subsets Google itself serves (weight axis 400–700 in one file per subset). */
@font-face{
  font-family:'Work Sans';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('/work-sans-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Work Sans';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('/work-sans-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* Bricolage Grotesque (Display) + IBM Plex Mono (Zahlen) — self-hosted aus
   demselben DSGVO-Grund wie Work Sans oben (kein Request an Google-CDN). */
@font-face{
  font-family:'Bricolage Grotesque';
  font-style:normal;
  font-weight:500 700;
  font-display:swap;
  src:url('/bricolage-grotesque-latin.woff2') format('woff2');
}
@font-face{ font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/ibm-plex-mono-400-latin.woff2') format('woff2'); }
@font-face{ font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/ibm-plex-mono-500-latin.woff2') format('woff2'); }
@font-face{ font-family:'IBM Plex Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('/ibm-plex-mono-600-latin.woff2') format('woff2'); }

/* K6 (Review #96): Montserrat für die Seiten der Magic Offerte (--mo-ff in magic-offerte.css) -- self-hosted aus
   demselben DSGVO-Grund wie Work Sans oben. Variable Schrift (Gewicht 100–900), SIL Open Font License 1.1
   (Fontsource @fontsource-variable/montserrat 5.2.8). Andere Seiten verwenden sie nicht und laden sie nicht. */
@font-face{
  font-family:'Montserrat';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('/montserrat-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Montserrat';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('/montserrat-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

.account-menu{ position:relative; flex-shrink:0; }
.account-menu[hidden]{ display:none; }
.account-chip{ display:flex; align-items:center; gap:8px; background:var(--color-accent-soft); border:none; border-radius:9px; padding:5px 12px 5px 5px; cursor:pointer; color:var(--color-text); font:inherit; font-size:12.5px; font-weight:700; }
@media (hover:hover){ .account-chip:hover{ background:color-mix(in srgb, var(--color-accent) 18%, var(--color-surface)); } }
.account-avatar{ width:24px; height:24px; border-radius:50%; background:var(--color-accent); color:var(--color-on-accent); display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; flex-shrink:0; }
.account-dropdown{ position:absolute; top:calc(100% + 8px); right:0; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius); box-shadow:var(--shadow); min-width:210px; padding:6px; z-index:60; }
.account-dropdown[hidden]{ display:none; }
.account-dropdown-item{ display:block; width:100%; text-align:left; background:none; border:none; padding:9px 10px; border-radius:6px; font:inherit; font-size:13px; font-weight:600; color:var(--color-text); text-decoration:none; cursor:pointer; box-sizing:border-box; }
@media (hover:hover){ .account-dropdown-item:hover{ background:var(--color-accent-soft); } }
.account-dropdown-sep{ height:1px; background:var(--color-border); margin:5px 4px; }

/* Zähler-Badge auf Nav-Links (z.B. "Aufgaben"), das App-Icon-typisch nur bei offenem Zähler
   erscheint. Identisches CSS existiert ausserdem lokal in kunde.html für die Tab-Badges dort —
   dieses hier ist die einzige Kopie, die seitenübergreifend im Nav gebraucht wird. */
.nav-badge{ display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px; padding:0 5px; margin-left:6px; border-radius:5px; background:var(--color-accent); color:var(--color-on-accent); font-size:11px; font-weight:700; vertical-align:1px; }
.nav-badge:empty{ display:none; }

/* ======================= APP-SHELL =======================
   Redesign "Fallassistent": Desktop (>=901px) bekommt eine schlanke Kopfzeile
   (.app-topbar-nav) statt der Seitenleiste -- die Seitenleiste (.app-sidebar) lebt nur noch
   als Mobil-Drawer weiter (<=900px, Hamburger-Menü). Beide teilen sich dasselbe NAV-Array,
   Modul-Sichtbarkeit und Aufgaben-Badge aus mountAppShell() (shared.js). Das Einklappen der
   Seitenleiste entfaellt damit komplett -- es gibt auf Desktop keine mehr, die Platz braucht. */
body.has-app-shell{
  /* Locenti-Markenband (Spec 2026-11-10-marke-rahmen) sitzt fix ueber der Kopfzeile. */
  --brandband-h:22px;
  padding-left:0; padding-top:calc(var(--topbar-h) + var(--brandband-h));
  /* kunde.html verankert seine sticky Werkzeugleiste an --nav-height (früher die
     Höhe der Top-.nav, per ResizeObserver gemessen — der greift ohne .nav nicht mehr).
     Jetzt an der Höhe von Markenband + Kopfleiste festmachen, sonst klebt sie darunter. */
  --nav-height:calc(var(--topbar-h) + var(--brandband-h));
}
/* Fusszeile auch auf kurzen Seiten am unteren Rand (Spec 2026-11-10-einheitliche-oberflaeche):
   .app-footer-gap ist mindestens 48px hoch; _trackFooterOverlap() (shared.js) verlaengert ihn auf
   kurzen Seiten bis zum Fensterrand. Bewusst kein Flex-Layout am body -- das machte zentrierte
   Inhalte (margin:auto) so breit wie ihr breitestes Kind und die Seite seitlich scrollbar. */
body.has-app-shell > .app-footer-gap{ height:var(--space-8, 48px); }
/* Gemeinsame Inhaltsbreite der Arbeitsseiten (Lager, Lieferungen, Rechnungen, Mahnungen, Aufgaben,
   Berichte, Einstellungen -- Spec 2026-11-10-einheitliche-oberflaeche). Kundenuebersicht (Tafel)
   und Kundenseite (Positionsraster) bleiben bewusst breiter. */
:root{ --page-max:1200px; }
/* Sichtbare Hilfezeile unter Fachbegriff-Feldern */
.field-hint{ display:block; margin-top:4px; font-size:12px; line-height:1.4; color:var(--color-text-muted); }
/* Fehlerhinweis direkt beim Feld statt Popup (UX-Rundgang 2026-11-11), s. setFieldError() in shared.js */
.field-error{ display:block; margin-top:4px; font-size:12px; line-height:1.4; color:var(--color-danger); }
.field-error[hidden]{ display:none; }
/* Feldraster mit sichtbarem Hinweis oben ausrichten -- sonst rutschen Beschriftung und Feld des
   betroffenen Felds gegenueber den Nachbarfeldern der Zeile nach oben. */
:has(> .field > .field-error:not([hidden])){ align-items:start; }
.input[aria-invalid="true"], input[aria-invalid="true"]{ border-color:var(--color-danger); }
/* Tabellen auf dem Handy als Karten statt seitlich scrollender Tabellen (wie die Vorhang-
   Positionen, Spec 2026-11-10-einheitliche-oberflaeche). Zellen tragen data-role: main =
   Bezeichnung, amount = Betrag rechts, meta = Details darunter (data-label als Vorsatz),
   action = Knopf, full/field = Eingabefelder in .table-cards-edit. Druck bleibt unberuehrt. */
.tc-mobile{ display:none; }
@media screen and (max-width:640px){
  .table-cards thead{ display:none; }
  .table-cards, .table-cards tbody{ display:block; width:100%; }
  .table-cards tr{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; padding:12px 14px; margin-bottom:8px; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-surface); }
  .table-cards td{ display:block; padding:0; border:0; background:none !important; text-align:left !important; }
  .table-cards td[data-role="main"]{ order:1; flex:1 1 55%; min-width:0; font-weight:600; overflow-wrap:anywhere; }
  .table-cards td[data-role="main"] *{ text-align:left; }
  .table-cards td[data-role="amount"]{ order:2; margin-left:auto; font-weight:700; white-space:nowrap; text-align:right !important; }
  .table-cards td[data-role="meta"]{ order:3; font-size:12.5px; color:var(--color-text-muted); }
  .table-cards td[data-role="meta"][data-label]::before{ content:attr(data-label) " "; }
  .table-cards td[data-role="action"]{ order:4; margin-left:auto; }
  .table-cards td[data-role="empty"]{ flex:1 1 100%; }
  .table-cards .tc-desk, .table-cards td.tc-desk-cell{ display:none; }
  .table-cards .tc-mobile{ display:block; font-weight:500; }
  .table-cards-edit td[data-role="full"]{ order:1; flex:1 1 100%; }
  .table-cards-edit td[data-role="field"]{ order:2; flex:1 1 calc(50% - 6px); min-width:0; }
  .table-cards-edit td[data-role="field"]::before{ content:attr(data-label); display:block; font-size:11.5px; font-weight:600; color:var(--color-text-muted); margin-bottom:3px; }
  .table-cards-edit td input.input{ width:100% !important; min-height:44px; }
  .table-cards-edit td[data-role="amount"]{ order:3; margin-left:0; margin-top:4px; }
  .table-cards-edit td[data-role="amount"]::before{ content:attr(data-label) " "; font-size:12px; font-weight:600; color:var(--color-text-muted); }
  .table-cards-edit td[data-role="action"]{ order:4; margin-top:4px; }
  .table-cards td[data-role="action"] .btn-icon{ min-width:44px; min-height:44px; }
}
body.has-app-shell > .app-footer{ margin-top:0; }

/* ======================= LOCENTI-RAHMEN (Spec 2026-11-10-marke-rahmen) =======================
   Markenband oben im Gruenverlauf der Anmeldeseite + leise Fusszeile. Feste Markenfarben
   (unabhaengig vom Hell/Dunkel-Modus), nicht klickbar, kein Hover -- darf nie wie ein Knopf
   wirken. */
.app-brandband{
  position:fixed; top:0; left:0; right:0; height:var(--brandband-h); z-index:41;
  display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:0 24px;
  background:linear-gradient(90deg, #2D5E51 0%, #1F4339 100%); color:#B7CDB9;
  font-size:9.5px; font-weight:500; letter-spacing:.3em; text-transform:uppercase;
  pointer-events:none; user-select:none;
}
.app-brandband .locenti-mark{ width:11px; height:10px; flex-shrink:0; }
.app-brandband-brand{ display:inline-flex; align-items:center; gap:6px; color:#E3EDE6; }
.app-brandband-name{ font-family:var(--font-display); font-size:11px; font-weight:700; letter-spacing:.18em; }
.app-brandband-brand .locenti-mark{ width:13px; height:12px; }
.app-brandband-sep{ opacity:.6; }
@media (max-width:480px){ .app-brandband-sep, .app-brandband-tagline{ display:none; } }
.app-footer{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  margin-top:var(--space-8, 48px); padding:14px 24px; border-top:1px solid var(--color-border);
  background:var(--color-surface); font-size:12px; color:var(--color-text-muted);
}
.app-footer-brand{ display:inline-flex; align-items:center; gap:9px; color:#6B7F77; }
.app-footer-brand .locenti-mark{ width:15px; height:14px; color:#9DB3A6; flex-shrink:0; }
.app-footer-name{ font-family:var(--font-display); font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.app-footer-sep{ color:var(--color-border-strong); }
.app-footer-tagline{ font-size:10.5px; letter-spacing:.28em; text-transform:uppercase; }
/* Leerzustand mit "Lo"-Illustration */
.brand-empty{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:48px 24px; }
.brand-empty-mark{ width:60px; height:54px; margin-bottom:4px; }
.brand-empty-mark path{ fill:color-mix(in srgb, var(--color-accent) 22%, var(--color-surface)); }
.brand-empty-mark circle{ fill:none; stroke:var(--color-accent); stroke-width:15; opacity:.55; }
.brand-empty-title{ font-family:var(--font-display); font-size:18px; color:var(--color-text); }
.brand-empty-text{ margin:0; max-width:340px; font-size:13.5px; line-height:1.5; color:var(--color-text-muted); }
.brand-empty-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:6px; }
@media (max-width:900px){
  body.has-app-shell{ --brandband-h:18px; }
  .app-brandband{ padding:0 14px; letter-spacing:.22em; font-size:8.5px; }
  .app-footer{ margin-bottom:0; padding:12px 16px; }
  .app-footer-tagline, .app-footer-sep{ display:none; }
}

.app-sidebar{
  position:fixed; inset:0 auto 0 0; width:var(--sidebar-w); z-index:40;
  background:var(--color-surface); border-right:1px solid var(--color-border);
  display:flex; flex-direction:column; padding:14px 12px; gap:10px; overflow-y:auto;
}
.app-logo{ display:flex; align-items:center; gap:8px; padding:6px 10px 10px; }
.app-logo .logo-img{ height:26px; width:auto; }
.app-nav{ display:flex; flex-direction:column; gap:2px; }
.app-nav-secondary{ margin-top:auto; padding-top:10px; border-top:1px solid var(--color-border); }
.app-nav-item{
  display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:9px;
  color:var(--color-text-muted); text-decoration:none; font-size:13.5px; font-weight:600; line-height:1;
}
@media (hover:hover){ .app-nav-item:hover{ background:var(--color-surface-2); color:var(--color-text); } }
.app-nav-item.active{
  background:var(--color-accent-soft); color:var(--color-accent-700);
  box-shadow:inset 3px 0 0 var(--color-accent);
}
.app-nav-item .ani-ic{ width:18px; height:18px; flex-shrink:0; }
.app-nav-item .nav-badge{ margin-left:auto; }

.app-topbar{
  position:fixed; top:var(--brandband-h, 0px); left:0; right:0; height:var(--topbar-h); z-index:39;
  display:flex; align-items:center; gap:10px; padding:0 16px;
  background:var(--color-surface); border-bottom:1px solid var(--color-border);
}
.app-topbar-spacer{ flex:1; }
.app-menu-btn{
  display:none; align-items:center; justify-content:center; width:38px; height:38px;
  border:1px solid var(--color-border); border-radius:9px;
  background:var(--color-surface); color:var(--color-text); cursor:pointer;
}
.app-menu-btn .ani-ic{ width:20px; height:20px; }
.app-topbar .account-menu[hidden]{ display:none; }

/* Desktop-Kopfzeilen-Inhalte: ausgeblendet, bis die min-width:901px-Regel unten sie zeigt --
   auf Mobil uebernimmt die Sidebar als Drawer dieselbe Rolle. */
.app-topbar-logo{ display:none; align-items:center; gap:8px; flex-shrink:0; }
.app-topbar-logo .logo-img{ height:24px; width:auto; }
.app-topbar-nav{ display:none; align-items:center; height:100%; }
.app-topbar-nav-item{
  display:flex; align-items:center; gap:7px; height:100%; margin:0 9px; padding:0 2px;
  color:var(--color-text-muted); text-decoration:none; font-size:13px; font-weight:600;
  position:relative; white-space:nowrap;
}
@media (hover:hover){ .app-topbar-nav-item:hover{ color:var(--color-text); } }
.app-topbar-nav-item.active{ color:var(--color-accent-700); }
.app-topbar-nav-item.active::after{
  content:''; position:absolute; left:1px; right:1px; bottom:0; height:2.5px;
  background:var(--color-accent-700); border-radius:2px 2px 0 0;
}
.app-topbar-nav-item .ani-ic{ width:17px; height:17px; flex-shrink:0; }
.app-topbar-nav-item .nav-badge{ margin-left:1px; }
.app-topbar-more{ display:none; position:relative; flex-shrink:0; }
.app-topbar-more-btn{
  display:flex; align-items:center; justify-content:center; width:34px; height:34px;
  border:none; border-radius:9px; background:none; color:var(--color-text-muted); cursor:pointer;
}
@media (hover:hover){ .app-topbar-more-btn:hover{ background:var(--color-surface-2); color:var(--color-text); } }
.app-topbar-more-btn .ani-ic{ width:18px; height:18px; }
.app-topbar-more-dropdown{
  position:absolute; top:calc(100% + 8px); right:0; background:var(--color-surface);
  border:1px solid var(--color-border); border-radius:var(--radius); box-shadow:var(--shadow);
  min-width:190px; padding:6px; z-index:60;
}
.app-topbar-more-dropdown[hidden]{ display:none; }

.app-bottombar{ display:none; }
.sidebar-backdrop{ display:none; }

@media (min-width:901px){
  .app-sidebar{ display:none; }
  .app-topbar-logo, .app-topbar-nav, .app-topbar-more{ display:flex; }
}

@media (max-width:900px){
  body.has-app-shell{ padding-bottom:var(--bottombar-h); }
  .app-menu-btn{ display:inline-flex; }
  .app-sidebar{
    transform:translateX(-100%); transition:transform 280ms var(--ease-drawer); box-shadow:var(--shadow); z-index:60;
  }
  body.sidebar-open .app-sidebar{ transform:translateX(0); }
  /* Abdunkelung blendet mit der Leiste ein statt schlagartig zu erscheinen. */
  .sidebar-backdrop{
    display:block; position:fixed; inset:0; z-index:55; background:rgba(15,23,42,.4);
    opacity:0; pointer-events:none; transition:opacity 280ms ease;
  }
  body.sidebar-open .sidebar-backdrop{ opacity:1; pointer-events:auto; }
  .app-bottombar{
    display:flex; position:fixed; left:0; right:0; bottom:0; height:var(--bottombar-h); z-index:39;
    background:var(--color-surface); border-top:1px solid var(--color-border);
  }
  .app-bottom-item{
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
    color:var(--color-text-muted); text-decoration:none; font-size:10.5px; font-weight:600;
    background:none; border:none; cursor:pointer; position:relative;
  }
  .app-bottom-item.active{ color:var(--color-accent-700); }
  .app-bottom-item .ani-ic{ width:20px; height:20px; }
  .app-bottom-item .nav-badge{ position:absolute; top:5px; left:calc(50% + 6px); margin:0; }
  /* Auftrag K10 (22.11.): Magic Offerte und Einstellungen ohne Leiste unten -- kein Platz dafür reserviert */
  body.ohne-bottombar{ --bottombar-h:0px; }
  body.ohne-bottombar .app-bottombar{ display:none; }
}

/* ======================= K20: Glas-Kopf (body[data-kopf="glas"], Spec 2026-11-22-k20-kopf-glas) =======================
   Handy: kein Kopfbalken (keine Höhe im Fluss), fixierte runde Glas-Knöpfe ☰ links und ⋯ rechts, die Titelzeile steht
   in der Seite zwischen ihnen. PC: Kopf transparent mit Logo und Navigation, scrollt mit; rechts derselbe ⋯-Knopf. */
.app-glas{
  width:44px; height:44px; padding:0; border-radius:50%; align-items:center; justify-content:center; cursor:pointer;
  background:linear-gradient(180deg, var(--glas-1), var(--glas-2)); border:1px solid var(--glas-rand);
  box-shadow:var(--glas-schatten); color:var(--glas-icon);
  -webkit-backdrop-filter:blur(14px) saturate(160%); backdrop-filter:blur(14px) saturate(160%);
  transition:opacity .2s ease;
}
.app-glas .ani-ic{ width:20px; height:20px; stroke-width:1.75; }
.app-glas-mehr{ display:inline-flex; }
.app-glas-mehr-w{ position:relative; flex-shrink:0; }
.app-glas-menu{
  position:absolute; top:calc(100% + 8px); right:0; z-index:60; min-width:240px; max-width:calc(100vw - 24px); padding:6px;
  background:linear-gradient(180deg, var(--glas-1), var(--glas-2)); border:1px solid var(--glas-rand); border-radius:18px;
  box-shadow:var(--glas-schatten), 0 12px 32px rgba(0,0,0,.12);
  -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
}
.app-glas-menu[hidden]{ display:none; }
.app-glas-item{
  display:flex; align-items:center; width:100%; min-height:44px; padding:0 12px; border:0; border-radius:12px;
  background:none; color:var(--color-text); font:inherit; font-size:14px; font-weight:500; text-align:left;
  text-decoration:none; cursor:pointer; box-sizing:border-box;
}
@media (hover:hover){ .app-glas-item:not(.is-info):hover{ background:color-mix(in srgb, var(--color-text) 7%, transparent); } }
.app-glas-item:focus-visible{ outline-offset:-2px; }
.app-glas-item.is-info{ color:var(--color-text-muted); cursor:default; }
.app-glas-item.is-gefahr{ color:var(--color-danger); }
.app-glas-sep{ height:1px; margin:5px 8px; background:color-mix(in srgb, var(--color-text) 12%, transparent); }
.app-glas-kopf{ padding:6px 12px 2px; font-size:12px; font-weight:600; color:var(--color-text-muted); }
.app-glas-wer{ padding:6px 12px 6px; font-size:12px; color:var(--color-text-muted); }
@media (max-width:900px){ .app-glas-nur-pc{ display:none; } }
@media (max-width:900px){
  body.has-app-shell[data-kopf="glas"]{ --topbar-h:0px; padding-top:calc(var(--brandband-h) + env(safe-area-inset-top)); }
  body[data-kopf="glas"] .app-topbar{ height:0; padding:0; background:none; border:0; }
  body[data-kopf="glas"] .app-glas{ position:fixed; top:calc(env(safe-area-inset-top) + var(--brandband-h) + 8px); }
  body[data-kopf="glas"] .app-menu-btn.app-glas{ left:calc(12px + env(safe-area-inset-left)); }
  body[data-kopf="glas"] .app-glas-mehr{ right:calc(12px + env(safe-area-inset-right)); }
  body[data-kopf="glas"] .app-glas-menu{ position:fixed; top:calc(env(safe-area-inset-top) + var(--brandband-h) + 60px);
    right:calc(12px + env(safe-area-inset-right)); }
  /* Titelzeile zwischen den Knöpfen (nicht fixiert): Mitte, 16 px halbfett, höchstens 2 Zeilen; die erste Zeile steht
     auf der Höhe der Knöpfe (11 px + 22 px + 11 px = 44 px), seitlich frei für die Knöpfe (mit 16 px Seitenrand) */
  body[data-kopf="glas"] .app-titel{
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden;
    margin:0; padding:11px 44px; font-family:var(--font-body); font-size:16px; font-weight:600; line-height:22px;
    letter-spacing:0; text-align:center; overflow-wrap:anywhere; color:var(--color-text);
    /* Review #145: line-clamp schneidet erst am Padding-Rand ab -- ohne das wäre eine 3. Zeile im unteren Padding halb
       sichtbar; das obere Padding bleibt (Tippfläche 44 px der ersten Zeile) */
    clip-path:inset(0 0 11px 0);
  }
  body[data-kopf="glas"] div.app-titel{ margin-bottom:12px; }  /* aus data-titel gebaut: Luft zum Inhalt darunter */
}
@media (min-width:901px){
  body[data-kopf="glas"] .app-topbar{ position:absolute; background:none; border-bottom:0; }
  body[data-kopf="glas"] div.app-titel{ margin:0 0 12px; font-size:16px; font-weight:600; color:var(--color-text); }
}

/* ======================= Magic Offerte: Menü hinter ☰ (Spec M1, 5.6; Entwurf freigegeben 25.11.) =======================
   Kopf mit Name, Betrieb und Rolle; Kunden, Einstellungen (GL), Hilfe; Abmelden unten; Marke Locenti + Magic Offerte.
   Am Laptop geht dasselbe Menü über ☰ auf (keine obere Leiste). */
.app-sidebar{ font-family:'Montserrat', var(--font-body); }
.app-wer{ display:flex; align-items:center; gap:10px; padding:10px 8px 14px; }
.app-wer-av{ width:36px; height:36px; border-radius:18px; background:var(--color-loden); color:var(--color-on-loden);
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; flex:none; }
.app-wer-txt{ display:flex; flex-direction:column; min-width:0; }
.app-wer-txt b{ font-weight:600; font-size:14px; color:var(--color-text); }
.app-wer-txt span{ font-size:12px; color:var(--color-text-muted); }
.app-sidebar .app-nav-item{ min-height:46px; padding:0 14px; border-radius:12px; font-size:14px; font-weight:500; color:var(--color-text);
  border:0; background:none; font-family:inherit; cursor:pointer; text-align:left; width:100%; }
.app-sidebar .app-nav-item.active{ background:var(--color-accent-soft); color:var(--color-accent-700); box-shadow:none; }
.app-sidebar .app-nav-item .ani-ic{ stroke:var(--color-accent-700); }
.app-nav-ende{ padding-top:8px; border-top:1px solid var(--color-border); }
.app-marke{ margin-top:auto; display:flex; align-items:center; gap:8px; padding:10px 14px 4px; font-weight:700; font-size:13px; color:var(--color-accent-700); }
.app-marke svg{ height:16px; width:auto; }
@media (min-width:901px){
  body[data-kopf="glas"] .app-menu-btn{ display:inline-flex; }
  body[data-kopf="glas"] .app-topbar-logo, body[data-kopf="glas"] .app-topbar-nav{ display:none; }
  body[data-kopf="glas"] .app-sidebar{ display:flex; transform:translateX(-100%); transition:transform 280ms var(--ease-drawer);
    box-shadow:var(--shadow); z-index:60; }
  body[data-kopf="glas"].sidebar-open .app-sidebar{ transform:translateX(0); }
  body[data-kopf="glas"] .sidebar-backdrop{ display:block; position:fixed; inset:0; z-index:55; background:rgba(15,23,42,.4);
    opacity:0; pointer-events:none; transition:opacity 280ms ease; }
  body[data-kopf="glas"].sidebar-open .sidebar-backdrop{ opacity:1; pointer-events:auto; }
}

@media print{
  .app-sidebar, .app-topbar, .app-bottombar, .sidebar-backdrop, .app-brandband, .app-footer, .app-footer-gap{ display:none !important; }
  body.has-app-shell{ padding:0 !important; }
}

:root:not([data-theme="light"]) .app-sidebar .logo-img[src$=".svg"],
:root[data-theme="dark"] .app-sidebar .logo-img[src$=".svg"]{ filter:brightness(0) invert(1); opacity:.92; }

#toast{ position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--color-text); color:var(--color-surface); padding:11px 18px; border-radius:var(--radius-sm); box-shadow:var(--shadow); font-size:13px; z-index:400; /* ueber .modal-overlay (300), sonst verdeckt ein offener Dialog die Meldung */ opacity:0; transition:opacity .2s; pointer-events:none; max-width:90vw; text-align:center; }

.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Modal-Grundgerüst. .modal-icon.info/.modal-icon.lock bleiben bewusst pro Seite lokal —
   index.html verwendet dort einen anderen Farbton (--color-accent-tint-2) als kunde.html/
   einstellungen.html (--color-accent-soft), das ist keine Kopie, sondern eine abweichende
   bestehende Gestaltung, die diese Auslagerung nicht verändern soll. */
.modal-overlay{ position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:20px; z-index:300; opacity:0; pointer-events:none; transition:opacity .15s ease; }
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal-box{ background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--r-panel); box-shadow:var(--shadow); max-width:400px; width:100%; padding:var(--space-6); transform:translateY(10px) scale(.97); transition:transform 200ms var(--ease-out); }
.modal-overlay.open .modal-box{ transform:translateY(0) scale(1); }
.modal-icon{ width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; margin-bottom:var(--space-3); }
.modal-icon svg{ width:21px; height:21px; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.modal-icon.danger{ background:var(--color-danger-tint); color:var(--color-danger); }
.modal-title{ font-family:var(--font-display); font-size:17px; font-weight:600; letter-spacing:-.01em; margin:0 0 6px; }
.modal-message{ font-size:13.5px; color:var(--color-text-muted); line-height:1.55; margin:0 0 var(--space-4); white-space:pre-wrap; }
.modal-input{ width:100%; border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:10px 12px; font-family:inherit; font-size:15px; margin:2px 0 var(--space-4); background:var(--color-bg); color:var(--color-text); display:block; }
.modal-input:focus-visible{ border-color:var(--color-accent); box-shadow:0 0 0 3px var(--color-focus-ring); outline:2px solid transparent; outline-offset:2px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; }
.modal-actions .btn{ min-width:84px; justify-content:center; }

/* ======================= LADESPINNER (Locenti-Bildmarke "Lo") =======================
   Das kraeftige L mit dem kleinen o im Winkel, wie im Locenti-Schriftzug. Das L steht, das o
   ist der eigentliche Spinner: blasser Ring + umlaufender Bogen. Alles ueber
   stroke:currentColor, damit er auf dunklen Knoepfen (z.B. "Anmelden…") genauso sichtbar ist wie
   auf hellem Grund. Groesse = 1.25em, folgt also der Schrift; groessere Einsaetze setzen
   width/height direkt. */
.brand-spinner{ display:inline-block; width:1.25em; height:1.25em; vertical-align:middle; flex-shrink:0; overflow:visible;
  fill:none; stroke:currentColor; }
.brand-spinner .bs-l{ stroke-width:3.4; stroke-linejoin:miter; }
.brand-spinner .bs-track{ stroke-width:2.6; opacity:.2; }
.brand-spinner .bs-arc{ stroke-width:2.6; stroke-linecap:round; stroke-dasharray:32 100; transform-origin:14px 10px;
  animation:bs-spin .85s cubic-bezier(.5,.15,.5,.85) infinite; }
@keyframes bs-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .brand-spinner .bs-arc{ animation-duration:2.4s; animation-timing-function:linear; } }

/* ======================= FORTSCHRITTS-LEISTE (Fall-Lebenszyklus Phase 3) =======================
   Ausfuehrliche Variante (Fall-Leiste Kundenseite) und kompakte Variante (Lieferungen-Stopps,
   Rechnungsuebersicht-Zeilen, Phase 4) teilen sich dieselbe Struktur, unterscheiden sich nur in
   Groesse/Abstand. Gleiches visuelles Vokabular wie .fulfillment-step (kunde.html) -- bewusst
   nicht dieselben Klassen, weil .fulfillment-step dort an eine andere Datenquelle (nur
   Auftragsabwicklung-Substatus) gebunden bleibt und unveraendert weiterlebt. */
.case-progress{ display:flex; align-items:flex-start; gap:0; margin:var(--space-2) 0; flex-wrap:wrap; }
.case-progress-step{ display:flex; flex-direction:column; align-items:center; gap:4px; flex:1 1 0; min-width:56px; position:relative; font-size:11px; font-weight:600; color:var(--color-text-muted); text-align:center; text-decoration:none; }
.case-progress-step::before{ content:''; position:absolute; top:6px; left:-50%; width:100%; height:2px; background:var(--color-border); z-index:0; }
.case-progress-step:first-child::before{ display:none; }
.case-progress-step .dot{ width:14px; height:14px; border-radius:50%; background:var(--color-surface); border:2px solid var(--color-border); z-index:1; }
.case-progress-step.done .dot{ background:var(--color-accent); border-color:var(--color-accent); }
.case-progress-step.done::before{ background:var(--color-accent); }
.case-progress-step.active{ color:var(--color-accent-700); }
.case-progress-step.active .dot{ border-color:var(--color-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent); }
.case-progress-label{ white-space:nowrap; }
.case-progress-compact{ gap:0; }
.case-progress-compact .case-progress-step{ font-size:9.5px; min-width:0; gap:2px; }
.case-progress-compact .dot{ width:10px; height:10px; }
@media (max-width:600px){ .case-progress-label{ display:none; } .case-progress-step{ min-width:20px; } }
@media (max-width:420px){ .modal-actions{ flex-direction:column-reverse; } .modal-actions .btn{ width:100%; } }

/* ===================== Swiss-SaaS-Grunddesign: gemeinsame Bausteine =====================
   Gleiche Sprache wie der Offerten-Editor (kunde.html): getoenter Hintergrund, dunkler
   Petrol-Seitenkopf mit Zonen (Titel | Kennzahlen | Aktionen), getoente Eingabezone fuer
   Filter/Suche. Die Seiten definieren .btn/.view-toggle je selbst -- die Varianten hier
   greifen nur INNERHALB von .page-hero (hoehere Spezifitaet), ausserhalb bleibt alles wie es ist. */
html body{ background:var(--color-canvas); }

.page-hero{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-4) var(--space-6); padding:16px 22px; margin-bottom:var(--space-4); background:var(--color-ink); color:var(--color-on-ink); border-radius:var(--radius); box-shadow:var(--shadow); }
.page-hero-main{ flex:1 1 220px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.page-hero-title-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.page-hero h1{ color:var(--color-on-ink); font-family:var(--font-display); font-size:24px; font-weight:600; letter-spacing:-.02em; line-height:1.15; margin:0; }
.page-hero-sub{ font-size:12.5px; color:var(--color-on-ink-muted); }
.page-hero-stats{ display:flex; align-items:center; padding:6px 4px; background:rgba(255,255,255,.06); border:1px solid var(--color-ink-line); border-radius:12px; }
.page-hero-stats[hidden], .page-hero-stats:not(:has(:not([hidden]))){ display:none; }
.page-hero-stat{ display:flex; flex-direction:column; gap:2px; padding:0 16px; }
.page-hero-stat + .page-hero-stat{ border-left:1px solid var(--color-ink-line); }
.page-hero-stat-label{ font-size:11.5px; font-weight:600; color:var(--color-on-ink-muted); }
.page-hero-stat-value{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; font-size:17px; font-weight:600; color:var(--color-on-ink); white-space:nowrap; }
.page-hero-actions{ display:flex; align-items:center; gap:var(--space-2); flex-wrap:wrap; }

.page-hero .btn{ min-height:40px; }
.page-hero a.btn{ text-decoration:none; }
.page-hero .btn-primary{ background:#fff; color:var(--color-ink); border-color:#fff; }
@media (hover:hover){ .page-hero .btn-primary:hover{ background:rgba(255,255,255,.88); } }
.page-hero .btn:not(.btn-primary){ background:transparent; border-color:var(--color-ink-line); color:var(--color-on-ink); }
@media (hover:hover){ .page-hero .btn:not(.btn-primary):hover{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.3); } }
.page-hero .view-toggle{ background:rgba(255,255,255,.06); border-color:var(--color-ink-line); }
.page-hero .view-toggle button{ color:var(--color-on-ink-muted); }
@media (hover:hover){ .page-hero .view-toggle button:hover{ color:var(--color-on-ink); } }
.page-hero .view-toggle button.active{ background:#fff; color:var(--color-ink); box-shadow:none; }

/* Eingabezone: Suche/Filter/Steuerung als getoente Flaeche, darin weisse, umrandete Felder --
   trennt "hier stelle ich etwas ein" sichtbar von den weissen Ergebnis-Karten darunter. */
.filter-well{ background:var(--color-well); border:1px solid var(--color-border); border-radius:var(--radius); padding:var(--space-3); margin-bottom:var(--space-4); }
.filter-well > :last-child{ margin-bottom:0; }

/* Einheitliches Upload-Feld (uploadFieldInnerHTML() in shared.js) -- Vorlage ist das Bild-Feld der
   Moebel-Offerte (.img-swatch + "Hochladen…" in kunde.html/kunde-moebel.js). */
.upload-field{ display:flex; align-items:center; gap:8px; width:100%; text-align:left; cursor:pointer; background:none; border:none; padding:0; margin:0; font:inherit; color:inherit; }
.upload-swatch{ width:38px; height:38px; border-radius:7px; border:1px dashed var(--color-border-strong); background:var(--color-surface-2); flex-shrink:0; display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); transition:border-color .15s ease, background .15s ease, color .15s ease; }
.upload-swatch svg{ width:15px; height:15px; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.upload-hint{ flex:1; min-width:0; font-size:12px; color:var(--color-text-muted); }
.upload-btn{ display:inline-flex; align-items:center; flex-shrink:0; white-space:nowrap; padding:9px 10px; font-size:11px; font-weight:600; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-surface); color:var(--color-text); transition:border-color .15s ease, color .15s ease; }
.upload-field.drag-active .upload-swatch{ border-color:var(--color-accent); background:var(--color-accent-tint, var(--color-accent-soft)); color:var(--color-accent-700); }
@media (hover:hover){ .upload-field:hover .upload-swatch{ border-color:var(--color-accent); background:var(--color-accent-tint, var(--color-accent-soft)); color:var(--color-accent-700); } }
@media (hover:hover){ .upload-field:hover .upload-btn{ border-color:var(--color-accent); color:var(--color-accent-700); } }
@media (max-width:640px){ .page-hero{ padding:14px 16px; } .page-hero h1{ font-size:21px; } }

/* ======================= BEWEGUNG & TOUCH (UI-Feinschliff) =======================
   Druck-Rueckmeldung: Knoepfe geben beim Druecken leicht nach. Seiten mit eigenem
   .btn{transition} nehmen transform dort selbst mit auf. */
.btn, .btn-submit{ transition:transform 160ms var(--ease-out); }
.btn:active:not(:disabled), .btn-submit:active:not(:disabled){ transform:scale(.97); }

/* iOS zoomt beim Antippen in Felder unter 16px. Nur Touch-Geraete, damit die kompakten
   Desktop-Felder bleiben; !important, weil die Seiten .input u.a. spaeter und spezifischer setzen. */
@media (pointer:coarse){
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea{ font-size:16px !important; }
}

/* Auf dem Handy liegt unten die Navigationsleiste: Meldung darueber statt darauf. */
@media (max-width:900px){
  body.has-app-shell #toast{ bottom:calc(var(--bottombar-h) + 12px); }
}

/* Bewegung reduzieren heisst: Ein-/Ausblenden bleibt, Bewegung ueber den Bildschirm faellt weg. */
@media (prefers-reduced-motion: reduce){
  .app-sidebar{ transition:none; }
  .modal-box, .modal-overlay.open .modal-box{ transform:none; transition:none; }
}
