/* public/assets/css/design-system.css
   FireGuard Design-System. Einzige Quelle fuer Farben, Abstaende, Typografie
   und Komponenten. Keine Farbwerte ausserhalb dieser Datei hart schreiben. */

/* ---------------------------------------------------------- 1. Tokens */
:root {
  /* Flaechen */
  --fg-bg:            #0E0F12;
  --fg-bg-sidebar:    #111318;
  --fg-surface:       #16181D;
  --fg-surface-2:     #1C1F26;
  --fg-surface-3:     #22262E;
  --fg-border:        #262A31;
  --fg-border-strong: #343A44;

  /* Text */
  --fg-text:          #F2F4F7;
  --fg-text-muted:    #98A2B3;
  --fg-text-dim:      #667085;
  --fg-text-invert:   #FFFFFF;

  /* Akzent Feuerwehrrot */
  --fg-accent:        #E3000F;
  --fg-accent-hover:  #FF1A28;
  --fg-accent-press:  #B80009;
  --fg-accent-soft:   rgba(227, 0, 15, 0.12);
  --fg-accent-line:   rgba(227, 0, 15, 0.38);

  /* Status */
  --fg-red:           #E3000F;
  --fg-red-soft:      rgba(227, 0, 15, 0.14);
  --fg-orange:        #F08A24;
  --fg-orange-soft:   rgba(240, 138, 36, 0.14);
  --fg-yellow:        #E8B400;
  --fg-yellow-soft:   rgba(232, 180, 0, 0.14);
  --fg-green:         #22C55E;
  --fg-green-soft:    rgba(34, 197, 94, 0.14);
  --fg-blue:          #3B82F6;
  --fg-blue-soft:     rgba(59, 130, 246, 0.14);

  /* Radien */
  --fg-r-sm: 6px;
  --fg-r-md: 10px;
  --fg-r-lg: 14px;
  --fg-r-xl: 20px;
  --fg-r-pill: 999px;
  /* Hoehe der Leiste unten am Handy, ohne sichere Zone. Alles, was schwebt
     (Hinweise, Knoepfe), haelt sich darueber. */
  --fg-tabbar-h: 66px;

  /* Abstaende (4er Raster) */
  --fg-s1: 4px;  --fg-s2: 8px;  --fg-s3: 12px; --fg-s4: 16px;
  --fg-s5: 20px; --fg-s6: 24px; --fg-s8: 32px; --fg-s10: 40px;

  /* Schrift */
  --fg-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fg-fs-xs: 11px; --fg-fs-sm: 13px; --fg-fs-md: 14px; --fg-fs-lg: 15px;
  --fg-fs-xl: 18px; --fg-fs-2xl: 22px; --fg-fs-3xl: 27px;

  /* Bewegung. Kurz und ruhig, nie verspielt. */
  --fg-dur-fast: 110ms;
  --fg-dur:      170ms;
  --fg-dur-slow: 260ms;
  --fg-ease:     cubic-bezier(.4, 0, .2, 1);
  --fg-ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Tiefe */
  --fg-shadow:       0 1px 2px rgba(0,0,0,.45);
  --fg-shadow-lg:    0 12px 32px rgba(0,0,0,.55);
  --fg-glow:         0 0 0 1px var(--fg-accent-line), 0 0 18px rgba(227,0,15,.18);

  /* Masse */
  --fg-sidebar-w:  248px;
  --fg-topbar-h:   56px;
  --fg-content-max: 1520px;
  --fg-tap:        44px;   /* Mindest-Tippflaeche, Finger */
  --fg-ctl:        38px;   /* Bedienhoehe mit Maus */
  --fg-tap-big:    60px;   /* Bedienmodus "Vor Ort" */

  /* Geraeterand: in der installierten App laeuft die Seite randlos
     (viewport-fit=cover). Ohne diese Abstaende liegt die Kopfzeile unter der
     Statusleiste, Uhrzeit und Akku stehen mitten im Suchfeld. Im Browser sind
     alle vier Werte null, dort aendert sich nichts. */
  --fg-safe-top:    env(safe-area-inset-top, 0px);
  --fg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --fg-safe-left:   env(safe-area-inset-left, 0px);
  --fg-safe-right:  env(safe-area-inset-right, 0px);
}

/* Mit der Maus darf alles enger sitzen, am Touchgeraet bleibt die
   Mindest-Tippflaeche von 44 px bestehen (Kap. 19). */
@media (pointer: coarse) { :root { --fg-ctl: var(--fg-tap); } }

/* ------------------------------------------------------- 2. Grundlagen */

/* Ohne diese Zeile gewinnt jede eigene display-Regel gegen das hidden-Attribut;
   versteckte Knoepfe waeren dann trotzdem sichtbar. */
[hidden] { display: none !important; }

@font-face { font-family:"Inter"; font-style:normal; font-weight:400;
  src:url("../fonts/Inter-Regular.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500;
  src:url("../fonts/Inter-Medium.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600;
  src:url("../fonts/Inter-SemiBold.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700;
  src:url("../fonts/Inter-Bold.woff2") format("woff2"); font-display:swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fg-bg);
  color: var(--fg-text);
  font-family: var(--fg-font);
  font-size: var(--fg-fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: var(--fg-fs-3xl); letter-spacing: -0.025em; line-height:1.2; }
h2 { font-size: var(--fg-fs-xl); }
h3 { font-size: var(--fg-fs-lg); }
p  { margin: 0 0 var(--fg-s3); }
a  { color: var(--fg-text); text-decoration: none; }
a { transition: color var(--fg-dur-fast) var(--fg-ease); }

/* Ein Symbol ohne eigene Groesse zieht sich sonst auf die volle Zeilenhoehe
   auf - genau das ist auf der Migrationsseite passiert. Spaetere Regeln mit
   gleicher Gewichtung (z. B. .fg-btn svg) gelten weiterhin. */
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
a:hover { color: var(--fg-accent-hover); }
small { font-size: var(--fg-fs-sm); }
:focus-visible { outline: 2px solid var(--fg-accent-hover); outline-offset: 2px; border-radius: var(--fg-r-sm); }

/* Schmale, unaufdringliche Rollbalken statt der breiten Systemleisten */
* { scrollbar-width: thin; scrollbar-color: var(--fg-surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--fg-surface-3); border-radius: var(--fg-r-pill);
  border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--fg-border-strong); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--fg-accent); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.fg-muted { color: var(--fg-text-muted); }
.fg-dim   { color: var(--fg-text-dim); }
.fg-num   { font-variant-numeric: tabular-nums; }
.fg-sr    { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ----------------------------------------------------------- 3. Layout */
.fg-app { display: grid; grid-template-columns: var(--fg-sidebar-w) 1fr; min-height: 100vh; }
.fg-main { min-width: 0; display: flex; flex-direction: column; }
.fg-content { padding: var(--fg-s6) calc(var(--fg-s6) + var(--fg-safe-right)) var(--fg-s10)
                       calc(var(--fg-s6) + var(--fg-safe-left));
  flex: 1; width:100%; max-width: var(--fg-content-max); margin: 0 auto; }
.fg-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--fg-s4); margin-bottom: var(--fg-s5); }
.fg-page-head p { color: var(--fg-text-muted); margin: var(--fg-s1) 0 0; font-size: var(--fg-fs-sm); }

.fg-grid { display: grid; gap: var(--fg-s3); align-items: start; }
.fg-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.fg-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.fg-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.fg-row { display:flex; align-items:center; gap: var(--fg-s3); }
.fg-row-end { margin-left: auto; }
.fg-stack { display: grid; gap: var(--fg-s4); }

/* --------------------------------------------------------- 4. Sidebar */
.fg-sidebar {
  background: var(--fg-bg-sidebar);
  border-right: 1px solid var(--fg-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  padding-top: var(--fg-safe-top); padding-left: var(--fg-safe-left);
}
.fg-brand { display:flex; align-items:center; gap: var(--fg-s3); padding: var(--fg-s4) var(--fg-s4) var(--fg-s5);
  position: sticky; top:0; background: var(--fg-bg-sidebar); z-index:2; }
.fg-brand img { width: 26px; height: 26px; }
.fg-brand span { font-size: var(--fg-fs-lg); font-weight: 700; letter-spacing: -0.02em; }

.fg-nav { display: block; padding: 0 var(--fg-s3) var(--fg-s4); }

/* Gruppe mit Kopfzeile, aufklappbar */
.fg-nav-group + .fg-nav-group { margin-top: var(--fg-s2); }
.fg-nav-title {
  display:flex; align-items:center; gap: var(--fg-s2); width:100%;
  padding: var(--fg-s2) var(--fg-s3); margin:0;
  background:none; border:0; cursor:pointer; font: inherit;
  font-size: var(--fg-fs-xs); font-weight:600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--fg-text-dim);
  transition: color var(--fg-dur-fast) var(--fg-ease);
}
.fg-nav-title:hover { color: var(--fg-text-muted); }
.fg-nav-title .fg-caret { margin-left:auto; width:12px; height:12px; flex:none;
  transition: transform var(--fg-dur) var(--fg-ease); opacity:.7; }
.fg-nav-group.is-closed .fg-caret { transform: rotate(-90deg); }

/* Aufklappen laeuft ueber die Zeilenhoehe des Rasters, das animiert weich */
.fg-nav-sub { display:grid; grid-template-rows: 1fr; transition: grid-template-rows var(--fg-dur) var(--fg-ease); }
.fg-nav-group.is-closed .fg-nav-sub { grid-template-rows: 0fr; }
.fg-nav-sub > div { overflow:hidden; display:grid; gap: 1px; }

.fg-nav-item {
  display:flex; align-items:center; gap: var(--fg-s3);
  min-height: 34px; padding: 0 var(--fg-s3);
  border-radius: var(--fg-r-md); color: var(--fg-text-muted);
  font-size: var(--fg-fs-sm);
  position: relative;
  transition: background var(--fg-dur-fast) var(--fg-ease),
              color var(--fg-dur-fast) var(--fg-ease);
}
.fg-nav-item svg { width: 16px; height: 16px; flex: none; opacity:.85;
  transition: opacity var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease); }
.fg-nav-item:hover { background: var(--fg-surface); color: var(--fg-text); }
.fg-nav-item:hover svg { opacity:1; }

/* Aktiver Punkt: roter Balken links, weich eingeblendet */
.fg-nav-item::before {
  content:""; position:absolute; left:0; top:50%; width:3px; height:0;
  background: var(--fg-accent); border-radius: 0 var(--fg-r-pill) var(--fg-r-pill) 0;
  transform: translateY(-50%);
  transition: height var(--fg-dur) var(--fg-ease-out);
}
.fg-nav-item.is-active { background: var(--fg-accent-soft); color: var(--fg-text); font-weight:500; }
.fg-nav-item.is-active::before { height: 18px; }
.fg-nav-item.is-active svg { color: var(--fg-accent); opacity:1; }
.fg-nav-item .fg-badge { margin-left: auto; padding: 1px 7px; font-size: var(--fg-fs-xs); }

.fg-sidebar-foot { margin-top: auto; padding: var(--fg-s4); color: var(--fg-text-dim); font-size: var(--fg-fs-xs);
  border-top: 1px solid var(--fg-border); }
.fg-sidebar-foot strong { display:block; color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }

/* ---------------------------------------------------------- 5. Topbar */
.fg-topbar {
  height: calc(var(--fg-topbar-h) + var(--fg-safe-top)); display:flex; align-items:center; gap: var(--fg-s4);
  padding: var(--fg-safe-top) calc(var(--fg-s6) + var(--fg-safe-right)) 0 var(--fg-s6);
  border-bottom: 1px solid var(--fg-border);
  background: rgba(14,15,18,.82); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.fg-search { flex: 1; max-width: 420px; position: relative; }
.fg-search svg { position:absolute; left: var(--fg-s3); top: 50%; transform: translateY(-50%); width:16px; height:16px; color: var(--fg-text-dim); }
.fg-search input { padding-left: 36px; min-height: 34px; background: var(--fg-surface); }
.fg-search input:focus { background: var(--fg-surface-2); }
.fg-search.is-typing .fg-kbd { display:none; }
.fg-kbd { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:var(--fg-fs-xs);
  color: var(--fg-text-dim); border:1px solid var(--fg-border); border-radius:var(--fg-r-sm); padding: 2px 6px; }

.fg-avatar { width:30px; height:30px; border-radius: var(--fg-r-pill); background: var(--fg-accent);
  color:#fff; display:grid; place-items:center; font-size: var(--fg-fs-sm); font-weight:600; flex:none; }
.fg-user { display:flex; align-items:center; gap: var(--fg-s3); padding: 4px 8px; border-radius: var(--fg-r-md);
  transition: background var(--fg-dur-fast) var(--fg-ease); }
.fg-user:hover { background: var(--fg-surface); }
.fg-user-name { font-size: var(--fg-fs-sm); }
.fg-user-name { line-height:1.2; }
.fg-user-name small { display:block; color: var(--fg-text-muted); }

/* Rollen-Umschalter Admin / Mitarbeiter */
.fg-switcher { display:inline-flex; background: var(--fg-surface); border:1px solid var(--fg-border); border-radius: var(--fg-r-pill); padding: 3px; }
.fg-switcher a { padding: 5px 13px; transition: background var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease); border-radius: var(--fg-r-pill); font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-switcher a.is-active { background: var(--fg-accent); color:#fff; font-weight:500; }

/* Sync-Anzeige, immer sichtbar */
.fg-sync { display:flex; align-items:center; gap: var(--fg-s2); font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-dot { width:8px; height:8px; border-radius:var(--fg-r-pill); background: var(--fg-green); flex:none; }
.fg-dot.is-offline { background: var(--fg-text-dim); }
.fg-dot.is-pending { background: var(--fg-yellow); }
.fg-dot.is-error   { background: var(--fg-red); }

/* ----------------------------------------------------------- 6. Karten */
.fg-card {
  background: var(--fg-surface); border: 1px solid var(--fg-border);
  border-radius: var(--fg-r-md); padding: var(--fg-s4) var(--fg-s5);
  transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease);
}
.fg-card-head { display:flex; align-items:center; justify-content:space-between; gap: var(--fg-s3); margin-bottom: var(--fg-s3); }
.fg-card-head h3 { font-size: var(--fg-fs-lg); font-weight:600; }
.fg-card-link { font-size: var(--fg-fs-sm); color: var(--fg-accent); }
.fg-card.is-critical { box-shadow: var(--fg-glow); border-color: var(--fg-accent-line); }
.fg-card-flush { padding: 0; overflow: hidden; }
.fg-card-flush .fg-card-head { padding: var(--fg-s4) var(--fg-s5) 0; margin-bottom: var(--fg-s3); }

/* Karten, die auf etwas fuehren, heben sich unter dem Zeiger leicht an */
a.fg-card, .fg-card.is-link { display:block; }
a.fg-card:hover, .fg-card.is-link:hover { border-color: var(--fg-border-strong); background: var(--fg-surface-2); }

/* Kennzahl */
.fg-kpi { display:flex; align-items:center; gap: var(--fg-s3); }
.fg-kpi-icon { width:36px; height:36px; border-radius: var(--fg-r-sm); display:grid; place-items:center; flex:none;
  background: var(--fg-surface-2); color: var(--fg-text-muted); }
.fg-kpi-icon svg { width:17px; height:17px; }
.fg-kpi-icon.is-green  { background: var(--fg-green-soft);  color: var(--fg-green); }
.fg-kpi-icon.is-red    { background: var(--fg-red-soft);    color: var(--fg-red); }
.fg-kpi-icon.is-yellow { background: var(--fg-yellow-soft); color: var(--fg-yellow); }
.fg-kpi-label { color: var(--fg-text-muted); font-size: var(--fg-fs-xs); text-transform:uppercase;
  letter-spacing:.06em; font-weight:600; }
.fg-kpi-value { font-size: var(--fg-fs-2xl); font-weight: 700; letter-spacing:-0.03em; line-height:1.15;
  font-variant-numeric: tabular-nums; }
.fg-kpi-delta { font-size: var(--fg-fs-sm); text-align: right; }
.fg-kpi-delta.is-up   { color: var(--fg-green); }
.fg-kpi-delta.is-down { color: var(--fg-red); }
.fg-kpi-delta small { display:block; color: var(--fg-text-dim); }

/* ---------------------------------------------------------- 7. Buttons */
.fg-btn {
  display:inline-flex; align-items:center; justify-content:center; gap: var(--fg-s2);
  min-height: var(--fg-ctl); padding: 0 var(--fg-s4);
  border-radius: var(--fg-r-md); border: 1px solid transparent;
  background: var(--fg-accent); color:#fff; font: inherit; font-weight: 500;
  font-size: var(--fg-fs-sm);
  cursor: pointer; white-space: nowrap;
  transition: background var(--fg-dur-fast) var(--fg-ease),
              border-color var(--fg-dur-fast) var(--fg-ease),
              transform var(--fg-dur-fast) var(--fg-ease),
              color var(--fg-dur-fast) var(--fg-ease);
}
.fg-btn:active { transform: translateY(1px); }
.fg-btn:hover { background: var(--fg-accent-hover); color:#fff; }
.fg-btn:active { background: var(--fg-accent-press); }
.fg-btn[disabled], .fg-btn.is-disabled { opacity:.45; pointer-events:none; }
.fg-btn svg { width:16px; height:16px; }
.fg-btn-ghost { background: var(--fg-surface); border-color: var(--fg-border); color: var(--fg-text); }
.fg-btn-ghost:hover { background: var(--fg-surface-2); border-color: var(--fg-border-strong); color: var(--fg-text); }
.fg-btn-quiet { background: transparent; border-color: transparent; color: var(--fg-text-muted); }
.fg-btn-quiet:hover { background: var(--fg-surface-2); color: var(--fg-text); }
.fg-btn-danger { background: transparent; border-color: var(--fg-accent-line); color: var(--fg-accent); }
.fg-btn-danger:hover { background: var(--fg-accent-soft); color: var(--fg-accent-hover); }

/* Antwort am Pruefpunkt: Ja ist gruen, Nein ist rot. Vorher sahen beide
   gewaehlten Knoepfe rot aus, man musste die Beschriftung lesen. */
.fg-btn-yes { background: var(--fg-green); border-color: var(--fg-green); color:#fff; }
.fg-btn-yes:hover { background: #1FB865; border-color: #1FB865; color:#fff; }
.fg-btn-no  { background: var(--fg-accent); border-color: var(--fg-accent); color:#fff; }
.fg-btn-no:hover { background: var(--fg-accent-hover); border-color: var(--fg-accent-hover); color:#fff; }
.fg-btn-sm { min-height: 30px; padding: 0 var(--fg-s3); font-size: var(--fg-fs-sm); }
.fg-btn-sm svg { width:14px; height:14px; }
.fg-btn-block { width: 100%; }
.fg-btn-icon { width: var(--fg-ctl); padding: 0; }
.fg-btn-icon.fg-btn-sm { width: 30px; }

/* --------------------------------------------------------- 8. Formulare */
.fg-field { display:grid; gap: 6px; margin-bottom: var(--fg-s4); }
.fg-label { font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-label .fg-req { color: var(--fg-accent); }
.fg-input, .fg-select, .fg-textarea {
  width: 100%; min-height: var(--fg-ctl); padding: 8px var(--fg-s3);
  background: var(--fg-surface-2); color: var(--fg-text);
  border: 1px solid var(--fg-border); border-radius: var(--fg-r-sm);
  font: inherit; font-size: var(--fg-fs-sm);
  transition: border-color var(--fg-dur-fast) var(--fg-ease),
              box-shadow var(--fg-dur-fast) var(--fg-ease),
              background var(--fg-dur-fast) var(--fg-ease);
}
.fg-input:hover, .fg-select:hover, .fg-textarea:hover { border-color: var(--fg-border-strong); }
.fg-textarea { min-height: 84px; resize: vertical; line-height:1.55; }
.fg-input::placeholder, .fg-textarea::placeholder { color: var(--fg-text-dim); }
.fg-input:focus, .fg-select:focus, .fg-textarea:focus {
  border-color: var(--fg-accent); outline: none; box-shadow: 0 0 0 3px var(--fg-accent-soft);
}
.fg-input.is-invalid, .fg-select.is-invalid { border-color: var(--fg-red); }
.fg-error { color: var(--fg-red); font-size: var(--fg-fs-sm); }
.fg-hint  { color: var(--fg-text-dim); font-size: var(--fg-fs-sm); max-width: 78ch; }
.fg-select { appearance:none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-text-muted) 50%), linear-gradient(135deg, var(--fg-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* uebernommene Werte bleiben markiert, bis sie bestaetigt sind (Kap. 9.4) */
.fg-input.is-carried, .fg-textarea.is-carried, .fg-select.is-carried {
  border-color: var(--fg-yellow); background: var(--fg-yellow-soft);
}

.fg-check { display:flex; align-items:center; gap: var(--fg-s3); min-height: var(--fg-ctl); cursor:pointer;
  font-size: var(--fg-fs-sm); }
.fg-check input { width:18px; height:18px; accent-color: var(--fg-accent); flex:none; }
.fg-switch { position:relative; width:42px; height:24px; flex:none; }
.fg-switch input { position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.fg-switch i { position:absolute; inset:0; background: var(--fg-surface-3); border-radius: var(--fg-r-pill); transition: background .15s; }
.fg-switch i::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:var(--fg-r-pill); background:#fff; transition: transform .15s; }
.fg-switch input:checked + i { background: var(--fg-accent); }
.fg-switch input:checked + i::after { transform: translateX(18px); }

/* Chips fuer Textbausteine */
.fg-chips { display:flex; flex-wrap:wrap; gap: var(--fg-s2); margin-bottom: var(--fg-s2); }
.fg-chip { border:1px solid var(--fg-border); background: var(--fg-surface-2); color: var(--fg-text-muted);
  border-radius: var(--fg-r-pill); padding: 5px 11px; font-size: var(--fg-fs-sm); cursor:pointer;
  transition: border-color var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease),
              background var(--fg-dur-fast) var(--fg-ease); }
.fg-chip:hover { border-color: var(--fg-accent-line); color: var(--fg-text); }

/* --------------------------------------------------------- 9. Tabellen */
.fg-table { width:100%; border-collapse: collapse; font-size: var(--fg-fs-md); }
.fg-table th {
  text-align:left; font-weight:600; font-size: var(--fg-fs-xs); color: var(--fg-text-dim);
  text-transform: uppercase; letter-spacing: .05em;
  padding: 10px var(--fg-s4); background: var(--fg-surface-2);
  border-bottom: 1px solid var(--fg-border); white-space: nowrap;
}
.fg-table td { padding: 10px var(--fg-s4); border-bottom: 1px solid var(--fg-border); vertical-align: middle; }
.fg-table tbody tr:last-child td { border-bottom: none; }
.fg-table tbody tr { transition: background var(--fg-dur-fast) var(--fg-ease); }
.fg-table tbody tr:hover { background: var(--fg-surface-2); }
.fg-table .fg-td-num { text-align:right; font-variant-numeric: tabular-nums; }
.fg-table-wrap { overflow-x:auto; }

/* Status-Badge */
.fg-badge { display:inline-flex; align-items:center; gap:6px; padding: 4px 10px; border-radius: var(--fg-r-pill);
  font-size: var(--fg-fs-sm); font-weight:500; background: var(--fg-surface-3); color: var(--fg-text-muted); white-space:nowrap; }
.fg-badge.is-red    { background: var(--fg-red-soft);    color: #FF6B72; }
.fg-badge.is-orange { background: var(--fg-orange-soft); color: var(--fg-orange); }
.fg-badge.is-yellow { background: var(--fg-yellow-soft); color: var(--fg-yellow); }
.fg-badge.is-green  { background: var(--fg-green-soft);  color: var(--fg-green); }
.fg-badge.is-blue   { background: var(--fg-blue-soft);   color: var(--fg-blue); }
.fg-badge.is-solid-red { background: var(--fg-red); color:#fff; }

/* Ampel */
.fg-light { width:10px; height:10px; border-radius: var(--fg-r-pill); display:inline-block; flex:none; }
.fg-light.is-red    { background: var(--fg-red); box-shadow: 0 0 10px rgba(227,0,15,.5); }
.fg-light.is-orange { background: var(--fg-orange); }
.fg-light.is-yellow { background: var(--fg-yellow); }
.fg-light.is-green  { background: var(--fg-green); }
.fg-light.is-blue   { background: var(--fg-blue); }

/* ---------------------------------------------- 10. Listen und Zustaende */
.fg-list { display:grid; }
.fg-list-item { display:flex; align-items:center; gap: var(--fg-s3); padding: var(--fg-s3) var(--fg-s4);
  border-bottom: 1px solid var(--fg-border); min-height: var(--fg-tap); }
.fg-list-item:last-child { border-bottom:none; }
.fg-list-item { transition: background var(--fg-dur-fast) var(--fg-ease); }
a.fg-list-item:hover { background: var(--fg-surface-2); color: var(--fg-text); }
a.fg-list-item:hover .fg-list-title { color: var(--fg-accent-hover); }
.fg-list-item:hover { background: var(--fg-surface-2); }
.fg-list-title { font-weight:500; }
.fg-list-sub { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }

.fg-empty { text-align:center; padding: var(--fg-s6) var(--fg-s5); color: var(--fg-text-muted);
  font-size: var(--fg-fs-sm); }
.fg-empty h3 { margin-bottom: var(--fg-s1); color: var(--fg-text); font-size: var(--fg-fs-md); }
.fg-empty p { margin-bottom: var(--fg-s3); }
.fg-empty p:last-child { margin-bottom: 0; }
.fg-empty svg { width:22px; height:22px; color: var(--fg-text-dim); margin-bottom: var(--fg-s2); }

.fg-alert { display:flex; gap: var(--fg-s3); padding: var(--fg-s4); border-radius: var(--fg-r-md);
  border:1px solid var(--fg-border); background: var(--fg-surface-2); margin-bottom: var(--fg-s4); }
.fg-alert svg { width:20px; height:20px; flex:none; }
.fg-alert.is-error   { border-color: var(--fg-accent-line); background: var(--fg-red-soft); color:#FFC9CC; }
.fg-alert.is-success { border-color: rgba(34,197,94,.35); background: var(--fg-green-soft); color:#B7F3CE; }
.fg-alert.is-warn    { border-color: rgba(232,180,0,.35); background: var(--fg-yellow-soft); color:#F6E3A0; }
.fg-alert.is-info    { border-color: rgba(59,130,246,.35); background: var(--fg-blue-soft); color:#BBD6FF; }

/* Dateinamen, Versionen, SQL: alles, was Zeichen fuer Zeichen gelesen wird */
.fg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fg-fs-xs); color: var(--fg-text-dim); }

/* Eine Liste, die neben ihrer Nachbarkarte nicht ins Endlose waechst */
.fg-scroll-sm { max-height: 320px; overflow-y:auto; overscroll-behavior:contain; }

/* Mangelblock, in App und PDF gleich aufgebaut (Kap. 9.3) */
.fg-defect { margin: var(--fg-s3) 0 var(--fg-s3) var(--fg-s5); padding: var(--fg-s4);
  background: var(--fg-surface-2); border-left: 3px solid var(--fg-red); border-radius: 0 var(--fg-r-md) var(--fg-r-md) 0; }
.fg-defect.is-known    { border-left-color: var(--fg-yellow); }
.fg-defect.is-progress { border-left-color: var(--fg-orange); }
.fg-defect.is-done     { border-left-color: var(--fg-green); }
/* Fotos als kleine Vorschaubilder. Gross gezogen fuellten sie vor Ort den
   halben Schirm; angetippt gehen sie ohnehin gross auf. */
.fg-defect-photos { display:flex; flex-wrap:wrap; gap: var(--fg-s3); margin-top: var(--fg-s3); }
.fg-defect-photos img { width:110px; height:110px; object-fit:cover; display:block;
  border-radius: var(--fg-r-sm); border:1px solid var(--fg-border); background: var(--fg-surface); }

/* -------------------------------------------- 11. Modal, Toast, Tabs */
.fg-modal-back { position:fixed; inset:0; background: rgba(0,0,0,.66); display:grid; place-items:center;
  padding: var(--fg-s4); z-index: 60; }
.fg-modal { background: var(--fg-surface); border:1px solid var(--fg-border-strong);
  border-radius: var(--fg-r-lg); box-shadow: var(--fg-shadow-lg); width:min(560px, 100%); max-height:88vh; overflow:auto; }
.fg-modal-head { padding: var(--fg-s5); border-bottom:1px solid var(--fg-border); }
.fg-modal-body { padding: var(--fg-s5); }
.fg-modal-foot { padding: var(--fg-s5); border-top:1px solid var(--fg-border); display:flex; gap: var(--fg-s3); justify-content:flex-end; }

.fg-toasts { position:fixed; right: calc(var(--fg-s5) + var(--fg-safe-right));
  bottom: calc(var(--fg-s5) + var(--fg-safe-bottom)); display:grid; gap: var(--fg-s2); z-index:80; }
.fg-toast { background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-md);
  padding: var(--fg-s3) var(--fg-s4); box-shadow: var(--fg-shadow-lg); max-width: 380px; }
.fg-toast.is-error { border-color: var(--fg-accent-line); }

.fg-tabs { display:flex; gap: var(--fg-s1); border-bottom:1px solid var(--fg-border); margin-bottom: var(--fg-s5);
  overflow-x:auto; scrollbar-width:none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.fg-tabs::-webkit-scrollbar { display:none; }
/* Sind es mehr Reiter, als nebeneinander passen, laufen die Raender weich
   aus - sonst sieht niemand, dass rechts noch etwas steht. */
.fg-tabs.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.fg-tab { padding: var(--fg-s3) var(--fg-s4); color: var(--fg-text-muted); border-bottom:2px solid transparent;
  white-space:nowrap; scroll-snap-align: center; }
.fg-tab.is-active { color: var(--fg-text); border-bottom-color: var(--fg-accent); }

/* Baum fuer Pruefpunkt-Auswahl */
.fg-tree { display:grid; }
.fg-tree-node { display:flex; align-items:center; gap: var(--fg-s3); min-height: var(--fg-tap);
  padding: 0 var(--fg-s3); border-bottom:1px solid var(--fg-border); }
.fg-tree-node.level-category { background: var(--fg-surface-2); font-weight:600; }
.fg-tree-node.level-item, .fg-tree-node.level-subitem {
  background-image: linear-gradient(var(--fg-border-strong) 0 0);
  background-size: 1px 100%; background-repeat: no-repeat;
}
.fg-tree-node.level-item    { padding-left: var(--fg-s6); background-position: 13px 0; }
.fg-tree-node.level-subitem { padding-left: var(--fg-s10); color: var(--fg-text-muted);
  background-position: 29px 0; }

/* Baum-Editor: Titel, Kennzeichen und Aktionen in einer Zeile */
.fg-tree-node.is-dim { opacity:.55; }
.fg-tree-node.is-drag { outline:2px dashed var(--fg-accent); outline-offset:-2px; }
.fg-tree-node.is-over { background: var(--fg-surface-3); }
.fg-tree-title { display:flex; align-items:center; gap: var(--fg-s2); flex-wrap:wrap; min-width:0;
  padding: var(--fg-s2) 0; }
.fg-tree-meta { margin-left:auto; font-size: var(--fg-fs-xs); white-space:nowrap; }
.fg-tree-actions { display:flex; align-items:center; gap: var(--fg-s2); flex:none; }
/* Mit der Maus treten die Nebenaktionen zurueck, bis die Zeile gemeint ist.
   Am Touchgeraet und bei Tastaturbedienung stehen sie immer da. */
@media (pointer: fine) {
  .fg-tree-actions > form,
  .fg-tree-actions > .fg-btn-quiet {
    opacity: 0; transition: opacity var(--fg-dur) var(--fg-ease);
  }
  .fg-tree-node:hover .fg-tree-actions > form,
  .fg-tree-node:hover .fg-tree-actions > .fg-btn-quiet,
  .fg-tree-node:focus-within .fg-tree-actions > form,
  .fg-tree-node:focus-within .fg-tree-actions > .fg-btn-quiet { opacity: 1; }
}
.fg-tree-actions form { display:inline-flex; margin:0; }
@media (max-width: 720px) {
  .fg-tree-node { flex-wrap:wrap; }
  .fg-tree-meta { margin-left:0; }
  .fg-tree-actions { width:100%; padding-bottom: var(--fg-s2); flex-wrap:wrap; }
}

.fg-light.is-grey { background: var(--fg-text-dim); }

/* Begehung: uebernommene Werte, Mangelblock, schwebender Uebernahme-Knopf */
.fg-card.is-carried { border-color: var(--fg-yellow); box-shadow: inset 3px 0 0 var(--fg-yellow); }
.fg-defect.is-open { border-left-color: var(--fg-red); }
.fg-defect-photos figure { margin:0; cursor:pointer; position:relative; width:110px; }
[data-lightbox] img { cursor: zoom-in; transition: border-color var(--fg-dur-fast) var(--fg-ease); }
[data-lightbox] img:hover { border-color: var(--fg-border-strong); }
.fg-defect-photos figcaption { font-size: var(--fg-fs-xs); color: var(--fg-text-dim); padding-top:4px;
  max-width:110px; }

/* Bild in gross (Kap. 9.6): fuellt den Schirm, Rest bleibt dunkel */
.fg-no-scroll { overflow: hidden; }
.fg-lightbox { position:fixed; inset:0; z-index:90; background: rgba(0,0,0,.93);
  display:grid; place-items:center; padding: calc(var(--fg-s5) + var(--fg-safe-top))
  calc(var(--fg-s4) + var(--fg-safe-right)) calc(var(--fg-s5) + var(--fg-safe-bottom))
  calc(var(--fg-s4) + var(--fg-safe-left));
  animation: fg-fade var(--fg-dur-fast) var(--fg-ease) both; }
.fg-lb-img { max-width:100%; max-height:100%; object-fit:contain; border-radius: var(--fg-r-sm); }
.fg-lightbox button { background: rgba(28,32,38,.8); border:1px solid var(--fg-border-strong);
  color: var(--fg-text); border-radius: var(--fg-r-pill); cursor:pointer;
  display:grid; place-items:center; }
.fg-lb-close { position:absolute; top: calc(var(--fg-s4) + var(--fg-safe-top));
  right: calc(var(--fg-s4) + var(--fg-safe-right)); width:40px; height:40px; font-size:24px; line-height:1; }
.fg-lb-nav { position:absolute; top:50%; transform:translateY(-50%); width:44px; height:44px; font-size:28px; line-height:1; }
.fg-lb-nav.is-prev { left: calc(var(--fg-s3) + var(--fg-safe-left)); }
.fg-lb-nav.is-next { right: calc(var(--fg-s3) + var(--fg-safe-right)); }
.fg-lightbox button:hover { background: var(--fg-surface-3); }
.fg-lb-count { position:absolute; bottom: calc(var(--fg-s5) + var(--fg-safe-bottom));
  left:50%; transform:translateX(-50%); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }

/* Das X zum Entfernen sitzt in der Ecke des Bildes */
.fg-photo-del {
  position:absolute; top:4px; right:4px; width:26px; height:26px; padding:0;
  display:grid; place-items:center; cursor:pointer;
  border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-pill);
  background: rgba(14,15,18,.78); color: var(--fg-text); font: inherit; font-size:15px; line-height:1;
  transition: background var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease);
}
.fg-photo-del:hover { background: var(--fg-accent); border-color: var(--fg-accent); color:#fff; }
.fg-fab { position:fixed; right: calc(var(--fg-s4) + var(--fg-safe-right));
  bottom: calc(84px + var(--fg-safe-bottom)); z-index:60; width:52px; height:52px;
  padding:0; border-radius: var(--fg-r-pill); font-size:22px; line-height:1; opacity:.9;
  box-shadow: var(--fg-shadow-lg); }
.fg-fab:hover { opacity:1; }
@media (min-width: 900px) { .fg-fab { bottom: calc(var(--fg-s5) + var(--fg-safe-bottom)); } }
body[data-inspection-saving="1"] .fg-sync .fg-dot { background: var(--fg-yellow); }

/* Autovervollstaendigung Adresse und Kunde */
.fg-ac { position:relative; }
.fg-ac-list { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:40; max-height:280px; overflow:auto;
  background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-md); box-shadow: var(--fg-shadow-lg); }
.fg-ac-item { padding: 10px var(--fg-s4); cursor:pointer; border-bottom:1px solid var(--fg-border); }
.fg-ac-item:last-child { border-bottom:none; }
.fg-ac-item:hover, .fg-ac-item.is-active { background: var(--fg-accent-soft); }
.fg-ac-item small { display:block; color: var(--fg-text-muted); }

/* Schnellsuche in der Kopfzeile (Kap. 3.4) */
.fg-qs { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:60; max-height:min(70vh, 460px);
  overflow-y:auto; overscroll-behavior:contain;
  background: var(--fg-surface-3); border:1px solid var(--fg-border-strong);
  border-radius: var(--fg-r-md); box-shadow: var(--fg-shadow-lg);
  animation: fg-pop var(--fg-dur-fast) var(--fg-ease-out) both; }
.fg-qs-head { font-size: var(--fg-fs-xs); text-transform:uppercase; letter-spacing:.06em;
  color: var(--fg-text-dim); padding: 10px var(--fg-s4) 4px; }
.fg-qs-item { display:flex; align-items:center; gap: var(--fg-s3); padding: 8px var(--fg-s4);
  color: var(--fg-text); text-decoration:none; }
.fg-qs-item + .fg-qs-head { border-top:1px solid var(--fg-border); margin-top:4px; }
.fg-qs-item:hover, .fg-qs-item.is-active { background: var(--fg-accent-soft); color: var(--fg-text); }
.fg-qs-text { min-width:0; flex:1; }
.fg-qs-title { display:block; font-size: var(--fg-fs-md); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-qs-sub { display:block; font-size: var(--fg-fs-sm); color: var(--fg-text-muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-qs-art { font-size: var(--fg-fs-xs); color: var(--fg-text-dim); border:1px solid var(--fg-border);
  border-radius: var(--fg-r-pill); padding: 1px 8px; flex:none; }
.fg-qs-leer { padding: var(--fg-s4); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-qs-mehr { border-top:1px solid var(--fg-border); }
.fg-qs-mehr .fg-qs-title { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }

/* Fortschritt */
.fg-progress { height:6px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3); overflow:hidden; }
.fg-progress i { display:block; height:100%; background: var(--fg-accent); }

/* Filterleiste ueber einer Liste */
/* Vorschau des hochgeladenen Logos in den Einstellungen */
.fg-logo-preview { max-width: 100%; max-height: 80px; display:block; margin-bottom: var(--fg-s2);
  background: #FFFFFF; border:1px solid var(--fg-border); border-radius: var(--fg-r-sm); padding: var(--fg-s2); }

.fg-filters, .fg-filters-body { display:flex; flex-wrap:wrap; align-items:flex-end; gap: var(--fg-s3); }
.fg-filters { margin-bottom: var(--fg-s4); }
.fg-filters-body { flex: 1 1 100%; }
.fg-filters .fg-field { margin:0; min-width: 180px; }
.fg-filters-toggle { display:none; }

.fg-pager { display:flex; align-items:center; gap: var(--fg-s2); padding: var(--fg-s4); justify-content:flex-end; }
.fg-pager a, .fg-pager span { min-width:34px; height:34px; display:grid; place-items:center; padding:0 10px;
  border:1px solid var(--fg-border); border-radius: var(--fg-r-sm); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-pager .is-active { background: var(--fg-accent); border-color: var(--fg-accent); color:#fff; }

/* ------------------------------------------------ 12. Anmeldung */
.fg-login { min-height:100vh; display:grid; place-items:center;
  padding: calc(var(--fg-s5) + var(--fg-safe-top)) calc(var(--fg-s5) + var(--fg-safe-right))
           calc(var(--fg-s5) + var(--fg-safe-bottom)) calc(var(--fg-s5) + var(--fg-safe-left));
  background: radial-gradient(900px 480px at 50% -10%, rgba(227,0,15,.10), transparent 70%), var(--fg-bg); }
.fg-login-box { width:min(400px,100%); }
.fg-login-brand { display:flex; align-items:center; gap: var(--fg-s3); justify-content:center; margin-bottom: var(--fg-s6); }
.fg-login-brand img { width:40px; height:40px; }
.fg-login-brand span { font-size: var(--fg-fs-2xl); font-weight:700; letter-spacing:-0.02em; }
.fg-claim { text-align:center; color: var(--fg-text-dim); font-size: var(--fg-fs-sm); margin-top: var(--fg-s5); }

/* ------------------------------------- 13. Mobil und Bedienmodus */
.fg-tabbar { display:none; }
@media (max-width: 900px) {
  .fg-app { grid-template-columns: 1fr; }
  .fg-sidebar { display:none; }
  .fg-content { padding: var(--fg-s4) calc(var(--fg-s4) + var(--fg-safe-right))
                        calc(var(--fg-tabbar-h) + var(--fg-s6) + var(--fg-safe-bottom))
                        calc(var(--fg-s4) + var(--fg-safe-left)); }

  /* Am Handy bricht jede Reihe um, statt aus dem Bild zu laufen. Knopfreihen,
     Kopfzeilen und Listenzeilen sind auf dem Schreibtisch nebeneinander
     gedacht; auf 390 Punkten reicht die Breite dafuer nicht. */
  .fg-row, .fg-card-head, .fg-list-item { flex-wrap: wrap; }
  .fg-row > .fg-btn { flex: 0 1 auto; max-width: 100%; }
  /* Lange Woerter (Protokollnummern, Dateinamen, Adressen) brechen um */
  body { overflow-wrap: break-word; }
  .fg-page-head { gap: var(--fg-s3); }
  .fg-topbar { position: sticky; }
  .fg-topbar { padding: var(--fg-safe-top) calc(var(--fg-s4) + var(--fg-safe-right)) 0
                        calc(var(--fg-s4) + var(--fg-safe-left)); gap: var(--fg-s3); }
  .fg-grid-2, .fg-grid-3 { grid-template-columns: 1fr; }
  .fg-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fg-kbd { display:none; }
  .fg-user-name { display:none; }
  .fg-sync span { display:none; }
  .fg-topbar { gap: var(--fg-s2); }
  .fg-page-head { flex-direction: column; }
  h1 { font-size: var(--fg-fs-2xl); }

  /* Listen werden zu Karten: sieben Spalten sind am Handy nicht lesbar, und
     seitwaerts schieben will vor Ort niemand. Die Spaltenueberschrift steht
     dann vor dem Wert (app.js haengt sie an jede Zelle). */
  .fg-table-wrap { overflow-x: visible; }
  .fg-table, .fg-table tbody, .fg-table tr { display:block; width:100%; }
  .fg-table thead { display:none; }
  .fg-table tbody tr {
    display:flex; flex-wrap:wrap; align-items:baseline; gap: 1px var(--fg-s3);
    padding: var(--fg-s3) var(--fg-s4); border-bottom:1px solid var(--fg-border);
  }
  .fg-table tbody tr:hover { background:none; }
  .fg-table td {
    flex: 1 1 100%; display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-end;
    gap: var(--fg-s1) var(--fg-s3); padding:0; border:0; min-width:0; text-align:right;
  }
  .fg-table td::before {
    content: attr(data-label); flex:none; margin-right:auto; text-align:left;
    color: var(--fg-text-dim); font-size: var(--fg-fs-xs);
    text-transform: uppercase; letter-spacing:.05em;
  }
  /* Spalten ohne Ueberschrift (Ampel, Knopf) stehen in der Kopfzeile mit */
  .fg-table td[data-label=""] { flex: 0 0 auto; }
  .fg-table td[data-label=""]::before { content: none; }
  /* Die Karte liest sich wie ein Listeneintrag: oben die Ueberschrift, darunter
     die uebrigen Angaben in einer fliessenden Zeile. Frueher bekam jede Spalte
     eine eigene Zeile - bei fuenf Spalten waren das fuenf Zeilen je Eintrag,
     und eine Liste mit zwanzig Eintraegen war endlos. */
  .fg-table td[data-cell="title"] { flex: 1 1 100%; order:-1; justify-content:flex-start; text-align:left;
    font-size: var(--fg-fs-lg); font-weight:500; line-height:1.3; margin-bottom:2px; }
  .fg-table td[data-cell="title"]::before { content: none; }

  /* Die uebrigen Angaben stehen klein darunter: Bezeichnung links, Wert
     rechts. Das liest sich wie ein Datenblatt und braucht je Angabe eine
     Zeile statt zweier. */
  .fg-table td:not([data-cell="title"]) {
    font-size: var(--fg-fs-sm); color: var(--fg-text-muted); line-height:1.35;
  }
  .fg-table .fg-td-num { text-align:left; }

  /* Eine Zelle ohne Inhalt braucht am Handy keine eigene Zeile. Frueher stand
     unter jedem Eintrag "J", "N", "ANMERKUNGEN", "ZUSTAENDIG" ohne Wert
     darunter - vier leere Zeilen je Pruefpunkt. */
  .fg-table td.is-empty { display:none; }

  /* Eine Zelle mit Eingabefeldern nimmt die ganze Breite und bricht um.
     Vorher stand das halbe Formular (Auswahl, Vermerk, Knopf) rechts
     ausserhalb des Bildschirms. */
  .fg-table td.has-form { flex: 1 1 100%; justify-content:flex-start; }
  .fg-table td.has-form::before { content:none; }
  .fg-table td.has-form > form, .fg-table td.has-form > .fg-row {
    display:flex; flex-wrap:wrap; gap: var(--fg-s2); width:100%; margin:0;
  }
  .fg-table td.has-form .fg-input, .fg-table td.has-form .fg-select { flex: 1 1 140px; max-width:none; }
  .fg-table td.has-form .fg-btn { flex: 0 0 auto; }

  /* Die festen Feldbreiten vom Schreibtisch gelten am Handy nicht */
  .fg-w-sm, .fg-w-md, .fg-w-40 { max-width:none; }

  /* Zeilen ueber die ganze Tabellenbreite - Kategorieueberschrift im
     Protokoll, ein Mangel unter einem Pruefpunkt - stehen links und ohne
     Spaltenbezeichnung. Vorher rutschten sie an den rechten Rand. */
  .fg-table td[colspan] { flex: 1 1 100%; justify-content:flex-start; text-align:left; }
  .fg-table td[colspan]::before { content:none; }
  .fg-table td[colspan] > .fg-defect { width:100%; }

  /* Langer Text steht unter seiner Bezeichnung, linksbuendig */
  .fg-table td.is-long { flex-direction: column; align-items:flex-start;
    justify-content:flex-start; text-align:left; }
  .fg-table td.is-long::before { margin-right:0; }

  /* Protokoll: statt "J  X" steht am Handy "Antwort  Ja". */
  .fg-table td.fg-mark::before { content:"Antwort"; }
  .fg-table td.fg-mark .fg-mark-x { display:none; }
  .fg-table td.fg-mark .fg-mark-wort { display:inline; font-weight:500; }
  .fg-pager { justify-content:center; flex-wrap:wrap; }

  /* Filter zugeklappt, bis man sie braucht */
  .fg-filters-mobile { display:block; }
  .fg-filters-mobile .fg-filters-body { display:none; }
  .fg-filters-mobile.is-open .fg-filters-body { display:flex; margin-top: var(--fg-s3); }
  .fg-filters-mobile .fg-field { min-width:100%; }
  .fg-filters-toggle {
    display:flex; align-items:center; gap: var(--fg-s2); width:100%;
    min-height: var(--fg-tap); padding: 0 var(--fg-s4);
    background: var(--fg-surface); border:1px solid var(--fg-border); border-radius: var(--fg-r-md);
    color: var(--fg-text-muted); font: inherit; font-size: var(--fg-fs-sm); text-align:left; cursor:pointer;
  }
  .fg-filters-toggle::after { content:"▾"; margin-left:auto; opacity:.7; }
  .fg-filters-mobile.is-open .fg-filters-toggle::after { content:"▴"; }

  .fg-tabbar {
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50;
    min-height: var(--fg-tabbar-h);
    background: var(--fg-bg-sidebar); border-top:1px solid var(--fg-border);
    padding: 6px calc(6px + var(--fg-safe-right)) calc(6px + var(--fg-safe-bottom)) calc(6px + var(--fg-safe-left));
  }
  .fg-tabbar a { flex:1; display:grid; justify-items:center; gap:2px; padding:6px 0;
    font-size: var(--fg-fs-xs); color: var(--fg-text-dim); }
  .fg-tabbar a svg { width:22px; height:22px; }
  .fg-tabbar a.is-active { color: var(--fg-accent); }
  .fg-tabbar .fg-scan { flex:none; width:58px; height:58px; margin-top:-22px; border-radius: var(--fg-r-pill);
    background: var(--fg-accent); color:#fff; display:grid; place-items:center; box-shadow: var(--fg-glow); }

  /* Hinweise standen bisher ueber der Leiste und dem runden Knopf. Sie
     ruecken darueber und nehmen die volle Breite, damit langer Text
     umbricht statt zu ueberdecken. */
  .fg-toasts {
    left: calc(var(--fg-s4) + var(--fg-safe-left));
    right: calc(var(--fg-s4) + var(--fg-safe-right));
    bottom: calc(var(--fg-tabbar-h) + 26px + var(--fg-safe-bottom));
  }
  .fg-toast { max-width: none; }
}
@media (max-width: 680px) { .fg-search { display:none; } }
@media (min-width: 901px) and (max-width: 1200px) { :root { --fg-sidebar-w: 216px; } }

/* zweispaltig auf dem Tablet: Kategorien links, Punkte rechts */
@media (min-width: 720px) and (max-width: 1100px) {
  .fg-split { display:grid; grid-template-columns: 300px 1fr; gap: var(--fg-s4); }
}

/* Bedienmodus "Vor Ort", per Einstellung aktiviert */
body.fg-onsite { --fg-fs-md: 16px; --fg-fs-sm: 14px; --fg-tap: var(--fg-tap-big); }
body.fg-onsite .fg-btn { font-size: 17px; }
body.fg-onsite .fg-tree-node { min-height: var(--fg-tap-big); }

/* ------------------------------------------- 13b. Hilfsklassen
   Die Content-Security-Policy erlaubt keine style-Attribute im HTML
   (Kap. 2.4). Alles, was frueher dort stand, steht hier als Klasse. */

/* Senkrechter Rhythmus: Abschnitte einer Seite stehen gleichmaessig */
.fg-content > * + * { margin-top: var(--fg-s5); }
.fg-content > .fg-alert + * { margin-top: var(--fg-s4); }

.fg-mt-2 { margin-top: var(--fg-s2); }
.fg-mt-3 { margin-top: var(--fg-s3); }
.fg-mt-4 { margin-top: var(--fg-s4); }
.fg-mt-5 { margin-top: var(--fg-s5); }
.fg-mt-6 { margin-top: var(--fg-s6); }
.fg-mb-2 { margin-bottom: var(--fg-s2); }
.fg-mb-3 { margin-bottom: var(--fg-s3); }
.fg-mb-4 { margin-bottom: var(--fg-s4); }
.fg-mb-5 { margin-bottom: var(--fg-s5); }
.fg-mb-6 { margin-bottom: var(--fg-s6); }
.fg-my-3 { margin: var(--fg-s3) 0; }
.fg-my-4 { margin: var(--fg-s4) 0; }

/* Breiten fuer schmale Eingabefelder in Tabellen */
.fg-w-xxs { max-width: 90px; }
.fg-w-xs  { max-width: 130px; }
.fg-w-sm  { max-width: 150px; }
.fg-w-md  { max-width: 200px; }
.fg-w-full { width: 100%; }
/* Lesbare Zeilenlaenge fuer Fliesstext und lange Formulare */
.fg-read { max-width: 78ch; }

/* Kurze Anleitung am Seitenkopf: da, wenn man sie braucht, sonst zurueckhaltend.
   Keine Karte, nur ein feiner Strich am Rand. */
.fg-note { border-left: 2px solid var(--fg-border); padding-left: var(--fg-s4);
  color: var(--fg-text-dim); font-size: var(--fg-fs-xs); max-width: 78ch; }
.fg-note-head { color: var(--fg-text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 var(--fg-s2); }
.fg-note p { margin: 0 0 var(--fg-s2); }
.fg-note .fg-steps { margin: var(--fg-s2) 0 0; padding-left: var(--fg-s4);
  color: inherit; font-size: inherit; }
.fg-note .fg-steps li { margin-bottom: var(--fg-s1); }
.fg-note code { font-size: inherit; }

.fg-wrap  { flex-wrap: wrap; }
.fg-gap-2 { gap: var(--fg-s2); }
.fg-gap-3 { gap: var(--fg-s3); }
.fg-break { word-break: break-all; }
.fg-xs    { font-size: var(--fg-fs-xs); }
.fg-pad   { padding: var(--fg-s4) var(--fg-s5); }
.fg-pad-x { padding: 0 var(--fg-s5); }
.fg-bg-2  { background: var(--fg-surface-2); }

/* Zeichenflaeche fuer Unterschrift und Fotomarkierung: heller Grund,
   damit der Strich sichtbar ist */
.fg-canvas { width:100%; background:#FFFFFF; border-radius: var(--fg-r-md);
  touch-action:none; cursor:crosshair; display:block; }
/* Hinterlegte Unterschrift: heller Grund, damit der Strich zu sehen ist */
.fg-signature { max-width:100%; background:#FFFFFF; border-radius: var(--fg-r-md); padding: var(--fg-s3); display:block; }

/* --------------------------------------------------- 14. Bewegung
   Wenig, kurz, immer mit demselben Verlauf. Wer Bewegung abgeschaltet hat,
   bekommt sie nicht (Regel ganz oben in dieser Datei). */

@keyframes fg-rise   { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }
@keyframes fg-fade   { from { opacity:0; } to { opacity:1; } }
@keyframes fg-slide  { from { opacity:0; transform: translateX(16px); } to { opacity:1; transform:none; } }
@keyframes fg-pop    { from { opacity:0; transform: scale(.97) translateY(6px); } to { opacity:1; transform:none; } }
@keyframes fg-pulse  { 0%,100% { opacity:1; } 50% { opacity:.45; } }

/* Der Inhalt einer Seite kommt einmal ruhig herein, Abschnitt fuer Abschnitt */
.fg-content > * { animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-content > *:nth-child(1) { animation-delay: 0ms; }
.fg-content > *:nth-child(2) { animation-delay: 40ms; }
.fg-content > *:nth-child(3) { animation-delay: 80ms; }
.fg-content > *:nth-child(4) { animation-delay: 120ms; }
.fg-content > *:nth-child(n+5) { animation-delay: 150ms; }

/* Kennzahlen laufen leicht versetzt ein */
.fg-grid-4 > *, .fg-grid-3 > * { animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-grid-4 > *:nth-child(2), .fg-grid-3 > *:nth-child(2) { animation-delay: 50ms; }
.fg-grid-4 > *:nth-child(3), .fg-grid-3 > *:nth-child(3) { animation-delay: 100ms; }
.fg-grid-4 > *:nth-child(4) { animation-delay: 150ms; }

.fg-toast { animation: fg-slide var(--fg-dur) var(--fg-ease-out) both; }
.fg-modal-back { animation: fg-fade var(--fg-dur-fast) var(--fg-ease) both; }
.fg-modal { animation: fg-pop var(--fg-dur) var(--fg-ease-out) both; }
.fg-ac-list { animation: fg-pop var(--fg-dur-fast) var(--fg-ease-out) both; }
.fg-qs-item { transition: background var(--fg-dur-fast) var(--fg-ease); }
.fg-alert { animation: fg-rise var(--fg-dur) var(--fg-ease-out) both; }

/* Der Balken laeuft zum neuen Stand, statt zu springen */
.fg-progress i { transition: width var(--fg-dur-slow) var(--fg-ease-out); }

/* Waehrend gespeichert wird, atmet der Punkt in der Kopfzeile */
body[data-inspection-saving="1"] .fg-sync .fg-dot { animation: fg-pulse 1s var(--fg-ease) infinite; }

.fg-tab { transition: color var(--fg-dur-fast) var(--fg-ease), border-color var(--fg-dur-fast) var(--fg-ease); }
.fg-tab:hover { color: var(--fg-text); }
.fg-badge { transition: background var(--fg-dur-fast) var(--fg-ease); }
.fg-light.is-red { animation: fg-pulse 2.4s var(--fg-ease) infinite; }

@media (prefers-reduced-motion: reduce) {
  .fg-content > *, .fg-grid-4 > *, .fg-grid-3 > *, .fg-toast, .fg-modal, .fg-modal-back,
  .fg-ac-list, .fg-alert, .fg-light.is-red, .fg-qs, .fg-lightbox { animation: none !important; }
}

/* ----------------------------------------- 14b. Aufklappbare Bereiche
   Eine Begehung hat schnell sechzig Punkte. Untereinander ist das eine
   endlose Rolle; nach Bereichen zugeklappt sieht man, wo man steht und
   was noch fehlt. Ohne JavaScript funktioniert es genauso, das uebernimmt
   das <details>-Element selbst. */
.fg-group { border:1px solid var(--fg-border); border-radius: var(--fg-r-md);
  background: var(--fg-bg-sidebar); margin-top: var(--fg-s4); overflow:hidden; }
.fg-group-head {
  display:flex; align-items:center; gap: var(--fg-s3);
  min-height: var(--fg-tap); padding: var(--fg-s3) var(--fg-s4);
  cursor:pointer; list-style:none; user-select:none;
}
.fg-group-head::-webkit-details-marker { display:none; }
.fg-group-head::after { content:"▾"; margin-left: var(--fg-s2); opacity:.6; transition: transform var(--fg-dur) var(--fg-ease); }
.fg-group[open] .fg-group-head::after { transform: rotate(180deg); }
.fg-group-head:hover { background: var(--fg-surface); }
.fg-group-title { font-weight:600; font-size: var(--fg-fs-lg); }
.fg-group-count { margin-left:auto; font-size: var(--fg-fs-sm); color: var(--fg-text-muted);
  font-variant-numeric: tabular-nums; white-space:nowrap; }
.fg-group-note { font-size: var(--fg-fs-xs); color: var(--fg-yellow); white-space:nowrap;
  background: var(--fg-yellow-soft); border-radius: var(--fg-r-pill); padding: 2px var(--fg-s2); }
.fg-group.is-done .fg-group-count { color: var(--fg-green); }
.fg-group-body { padding: 0 var(--fg-s3) var(--fg-s3); }
.fg-group-body > .fg-card { margin-bottom: var(--fg-s3); }
.fg-group-body > .fg-card:last-child { margin-bottom: 0; }

/* Bereiche eines Objekts in der Begehung (Kap. 8.2): "Allgemein" zuerst,
   darunter jeder Bereich mit eigener Ueberschrift. */
.fg-area { margin-top: var(--fg-s6); padding-top: var(--fg-s4); border-top: 2px solid var(--fg-border-strong); }
.fg-area-head { display:flex; align-items:center; gap: var(--fg-s3); flex-wrap:wrap; }
.fg-area-head .fg-btn { margin-left:auto; }
.fg-area-title { font-size: var(--fg-fs-xl); font-weight:700; margin: var(--fg-s4) 0 0; }
.fg-area-head .fg-area-title { margin:0; }
.fg-modal-area { width:min(720px, 100%); }
.fg-modal-back.fg-modal-top { z-index: 80; }
.fg-area-tree { max-height: 52vh; overflow:auto; border:1px solid var(--fg-border); border-radius: var(--fg-r-md); }
.fg-area-tree .fg-tree-node[hidden] { display:none; }
.fg-area-list .fg-list-item { gap: var(--fg-s3); }

/* Pruefpunkt in der Begehung (Kap. 9)
   Eine Zeile je Punkt: Status links, Titel, Antwort rechts. Darunter kleine
   Werkzeuge mit Symbol (Anmerkung, Zustaendig, Foto, Mangel). Anmerkung und
   Zustaendig klappen erst auf, wenn man sie braucht oder schon etwas drin
   steht. Am Handy rutscht die Antwort unter den Titel, in voller Breite. */
.fg-group-body > .fg-point { padding: var(--fg-s3) var(--fg-s4); margin-bottom: var(--fg-s2);
  border-left: 3px solid var(--fg-border); transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease); }
.fg-point[data-state="ok"]  { border-left-color: var(--fg-green); }
.fg-point[data-state="bad"] { border-left-color: var(--fg-red); background: linear-gradient(90deg, var(--fg-red-soft), transparent 38%), var(--fg-surface); }
.fg-point.is-carried { border-left-color: var(--fg-yellow); background: linear-gradient(90deg, var(--fg-yellow-soft), transparent 38%), var(--fg-surface); }

.fg-point-main { display:grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items:center; gap: var(--fg-s2) var(--fg-s3); }
.fg-point-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fg-border-strong);
  display:grid; place-items:center; color: transparent; flex:none; transition: all var(--fg-dur-fast) var(--fg-ease); }
.fg-point-dot svg { width: 13px; height: 13px; }
.fg-point[data-state="ok"] .fg-point-dot  { background: var(--fg-green); border-color: var(--fg-green); color:#fff; }
.fg-point[data-state="bad"] .fg-point-dot { background: var(--fg-red); border-color: var(--fg-red); color: transparent; }
.fg-point[data-state="bad"] .fg-point-dot::after { content:"!"; color:#fff; font-weight:800; font-size: 13px; line-height:1; position:absolute; }
.fg-point-dot { position: relative; }

.fg-point-text { min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap: 2px var(--fg-s2); }
.fg-point-title { font-weight:600; font-size: var(--fg-fs-md); line-height:1.35; }
.fg-point-tags { display:inline-flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s1); }
.fg-point-tags .fg-badge { font-size: var(--fg-fs-xs); }
.fg-point-info { display:inline-grid; place-items:center; width: 24px; height: 24px; border-radius: 50%;
  border:0; background: transparent; color: var(--fg-text-muted); cursor:pointer; }
.fg-point-info:hover { color: var(--fg-text); background: var(--fg-surface-2); }
.fg-point-info svg { width: 17px; height: 17px; }

.fg-point-answer { display:flex; align-items:center; justify-content:flex-end; gap: var(--fg-s2); min-width:0; }
.fg-point-input { width: auto; min-width: 190px; }
.fg-point-answer .fg-month .fg-select { min-width: 96px; }

/* Ja/Nein als zusammenhaengender Schalter mit Symbol */
.fg-seg { display:inline-flex; border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-sm); overflow:hidden; background: var(--fg-surface-2); }
.fg-seg .fg-seg-btn { border:0; border-radius:0; min-width: 84px; gap: 6px; }
.fg-seg .fg-seg-btn + .fg-seg-btn { border-left:1px solid var(--fg-border-strong); }
.fg-seg .fg-seg-btn svg { width: 16px; height: 16px; }
.fg-seg .fg-seg-btn.fg-btn-ghost { background: transparent; color: var(--fg-text-muted); }
.fg-seg .fg-seg-btn.is-yes.fg-btn-ghost:hover { color: var(--fg-green); background: var(--fg-green-soft); }
.fg-seg .fg-seg-btn.is-no.fg-btn-ghost:hover  { color: var(--fg-red); background: var(--fg-red-soft); }

/* Kleine Werkzeuge mit Symbol */
.fg-point-tools { display:flex; flex-wrap:wrap; align-items:center; gap: 2px var(--fg-s1); margin-top: var(--fg-s2); padding-left: 34px; }
.fg-tool { display:inline-flex; align-items:center; gap: 6px; min-height: 30px; padding: 0 10px; max-width: 100%;
  border:1px solid transparent; border-radius: var(--fg-r-pill); background: transparent; color: var(--fg-text-muted);
  font: inherit; font-size: var(--fg-fs-xs); font-weight: 500; cursor:pointer; white-space:nowrap;
  transition: background var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease), border-color var(--fg-dur-fast) var(--fg-ease); }
.fg-tool span { overflow:hidden; text-overflow:ellipsis; }
.fg-tool svg { width: 16px; height: 16px; flex:none; }
.fg-tool:hover { background: var(--fg-surface-2); color: var(--fg-text); }
.fg-tool.is-filled { color: var(--fg-text); border-color: var(--fg-border); background: var(--fg-surface-2); }
.fg-tool.is-open { color: var(--fg-text); border-color: var(--fg-border-strong); }
.fg-tool.is-defect:hover { color: var(--fg-red); background: var(--fg-red-soft); }
.fg-tool.is-confirm { color: var(--fg-yellow); border-color: var(--fg-yellow); background: var(--fg-yellow-soft); }
.fg-tool[disabled] { opacity:.5; cursor:default; }
.fg-tool span[data-resp-label] { max-width: 180px; }

.fg-point-more { margin: var(--fg-s2) 0 0 34px; gap: var(--fg-s1); }
.fg-point-more .fg-chips { margin: 2px 0 0; }
.fg-point-more .fg-chip { padding-top: 2px; padding-bottom: 2px; }
.fg-point textarea[data-autogrow] { min-height: var(--fg-ctl); height: var(--fg-ctl); resize:none; overflow:hidden; line-height:1.45; }
.fg-point .fg-defect-photos { margin-left: 34px; }
/* Leere Foto- und Mangelbereiche nehmen keinen Platz weg (sie enthalten
   nur Leerzeichen aus der Vorlage, daher :has statt :empty) */
.fg-point .fg-defect-photos:not(:has(figure)) { display:none; }
.fg-point [data-defects]:not(:has(*)) { display:none; }

@media (max-width: 759px) {
  .fg-group-body > .fg-point { padding: var(--fg-s3); }
  .fg-point-main { grid-template-columns: auto minmax(0, 1fr); }
  .fg-point-answer { grid-column: 1 / -1; justify-content:stretch; }
  .fg-point-answer > * { flex: 1 1 auto; }
  .fg-seg { width:100%; }
  .fg-seg .fg-seg-btn { flex:1; min-height: 46px; font-size: var(--fg-fs-md); }
  .fg-point-input { min-width:0; width:100%; }
  .fg-point-tools, .fg-point-more, .fg-point .fg-defect-photos { padding-left:0; margin-left:0; }
  /* Am Handy: Werkzeuge als gleich breite Felder, Symbol ueber dem Wort */
  .fg-point-tools, .fg-group-body > .fg-group-tools { display:grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--fg-s1); }
  .fg-group-body > .fg-group-tools > .fg-group-tools-end { display:contents; }
  .fg-tool { flex-direction: column; justify-content:center; gap: 3px; min-height: 48px; padding: 4px 2px;
    border-radius: var(--fg-r-sm); font-size: 11px; }
  .fg-tool svg { width: 19px; height: 19px; }
  .fg-tool span, .fg-tool span[data-resp-label] { max-width: 100%; }
  .fg-point [data-defects] { margin-left: 0; }
}
@media (min-width: 760px) {
  .fg-point [data-defects] { margin-left: 34px; }
}

/* Werkzeuge einer Kategorie und ihre Fristen (Kap. 9.3) */
.fg-group-tools { display:flex; flex-wrap:wrap; align-items:center; gap: 2px var(--fg-s1); margin-bottom: var(--fg-s2); }
.fg-group-tools-end { display:inline-flex; flex-wrap:wrap; gap: 2px var(--fg-s1); margin-left:auto; }

/* Monat und Jahr als zwei Auswahllisten, dazu die Ampel */
.fg-month { display:inline-flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s2); }
.fg-month .fg-select { width:auto; min-width: 92px; }

/* Am Handy: Monat und Jahr nebeneinander in voller Breite */
@media (max-width: 759px) {
  .fg-month { display:flex; flex-wrap:nowrap; }
  .fg-month .fg-select { flex: 1 1 0; min-width: 0; }
  .fg-month .fg-badge { flex:none; }
}

/* Speichern-Leiste, die beim Scrollen unten stehen bleibt */
.fg-card.has-savebar { overflow: visible; }
.fg-card.has-savebar > form > .fg-savebar:last-child,
.fg-card.has-savebar > .fg-savebar:last-child { border-radius: 0 0 var(--fg-r-md) var(--fg-r-md); }
.fg-savebar { position: sticky; bottom: 0; z-index: 20; display:flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s2) var(--fg-s3);
  padding: var(--fg-s3) var(--fg-s5); background: var(--fg-bg-sidebar); border-top:1px solid var(--fg-border);
  box-shadow: 0 -8px 18px rgba(0,0,0,.35); }
.fg-savebar .fg-hint { margin:0; }
@media (max-width: 900px) {
  /* Unten Platz fuer den runden Scan-Knopf, der in die Leiste ragt */
  .fg-savebar { bottom: calc(var(--fg-tabbar-h) + var(--fg-safe-bottom)); padding: var(--fg-s2) var(--fg-s4) calc(var(--fg-s2) + 24px); }
  .fg-savebar .fg-btn { flex: 1 1 auto; }
  .fg-savebar .fg-hint { display:none; }
}

/* Selten gebrauchte Felder in einem Formular */
.fg-more { margin-bottom: var(--fg-s3); }
.fg-more > summary { cursor:pointer; list-style:none; display:inline-flex; align-items:center; gap: var(--fg-s2);
  min-height: var(--fg-ctl); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-more > summary::-webkit-details-marker { display:none; }
.fg-more > summary::before { content:"▸"; opacity:.7; }
.fg-more[open] > summary::before { content:"▾"; }
.fg-more[open] > summary { margin-bottom: var(--fg-s2); }

/* ------------------------------- 15. Offline, Installation und Sync
   Alles, was nur im Offline-Betrieb sichtbar wird: Installationskarte,
   Hinweisleisten, Sperrhinweis, Anwesenheitsnachweis. */

/* Installationskarte auf der Anmeldeseite */
.fg-install-head { display:flex; gap: var(--fg-s3); align-items:flex-start; margin-bottom: var(--fg-s4); }
.fg-install-head svg { width:22px; height:22px; color: var(--fg-accent); flex:none; margin-top:2px; }
.fg-install-head strong { display:block; font-size: var(--fg-fs-lg); }
.fg-install-head p { margin: var(--fg-s1) 0 0; }

.fg-steps { margin: var(--fg-s3) 0; padding-left: var(--fg-s5); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-steps li { margin-bottom: var(--fg-s2); }

/* Zwei Leisten am unteren Rand: Update bereit und Kein Netz */
.fg-updatebar, .fg-offlinebar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--fg-s4) + var(--fg-safe-bottom));
  z-index: 70; display:flex; align-items:center; gap: var(--fg-s3);
  max-width: min(560px, calc(100vw - 2 * var(--fg-s4)));
  padding: var(--fg-s3) var(--fg-s4);
  border-radius: var(--fg-r-pill);
  font-size: var(--fg-fs-sm);
  box-shadow: var(--fg-shadow-lg);
  animation: fg-slide var(--fg-dur) var(--fg-ease-out) both;
}
.fg-updatebar  { background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); color: var(--fg-text); }
.fg-offlinebar { background: var(--fg-yellow-soft); border:1px solid var(--fg-yellow); color: var(--fg-text); }
@media (max-width: 720px) {
  .fg-updatebar, .fg-offlinebar { bottom: calc(72px + var(--fg-safe-bottom)); }
}

/* Der Punkt in der Kopfzeile ist jetzt ein Knopf */
.fg-sync { background:none; border:0; cursor:pointer; padding: var(--fg-s1) var(--fg-s2); border-radius: var(--fg-r-sm); }
.fg-sync:hover { background: var(--fg-surface-2); color: var(--fg-text); }
.fg-sync[data-busy="1"] .fg-dot { animation: fg-pulse 1s var(--fg-ease) infinite; }

/* Auschecken: Zustand des Objekts am Gerät */
.fg-checkout { display:flex; flex-wrap:wrap; gap: var(--fg-s3); align-items:center; justify-content:space-between; }
.fg-checkout-state { display:flex; align-items:center; gap: var(--fg-s2); font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-checkout-state svg { width:16px; height:16px; }
.fg-checkout.is-mine  { --fg-checkout-color: var(--fg-green); }
.fg-checkout.is-other { --fg-checkout-color: var(--fg-yellow); }
.fg-checkout-state .fg-dot { background: var(--fg-checkout-color, var(--fg-text-dim)); }

.fg-storage { margin-top: var(--fg-s3); }
.fg-storage-bar { height:6px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3); overflow:hidden; }
.fg-storage-bar i { display:block; height:100%; background: var(--fg-green); border-radius: var(--fg-r-pill);
                    transition: width var(--fg-dur-slow) var(--fg-ease-out); }
.fg-storage.is-low .fg-storage-bar i { background: var(--fg-yellow); }

/* Anwesenheitsnachweis vor dem Start */
.fg-proofs { display:grid; gap: var(--fg-s3); }
.fg-proof {
  display:flex; align-items:center; gap: var(--fg-s3);
  padding: var(--fg-s3) var(--fg-s4);
  border:1px solid var(--fg-border); border-radius: var(--fg-r-md);
  background: var(--fg-surface-2);
  min-height: var(--fg-tap);
}
.fg-proof svg { width:20px; height:20px; color: var(--fg-text-muted); flex:none; }
.fg-proof.is-done { border-color: var(--fg-green); background: var(--fg-green-soft); }
.fg-proof.is-done svg { color: var(--fg-green); }
.fg-proof.is-failed { border-color: var(--fg-red); background: var(--fg-red-soft); }
.fg-proof-text { flex:1; min-width:0; }
.fg-proof-text strong { display:block; font-size: var(--fg-fs-md); }
.fg-proof-text small { color: var(--fg-text-muted); }

/* Kamera fuer den QR-Code */
.fg-scanner { position:relative; border-radius: var(--fg-r-lg); overflow:hidden; background:#000; }
.fg-scanner video { width:100%; max-height:60vh; display:block; object-fit:cover; }
.fg-scanner-frame {
  position:absolute; inset:18% 14%; border:2px solid var(--fg-accent);
  border-radius: var(--fg-r-md); box-shadow: 0 0 0 100vmax rgba(0,0,0,.45);
}

/* Sync-Fehler und Konflikt-Entwuerfe */
.fg-syncerr { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: var(--fg-fs-xs);
              color: var(--fg-text-muted); white-space:pre-wrap; word-break:break-word; }

/* Druckvorlage fuer den QR-Code am Objekt */
.fg-qr-sheet { background:#fff; color:#000; padding: var(--fg-s8); border-radius: var(--fg-r-lg); text-align:center; }
.fg-qr-sheet img { width:220px; height:220px; image-rendering: pixelated; }

@media print { .fg-sidebar, .fg-topbar, .fg-tabbar, .fg-btn { display:none !important; } body { background:#fff; color:#000; } }

/* ------------------------------------------------------- Karte (Kap. 16) */
.fg-map-page { display:grid; grid-template-columns: minmax(0,1fr) 380px; gap: var(--fg-s5); align-items:start; }
.fg-map-main { min-width:0; }
.fg-map-canvas { height: calc(100vh - 220px); min-height: 420px; border-radius: var(--fg-r-lg);
                 border:1px solid var(--fg-border); overflow:hidden; background: var(--fg-surface); }
.fg-map-side { min-width:0; }
/* In der schmalen Spalte muessen Knopfreihen umbrechen, sonst steht der
   letzte Knopf ausserhalb der Karte. */
.fg-map-side .fg-row { flex-wrap: wrap; }
.fg-wrap { flex-wrap: wrap; }
.fg-map-side .fg-grid-2 { grid-template-columns: 1fr 1fr; }
.fg-map-scroll { max-height: 260px; overflow-y:auto; }
.fg-map-scroll.is-tall { max-height: calc(100vh - 420px); }
.fg-list-item.is-quiet { opacity: .55; }

/* Protokoll: das Kreuz gilt am Schreibtisch, das Wort am Handy (Kap. 9.6) */
.fg-mark-wort { display:none; }
.fg-mark-wort.is-yes { color: var(--fg-green); }
.fg-mark-wort.is-no  { color: var(--fg-red); }

/* Auswahlleiste der Routen (Kap. 16.4): eine Schaltflaeche je Route, mit
   ihrer Farbe und der Zahl der Stopps. Gestrichelt heisst "noch nicht
   gespeichert". */
/* Die Pfeile am Stopp bleiben nebeneinander. In der schmalen Spalte brechen
   Knopfreihen sonst um, und ein Stopp waere dreimal so hoch. */
.fg-map-side .fg-list-item .fg-row-end { flex-wrap: nowrap; gap: 2px; }
.fg-map-side .fg-list-item .fg-btn-quiet { padding: 2px 7px; }

.fg-route-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom: var(--fg-s3); }
.fg-route-tab { display:inline-flex; align-items:center; gap:6px; padding:5px 10px;
  border:1px solid var(--fg-border); border-radius: var(--fg-r-pill);
  background: var(--fg-surface-2); color: var(--fg-text-muted); font-size: var(--fg-fs-sm);
  cursor:pointer; max-width:100%;
  transition: background var(--fg-dur-fast) var(--fg-ease),
              border-color var(--fg-dur-fast) var(--fg-ease),
              color var(--fg-dur-fast) var(--fg-ease); }
.fg-route-tab:hover { color: var(--fg-text); border-color: var(--fg-border-strong); }
.fg-route-tab.is-active { color: var(--fg-text); border-color: var(--fg-accent-line);
  background: var(--fg-surface-3); }
.fg-route-tab.is-neu { border-style: dashed; }
.fg-route-dot { width:9px; height:9px; border-radius: var(--fg-r-pill); flex:none; }
.fg-route-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:150px; }
.fg-route-count { font-size: var(--fg-fs-xs); color: var(--fg-text-dim); background: var(--fg-surface);
  border-radius: var(--fg-r-pill); padding: 1px 6px; flex:none; }
.fg-route-tab.is-active .fg-route-count { color: var(--fg-text-muted); }

/* Fenster am Pin (Kap. 16.2).
   Titel, Adresse, Merkmale und Knoepfe stehen untereinander statt in einer
   langen Zeile - sonst zerreisst es bei langen Kundennamen. */
.fg-pop-card { width: 264px; max-width: 74vw; font-size: var(--fg-fs-sm); }
.fg-pop-head { display:flex; align-items:flex-start; gap: var(--fg-s2); padding-right: 20px; }
.fg-pop-head .fg-light { margin-top: 5px; }
.fg-pop-title { font-size: var(--fg-fs-lg); font-weight:600; line-height:1.25; color: var(--fg-text); }
.fg-pop-addr { color: var(--fg-text-muted); line-height:1.35; margin: 4px 0 0; }
.fg-pop-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top: var(--fg-s3); }
.fg-pop-meta .fg-chip { cursor:default; }
.fg-pop-meta .fg-chip:hover { border-color: var(--fg-border); color: var(--fg-text-muted); }
.fg-pop-actions { display:flex; gap: var(--fg-s2); margin-top: var(--fg-s3); }
.fg-pop-actions .fg-btn { flex:1 1 0; justify-content:center; }

/* Die Kartenbibliothek bringt eigenes CSS mit und wird nach diesem geladen.
   Damit das dunkle Design gewinnt, haengt alles an der eigenen Klasse. */
/* Ueber der Quellenangabe unten rechts, sonst liegt sie im Fenster. */
.maplibregl-popup.fg-pop { will-change: transform; z-index: 6; }
.maplibregl-popup.fg-pop .maplibregl-popup-content {
  background: var(--fg-surface); color: var(--fg-text);
  border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-md);
  padding: var(--fg-s4); box-shadow: var(--fg-shadow-2);
  animation: fg-pop var(--fg-dur) var(--fg-ease-out) both;
}
.maplibregl-popup.fg-pop .maplibregl-popup-tip { border-color: transparent; }
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--fg-border-strong);
}
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--fg-border-strong);
}
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--fg-border-strong);
}
.maplibregl-popup.fg-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--fg-border-strong);
}
.maplibregl-popup.fg-pop .maplibregl-popup-close-button {
  color: var(--fg-text-muted); font-size: 16px; line-height:1; width:22px; height:22px;
  top:6px; right:6px; border-radius: var(--fg-r-sm); background: transparent;
  transition: background var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease);
}
.maplibregl-popup.fg-pop .maplibregl-popup-close-button:hover {
  background: var(--fg-surface-2); color: var(--fg-text);
}
.maplibregl-ctrl-group { background: var(--fg-surface) !important; border:1px solid var(--fg-border); }
.maplibregl-ctrl-group button { background: transparent; }
.maplibregl-ctrl-group button + button { border-top:1px solid var(--fg-border); }
.maplibregl-ctrl-group button span { filter: invert(1) hue-rotate(180deg) brightness(1.6); }
.maplibregl-ctrl-attrib { background: rgba(14,15,18,.8) !important; color: var(--fg-text-dim); }
.maplibregl-ctrl-attrib a { color: var(--fg-text-muted); }

@media (max-width: 1100px) {
  .fg-map-page { grid-template-columns: 1fr; }
  .fg-map-canvas { height: 46vh; min-height: 320px; }
  .fg-map-scroll { max-height: 220px; }
  .fg-map-scroll.is-tall { max-height: 280px; }
}

/* =====================================================================
   15. Prueflisten, Mehrfachauswahl, Formulare, Reiter und Bewegung
   (Version 1.14). Alles zusaetzlich, bestehende Regeln bleiben, wie sie sind.
   ===================================================================== */

/* ---------- Umschalter wie Segmente: Prueflisten im Katalog und am Objekt */
.fg-seg-tabs { display:inline-flex; gap: 4px; padding: 4px; background: var(--fg-bg-sidebar);
  border:1px solid var(--fg-border); border-radius: var(--fg-r-lg); max-width:100%; overflow-x:auto; scrollbar-width:none; }
.fg-seg-tabs::-webkit-scrollbar { display:none; }
.fg-seg-tabs form { display:contents; }
.fg-seg-tab { position:relative; display:inline-flex; align-items:center; gap: var(--fg-s2); white-space:nowrap;
  min-height: var(--fg-ctl); padding: 0 var(--fg-s4); border-radius: var(--fg-r-md); border:0; background:transparent;
  color: var(--fg-text-muted); font: inherit; font-weight:500; font-size: var(--fg-fs-sm); cursor:pointer;
  transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-seg-tab svg { width:16px; height:16px; }
.fg-seg-tab:hover { color: var(--fg-text); background: var(--fg-surface); }
.fg-seg-tab:active { transform: scale(.97); }
.fg-seg-tab.is-active { background: var(--fg-surface-3); color: var(--fg-text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 4px 14px rgba(0,0,0,.35); }
.fg-seg-tab.is-active svg { color: var(--fg-accent); }
.fg-seg-tab.is-off { opacity:.45; cursor:default; }
.fg-seg-count { min-width: 22px; padding: 1px 7px; border-radius: var(--fg-r-pill); background: var(--fg-surface-2);
  font-size: var(--fg-fs-xs); font-variant-numeric: tabular-nums; color: var(--fg-text-muted); text-align:center; }
.fg-seg-tab.is-active .fg-seg-count { background: var(--fg-accent-soft); color: var(--fg-accent-hover); }
.fg-seg-tabs-sm .fg-seg-tab { min-height: 34px; padding: 0 var(--fg-s3); }
.fg-checklist-switch { display:flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s2) var(--fg-s4); border-bottom:1px solid var(--fg-border); }
.fg-checklist-switch .fg-hint { margin:0; }

/* ---------- Auswahlkarten (Objekt anlegen: Pruefliste) */
.fg-choice-cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--fg-s3); }
.fg-choice-card { position:relative; display:flex; gap: var(--fg-s3); align-items:flex-start; padding: var(--fg-s4);
  border:1px solid var(--fg-border); border-radius: var(--fg-r-lg); background: var(--fg-bg-sidebar); cursor:pointer;
  transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease-out), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-choice-card:hover { border-color: var(--fg-border-strong); transform: translateY(-1px); }
.fg-choice-card input { position:absolute; opacity:0; pointer-events:none; }
.fg-choice-card:has(input:checked) { border-color: var(--fg-accent-line); background: linear-gradient(180deg, var(--fg-accent-soft), transparent 80%); box-shadow: var(--fg-glow); }
.fg-choice-card:has(input:focus-visible) { outline: 2px solid var(--fg-accent-hover); outline-offset: 2px; }
.fg-choice-icon { flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius: var(--fg-r-md);
  background: var(--fg-surface-2); color: var(--fg-text-muted); transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-slow) var(--fg-ease-out); }
.fg-choice-icon svg { width:20px; height:20px; }
.fg-choice-card:has(input:checked) .fg-choice-icon { background: var(--fg-accent); color:#fff; transform: rotate(-6deg) scale(1.06); }
.fg-choice-body { display:grid; gap: 2px; }
.fg-choice-body small { color: var(--fg-text-muted); line-height:1.45; }

/* ---------- Katalog: Mehrfachauswahl, Termine, Loeschen */
.fg-tree-all { background: var(--fg-bg-sidebar); }
.fg-tree-all .fg-check { min-height: 36px; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-bulk-check { width:18px; height:18px; flex:none; accent-color: var(--fg-accent); cursor:pointer; }
.fg-bulk-gap { width:18px; flex:none; }
.fg-tree-node { transition: background var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-tree-node.is-picked { background: var(--fg-accent-soft); box-shadow: inset 3px 0 0 var(--fg-accent); }
.fg-bulkbar { position: sticky; bottom: var(--fg-s4); z-index: 30; display:flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s2);
  margin: var(--fg-s4) auto 0; width: fit-content; max-width: 100%; padding: var(--fg-s2) var(--fg-s3);
  background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-pill);
  box-shadow: var(--fg-shadow-lg); animation: fg-bar-in var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-bulkbar[hidden] { display:none; }
.fg-bulkbar-count { padding: 0 var(--fg-s2); font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-bulkbar-count b { color: var(--fg-text); font-variant-numeric: tabular-nums; display:inline-block; }
@keyframes fg-bar-in { from { opacity:0; transform: translateY(18px) scale(.96); } to { opacity:1; transform:none; } }
@media (max-width: 900px) {
  .fg-bulkbar { bottom: calc(var(--fg-tabbar-h) + var(--fg-safe-bottom) + 30px); border-radius: var(--fg-r-lg); }
}
.fg-terms { position:relative; display:inline-block; }
.fg-terms > summary { list-style:none; }
.fg-terms > summary::-webkit-details-marker { display:none; }
.fg-terms[open] > summary { background: var(--fg-surface-2); color: var(--fg-text); }
.fg-terms-pop { position:absolute; right:0; top: calc(100% + 6px); z-index: 25; display:grid; gap: 2px; min-width: 210px;
  padding: var(--fg-s3); background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-md);
  box-shadow: var(--fg-shadow-lg); animation: fg-pop var(--fg-dur) var(--fg-ease-out) both; }
.fg-terms-head { font-size: var(--fg-fs-xs); color: var(--fg-text-dim); text-transform: uppercase; letter-spacing:.06em; margin-bottom: 2px; }
.fg-terms-pop .fg-btn { margin-top: var(--fg-s2); }
.fg-text-danger { color: var(--fg-accent) !important; }
.fg-text-danger:hover { color: var(--fg-accent-hover) !important; background: var(--fg-accent-soft) !important; }
.fg-danger-zone { border-color: var(--fg-accent-line); }
.fg-danger-zone > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap: var(--fg-s2);
  color: var(--fg-accent-hover); font-weight:600; }
.fg-danger-zone > summary::-webkit-details-marker { display:none; }
.fg-danger-zone > summary svg { width:18px; height:18px; }
.fg-danger-zone[open] > form { animation: fg-rise var(--fg-dur) var(--fg-ease-out) both; margin-top: var(--fg-s3); }
.fg-chip.is-on { border-color: var(--fg-accent-line); color: var(--fg-text); background: var(--fg-accent-soft); }
.fg-chip svg { width:14px; height:14px; }
.fg-chip { display:inline-flex; align-items:center; gap: 6px; }
.fg-flash { animation: fg-flash 700ms var(--fg-ease-out); }
@keyframes fg-flash { 0% { box-shadow: 0 0 0 0 var(--fg-accent-line); } 40% { box-shadow: 0 0 0 4px var(--fg-accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Reiter: Symbol, Zahl, gleitender Balken, Menue "Mehr" */
.fg-tabs { position:relative; }
.fg-tabs.has-ink .fg-tab.is-active { border-bottom-color: transparent; }
.fg-tab-ink { position:absolute; left:0; bottom:-1px; height:2px; width:0; border-radius: 2px 2px 0 0;
  background: var(--fg-accent); box-shadow: 0 0 12px rgba(227,0,15,.55); pointer-events:none;
  transition: transform var(--fg-dur-slow) var(--fg-ease-out), width var(--fg-dur-slow) var(--fg-ease-out), opacity var(--fg-dur) var(--fg-ease); }
.fg-tabs-icons .fg-tab { display:inline-flex; align-items:center; gap: 7px; }
.fg-tabs-icons .fg-tab > svg { width:16px; height:16px; opacity:.75; transition: transform var(--fg-dur) var(--fg-ease-out), opacity var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease); }
.fg-tabs-icons .fg-tab:hover > svg { opacity:1; transform: translateY(-1px); }
.fg-tabs-icons .fg-tab.is-active > svg { opacity:1; color: var(--fg-accent); }
.fg-tab-count { min-width: 20px; padding: 0 6px; border-radius: var(--fg-r-pill); background: var(--fg-surface-2);
  color: var(--fg-text-muted); font-size: var(--fg-fs-xs); font-weight:600; line-height: 18px; text-align:center;
  font-variant-numeric: tabular-nums; animation: fg-count-pop 420ms var(--fg-ease-out) both; }
.fg-tab-count.is-red { background: var(--fg-red-soft); color: #FF5A63; }
.fg-tab.is-active .fg-tab-count { background: var(--fg-surface-3); color: var(--fg-text); }
@keyframes fg-count-pop { 0% { transform: scale(.4); opacity:0; } 70% { transform: scale(1.12); opacity:1; } 100% { transform: scale(1); } }
.fg-tabs.is-smart { overflow: hidden; flex-wrap: nowrap; scroll-snap-type:none; }
.fg-tab-more { margin-left:auto; display:inline-flex; align-items:center; gap: 6px; background:transparent; border:0;
  border-bottom:2px solid transparent; font: inherit; cursor:pointer; color: var(--fg-text-muted); flex:none; }
.fg-tab-more svg { width:14px; height:14px; transition: transform var(--fg-dur) var(--fg-ease-out); }
.fg-tabs.menu-open .fg-tab-more { color: var(--fg-text); }
.fg-tabs.menu-open .fg-tab-more svg { transform: rotate(180deg); }
.fg-tab-more-n { min-width: 18px; padding: 0 5px; border-radius: var(--fg-r-pill); background: var(--fg-surface-2); font-size: var(--fg-fs-xs); line-height:18px; }
.fg-tab-more[hidden] { display:none; }
.fg-tab-menu { position:relative; height:0; z-index: 40; --menu-right: 0px; }
.fg-tab-menu[hidden] { display:none; }
/* Das Menue: ein schwebendes Raster aus Kacheln direkt unter "Mehr" */
.fg-tab-menu-panel { position:absolute; right: var(--menu-right); top: calc(-1 * var(--fg-s5) + 6px);
  display:grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 4px; padding: var(--fg-s2);
  background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-lg);
  box-shadow: var(--fg-shadow-lg); transform-origin: top right; animation: fg-menu-in var(--fg-dur) var(--fg-ease-out) both; }
.fg-tab-menu-panel > .fg-tab { display:flex; align-items:center; gap: 10px; padding: 10px 12px; border:0; border-radius: var(--fg-r-md);
  color: var(--fg-text); white-space:nowrap; transition: background var(--fg-dur-fast) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-tab-menu-panel > .fg-tab:hover { background: var(--fg-surface-2); transform: translateX(2px); }
.fg-tab-menu-panel > .fg-tab > svg { width:18px; height:18px; color: var(--fg-text-muted); opacity:1; }
.fg-tab-menu-panel > .fg-tab .fg-tab-count { margin-left:auto; }
@keyframes fg-menu-in { from { opacity:0; transform: translateY(-6px) scale(.96); } to { opacity:1; transform:none; } }
.fg-tab-enter { animation: fg-tab-in var(--fg-dur-slow) var(--fg-ease-out) both; }
@keyframes fg-tab-in { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:none; } }
/* Am Handy: inaktive Reiter nur als Symbol (mit Zahl als kleiner Punkt),
   der aktive mit Text. So passen die wichtigsten nebeneinander. */
@media (max-width: 640px) {
  .fg-tabs-icons .fg-tab { padding-left: 11px; padding-right: 11px; position:relative; }
  .fg-tabs-icons > .fg-tab:not(.is-active):not(.fg-tab-more) > span { display:none; }
  .fg-tabs-icons > .fg-tab:not(.is-active) > svg { width:19px; height:19px; }
  .fg-tabs-icons > .fg-tab:not(.is-active) > .fg-tab-count { position:absolute; top: 3px; right: 0; min-width: 16px; padding: 0 4px;
    line-height: 15px; font-size: 10px; }
  .fg-tabs-icons > .fg-tab.is-active > span { display:inline-block; animation: fg-label-in var(--fg-dur-slow) var(--fg-ease-out) both; }
  .fg-tab-more > span { display:none; }
}
@keyframes fg-label-in { from { opacity:0; transform: translateX(-4px); } to { opacity:1; transform:none; } }
@media (max-width: 560px) {
  .fg-tab-menu-panel { left: 0; right: 0; grid-template-columns: 1fr 1fr; }
  .fg-tab-menu-panel > .fg-tab { white-space:normal; }
}

/* ---------- Formulare am Objekt */
.fg-form-item { gap: var(--fg-s4); }
.fg-form-q { flex:none; display:grid; place-items:center; width:48px; height:48px; border-radius: var(--fg-r-md);
  background: var(--fg-surface-2); color: var(--fg-text); font-weight:700; font-size: var(--fg-fs-lg); line-height:1;
  transition: transform var(--fg-dur) var(--fg-ease-out); }
.fg-form-q small { display:block; font-size: 10px; font-weight:500; color: var(--fg-text-muted); margin-top: 2px; }
.fg-form-q.is-signed { background: var(--fg-green-soft); color: var(--fg-green); }
.fg-form-item:hover .fg-form-q { transform: scale(1.06) rotate(-3deg); }
.fg-form-main { display:grid; gap: 2px; min-width:0; flex:1; }
.fg-empty-sm { padding: var(--fg-s6) var(--fg-s5); }
.fg-empty-icon { display:inline-grid; place-items:center; width:52px; height:52px; border-radius: 50%;
  background: var(--fg-surface-2); margin-bottom: var(--fg-s3); animation: fg-float 3.2s var(--fg-ease) infinite; }
.fg-empty-icon svg { width:24px; height:24px; margin:0; color: var(--fg-text-muted); }
@keyframes fg-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Quartalsbestaetigung */
.fg-qform { display:grid; gap: var(--fg-s4); max-width: 1100px; }
.fg-qfacts { display:flex; gap: var(--fg-s3); align-items:flex-start; padding: var(--fg-s3) var(--fg-s4);
  border:1px solid rgba(59,130,246,.35); background: var(--fg-blue-soft); border-radius: var(--fg-r-md); color: var(--fg-text);
  font-size: var(--fg-fs-sm); animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-qfacts svg { width:18px; height:18px; color: var(--fg-blue); flex:none; margin-top:1px; }
.fg-qsec { margin:0; }
.fg-qsec-head { display:flex; align-items:center; justify-content:space-between; gap: var(--fg-s3); flex-wrap:wrap; margin-bottom: var(--fg-s3); }
.fg-qsec-head .fg-qsec-title { margin:0; }
.fg-qsec-title { display:flex; align-items:center; gap: var(--fg-s3); font-size: var(--fg-fs-lg); margin: 0 0 var(--fg-s4); }
.fg-qsec-title > span { display:grid; place-items:center; width:28px; height:28px; border-radius: 50%; flex:none;
  background: var(--fg-accent); color:#fff; font-size: var(--fg-fs-sm); font-weight:700; box-shadow: 0 0 0 4px var(--fg-accent-soft); }
.fg-qperiod { display:flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s3); }
.fg-qquarters { display:inline-flex; gap:4px; padding:4px; background: var(--fg-bg-sidebar); border:1px solid var(--fg-border); border-radius: var(--fg-r-lg); }
.fg-qq { position:relative; cursor:pointer; }
.fg-qq input { position:absolute; opacity:0; pointer-events:none; }
.fg-qq span { display:grid; place-items:center; min-width: 48px; min-height: var(--fg-ctl); border-radius: var(--fg-r-md);
  color: var(--fg-text-muted); font-weight:600; transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-qq:hover span { color: var(--fg-text); background: var(--fg-surface); }
.fg-qq input:checked + span { background: var(--fg-accent); color:#fff; box-shadow: 0 6px 16px rgba(227,0,15,.35); animation: fg-press 260ms var(--fg-ease-out); }
.fg-qq input:focus-visible + span { outline: 2px solid var(--fg-accent-hover); outline-offset: 2px; }
.fg-qyear { width:auto; min-width: 100px; }
.fg-qdates { display:flex; flex-wrap:wrap; gap: var(--fg-s2) var(--fg-s3); }
.fg-qdates label { display:flex; align-items:center; gap: var(--fg-s2); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-qdates .fg-input { width:auto; }
@keyframes fg-press { 0% { transform: scale(.9); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }

.fg-qrows { display:grid; border:1px solid var(--fg-border); border-radius: var(--fg-r-md); overflow:hidden; }
.fg-qrow { display:grid; grid-template-columns: minmax(0,1fr) 140px 170px 170px; gap: var(--fg-s3); align-items:center;
  padding: var(--fg-s3) var(--fg-s4); border-bottom:1px solid var(--fg-border); background: var(--fg-surface);
  transition: background var(--fg-dur) var(--fg-ease); }
.fg-qrow:last-child { border-bottom:0; }
.fg-qrow:hover { background: var(--fg-surface-2); }
.fg-qrow-head { background: var(--fg-bg-sidebar); color: var(--fg-text-dim); font-size: var(--fg-fs-xs); text-transform:uppercase; letter-spacing:.06em; padding-top: var(--fg-s2); padding-bottom: var(--fg-s2); }
.fg-qrow-head:hover { background: var(--fg-bg-sidebar); }
.fg-qrow-title { display:grid; gap:2px; min-width:0; }
.fg-qrow-title small { color: var(--fg-text-muted); }
.fg-yn { display:inline-flex; gap:4px; padding:3px; background: var(--fg-bg-sidebar); border:1px solid var(--fg-border); border-radius: var(--fg-r-pill); }
.fg-yn-opt { position:relative; cursor:pointer; }
.fg-yn-opt input { position:absolute; opacity:0; pointer-events:none; }
.fg-yn-opt span { display:grid; place-items:center; min-width: 58px; min-height: 32px; padding: 0 var(--fg-s3); border-radius: var(--fg-r-pill);
  color: var(--fg-text-muted); font-size: var(--fg-fs-sm); font-weight:600;
  transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-yn-opt:hover span { color: var(--fg-text); }
.fg-yn-opt:active span { transform: scale(.94); }
.fg-yn-opt.is-yes input:checked + span { background: var(--fg-green); color: #04140A; animation: fg-press 260ms var(--fg-ease-out); }
.fg-yn-opt.is-no input:checked + span { background: var(--fg-surface-3); color: var(--fg-text); animation: fg-press 260ms var(--fg-ease-out); }
/* Bei "Maengel" ist Ja das Auffaellige */
.fg-qrow-yn:last-child .fg-yn-opt.is-yes input:checked + span { background: var(--fg-red); color:#fff; }
.fg-qrow-yn:last-child .fg-yn-opt.is-no input:checked + span { background: var(--fg-green-soft); color: var(--fg-green); }
.fg-yn-opt input:focus-visible + span { outline: 2px solid var(--fg-accent-hover); outline-offset: 2px; }
.fg-yn-opt input:disabled + span { cursor:default; }
.fg-pulse-once { animation: fg-row-pulse 600ms var(--fg-ease-out) both; }
@keyframes fg-row-pulse { 0% { background: var(--fg-surface); } 35% { background: var(--fg-green-soft); } 100% { background: var(--fg-surface); } }

.fg-qchecks { display:grid; gap: var(--fg-s2); }
.fg-qcheck { display:flex; gap: var(--fg-s3); align-items:center; padding: var(--fg-s3) var(--fg-s4); border:1px solid var(--fg-border);
  border-radius: var(--fg-r-md); background: var(--fg-bg-sidebar); cursor:pointer;
  transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease); }
.fg-qcheck:hover { border-color: var(--fg-border-strong); }
.fg-qcheck input { width:20px; height:20px; accent-color: var(--fg-accent); flex:none; }
.fg-qcheck:has(input:checked) { border-color: var(--fg-accent-line); background: var(--fg-accent-soft); }
.fg-qcheck.is-none:has(input:checked) { border-color: rgba(34,197,94,.45); background: var(--fg-green-soft); }
.fg-qcheck.is-none input { accent-color: var(--fg-green); }
.fg-qconfirm { padding: var(--fg-s3) var(--fg-s4); border-left: 3px solid var(--fg-accent); background: var(--fg-bg-sidebar); border-radius: 0 var(--fg-r-md) var(--fg-r-md) 0; }
.fg-qsigns { display:grid; grid-template-columns: 1fr 1fr; gap: var(--fg-s4); }
.fg-qsign { padding: var(--fg-s4); border:1px solid var(--fg-border); border-radius: var(--fg-r-lg); background: var(--fg-bg-sidebar); min-width:0; }
.fg-qsign.is-customer { border-color: var(--fg-accent-line); }
.fg-qsign h3 { display:flex; align-items:baseline; gap: var(--fg-s2); margin-bottom: var(--fg-s3); }
.fg-qsign h3 small { color: var(--fg-text-muted); font-weight:400; font-size: var(--fg-fs-sm); }
.fg-qsign .fg-signature { max-height: 140px; margin-bottom: var(--fg-s3); }
.fg-qsign .fg-signature.is-old { opacity:.35; filter: grayscale(1); }
.fg-qbar { border-radius: var(--fg-r-lg); border:1px solid var(--fg-border); }

/* Unterschriftsfeld: weisser Grund, Linie, Hinweis verschwindet beim ersten Strich */
.fg-sign { position:relative; height: 190px; background:#FFFFFF; border-radius: var(--fg-r-md); overflow:hidden;
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.12); transition: box-shadow var(--fg-dur) var(--fg-ease); }
.fg-sign:focus-within, .fg-sign.has-ink { box-shadow: inset 0 0 0 2px rgba(227,0,15,.35); }
.fg-sign canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; cursor:crosshair; display:block; }
.fg-sign::after { content:""; position:absolute; left: 6%; right: 6%; bottom: 30%; border-bottom: 1.5px dashed rgba(16,24,40,.25); pointer-events:none; }
.fg-sign-hint { position:absolute; left: 6%; bottom: calc(30% + 8px); display:flex; align-items:center; gap:6px; color: rgba(16,24,40,.38);
  font-size: var(--fg-fs-sm); pointer-events:none; transition: opacity var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease); }
.fg-sign-hint svg { width:18px; height:18px; }
.fg-sign.has-ink .fg-sign-hint { opacity:0; transform: translateY(6px); }
.fg-sign-tools { position:absolute; top: 6px; right: 6px; display:flex; gap:4px; z-index:2; }
.fg-sign-tools .fg-btn { background: rgba(16,24,40,.06); color: #344054; min-height: 30px; }
.fg-sign-tools .fg-btn:hover { background: rgba(16,24,40,.12); color:#101828; }
.fg-sign.is-big { position: fixed; inset: calc(var(--fg-safe-top) + 12px) 12px calc(var(--fg-safe-bottom) + 12px) 12px; height:auto; z-index: 120;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.72), var(--fg-shadow-lg); animation: fg-pop var(--fg-dur) var(--fg-ease-out) both; }
body.fg-sign-open { overflow:hidden; }
.fg-shake { animation: fg-shake 520ms var(--fg-ease) both; }
@keyframes fg-shake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-6px); } 40%,60% { transform: translateX(6px); } }

@media (max-width: 900px) {
  .fg-qrow { grid-template-columns: 1fr 1fr; gap: var(--fg-s2) var(--fg-s3); }
  .fg-qrow-head { display:none; }
  .fg-qrow-title { grid-column: 1 / -1; }
  .fg-qrow-int { grid-column: 1 / -1; }
  .fg-qrow-yn { display:grid; gap: 4px; }
  .fg-qrow-yn::before { content: attr(data-label); font-size: var(--fg-fs-xs); color: var(--fg-text-dim); text-transform:uppercase; letter-spacing:.06em; }
  .fg-yn { width:100%; }
  .fg-yn-opt { flex:1; }
  .fg-yn-opt span { min-width:0; min-height: 40px; }
  .fg-qsigns { grid-template-columns: 1fr; }
  .fg-qquarters { flex: 1 1 100%; }
  .fg-qq { flex:1; }
  .fg-qq span { min-width:0; }
  .fg-sign { height: 200px; }
}

/* ---------- Mehr Leben: kleine, ruhige Rueckmeldungen ueberall */
.fg-btn:active { transform: translateY(1px) scale(.98); }
.fg-btn:not(.fg-btn-ghost):not(.fg-btn-quiet):not(.fg-btn-danger):hover { box-shadow: 0 6px 18px rgba(227,0,15,.28); }
.fg-btn svg { transition: transform var(--fg-dur) var(--fg-ease-out); }
.fg-btn:hover svg { transform: scale(1.08); }
.fg-card { transition: border-color var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
a.fg-list-item { transition: background var(--fg-dur-fast) var(--fg-ease), transform var(--fg-dur) var(--fg-ease-out); }
a.fg-list-item:hover { transform: translateX(3px); }
.fg-check input, .fg-bulk-check, .fg-qcheck input { transition: transform var(--fg-dur-fast) var(--fg-ease); }
.fg-check input:checked, .fg-bulk-check:checked, .fg-qcheck input:checked { animation: fg-press 260ms var(--fg-ease-out); }
.fg-badge.is-green, .fg-badge.is-red, .fg-badge.is-yellow { animation: fg-count-pop 420ms var(--fg-ease-out) both; }
.fg-input, .fg-select, .fg-textarea { transition: border-color var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease); }
.fg-input:focus, .fg-select:focus, .fg-textarea:focus { box-shadow: 0 0 0 3px var(--fg-accent-soft); }

@media (prefers-reduced-motion: reduce) {
  .fg-bulkbar, .fg-terms-pop, .fg-tab-menu-panel, .fg-tab-enter, .fg-tab-count, .fg-empty-icon, .fg-qfacts, .fg-sign.is-big,
  .fg-pulse-once, .fg-shake, .fg-flash, .fg-badge, .fg-qq input:checked + span, .fg-yn-opt input:checked + span,
  .fg-check input:checked, .fg-bulk-check:checked, .fg-qcheck input:checked { animation: none !important; }
  .fg-tab-ink, a.fg-list-item, .fg-choice-card, .fg-choice-icon { transition: none !important; transform: none !important; }
}
.fg-tree-actions .fg-terms-pop { display:grid; justify-items:start; }
.fg-tree-actions .fg-terms-pop .fg-btn { justify-self: stretch; }
.fg-tree-actions > .fg-terms { opacity:1; }
.fg-sign.is-big { z-index: 300; }
@media (max-width: 900px) {
  .fg-qbar { flex-wrap: nowrap; }
  .fg-qbar .fg-btn { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; padding: 6px 10px; }
}
@media (orientation: portrait) and (max-width: 700px) {
  .fg-sign.is-big::before { content: "Tipp: Handy quer halten, dann ist mehr Platz."; position:absolute; left: 12px; bottom: 14px; z-index:1;
    color: rgba(16,24,40,.45); font-size: var(--fg-fs-sm); pointer-events:none; }
}
/* Zeile, an der man nach Loeschen oder Archivieren wieder steht */
.fg-tree-node.fg-row-here { animation: fg-row-here 1.4s var(--fg-ease-out) both; }
@keyframes fg-row-here { 0%, 30% { background: var(--fg-accent-soft); box-shadow: inset 3px 0 0 var(--fg-accent); } }
@media (prefers-reduced-motion: reduce) { .fg-tree-node.fg-row-here { animation: none !important; } }
/* Protokollansicht: Termine (Monat/Jahr, Datum) bündig untereinander */
.fg-term-cell { display:grid; grid-template-columns: minmax(0,1fr) 12.5em; gap: var(--fg-s3); align-items:center; }
.fg-term { display:inline-flex; align-items:center; gap: var(--fg-s2); white-space:nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .fg-term-cell { grid-template-columns: minmax(0,1fr) auto; width:100%; flex:1 1 auto; } .fg-term { justify-self:end; flex-direction:row-reverse; } }

/* Mailversand: Weg wählen, großer Senden-Knopf, Hilfe danach (Kap. 13.1) */
.fg-btn-lg { min-height: 48px; padding: 0 var(--fg-s5); font-size: var(--fg-fs-md); font-weight:600; }
.fg-btn-lg svg { width:18px; height:18px; }
.fg-mail-way { display:flex; flex-wrap:wrap; align-items:center; gap: var(--fg-s2) var(--fg-s4); }
.fg-mail-way .fg-hint { margin:0; }
.fg-mail-help { padding: var(--fg-s3) var(--fg-s4); border:1px solid var(--fg-border-strong); border-left: 3px solid var(--fg-accent);
  border-radius: var(--fg-r-md); background: var(--fg-bg-sidebar); }
.fg-mail-help [data-help] { display:grid; gap: 2px; }
.fg-mail-help [data-help][hidden] { display:none; }
.fg-seg-tab[disabled] { opacity:.4; cursor:not-allowed; }
@media (max-width: 720px) {
  .fg-mail-way .fg-seg-tabs { width:100%; }
  .fg-mail-way .fg-seg-tab { flex:1; justify-content:center; }
  [data-mail-send].fg-btn-lg { width:100%; }
}

/* =====================================================================
   16. Karte "Meine Objekte" neu (Version 1.16, E-93)
   Karte als Hauptsache, Suche und Ampel schwebend darauf, Objekte und
   Route in zwei Reitern: am PC als Spalte, am Handy als Schublade.
   Die alten Kartenregeln oben bleiben für die Karte "Bundesland".
   ===================================================================== */
.fg-content > .fg-mapx { animation: none; }
.fg-mapx { --mapx-h: calc(100vh - var(--fg-topbar-h) - 150px);
  display:grid; grid-template-columns: minmax(0,1fr) 380px; gap: var(--fg-s4);
  height: max(480px, var(--mapx-h)); }
.fg-mapx-stage { position:relative; min-width:0; height:100%; border-radius: var(--fg-r-lg); overflow:hidden;
  border:1px solid var(--fg-border); background: var(--fg-surface); }
.fg-mapx .fg-mapx-canvas { position:absolute; inset:0; height:auto; min-height:0; border:0; border-radius:0; }
.fg-mapx-head p { max-width: 620px; }

/* Schwebend: Suche und Ampel */
.fg-mapx-float { position:absolute; top: var(--fg-s3); left: var(--fg-s3); z-index:3; width: min(600px, calc(100% - 76px));
  display:grid; gap: var(--fg-s2); pointer-events:none; animation: fg-pop var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-mapx-float > * { pointer-events:auto; }
.fg-mapx-search { display:flex; align-items:center; gap: var(--fg-s2); height: 46px; max-width: 440px; padding: 0 6px 0 var(--fg-s4);
  background: rgba(22,24,29,.92); backdrop-filter: blur(10px); border:1px solid var(--fg-border-strong);
  border-radius: var(--fg-r-pill); box-shadow: var(--fg-shadow-lg);
  transition: border-color var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-mapx-search:focus-within { border-color: var(--fg-accent-line); box-shadow: var(--fg-shadow-lg), 0 0 0 3px var(--fg-accent-soft); }
.fg-mapx-search > svg { width:18px; height:18px; color: var(--fg-text-dim); flex:none; }
.fg-mapx-search input { flex:1; min-width:0; height:100%; background:transparent; border:0; outline:0; color: var(--fg-text);
  font: inherit; font-size: 16px; }
.fg-mapx-search input::placeholder { color: var(--fg-text-dim); }
.fg-mapx-search input::-webkit-search-cancel-button { display:none; }
.fg-mapx-clear { width:34px; height:34px; display:grid; place-items:center; border:0; border-radius: var(--fg-r-pill);
  background: var(--fg-surface-3); color: var(--fg-text-muted); cursor:pointer; animation: fg-pop var(--fg-dur) var(--fg-ease-out) both; }
.fg-mapx-clear svg { width:14px; height:14px; }
.fg-mapx-clear:hover { color: var(--fg-text); }

.fg-mapx-chips { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; -webkit-overflow-scrolling: touch; }
.fg-mapx-chips::-webkit-scrollbar { display:none; }
/* Rechts ausblenden, damit man sieht: hier geht es weiter */
@media (max-width: 900px) { .fg-mapx-chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 28px; } }
.fg-mapx-chip { flex:none; display:inline-flex; align-items:center; gap:6px; height:34px; padding: 0 12px;
  border:1px solid var(--fg-border-strong); border-radius: var(--fg-r-pill); background: rgba(22,24,29,.92);
  backdrop-filter: blur(10px); color: var(--fg-text-muted); font: inherit; font-size: var(--fg-fs-sm); cursor:pointer;
  box-shadow: var(--fg-shadow); white-space:nowrap;
  transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease), opacity var(--fg-dur) var(--fg-ease); }
.fg-mapx-chip:hover { color: var(--fg-text); border-color: #4A515D; }
.fg-mapx-chip:active { transform: scale(.95); }
.fg-mapx-chip.is-active { background: var(--fg-text); color: #0E0F12; border-color: var(--fg-text); }
.fg-mapx-chip.is-active .fg-mapx-chip-n { background: rgba(14,15,18,.12); color:#0E0F12; }
.fg-mapx-chip.is-empty:not(.is-active) { opacity:.45; }
.fg-mapx-chip .fg-light { width:8px; height:8px; box-shadow:none; }
.fg-mapx-chip-n { min-width: 20px; padding: 0 6px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3);
  font-size: var(--fg-fs-xs); font-variant-numeric: tabular-nums; text-align:center; line-height:18px; }

/* Kartenknöpfe passend zum Design */
.fg-mapx .maplibregl-ctrl-top-right { top: var(--fg-s1); right: var(--fg-s1); }
.fg-mapx .maplibregl-ctrl-group { border-radius: var(--fg-r-md); box-shadow: var(--fg-shadow-lg); overflow:hidden; }
.fg-mapx .maplibregl-ctrl-group button { width:38px; height:38px; }
.fg-mapx-ctrl button { display:grid; place-items:center; color: var(--fg-text-muted); }
.fg-mapx-ctrl button svg { width:18px; height:18px; }
.fg-mapx-ctrl button:hover { color: var(--fg-text); }

/* Stoppnummern auf der Karte: runde Nadel mit Spitze, fällt sanft ein */
.fg-stopmark { --route: var(--fg-accent); width:30px; height:30px; padding:0; margin-bottom:7px;
  border:2px solid #0E0F12; border-radius: var(--fg-r-pill); background: var(--route); color:#fff;
  font: 700 13px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; cursor:pointer;
  display:grid; place-items:center; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.fg-stopmark::after { content:""; position:absolute; left:50%; bottom:-8px; transform: translateX(-50%);
  border:6px solid transparent; border-top:7px solid var(--route); border-bottom:0; }
.fg-stopmark > * { pointer-events:none; }
.fg-stopmark { animation: fg-stop-drop .42s var(--fg-ease-out) both; }
@keyframes fg-stop-drop { from { opacity:0; translate: 0 -16px; } to { opacity:1; translate: 0 0; } }
.fg-stopmark:hover { filter: brightness(1.15); }

/* Bedienfeld mit zwei Reitern */
.fg-mapx-panel { min-width:0; height:100%; display:flex; flex-direction:column; background: var(--fg-surface);
  border:1px solid var(--fg-border); border-radius: var(--fg-r-lg); overflow:hidden; }
.fg-mapx-grip { display:none; }
.fg-mapx-tabs { position:relative; display:flex; gap:4px; padding: var(--fg-s2); border-bottom:1px solid var(--fg-border); flex:none; }
.fg-mapx-tab { position:relative; z-index:1; flex:1; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:40px; border:0; background:transparent; color: var(--fg-text-muted); font: inherit; font-weight:600;
  font-size: var(--fg-fs-md); border-radius: var(--fg-r-md); cursor:pointer; transition: color var(--fg-dur) var(--fg-ease); }
.fg-mapx-tab svg { width:17px; height:17px; }
.fg-mapx-tab:hover { color: var(--fg-text); }
.fg-mapx-tab.is-active { color: var(--fg-text); }
.fg-mapx-tab-n { min-width:22px; padding: 0 7px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3);
  font-size: var(--fg-fs-xs); line-height:20px; font-variant-numeric: tabular-nums; color: var(--fg-text-muted); }
.fg-mapx-tab.is-active .fg-mapx-tab-n { background: var(--fg-accent); color:#fff; }
.fg-mapx-tab-n.is-bump { animation: fg-count-pop .45s var(--fg-ease-out) both; }
.fg-mapx-tab-ink { position:absolute; left:0; top: var(--fg-s2); height:40px; border-radius: var(--fg-r-md);
  background: var(--fg-surface-3); box-shadow: inset 0 0 0 1px var(--fg-border-strong);
  transition: transform var(--fg-dur-slow) var(--fg-ease-out), width var(--fg-dur-slow) var(--fg-ease-out); }

.fg-mapx-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior: contain; padding: var(--fg-s3); }
.fg-mapx-body[hidden] { display:none; }
.fg-mapx-body.is-enter { animation: fg-tab-in var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-mapx-result { margin: 0 var(--fg-s1) var(--fg-s2); color: var(--fg-text-dim); font-size: var(--fg-fs-xs);
  text-transform: uppercase; letter-spacing: .06em; }
.fg-mapx-list { display:grid; gap: 6px; }
.fg-mapx-admin { margin-top: var(--fg-s4); padding: 0 var(--fg-s1); }

/* Objektzeile: antippen zeigt, + legt in die Route */
.fg-mo { display:flex; align-items:stretch; gap: 6px; border:1px solid var(--fg-border); border-radius: var(--fg-r-md);
  background: var(--fg-surface-2); transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease);
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
.fg-mo:hover { border-color: var(--fg-border-strong); }
.fg-mo.is-current { border-color: var(--fg-accent-line); background: var(--fg-surface-3); box-shadow: inset 3px 0 0 var(--fg-accent); }
.fg-mo.is-in-route { border-color: var(--fg-border-strong); }
.fg-mo.is-quiet { opacity:.6; }
.fg-mo-main { flex:1; min-width:0; display:flex; align-items:flex-start; gap: var(--fg-s3); padding: 10px 4px 10px var(--fg-s3);
  background:transparent; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius: var(--fg-r-md); }
.fg-mo-main .fg-light { margin-top:5px; }
.fg-mo-text { min-width:0; display:grid; gap: 2px; }
.fg-mo-title { font-size: var(--fg-fs-md); font-weight:600; color: var(--fg-text); line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-mo-sub { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-mo-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.fg-mo-tags > span { font-size: var(--fg-fs-xs); line-height:18px; padding: 0 7px; border-radius: var(--fg-r-pill);
  background: var(--fg-surface-3); color: var(--fg-text-muted); white-space:nowrap; }
.fg-mo-due.is-red { background: var(--fg-red-soft); color: #FF6B73; }
.fg-mo-due.is-yellow { background: var(--fg-yellow-soft); color: var(--fg-yellow); }
.fg-mo-due.is-green { background: var(--fg-green-soft); color: var(--fg-green); }
.fg-mo-due.is-blue { background: var(--fg-blue-soft); color: #7FB0FF; }
.fg-mo-def { background: var(--fg-red-soft) !important; color: #FF6B73 !important; }
.fg-mo-add { --route: var(--fg-accent); flex:none; align-self:center; width:40px; height:40px; margin-right:8px; display:grid; place-items:center;
  border:1px dashed var(--fg-border-strong); border-radius: var(--fg-r-pill); background: transparent; color: var(--fg-text-muted);
  cursor:pointer; transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-mo-add svg { width:18px; height:18px; }
.fg-mo-add:hover:not(:disabled) { border-style:solid; border-color: var(--fg-accent); color: var(--fg-text); background: var(--fg-accent-soft); }
.fg-mo-add:active:not(:disabled) { transform: scale(.9); }
.fg-mo-add:disabled { opacity:.35; cursor:not-allowed; }
.fg-mo.is-in-route .fg-mo-add { border:2px solid var(--route); background: var(--route); color:#fff; }
.fg-mo-no { font-weight:700; font-size: var(--fg-fs-md); font-variant-numeric: tabular-nums; }
.fg-mo-add.is-pop { animation: fg-press .38s var(--fg-ease-out) both; }

/* Leer-Zustände */
.fg-mapx-empty { display:grid; justify-items:center; gap: 6px; text-align:center; padding: var(--fg-s8) var(--fg-s4);
  color: var(--fg-text-muted); animation: fg-fade var(--fg-dur-slow) var(--fg-ease) both; }
.fg-mapx-empty > svg { width:34px; height:34px; color: var(--fg-text-dim); margin-bottom: var(--fg-s1);
  animation: fg-float 3s var(--fg-ease) infinite; }
.fg-mapx-empty strong { color: var(--fg-text); font-size: var(--fg-fs-lg); }
.fg-mapx-empty span { max-width: 280px; font-size: var(--fg-fs-sm); line-height:1.45; }
.fg-mapx-empty .fg-btn { margin-top: var(--fg-s2); }

/* Reiter Route */
.fg-mapx-routes { display:flex; align-items:flex-start; gap: var(--fg-s2); margin-bottom: var(--fg-s3); }
.fg-mapx-routes .fg-route-tabs { flex:1; min-width:0; margin:0; }
.fg-mapx-newroute { flex:none; display:inline-flex; align-items:center; gap:4px; height:32px; padding: 0 10px;
  border:1px dashed var(--fg-border-strong); border-radius: var(--fg-r-pill); background:transparent; color: var(--fg-text-muted);
  font: inherit; font-size: var(--fg-fs-sm); cursor:pointer; transition: color var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease); }
.fg-mapx-newroute svg { width:14px; height:14px; }
.fg-mapx-newroute:hover { color: var(--fg-text); border-color: var(--fg-accent); }
.fg-mapx .fg-route-tab { height:32px; animation: fg-pop var(--fg-dur) var(--fg-ease-out) both; }
.fg-mapx-load { display:flex; align-items:center; gap: var(--fg-s2); margin-bottom: var(--fg-s3); }
.fg-mapx-load[hidden] { display:none; }
.fg-mapx-load > svg { width:16px; height:16px; color: var(--fg-text-dim); flex:none; }
.fg-mapx-load .fg-select { flex:1; min-height:38px; }

.fg-mapx-stats { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-bottom: var(--fg-s3); }
.fg-mapx-stat { display:grid; gap:2px; padding: 10px 8px; border-radius: var(--fg-r-md); background: var(--fg-bg-sidebar);
  border:1px solid var(--fg-border); text-align:center; min-width:0; transition: opacity var(--fg-dur) var(--fg-ease); }
.fg-mapx-stat strong { font-size: var(--fg-fs-xl); font-weight:700; font-variant-numeric: tabular-nums; color: var(--fg-text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fg-mapx-stat span { font-size: var(--fg-fs-xs); color: var(--fg-text-dim); text-transform: uppercase; letter-spacing:.05em; }
.fg-mapx-stat.is-total { border-color: var(--fg-accent-line); background: linear-gradient(180deg, var(--fg-accent-soft), transparent); }
.fg-mapx-stats.is-empty .fg-mapx-stat { opacity:.45; }

.fg-mapx-stops { display:grid; margin-bottom: var(--fg-s3); }
.fg-stop { display:flex; align-items:center; gap: var(--fg-s2); padding: 6px 6px 6px 2px; border-radius: var(--fg-r-md);
  background: var(--fg-surface-2); border:1px solid var(--fg-border); position:relative; touch-action: pan-y;
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both;
  transition: box-shadow var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease), opacity var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease); }
.fg-stop.is-start { background: transparent; border-style: dashed; padding-left: var(--fg-s2); }
.fg-stop.is-start .fg-stop-no { background: var(--fg-surface-3); color: var(--fg-text-muted); }
.fg-stop.is-start .fg-stop-no svg { width:14px; height:14px; }
.fg-stop.is-drag { z-index:2; border-color: var(--fg-accent-line); box-shadow: var(--fg-shadow-lg); background: var(--fg-surface-3); transition:none; }
.fg-stop.is-leaving { opacity:0; transform: translateX(24px); }
.fg-stop-grip { flex:none; width:28px; height:40px; display:grid; align-content:center; justify-items:center; gap:3px; padding:0;
  border:0; background:transparent; cursor:grab; touch-action:none; border-radius: var(--fg-r-sm); }
.fg-stop-grip span { width:14px; height:2px; border-radius:2px; background: var(--fg-text-dim); }
.fg-stop-grip:hover span, .fg-stop.is-drag .fg-stop-grip span { background: var(--fg-text); }
.fg-stop.is-drag .fg-stop-grip { cursor:grabbing; }
.fg-stop-no { flex:none; width:28px; height:28px; display:grid; place-items:center; border-radius: var(--fg-r-pill);
  color:#fff; font-weight:700; font-size: var(--fg-fs-sm); font-variant-numeric: tabular-nums; }
.fg-stop-text { flex:1; min-width:0; display:grid; gap:1px; padding: 2px 0; border:0; background:transparent; color:inherit; font:inherit;
  text-align:left; cursor:pointer; }
.fg-stop-text strong { font-size: var(--fg-fs-md); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-stop-text small { color: var(--fg-text-muted); font-size: var(--fg-fs-xs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-stop-x { flex:none; width:34px; height:34px; display:grid; place-items:center; border:0; border-radius: var(--fg-r-pill);
  background:transparent; color: var(--fg-text-dim); cursor:pointer; transition: background var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease); }
.fg-stop-x svg { width:15px; height:15px; }
.fg-stop-x:hover { background: var(--fg-red-soft); color: #FF6B73; }
.fg-leg { margin: 0 0 0 30px; padding: 5px 0 5px 22px; border-left: 2px dotted var(--fg-border-strong);
  font-size: var(--fg-fs-xs); color: var(--fg-text-dim); font-variant-numeric: tabular-nums; }
.fg-mapx-stops.is-sorting .fg-leg { visibility:hidden; height:8px; padding:0; }
.fg-mapx-stops.is-shuffled .fg-stop { animation: fg-shuffle .5s var(--fg-ease-out) both; }
@keyframes fg-shuffle { 0% { transform: translateX(-10px); opacity:.4; } 100% { transform:none; opacity:1; } }

.fg-mapx-actions { display:grid; grid-template-columns: 1fr 1fr; gap: var(--fg-s2); }
.fg-mapx-actions .fg-btn { justify-content:center; min-height:42px; }
.fg-mapx-go { grid-column: 1 / -1; min-height:48px !important; font-size: var(--fg-fs-md); font-weight:600; }
.fg-mapx-actions .fg-btn.is-done { border-color: var(--fg-green); color: var(--fg-green); animation: fg-press .38s var(--fg-ease-out) both; }

.fg-mapx-more { margin-top: var(--fg-s4); border:1px solid var(--fg-border); border-radius: var(--fg-r-md); background: var(--fg-bg-sidebar); }
.fg-mapx-more summary { display:flex; align-items:center; gap: var(--fg-s2); padding: 12px var(--fg-s3); cursor:pointer; list-style:none;
  color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-mapx-more summary::-webkit-details-marker { display:none; }
.fg-mapx-more summary::after { content:"▾"; margin-left:auto; transition: transform var(--fg-dur) var(--fg-ease); }
.fg-mapx-more[open] summary::after { transform: rotate(180deg); }
.fg-mapx-more summary svg { width:15px; height:15px; }
.fg-mapx-more summary:hover { color: var(--fg-text); }
.fg-mapx-more-body { padding: 0 var(--fg-s3) var(--fg-s3); display:grid; gap: var(--fg-s3); animation: fg-fade var(--fg-dur-slow) var(--fg-ease) both; }
.fg-mapx-more-body .fg-field { margin:0; }
.fg-mapx-more-body .fg-hint { margin:0; }
.fg-mapx-more-body .fg-grid-2 { grid-template-columns: 1fr 1fr; }
.fg-mapx-danger { color: #FF6B73 !important; }

/* Fenster am Pin: Navigation als kleiner Knopf daneben */
.fg-pop-actions .fg-pop-nav { flex: 0 0 38px; padding:0; }
.fg-pop-actions .fg-pop-nav svg { width:16px; height:16px; }

/* PC mittlerer Breite: schmalere Spalte */
@media (min-width: 901px) and (max-width: 1280px) {
  .fg-mapx { grid-template-columns: minmax(0,1fr) 330px; }
  .fg-mapx-stat strong { font-size: var(--fg-fs-lg); }
}

/* Handy und kleines Tablet: Karte über die ganze Fläche, Schublade unten */
@media (max-width: 900px) {
  body:has(.fg-mapx) { overflow:hidden; }
  .fg-mapx-head { display:none; }
  .fg-mapx { position:fixed; z-index:5; left:0; right:0; top: calc(var(--fg-topbar-h) + var(--fg-safe-top));
    bottom: calc(var(--fg-tabbar-h) + var(--fg-safe-bottom)); height:auto; display:block; margin:0 !important; overscroll-behavior: none; }
  .fg-mapx-stage { position:absolute; inset:0; border:0; border-radius:0; }
  .fg-mapx-float { left: calc(var(--fg-s3) + var(--fg-safe-left)); right: calc(var(--fg-s3) + var(--fg-safe-right)); width:auto; }
  .fg-mapx .maplibregl-ctrl-top-right { top: 96px; }
  .fg-mapx .maplibregl-ctrl-bottom-right { display:none; }

  .fg-mapx-panel { --sheet-y: calc(100% - 120px); position:absolute; left:0; right:0; bottom:0; z-index:4;
    height: calc(100% - 10px); border-radius: var(--fg-r-xl) var(--fg-r-xl) 0 0; border-bottom:0;
    box-shadow: 0 -12px 34px rgba(0,0,0,.55); background: var(--fg-surface);
    transform: translate3d(0, var(--sheet-y), 0); will-change: transform;
    transition: transform .34s cubic-bezier(.2,.9,.25,1); }
  .fg-mapx-panel.is-dragging { transition:none; }
  .fg-mapx-grip { display:grid; place-items:center; height:22px; flex:none; cursor:grab; touch-action:none; }
  .fg-mapx-grip span { width:42px; height:5px; border-radius:5px; background: var(--fg-border-strong); transition: background var(--fg-dur) var(--fg-ease), width var(--fg-dur) var(--fg-ease); }
  .fg-mapx-grip:hover span, .fg-mapx-panel.is-dragging .fg-mapx-grip span { background: var(--fg-text-dim); width:54px; }
  .fg-mapx-tabs { touch-action:none; padding-top: 0; }
  .fg-mapx-tab-ink { top:0; }
  /* Platz für den runden Scan-Knopf der unteren Leiste */
  .fg-mapx-body { padding-bottom: calc(56px + var(--fg-safe-bottom)); }
  .fg-mo-add { width:44px; height:44px; }
  .fg-stop-x { width:40px; height:40px; }
}
@media (max-width: 420px) {
  .fg-mapx-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fg-mapx-chip { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fg-mo, .fg-stop, .fg-stopmark, .fg-mapx-float, .fg-mapx-body.is-enter, .fg-mapx-empty > svg, .fg-mapx .fg-route-tab { animation: none !important; }
  .fg-mapx-panel, .fg-mapx-tab-ink { transition: none !important; }
}
/* Karte Bundesland: dieselben Objektzeilen in der bisherigen Liste */
.fg-map-side .fg-list .fg-mo { margin: 0 var(--fg-s2) 6px; }
.fg-map-side .fg-list .fg-mo:first-of-type { margin-top: var(--fg-s2); }

/* =====================================================================
   17. Start (Mitarbeiter) und Mein Profil neu (Version 1.17, E-94)
   ===================================================================== */

/* ---------- Start: Kopf */
.fg-dash { display:grid; gap: var(--fg-s5); }
.fg-dash > * { animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-dash-hero { display:flex; align-items:flex-end; justify-content:space-between; gap: var(--fg-s4); flex-wrap:wrap;
  padding: var(--fg-s5) var(--fg-s6); border:1px solid var(--fg-border); border-radius: var(--fg-r-xl);
  background: radial-gradient(600px 220px at 0% 0%, rgba(227,0,15,.14), transparent 70%),
              linear-gradient(180deg, var(--fg-surface), var(--fg-bg-sidebar)); position:relative; overflow:hidden; }
.fg-dash-hero::after { content:""; position:absolute; right:-60px; top:-60px; width:220px; height:220px; border-radius:50%;
  background: radial-gradient(circle, rgba(227,0,15,.10), transparent 70%); pointer-events:none; }
.fg-dash-date { display:inline-block; font-size: var(--fg-fs-xs); text-transform: uppercase; letter-spacing:.08em; color: var(--fg-text-dim); margin-bottom: 4px; }
.fg-dash-hello h1 { margin:0; font-size: var(--fg-fs-3xl); letter-spacing:-.02em; }
.fg-dash-hello p { margin: 6px 0 0; color: var(--fg-text-muted); }
.fg-dash-quick { display:flex; gap: var(--fg-s2); flex-wrap:wrap; position:relative; z-index:1; }

/* ---------- Kennzahlen */
.fg-dash-kpis { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)) minmax(150px, .9fr); gap: var(--fg-s3); }
.fg-kpi { --tone: var(--fg-text-muted); --soft: var(--fg-surface-2); position:relative; display:grid; grid-template-columns: auto 1fr;
  grid-template-areas: "icon n" "label label" "sub sub"; align-items:center; column-gap: var(--fg-s3); row-gap: 2px;
  padding: var(--fg-s4); border-radius: var(--fg-r-lg); border:1px solid var(--fg-border); background: var(--fg-surface);
  color: inherit; text-decoration:none; overflow:hidden;
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; animation-delay: calc(var(--i,0) * 50ms + 60ms);
  transition: transform var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--tone); opacity:.85; }
a.fg-kpi:hover { transform: translateY(-2px); border-color: var(--fg-border-strong); box-shadow: var(--fg-shadow-lg); }
.fg-kpi.is-red    { --tone: var(--fg-red);    --soft: var(--fg-red-soft); }
.fg-kpi.is-yellow { --tone: var(--fg-yellow); --soft: var(--fg-yellow-soft); }
.fg-kpi.is-orange { --tone: var(--fg-orange); --soft: var(--fg-orange-soft); }
.fg-kpi.is-blue   { --tone: var(--fg-blue);   --soft: var(--fg-blue-soft); }
.fg-kpi.is-red:not(.is-zero) { border-color: var(--fg-accent-line); box-shadow: 0 0 22px rgba(227,0,15,.12); }
.fg-kpi.is-zero { --tone: var(--fg-border-strong); }
.fg-kpi.is-zero .fg-kpi-icon { color: var(--fg-text-dim); background: var(--fg-surface-2); }
.fg-kpi-icon { grid-area: icon; width:38px; height:38px; display:grid; place-items:center; border-radius: var(--fg-r-md); background: var(--soft); color: var(--tone); }
.fg-kpi-icon svg { width:19px; height:19px; }
.fg-kpi-n { grid-area: n; font-size: 30px; font-weight:700; line-height:1; letter-spacing:-.02em; font-variant-numeric: tabular-nums; text-align:right; }
.fg-kpi-label { grid-area: label; margin-top: var(--fg-s3); font-weight:600; font-size: var(--fg-fs-md); }
.fg-kpi-sub { grid-area: sub; color: var(--fg-text-dim); font-size: var(--fg-fs-xs); }

.fg-kpi-ring { display:flex; align-items:center; justify-content:center; gap: var(--fg-s3); grid-template-areas:none; }
.fg-kpi-ring::before { background: var(--fg-green); }
.fg-kpi-ring svg { width:72px; height:72px; transform: rotate(-90deg); flex:none; }
.fg-ring-bg { fill:none; stroke: var(--fg-surface-3); stroke-width:7; }
.fg-ring-fg { fill:none; stroke: var(--fg-green); stroke-width:7; stroke-linecap:round;
  stroke-dasharray: 169.6px; stroke-dashoffset: calc(169.6px - 169.6px * var(--p, 0) / 100);
  animation: fg-ring 1.1s var(--fg-ease-out) both .2s; filter: drop-shadow(0 0 6px rgba(34,197,94,.35)); }
@keyframes fg-ring { from { stroke-dashoffset: 169.6px; } }
.fg-ring-text { display:grid; }
.fg-ring-text strong { font-size: var(--fg-fs-2xl); font-weight:700; font-variant-numeric: tabular-nums; }
.fg-ring-text small { color: var(--fg-text-dim); font-size: var(--fg-fs-xs); text-transform: uppercase; letter-spacing:.06em; }
.fg-ring-text em { font-style:normal; color: var(--fg-text-muted); font-size: var(--fg-fs-xs); margin-top:2px; }

/* ---------- Raster */
.fg-dash-grid { display:grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--fg-s5); align-items:start; }
.fg-dash-main, .fg-dash-side { display:grid; gap: var(--fg-s5); min-width:0; }
.fg-dash-card .fg-card-head h3 { display:flex; align-items:center; gap: var(--fg-s2); }
.fg-dash-card .fg-card-head h3 > svg { width:17px; height:17px; color: var(--fg-text-dim); }
.fg-dash-meta { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-dash-count { min-width:22px; padding: 0 7px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3);
  font-size: var(--fg-fs-xs); line-height:20px; color: var(--fg-text-muted); text-align:center; font-weight:600; }
.fg-dash-note { margin: 0 0 var(--fg-s3); font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-dash-note.is-red { color: #FF6B73; }

/* ---------- Als Nächstes */
.fg-next { --tone: var(--fg-green); --soft: var(--fg-green-soft); display:flex; align-items:center; gap: var(--fg-s4);
  padding: var(--fg-s5); border-radius: var(--fg-r-xl); border:1px solid var(--fg-border-strong); color:inherit; text-decoration:none;
  background: linear-gradient(110deg, var(--soft), transparent 55%), var(--fg-surface); position:relative; overflow:hidden;
  transition: transform var(--fg-dur) var(--fg-ease), box-shadow var(--fg-dur) var(--fg-ease); }
.fg-next::after { content:""; position:absolute; inset:0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%);
  transform: translateX(-100%); animation: fg-shine 2.6s var(--fg-ease) .6s 1 both; pointer-events:none; }
@keyframes fg-shine { to { transform: translateX(100%); } }
.fg-next:hover { transform: translateY(-2px); box-shadow: var(--fg-shadow-lg); }
.fg-next.is-red { --tone: var(--fg-red); --soft: var(--fg-red-soft); border-color: var(--fg-accent-line); box-shadow: 0 0 26px rgba(227,0,15,.14); }
.fg-next.is-yellow { --tone: var(--fg-yellow); --soft: var(--fg-yellow-soft); }
.fg-next.is-blue { --tone: var(--fg-blue); --soft: var(--fg-blue-soft); }
.fg-next-icon { flex:none; width:52px; height:52px; display:grid; place-items:center; border-radius: 16px; background: var(--soft); color: var(--tone);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 35%, transparent); }
.fg-next-icon svg { width:24px; height:24px; }
.fg-next.is-red .fg-next-icon { animation: fg-next-pulse 2.4s var(--fg-ease) 3; }
@keyframes fg-next-pulse { 0%,100% { box-shadow: inset 0 0 0 1px rgba(227,0,15,.4), 0 0 0 0 rgba(227,0,15,.35); } 50% { box-shadow: inset 0 0 0 1px rgba(227,0,15,.4), 0 0 0 10px rgba(227,0,15,0); } }
.fg-next-body { flex:1; min-width:0; display:grid; gap: 3px; }
.fg-next-kicker { font-size: var(--fg-fs-xs); text-transform: uppercase; letter-spacing:.07em; color: var(--tone); font-weight:600; }
.fg-next-title { font-size: var(--fg-fs-xl); font-weight:700; line-height:1.25; }
.fg-next-text { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); line-height:1.45; }
.fg-next-cta { flex:none; }
.fg-next-cta svg { width:15px; height:15px; transform: rotate(-90deg); transition: transform var(--fg-dur) var(--fg-ease); }
.fg-next:hover .fg-next-cta svg { transform: rotate(-90deg) translateY(3px); }

/* ---------- Zeilen */
.fg-dash-list { display:grid; gap: 6px; }
.fg-card-flush .fg-dash-list { padding: 0 var(--fg-s3) var(--fg-s3); }
.fg-dash-row { display:flex; align-items:center; gap: var(--fg-s3); padding: 11px var(--fg-s3); border-radius: var(--fg-r-md);
  background: var(--fg-surface-2); border:1px solid transparent; color:inherit; text-decoration:none; cursor:pointer; list-style:none;
  transition: background var(--fg-dur-fast) var(--fg-ease), border-color var(--fg-dur-fast) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-dash-row::-webkit-details-marker { display:none; }
.fg-dash-row:hover { background: var(--fg-surface-3); border-color: var(--fg-border-strong); }
.fg-dash-row:active { transform: scale(.99); }
.fg-dash-row-text { flex:1; min-width:0; display:grid; gap:2px; }
.fg-dash-row-text strong { font-weight:600; font-size: var(--fg-fs-md); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-dash-row-text small { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); line-height:1.35; }
.fg-dash-chip { flex:none; font-size: var(--fg-fs-xs); padding: 3px 9px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3); color: var(--fg-text-muted); white-space:nowrap; font-weight:600; }
.fg-dash-chip.is-red { background: var(--fg-red-soft); color: #FF6B73; }
.fg-dash-chip.is-yellow { background: var(--fg-yellow-soft); color: var(--fg-yellow); }
.fg-dash-chip.is-green { background: var(--fg-green-soft); color: var(--fg-green); }
.fg-dash-chip.is-blue { background: var(--fg-blue-soft); color: #7FB0FF; }
.fg-dash-def { color: #FF6B73; }
.fg-dash-go { flex:none; color: var(--fg-text-dim); }
.fg-dash-go svg, .fg-dash-caret svg { width:16px; height:16px; transform: rotate(-90deg); display:block; transition: transform var(--fg-dur) var(--fg-ease); }
.fg-dash-row:hover .fg-dash-go svg { transform: rotate(-90deg) translateY(3px); color: var(--fg-text); }
.fg-dash-send { flex:none; }
.fg-dash-badge { flex:none; min-width:26px; height:26px; display:grid; place-items:center; border-radius: var(--fg-r-pill); background: var(--fg-yellow-soft); color: var(--fg-yellow); font-weight:700; font-size: var(--fg-fs-sm); }
.fg-dash-caret { flex:none; color: var(--fg-text-dim); }
.fg-dash-group[open] .fg-dash-caret svg { transform: rotate(0deg); }
.fg-dash-group[open] > .fg-dash-row { border-color: var(--fg-border-strong); background: var(--fg-surface-3); }
.fg-dash-sub { display:grid; gap:4px; padding: 6px 0 4px 28px; animation: fg-fade var(--fg-dur-slow) var(--fg-ease) both; }
.fg-dash-subrow { display:flex; align-items:center; justify-content:space-between; gap: var(--fg-s3); padding: 7px var(--fg-s3);
  border-radius: var(--fg-r-md); border:1px dashed var(--fg-border); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); text-decoration:none;
  transition: border-color var(--fg-dur-fast) var(--fg-ease), color var(--fg-dur-fast) var(--fg-ease); }
.fg-dash-subrow strong { color: var(--fg-text); }
.fg-dash-subrow:hover { border-color: var(--fg-border-strong); color: var(--fg-text); }
.fg-dash-foot { margin-top: var(--fg-s3); }
.fg-dash-calm { display:flex; align-items:center; gap: var(--fg-s3); padding: var(--fg-s3); border-radius: var(--fg-r-md); background: var(--fg-green-soft); }
.fg-dash-calm-icon { flex:none; width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background: rgba(34,197,94,.18); color: var(--fg-green); }
.fg-dash-calm-icon svg { width:18px; height:18px; }
.fg-dash-calm > span:last-child { display:grid; gap:2px; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-dash-calm strong { color: var(--fg-text); font-size: var(--fg-fs-md); }
.fg-dash-objects .fg-dash-row { animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-dash-objects .fg-dash-row:nth-child(n+2) { animation-delay: 40ms; }
.fg-dash-objects .fg-dash-row:nth-child(n+3) { animation-delay: 80ms; }
.fg-dash-objects .fg-dash-row:nth-child(n+4) { animation-delay: 120ms; }

/* ---------- 7 Tage */
.fg-week { display:grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; align-items:end; }
.fg-week-day { display:grid; justify-items:center; gap: 4px; padding: 6px 2px; border-radius: var(--fg-r-md); }
.fg-week-day.is-today { background: var(--fg-surface-2); box-shadow: inset 0 0 0 1px var(--fg-border-strong); }
.fg-week-day.is-weekend .fg-week-label { color: var(--fg-text-dim); }
.fg-week-n { font-size: var(--fg-fs-sm); font-weight:700; min-height:18px; font-variant-numeric: tabular-nums; }
.fg-week-bar { width: 100%; max-width: 26px; height: 74px; border-radius: 7px; background: var(--fg-surface-2); display:flex; align-items:flex-end; overflow:hidden; }
.fg-week-day.is-today .fg-week-bar { background: var(--fg-surface-3); }
.fg-week-fill { width:100%; height: var(--h, 0%); border-radius: 7px; background: linear-gradient(180deg, var(--fg-yellow), #B98F00);
  transform-origin: bottom; animation: fg-grow .7s var(--fg-ease-out) both; animation-delay: calc(var(--i,0) * 60ms + 250ms); }
.fg-week-fill.is-red { background: linear-gradient(180deg, #FF3B47, var(--fg-red)); box-shadow: 0 0 12px rgba(227,0,15,.35); }
@keyframes fg-grow { from { transform: scaleY(0); } }
.fg-week-label { font-size: var(--fg-fs-xs); font-weight:600; color: var(--fg-text-muted); }
.fg-week-day.is-today .fg-week-label { color: var(--fg-accent); }
.fg-week-date { font-size: 10px; color: var(--fg-text-dim); }

/* ---------- Start: Tablet und Handy */
@media (max-width: 1180px) {
  .fg-dash-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .fg-kpi-ring { grid-column: 1 / -1; justify-content:flex-start; }
  .fg-kpi-ring svg { width:56px; height:56px; }
  .fg-dash-grid { grid-template-columns: 1fr; }
  .fg-dash-side { grid-template-columns: repeat(2, minmax(0,1fr)); align-items:start; }
}
@media (max-width: 760px) {
  .fg-dash { gap: var(--fg-s4); }
  .fg-dash-hero { padding: var(--fg-s4); border-radius: var(--fg-r-lg); }
  .fg-dash-hello h1 { font-size: var(--fg-fs-2xl); }
  .fg-dash-quick { width:100%; }
  .fg-dash-quick .fg-btn:first-child { flex: 1 1 100%; justify-content:center; min-height:46px; }
  .fg-dash-quick .fg-btn-ghost { flex:1; justify-content:center; }
  .fg-dash-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--fg-s2); }
  .fg-kpi { padding: var(--fg-s3); }
  .fg-kpi-n { font-size: 26px; }
  .fg-dash-side { grid-template-columns: 1fr; }
  .fg-next { flex-wrap:wrap; padding: var(--fg-s4); }
  .fg-next-icon { width:44px; height:44px; }
  .fg-next-body { flex-basis: calc(100% - 64px); }
  .fg-next-cta { width:100%; justify-content:center; min-height:44px; }
  /* Am Handy steht der Name in voller Breite, Status und Knopf darunter */
  .fg-dash-row { flex-wrap:wrap; row-gap: 8px; align-items:flex-start; }
  .fg-dash-row > .fg-light { margin-top: 6px; }
  .fg-dash-row-text { flex: 1 1 calc(100% - 60px); }
  .fg-dash-row-text strong { white-space: normal; }
  .fg-dash-row .fg-dash-chip, .fg-dash-row .fg-dash-send, .fg-dash-row > .fg-btn-ghost { margin-left: 22px; }
  .fg-dash-row .fg-dash-send, .fg-dash-row > .fg-btn-ghost { min-height: 38px; }
  .fg-dash-badge, .fg-dash-caret, .fg-dash-go { margin-top: 2px; }
  .fg-dash-group > summary .fg-dash-row-text { flex-basis: calc(100% - 110px); }
  .fg-dash-subrow .fg-btn { margin-left:auto; }
  .fg-dash-sub { padding-left: 10px; }
  .fg-dash-subrow { flex-wrap:wrap; }
}

/* ---------- Profil: Kopf */
.fg-prof-hero { display:grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: var(--fg-s5); margin-bottom: var(--fg-s5);
  padding: var(--fg-s5) var(--fg-s6); border:1px solid var(--fg-border); border-radius: var(--fg-r-xl);
  background: radial-gradient(560px 220px at 0% 0%, rgba(227,0,15,.13), transparent 70%), linear-gradient(180deg, var(--fg-surface), var(--fg-bg-sidebar));
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-prof-id { display:flex; align-items:center; gap: var(--fg-s5); min-width:0; }
.fg-prof-avatar { flex:none; width:84px; height:84px; border-radius: 26px; display:grid; place-items:center;
  font-size: 30px; font-weight:700; letter-spacing:.02em; color:#fff;
  background: linear-gradient(140deg, #FF2A36, var(--fg-accent) 55%, #8E0009); box-shadow: 0 10px 30px rgba(227,0,15,.35), inset 0 1px 0 rgba(255,255,255,.25);
  animation: fg-avatar-in .6s var(--fg-ease-out) both; }
@keyframes fg-avatar-in { from { transform: scale(.6) rotate(-8deg); opacity:0; } }
.fg-prof-who { min-width:0; }
.fg-prof-who h1 { margin:0; font-size: var(--fg-fs-3xl); letter-spacing:-.02em; }
.fg-prof-user { margin: 4px 0 0; display:flex; align-items:center; gap:6px; color: var(--fg-text-muted); }
.fg-prof-user svg { width:14px; height:14px; }
.fg-prof-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top: var(--fg-s3); }
.fg-prof-chip { display:inline-flex; align-items:center; gap:5px; padding: 3px 10px; border-radius: var(--fg-r-pill);
  background: var(--fg-surface-3); border:1px solid var(--fg-border-strong); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-prof-chip svg { width:13px; height:13px; }
.fg-prof-chip.is-role { background: var(--fg-accent-soft); border-color: var(--fg-accent-line); color: #FFB3B8; font-weight:600; }

.fg-prof-progress { padding: var(--fg-s4); border-radius: var(--fg-r-lg); background: rgba(14,15,18,.55); border:1px solid var(--fg-border); }
.fg-prof-progress-head { display:flex; justify-content:space-between; align-items:baseline; gap: var(--fg-s2); }
.fg-prof-progress-head span { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-prof-progress-head b { color: var(--fg-text); }
.fg-prof-bar { height:8px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3); overflow:hidden; margin: var(--fg-s2) 0 var(--fg-s3); }
.fg-prof-bar > span { display:block; height:100%; width: var(--p); border-radius:inherit; background: linear-gradient(90deg, var(--fg-green), #4ADE80);
  transform-origin:left; animation: fg-bar-grow .9s var(--fg-ease-out) both .25s; }
.fg-prof-bar.is-thin { height:5px; margin: var(--fg-s3) 0 0; }
@keyframes fg-bar-grow { from { transform: scaleX(0); } }
.fg-prof-checks { list-style:none; margin:0; padding:0; display:grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fg-prof-checks a { display:flex; align-items:center; gap: var(--fg-s2); padding: 8px; border-radius: var(--fg-r-md); color: inherit; text-decoration:none;
  border:1px solid var(--fg-border); background: var(--fg-surface); transition: border-color var(--fg-dur-fast) var(--fg-ease), transform var(--fg-dur-fast) var(--fg-ease); }
.fg-prof-checks a:hover { border-color: var(--fg-border-strong); transform: translateY(-1px); }
.fg-prof-checks a > span:last-child { display:grid; min-width:0; }
.fg-prof-checks strong { font-size: var(--fg-fs-sm); font-weight:600; }
.fg-prof-checks small { color: var(--fg-text-dim); font-size: var(--fg-fs-xs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-prof-check { flex:none; width:26px; height:26px; display:grid; place-items:center; border-radius:50%; }
.fg-prof-check svg { width:14px; height:14px; }
.fg-prof-checks .is-ok .fg-prof-check { background: var(--fg-green-soft); color: var(--fg-green); }
.fg-prof-checks .is-open .fg-prof-check { background: var(--fg-red-soft); color: #FF6B73; }
.fg-prof-checks .is-open { border-color: rgba(227,0,15,.28); }

/* ---------- Profil: Reiter */
.fg-prof-tabs .fg-tab { display:inline-flex; align-items:center; gap: 8px; }
.fg-prof-tabs .fg-tab svg { width:16px; height:16px; }
.fg-ptab-dot { width:7px; height:7px; border-radius:50%; }
.fg-ptab-dot.is-green { background: var(--fg-green); }
.fg-ptab-dot.is-red { background: var(--fg-red); box-shadow: 0 0 8px rgba(227,0,15,.6); }
.fg-prof-body { max-width: 1100px; }
.fg-prof-body > .fg-card .fg-card-head h3 { display:flex; align-items:center; gap: var(--fg-s2); }
.fg-prof-body > .fg-card .fg-card-head h3 svg { width:18px; height:18px; color: var(--fg-text-dim); }
.fg-prof-label { display:block; font-size: var(--fg-fs-xs); text-transform: uppercase; letter-spacing:.07em; color: var(--fg-text-dim); margin-bottom: var(--fg-s2); }
.fg-prof-split { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--fg-s6); align-items:start; }

/* Unterschrift */
.fg-prof-sig { display:grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: var(--fg-s6); align-items:start; }
.fg-prof-paper { background:#fff; border-radius: var(--fg-r-lg); padding: var(--fg-s3); box-shadow: 0 10px 28px rgba(0,0,0,.35);
  transform: rotate(-.6deg); transition: transform var(--fg-dur-slow) var(--fg-ease-out); }
.fg-prof-paper:hover { transform: rotate(0deg) scale(1.01); }
.fg-prof-paper .fg-signature { width:100%; padding:0; max-height: 170px; object-fit: contain; }
.fg-prof-paper.is-empty { transform:none; background: var(--fg-surface-2); border:1px dashed var(--fg-border-strong); box-shadow:none;
  min-height: 150px; display:grid; place-items:center; align-content:center; gap: var(--fg-s2); color: var(--fg-text-muted); text-align:center; font-size: var(--fg-fs-sm); }
.fg-prof-paper.is-empty svg { width:30px; height:30px; color: var(--fg-text-dim); }
.fg-prof-meta { display:flex; align-items:center; gap:6px; margin: var(--fg-s3) 0 0; color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-prof-meta svg { width:14px; height:14px; color: var(--fg-green); }
.fg-prof-pad { position:relative; border-radius: var(--fg-r-lg); box-shadow: 0 0 0 2px var(--fg-border-strong); transition: box-shadow var(--fg-dur) var(--fg-ease); }
.fg-prof-pad:hover, .fg-prof-pad:focus-within { box-shadow: 0 0 0 2px var(--fg-accent-line), 0 0 0 6px var(--fg-accent-soft); }
.fg-prof-pad .fg-canvas { display:block; margin:0 !important; border-radius: var(--fg-r-lg); touch-action:none; cursor: crosshair; aspect-ratio: 600 / 220; height:auto; }
.fg-prof-pad-line { position:absolute; left: 9%; right: 6%; bottom: 26%; height:1px; background: #C9CDD4; pointer-events:none; }
.fg-prof-pad-x { position:absolute; left: 4%; bottom: calc(26% - 2px); color:#B4B9C2; font-size: 15px; pointer-events:none; }
.fg-prof-pad-hint { position:absolute; left:0; right:0; top: 32%; text-align:center; color:#9AA1AC; font-size: var(--fg-fs-md); pointer-events:none;
  transition: opacity var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease); animation: fg-float 3s var(--fg-ease) infinite; }
.fg-prof-pad.is-drawn .fg-prof-pad-hint { opacity:0; transform: translateY(-6px); animation:none; }

/* Passwort */
.fg-prof-pw { position:relative; }
.fg-prof-pw .fg-input { padding-right: 96px; }
.fg-prof-eye { position:absolute; right:6px; top:50%; transform: translateY(-50%); height:30px; padding: 0 10px; border:0; border-radius: var(--fg-r-sm);
  background: var(--fg-surface-3); color: var(--fg-text-muted); font: inherit; font-size: var(--fg-fs-xs); cursor:pointer; }
.fg-prof-eye:hover { color: var(--fg-text); }
.fg-prof-meter { height:6px; border-radius: var(--fg-r-pill); background: var(--fg-surface-3); margin: var(--fg-s2) 0 4px; overflow:hidden; }
.fg-prof-meter span { display:block; height:100%; width:0; border-radius:inherit; background: var(--fg-red);
  transition: width var(--fg-dur-slow) var(--fg-ease-out), background var(--fg-dur) var(--fg-ease); }
.fg-prof-meter span[data-level="2"] { background: var(--fg-orange); }
.fg-prof-meter span[data-level="3"] { background: var(--fg-yellow); }
.fg-prof-meter span[data-level="4"] { background: var(--fg-green); box-shadow: 0 0 10px rgba(34,197,94,.5); }
.fg-prof-rules { list-style:none; margin:0; padding: var(--fg-s4); display:grid; gap: 10px; border-radius: var(--fg-r-lg); background: var(--fg-bg-sidebar); border:1px solid var(--fg-border); }
.fg-prof-rules li { display:flex; align-items:center; gap: var(--fg-s2); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); transition: color var(--fg-dur) var(--fg-ease); }
.fg-prof-rule-i { flex:none; width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background: var(--fg-surface-3); color: transparent;
  transition: background var(--fg-dur) var(--fg-ease), color var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease); }
.fg-prof-rule-i svg { width:12px; height:12px; }
.fg-prof-rules li.is-ok { color: var(--fg-text); }
.fg-prof-rules li.is-ok .fg-prof-rule-i { background: var(--fg-green); color:#0E0F12; transform: scale(1.08); }
.fg-prof-rules-tip { align-items:flex-start !important; padding-top: var(--fg-s2); border-top: 1px solid var(--fg-border); color: var(--fg-text-dim) !important; font-size: var(--fg-fs-xs) !important; line-height:1.45; }
.fg-prof-rules-tip svg { width:14px; height:14px; flex:none; margin-top:2px; }
[data-pw-submit]:disabled { opacity:.45; cursor:not-allowed; }

/* BSB-Pass */
.fg-prof-passnow { display:grid; justify-items:start; gap: 6px; padding: var(--fg-s5); border-radius: var(--fg-r-lg); border:1px solid var(--fg-border); background: var(--fg-bg-sidebar); }
.fg-prof-passnow.is-ok { border-color: rgba(34,197,94,.35); background: linear-gradient(160deg, var(--fg-green-soft), transparent 60%), var(--fg-bg-sidebar); }
.fg-prof-passnow.is-missing { border-color: var(--fg-accent-line); background: linear-gradient(160deg, var(--fg-red-soft), transparent 60%), var(--fg-bg-sidebar); }
.fg-prof-passicon { width:44px; height:44px; display:grid; place-items:center; border-radius: 14px; margin-bottom: 4px; }
.fg-prof-passicon svg { width:22px; height:22px; }
.is-ok > .fg-prof-passicon { background: var(--fg-green-soft); color: var(--fg-green); }
.is-missing > .fg-prof-passicon { background: var(--fg-red-soft); color: #FF6B73; }
.fg-prof-passnow strong { font-size: var(--fg-fs-lg); }
.fg-prof-passnow .fg-btn { margin-top: var(--fg-s2); }
.fg-prof-drop { position:relative; display:grid; justify-items:center; gap: 6px; padding: var(--fg-s6) var(--fg-s4); border-radius: var(--fg-r-lg);
  border: 2px dashed var(--fg-border-strong); background: var(--fg-surface-2); text-align:center; cursor:pointer;
  transition: border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease), transform var(--fg-dur) var(--fg-ease); }
.fg-prof-drop input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.fg-prof-drop:hover, .fg-prof-drop.is-over { border-color: var(--fg-accent); background: var(--fg-accent-soft); }
.fg-prof-drop.is-over { transform: scale(1.01); }
.fg-prof-drop.has-file { border-style: solid; border-color: var(--fg-green); background: var(--fg-green-soft); }
.fg-prof-drop-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:50%; background: var(--fg-surface-3); color: var(--fg-text-muted);
  transition: transform var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease); }
.fg-prof-drop-icon svg { width:20px; height:20px; }
.fg-prof-drop:hover .fg-prof-drop-icon { transform: translateY(-3px); }
.fg-prof-drop.has-file .fg-prof-drop-icon { background: var(--fg-green); color:#0E0F12; }
.fg-prof-drop strong { word-break: break-all; }
.fg-prof-drop .fg-muted { font-size: var(--fg-fs-sm); }
[data-drop-submit]:disabled { opacity:.45; cursor:not-allowed; }

/* Qualifikation */
.fg-prof-quals { display:grid; gap: var(--fg-s3); }
.fg-prof-qual { --tone: var(--fg-green); --soft: var(--fg-green-soft); padding: var(--fg-s4); border-radius: var(--fg-r-lg); border:1px solid var(--fg-border); background: var(--fg-surface-2); border-left: 3px solid var(--tone); }
.fg-prof-qual.is-yellow { --tone: var(--fg-yellow); --soft: var(--fg-yellow-soft); }
.fg-prof-qual.is-red { --tone: var(--fg-red); --soft: var(--fg-red-soft); box-shadow: 0 0 20px rgba(227,0,15,.1); }
.fg-prof-qual-head { display:flex; align-items:center; gap: var(--fg-s3); }
.fg-prof-qual-icon { flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius: 12px; background: var(--soft); color: var(--tone); }
.fg-prof-qual-icon svg { width:19px; height:19px; }
.fg-prof-qual-text { flex:1; min-width:0; display:grid; gap:2px; }
.fg-prof-qual-text small { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-prof-qual-chip { flex:none; padding: 4px 10px; border-radius: var(--fg-r-pill); background: var(--soft); color: var(--tone); font-size: var(--fg-fs-xs); font-weight:600; white-space:nowrap; }
.fg-prof-qual .fg-prof-bar > span { background: var(--tone); }
.fg-prof-empty { display:grid; justify-items:center; gap: 6px; text-align:center; padding: var(--fg-s8) var(--fg-s4); color: var(--fg-text-muted); }
.fg-prof-empty > svg { width:34px; height:34px; color: var(--fg-text-dim); animation: fg-float 3s var(--fg-ease) infinite; }
.fg-prof-empty strong { color: var(--fg-text); font-size: var(--fg-fs-lg); }
.fg-prof-empty span { max-width: 460px; font-size: var(--fg-fs-sm); line-height:1.5; }

/* Konto */
.fg-prof-facts { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--fg-s2); }
.fg-prof-facts > div { display:grid; gap:3px; padding: var(--fg-s3); border-radius: var(--fg-r-md); background: var(--fg-surface-2); border:1px solid var(--fg-border); }
.fg-prof-facts span { font-size: var(--fg-fs-xs); text-transform: uppercase; letter-spacing:.06em; color: var(--fg-text-dim); }
.fg-prof-facts strong { font-weight:600; overflow-wrap:anywhere; }

/* Profil: Tablet und Handy */
@media (max-width: 1000px) {
  .fg-prof-hero { grid-template-columns: 1fr; }
  .fg-prof-sig, .fg-prof-split { grid-template-columns: 1fr; gap: var(--fg-s4); }
}
@media (max-width: 640px) {
  .fg-prof-hero { padding: var(--fg-s4); border-radius: var(--fg-r-lg); }
  .fg-prof-avatar { width:64px; height:64px; border-radius: 20px; font-size: 24px; }
  .fg-prof-id { gap: var(--fg-s3); }
  .fg-prof-who h1 { font-size: var(--fg-fs-2xl); }
  .fg-prof-checks small { display:none; }
  .fg-prof-checks a { padding: 7px; }
  .fg-prof-checks strong { font-size: var(--fg-fs-xs); line-height:1.3; }
  .fg-prof-qual-head { flex-wrap:wrap; }
  .fg-prof-qual-head { align-items:flex-start; }
  .fg-prof-qual-text { flex: 1 1 calc(100% - 60px); }
  .fg-prof-qual-chip { margin-left: 52px; }
  .fg-prof-paper { transform:none; }
  #sig-form .fg-btn { flex:1; justify-content:center; min-height:44px; }
}
@media (prefers-reduced-motion: reduce) {
  .fg-dash > *, .fg-kpi, .fg-next::after, .fg-next-icon, .fg-ring-fg, .fg-week-fill, .fg-dash-objects .fg-dash-row,
  .fg-prof-hero, .fg-prof-avatar, .fg-prof-bar > span, .fg-prof-pad-hint, .fg-prof-empty > svg { animation: none !important; }
}

/* =====================================================================
   18. Admin-Übersicht neu (Version 1.18, E-95)
   Baut auf Abschnitt 17 auf (Kopf, Kennzahlen, Zeilen, 7 Tage).
   ===================================================================== */

/* Handlungsbedarf */
.fg-todo { padding: var(--fg-s4); border-radius: var(--fg-r-xl); border:1px solid var(--fg-border-strong);
  background: linear-gradient(110deg, rgba(227,0,15,.08), transparent 55%), var(--fg-surface); }
.fg-todo-head { display:flex; justify-content:space-between; align-items:baseline; gap: var(--fg-s3); margin-bottom: var(--fg-s3); flex-wrap:wrap; }
.fg-todo .fg-next-kicker { color: var(--fg-accent); }
.fg-todo-list { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--fg-s2); }
.fg-todo-item { --tone: var(--fg-yellow); --soft: var(--fg-yellow-soft); display:flex; align-items:center; gap: var(--fg-s3);
  padding: 12px; border-radius: var(--fg-r-lg); border:1px solid var(--fg-border); background: var(--fg-surface-2); color:inherit; text-decoration:none;
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; animation-delay: calc(var(--i,0) * 50ms + 120ms);
  transition: transform var(--fg-dur) var(--fg-ease), border-color var(--fg-dur) var(--fg-ease), background var(--fg-dur) var(--fg-ease); }
.fg-todo-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 45%, transparent); background: var(--fg-surface-3); }
.fg-todo-item.is-red { --tone: var(--fg-red); --soft: var(--fg-red-soft); border-color: rgba(227,0,15,.3); }
.fg-todo-item.is-blue { --tone: var(--fg-blue); --soft: var(--fg-blue-soft); }
.fg-todo-icon { flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius: 12px; background: var(--soft); color: var(--tone); }
.fg-todo-icon svg { width:19px; height:19px; }
.fg-todo-text { flex:1; min-width:0; display:grid; gap:2px; }
.fg-todo-text strong { font-size: var(--fg-fs-md); font-weight:600; line-height:1.3; }
.fg-todo-text strong b { color: var(--tone); font-size: var(--fg-fs-lg); font-variant-numeric: tabular-nums; margin-right: 2px; }
.fg-todo-text small { color: var(--fg-text-muted); font-size: var(--fg-fs-xs); line-height:1.35; }
.fg-todo-cta { flex:none; display:inline-flex; align-items:center; gap:4px; font-size: var(--fg-fs-xs); font-weight:600; color: var(--fg-text-muted); white-space:nowrap; }
.fg-todo-cta svg { width:13px; height:13px; transform: rotate(-90deg); transition: transform var(--fg-dur) var(--fg-ease); }
.fg-todo-item:hover .fg-todo-cta { color: var(--fg-text); }
.fg-todo-item:hover .fg-todo-cta svg { transform: rotate(-90deg) translateY(3px); }

/* Team */
.fg-team { display:grid; gap: 6px; }
.fg-team-row { display:flex; align-items:center; gap: var(--fg-s3); padding: 10px var(--fg-s3); border-radius: var(--fg-r-md); background: var(--fg-surface-2);
  border:1px solid transparent; color:inherit; text-decoration:none;
  animation: fg-rise var(--fg-dur-slow) var(--fg-ease-out) both; animation-delay: calc(var(--i,0) * 40ms);
  transition: background var(--fg-dur-fast) var(--fg-ease), border-color var(--fg-dur-fast) var(--fg-ease); }
.fg-team-row:hover { background: var(--fg-surface-3); border-color: var(--fg-border-strong); }
.fg-team-avatar { flex:none; width:36px; height:36px; border-radius: 11px; display:grid; place-items:center; font-weight:700; font-size: var(--fg-fs-sm);
  background: linear-gradient(140deg, #2B3039, #1E2229); border:1px solid var(--fg-border-strong); color: var(--fg-text); }
.fg-team-main { flex:1; min-width:0; display:grid; gap: 6px; }
.fg-team-top { display:flex; align-items:baseline; gap: var(--fg-s2); flex-wrap:wrap; }
.fg-team-top strong { font-weight:600; }
.fg-team-top small { color: var(--fg-text-dim); font-size: var(--fg-fs-xs); }
.fg-team-n { flex:none; }
.fg-stack { display:flex; height:7px; border-radius: var(--fg-r-pill); overflow:hidden; background: var(--fg-surface-3); gap:2px; }
.fg-stack > span { width: var(--w, 0%); height:100%; transform-origin:left; animation: fg-bar-grow .8s var(--fg-ease-out) both .3s; }
.fg-stack > span.is-red { background: var(--fg-red); }
.fg-stack > span.is-yellow { background: var(--fg-yellow); }
.fg-stack > span.is-green { background: var(--fg-green); }

/* Bundesländer */
.fg-states { display:grid; gap: 8px; }
.fg-state-row { display:grid; grid-template-columns: 34px 1fr 36px; align-items:center; gap: var(--fg-s3); color:inherit; text-decoration:none;
  padding: 4px 6px; border-radius: var(--fg-r-sm); transition: background var(--fg-dur-fast) var(--fg-ease); }
.fg-state-row:hover { background: var(--fg-surface-2); }
.fg-state-row .fg-stack { height:10px; }
.fg-state-code { font-weight:700; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-state-n { text-align:right; font-variant-numeric: tabular-nums; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); }
.fg-legend { display:inline-block; width:9px; height:9px; border-radius:3px; margin: 0 3px 0 8px; vertical-align: -1px; }
.fg-legend:first-child { margin-left:0; }
.fg-legend.is-red { background: var(--fg-red); } .fg-legend.is-yellow { background: var(--fg-yellow); } .fg-legend.is-green { background: var(--fg-green); }

/* 7 Tage: Lücken je Tag */
.fg-week-day { position:relative; }
.fg-week-gap { min-width:18px; height:18px; padding: 0 4px; display:grid; place-items:center; border-radius: var(--fg-r-pill);
  background: var(--fg-yellow); color:#0E0F12; font-size: 10px; font-weight:700; animation: fg-count-pop .45s var(--fg-ease-out) both .6s; }
.fg-dash-ok { display:flex; align-items:center; gap: var(--fg-s2); margin: var(--fg-s3) 0 0; padding: 10px var(--fg-s3); border-radius: var(--fg-r-md);
  background: var(--fg-green-soft); color: var(--fg-text); font-size: var(--fg-fs-sm); }
.fg-dash-ok svg { width:16px; height:16px; color: var(--fg-green); flex:none; }

/* System (Superadmin) */
.fg-sys { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.fg-sys-item { --tone: var(--fg-text-dim); display:grid; grid-template-columns: auto 1fr; grid-template-areas: "i v" "i l"; column-gap: var(--fg-s2);
  align-items:center; padding: 10px; border-radius: var(--fg-r-md); background: var(--fg-surface-2); border:1px solid var(--fg-border); color:inherit; text-decoration:none;
  transition: border-color var(--fg-dur-fast) var(--fg-ease), background var(--fg-dur-fast) var(--fg-ease); }
a.fg-sys-item:hover { border-color: var(--fg-border-strong); background: var(--fg-surface-3); }
.fg-sys-item > span { grid-area: i; width:32px; height:32px; display:grid; place-items:center; border-radius: 10px; background: var(--fg-surface-3); color: var(--tone); }
.fg-sys-item > span svg { width:16px; height:16px; }
.fg-sys-item strong { grid-area: v; font-size: var(--fg-fs-md); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-sys-item small { grid-area: l; color: var(--fg-text-dim); font-size: var(--fg-fs-xs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-sys-item.is-green { --tone: var(--fg-green); }
.fg-sys-item.is-yellow { --tone: var(--fg-yellow); }
.fg-sys-item.is-red { --tone: var(--fg-red); border-color: var(--fg-accent-line); }

/* Ohne Handlungsbedarf */
.fg-calm { padding: var(--fg-s4); border-radius: var(--fg-r-lg); border:1px dashed var(--fg-border-strong); background: var(--fg-bg-sidebar); }
.fg-calm-head { display:flex; align-items:center; gap: var(--fg-s2); font-weight:600; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); margin-bottom: var(--fg-s3); }
.fg-calm-head svg { width:16px; height:16px; color: var(--fg-green); }
.fg-calm-chips { display:flex; flex-wrap:wrap; gap:6px; }
.fg-calm-chips span { padding: 4px 10px; border-radius: var(--fg-r-pill); background: var(--fg-green-soft); color: #7BE3A1; font-size: var(--fg-fs-xs); }

@media (max-width: 1180px) { .fg-todo-list { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) {
  .fg-todo { padding: var(--fg-s3); }
  .fg-todo-list { grid-template-columns: 1fr; }
  .fg-todo-item { padding: 10px; }
  .fg-dash-quick .fg-btn-ghost { flex: 1 1 0; min-width:0; padding-left:8px; padding-right:8px; }
  .fg-team-row { flex-wrap:wrap; }
  .fg-team-main { flex-basis: calc(100% - 52px); }
  .fg-team-n { margin-left: 48px; }
  .fg-sys { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fg-todo-item, .fg-team-row, .fg-stack > span, .fg-week-gap { animation: none !important; }
}
.fg-dash-more { margin-top: 6px; }
.fg-dash-more summary { cursor:pointer; list-style:none; display:inline-flex; align-items:center; gap:6px; padding: 6px 12px; border-radius: var(--fg-r-pill);
  border:1px dashed var(--fg-border-strong); color: var(--fg-text-muted); font-size: var(--fg-fs-sm); }
.fg-dash-more summary::-webkit-details-marker { display:none; }
.fg-dash-more summary:hover { color: var(--fg-text); border-color: var(--fg-text-dim); }
.fg-dash-more[open] summary { display:none; }
/* Objekt anlegen: Adresse liegt in einem nicht zugewiesenen Bundesland (E-97) */
.fg-state-warn { display:block; color: var(--fg-yellow); animation: fg-fade var(--fg-dur-slow) var(--fg-ease) both; }
.fg-state-warn[hidden] { display:none; }
/* Gewählter Kunde als Karte (E-98) */
.fg-pick-card { display:flex; align-items:center; gap: var(--fg-s3); padding: 12px var(--fg-s3); border-radius: var(--fg-r-md);
  border:1px solid rgba(34,197,94,.45); background: linear-gradient(110deg, var(--fg-green-soft), transparent 60%), var(--fg-surface-2); }
.fg-pick-card[hidden] { display:none; }
.fg-pick-card.is-in { animation: fg-pop var(--fg-dur-slow) var(--fg-ease-out) both; }
.fg-pick-icon { flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius: 12px; background: var(--fg-green-soft); color: var(--fg-green); }
.fg-pick-icon svg { width:19px; height:19px; }
.fg-pick-text { flex:1; min-width:0; display:grid; gap:2px; }
.fg-pick-text strong { font-weight:600; font-size: var(--fg-fs-md); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-pick-text small { color: var(--fg-text-muted); font-size: var(--fg-fs-sm); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-pick-ok { flex:none; display:inline-flex; align-items:center; gap:4px; padding: 3px 9px; border-radius: var(--fg-r-pill);
  background: var(--fg-green-soft); color: var(--fg-green); font-size: var(--fg-fs-xs); font-weight:600; }
.fg-pick-ok svg { width:12px; height:12px; }
.fg-input.is-invalid { border-color: var(--fg-accent); box-shadow: 0 0 0 3px var(--fg-accent-soft); }
@media (max-width: 560px) {
  .fg-pick-card { flex-wrap:wrap; }
  .fg-pick-text { flex-basis: calc(100% - 56px); }
  .fg-pick-ok { margin-left: 52px; }
  .fg-pick-card .fg-btn { margin-left:auto; }
}
.fg-ac > input[hidden], .fg-ac > .fg-hint[hidden] { display:none; }
/* Begehungen: mehrere als versendet markieren (E-100) */
.fg-sent-check { width: 36px; padding-right: 0 !important; }
.fg-sent-check input { width:18px; height:18px; accent-color: var(--fg-accent); cursor:pointer; vertical-align: middle; }
.fg-sent-table tr.is-picked td { background: var(--fg-accent-soft); }
.fg-sent-table tr.is-picked td:first-child { box-shadow: inset 3px 0 0 var(--fg-accent); }
.fg-sent-all-m { display:none; align-items:center; gap:8px; font-size: var(--fg-fs-sm); color: var(--fg-text-muted); cursor:pointer; }
.fg-sent-all-m input { width:20px; height:20px; accent-color: var(--fg-accent); }
@media (max-width: 900px) {
  .fg-sent-all-m { display:inline-flex; }
  .fg-sent-table tbody tr { position:relative; padding-right: 56px !important; transition: background var(--fg-dur) var(--fg-ease); }
  .fg-sent-table td.fg-sent-check { position:absolute; right: var(--fg-s4); top: var(--fg-s3); width:auto; flex:none; }
  .fg-sent-table td.fg-sent-check::before { content:none; }
  .fg-sent-check input { width:24px; height:24px; }
  .fg-sent-table tr.is-picked { background: var(--fg-accent-soft); box-shadow: inset 3px 0 0 var(--fg-accent); }
  .fg-sent-table tr.is-picked td { background: none; }
  .fg-sent-table tr.is-picked td:first-child { box-shadow: none; }
}
@media (max-width: 900px) {
  /* Am Handy steht die Leiste fest über der unteren Leiste, egal wie lang die Liste ist */
  .fg-sent-bar { position: fixed; left: 0; right: 0; margin: 0 auto; z-index: 60;
    bottom: calc(var(--fg-tabbar-h) + var(--fg-safe-bottom) + 34px); }
  .fg-sent-table { padding-bottom: 70px; }
}
@media (max-width: 900px) {
  .fg-sent-bar { flex-wrap: nowrap; width: max-content; max-width: calc(100% - 24px); }
  .fg-sent-bar .fg-sent-clear-t { display:none; }
  .fg-sent-bar .fg-btn { white-space: nowrap; }
}
.fg-sent-bar .fg-bulkbar-count { white-space: nowrap; }
/* Kunden archivieren (E-101) */
.fg-table th.fg-td-act, .fg-table td.fg-td-act { width:1%; white-space:nowrap; text-align:right; }
.fg-table td.fg-td-act form { display:inline-flex; margin:0; }
@media (max-width: 900px) {
  .fg-table td.fg-td-act { justify-content:flex-end; }
  .fg-table td.fg-td-act > form { width:auto; }
}
.fg-cust-archived { margin-bottom: var(--fg-s4); }
/* Selbsttest Projektordner (E-102) */
.fg-exposure { margin-bottom: var(--fg-s5); }
.fg-exposure code { font-size: var(--fg-fs-sm); }
.fg-exposure .fg-hint { display:block; margin-top: var(--fg-s2); }
