/* ==========================================================================
   Fluss – Designsystem für Kantinvoice
   Eine Datei: Tokens, Shell, Bausteine, Zustände, Bewegung.
   Jede Seite wird nur aus diesen Klassen gebaut (Präfix f-).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --f-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;

  --f-desk: #F1F2F4;          /* Pult: Hintergrund hinter Navigation und Blatt */
  --f-sheet: #FFFFFF;         /* Blatt: Inhaltsfläche */
  --f-sunk: #F4F5F7;          /* Fläche: gruppierte Bereiche, Eingaben */
  --f-sunk-2: #ECEEF1;
  --f-hover: #F6F7F9;
  --f-edge: #E4E6EA;          /* feine Kante um das Blatt */
  --f-line: #ECEDF0;          /* Trennlinien in Tabellen */
  --f-line-soft: #F2F3F5;

  --f-ink: #111318;
  --f-ink-2: #4B5060;
  --f-ink-3: #6B7080;
  --f-ink-4: #A2A7B2;
  --f-nav-ink: #2D323C;
  --f-nav-ink-2: #5D6270;

  --f-accent: #3350F0;        /* wird von der Mandantenfarbe überschrieben */
  --f-accent-ink: #2238C8;
  --f-accent-soft: #EEF1FE;
  --f-accent-ring: #DDE3FD;

  --f-ok: #0E8C77;   --f-ok-soft: #E3F3F0;
  --f-warn: #F06A1D; --f-warn-ink: #B1460C; --f-warn-soft: #FDEBE1;
  --f-danger: #B1460C;

  --f-r-sm: 8px; --f-r: 10px; --f-r-lg: 14px; --f-r-xl: 18px;
  --f-shadow-pop: 0 12px 32px rgba(17, 19, 24, .14), 0 0 0 1px rgba(17, 19, 24, .05);
  --f-shadow-float: 0 16px 40px rgba(17, 19, 24, .28);
  --f-shadow-raise: 0 1px 2px rgba(17, 19, 24, .12), 0 0 0 .5px rgba(17, 19, 24, .06);

  --f-dur-1: 120ms; --f-dur-2: 200ms; --f-dur-3: 280ms;
  --f-ease-out: cubic-bezier(.2, .8, .2, 1);
  --f-ease-in: cubic-bezier(.4, 0, 1, 1);

  --f-nav-w: 240px;
  --f-nav-w-collapsed: 68px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --f-desk: #0A0B0D;
  --f-sheet: #15171C;
  --f-sunk: #1E2128;
  --f-sunk-2: #262A32;
  --f-hover: #1B1E24;
  --f-edge: #23262D;
  --f-line: #23262D;
  --f-line-soft: #1E2128;
  --f-ink: #ECEDF1;
  --f-ink-2: #B4B8C2;
  --f-ink-3: #8A8F9B;
  --f-ink-4: #5D6270;
  --f-nav-ink: #C5C8D0;
  --f-nav-ink-2: #8A8F9B;
  --f-accent-ink: #9FAEFF;
  --f-accent-soft: #1D2340;
  --f-accent-ring: #2A3366;
  --f-ok: #2BC4A6; --f-ok-soft: #12322C;
  --f-warn: #FF8A47; --f-warn-ink: #FF9F66; --f-warn-soft: #3A2312;
  --f-danger: #FF9F66;
  --f-shadow-pop: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  --f-shadow-raise: 0 0 0 1px rgba(255, 255, 255, .08);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.f-body {
  margin: 0;
  font-family: var(--f-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--f-ink);
  background: var(--f-desk);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11";
}
.f-body a { color: var(--f-accent-ink); text-decoration: none; }
/* Unterstrich nur bei echten Textlinks – nicht bei Navigation, Knöpfen, Menüs, Reitern, Zeilen */
.f-body a:hover { text-decoration: none; }
.f-body a:not([class]):hover, .f-body .f-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.f-num, .f-body .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.f-body :focus-visible:not(input):not(textarea):not(select) { outline: 2px solid var(--f-accent); outline-offset: 2px; border-radius: 6px; }
.f-body input:focus-visible, .f-body textarea:focus-visible, .f-body select:focus-visible { outline: none; }
.f-body input[type=checkbox]:focus-visible, .f-body input[type=radio]:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 2px; }
.f-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.f-icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; vertical-align: -0.125em; display: inline-block; }
.f-icon--16 { width: 16px; height: 16px; }
.f-icon--18 { width: 18px; height: 18px; }
.f-icon--20 { width: 20px; height: 20px; }

/* ---------- Shell ---------- */
.f-shell {
  display: grid;
  grid-template-columns: var(--f-nav-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  transition: grid-template-columns var(--f-dur-3) var(--f-ease-out);
}
html.f-nav-collapsed .f-shell { grid-template-columns: var(--f-nav-w-collapsed) minmax(0, 1fr); }

.f-nav {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px 12px;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.f-nav::-webkit-scrollbar { display: none; }
/* Bei wenig Höhe (Handy) scrollt die Navigation – Elemente dürfen nicht gestaucht werden */
.f-nav > * { flex-shrink: 0; }
.f-nav__brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; min-height: 38px; }
.f-nav__logo {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--f-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 16px var(--f-font-display);
}
.f-nav__logo img { width: 30px; height: 30px; border-radius: 9px; object-fit: contain; background: #fff; }
.f-nav__tenant { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.f-nav__tenant b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-nav__tenant span { font-size: 12px; color: var(--f-nav-ink-2); }
.f-nav__search {
  height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border: 0; border-radius: var(--f-r); background: var(--f-sheet); box-shadow: 0 0 0 1px var(--f-edge);
  font: 600 14px var(--f-font); color: var(--f-nav-ink-2); cursor: pointer; width: 100%;
  transition: box-shadow var(--f-dur-1) ease;
}
.f-nav__search:hover { box-shadow: 0 0 0 1px var(--f-ink-4); }
.f-nav__search span:first-of-type { flex-grow: 1; text-align: left; white-space: nowrap; }
.f-nav__links { display: flex; flex-direction: column; gap: 1px; flex-grow: 1; }
.f-nav__group { font-size: 12px; font-weight: 700; color: var(--f-ink-3); padding: 16px 12px 6px; white-space: nowrap; }
.f-nav__link {
  height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--f-nav-ink);
  white-space: nowrap;
  transition: background-color var(--f-dur-1) ease, color var(--f-dur-1) ease;
}
.f-body .f-nav__link { color: var(--f-nav-ink); text-decoration: none; }
.f-nav__link .f-icon { width: 17px; height: 17px; color: var(--f-ink-3); }
.f-nav__link:hover { background: rgba(17, 19, 24, .045); }
:root[data-theme="dark"] .f-nav__link:hover { background: rgba(255, 255, 255, .05); }
.f-nav__link.is-active { background: var(--f-sheet); color: var(--f-ink); box-shadow: 0 0 0 1px var(--f-edge); }
.f-nav__link.is-active .f-icon { color: var(--f-accent); }
.f-nav__label { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; }
.f-nav__count { font-size: 12px; font-weight: 700; color: var(--f-nav-ink-2); }
.f-nav__count--warn { color: var(--f-warn-ink); }
.f-nav__ext { width: 12px; height: 12px; color: var(--f-nav-ink-2); }
.f-nav__live { width: 7px; height: 7px; border-radius: 99px; background: var(--f-warn); }
.f-nav__foot { display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; position: relative; }
.f-avatar {
  width: 30px; height: 30px; border-radius: 99px; flex-shrink: 0;
  background: var(--f-sunk-2); color: var(--f-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.f-nav__user { flex-grow: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px; border-radius: 9px; cursor: pointer; font: 600 13px var(--f-font); color: var(--f-ink); text-align: left; }
.f-nav__user:hover { background: rgba(17, 19, 24, .045); }
.f-nav__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* eingeklappte Navigation (Desktop) */
html.f-nav-collapsed .f-nav { padding: 14px 10px; align-items: center; }
html.f-nav-collapsed .f-nav__tenant,
html.f-nav-collapsed .f-nav__label,
html.f-nav-collapsed .f-nav__count,
html.f-nav-collapsed .f-nav__ext,
html.f-nav-collapsed .f-nav__group,
html.f-nav-collapsed .f-nav__search span,
html.f-nav-collapsed .f-nav__user span,
html.f-nav-collapsed .f-nav__foot .f-iconbtn:not(.f-nav__collapse) { display: none; }
html.f-nav-collapsed .f-nav__links { align-items: center; gap: 4px; padding-top: 10px; }
html.f-nav-collapsed .f-nav__link { width: 44px; justify-content: center; padding: 0; position: relative; }
html.f-nav-collapsed .f-nav__live { position: absolute; top: 7px; right: 8px; }
html.f-nav-collapsed .f-nav__search { width: 44px; justify-content: center; padding: 0; }
html.f-nav-collapsed .f-nav__brand { justify-content: center; padding: 4px 0; flex-direction: column; }
html.f-nav-collapsed .f-nav__foot { flex-direction: column; }

/* Blatt */
.f-sheet {
  margin: 8px 8px 8px 0;
  background: var(--f-sheet);
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--f-edge), 0 1px 3px rgba(17, 19, 24, .04);
  min-width: 0;
  min-height: calc(100vh - 16px);
  min-height: calc(100dvh - 16px);
  display: flex; flex-direction: column;
  position: relative;
}
.f-page { padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 24px; flex-grow: 1; }
.f-page--flush { padding: 0; gap: 0; }
.f-page--narrow { max-width: 920px; }

/* Mobile Kopfzeile + Navigation als Schublade */
.f-mobilebar { display: none; }
.f-scrim {
  position: fixed; inset: 0; background: rgba(17, 19, 24, .32);
  opacity: 0; pointer-events: none; z-index: 80;
  transition: opacity var(--f-dur-2) ease;
}

@media (max-width: 991px) {
  .f-shell, html.f-nav-collapsed .f-shell { grid-template-columns: minmax(0, 1fr); }
  .f-nav {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 90;
    background: var(--f-desk); box-shadow: var(--f-shadow-float);
    transform: translateX(-104%);
    transition: transform var(--f-dur-3) var(--f-ease-out);
  }
  html.f-nav-open .f-nav { transform: none; }
  html.f-nav-open .f-scrim { opacity: 1; pointer-events: auto; }
  html.f-nav-collapsed .f-nav__tenant, html.f-nav-collapsed .f-nav__label { display: revert; }
  .f-nav__collapse { display: none !important; }
  .f-sheet { margin: 0; border-radius: 0; box-shadow: none; min-height: calc(100dvh - 56px); }
  .f-mobilebar {
    display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px;
    position: sticky; top: 0; z-index: 50; background: var(--f-desk);
  }
  .f-mobilebar__title { font: 600 18px var(--f-font-display); flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .f-page { padding: 18px 16px 96px; gap: 18px; }
  .f-page.f-page--flush { padding: 0; gap: 0; }
}

/* ---------- Typografie ---------- */
.f-title { margin: 0; font-family: var(--f-font-display); font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
.f-title--sm { font-size: 26px; }
.f-h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.005em; }
.f-h3 { margin: 0; font-size: 15px; font-weight: 800; }
.f-sub { font-size: 14px; font-weight: 500; color: var(--f-ink-3); }
.f-meta { font-size: 12.5px; font-weight: 600; color: var(--f-ink-3); }
.f-muted { color: var(--f-ink-3); }
.f-label { font-size: 12.5px; font-weight: 700; color: var(--f-ink-2); }
.f-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--f-ink-3); }
.f-crumbs a { color: var(--f-ink-3) !important; }
.f-text-warn { color: var(--f-warn-ink); }
.f-text-ok { color: var(--f-ok); }

/* Seitenkopf */
.f-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.f-head__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Schaltflächen ---------- */
.f-btn {
  height: 38px; padding: 0 16px; border: 0; border-radius: var(--f-r);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14px var(--f-font); white-space: nowrap; cursor: pointer;
  background: var(--f-sunk); color: var(--f-ink);
  transition: transform var(--f-dur-1) ease, background-color var(--f-dur-1) ease, box-shadow var(--f-dur-1) ease, opacity var(--f-dur-1) ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.f-body a.f-btn { text-decoration: none; color: var(--f-ink); }
.f-btn:hover { background: var(--f-sunk-2); }
.f-btn:active { transform: scale(.97); }
.f-btn .f-icon { width: 15px; height: 15px; }
.f-btn--primary, .f-body a.f-btn--primary { background: var(--f-ink); color: var(--f-sheet); }
.f-btn--primary:hover { background: #2A2D35; }
:root[data-theme="dark"] .f-btn--primary:hover { background: #fff; }
.f-btn--accent, .f-body a.f-btn--accent { background: var(--f-accent); color: #fff; }
.f-btn--accent:hover { filter: brightness(1.08); background: var(--f-accent); }
.f-btn--raised, .f-body a.f-btn--raised { background: var(--f-sheet); box-shadow: 0 0 0 1px var(--f-edge); }
.f-btn--raised:hover { background: var(--f-hover); }
.f-btn--ghost, .f-body a.f-btn--ghost { background: transparent; color: var(--f-ink-2); }
.f-btn--ghost:hover { background: var(--f-sunk); color: var(--f-ink); }
.f-btn--danger, .f-body a.f-btn--danger { background: var(--f-warn-soft); color: var(--f-warn-ink); }
.f-btn--danger:hover { background: var(--f-warn-soft); filter: brightness(.97); }
.f-btn--danger-solid { background: var(--f-warn-ink); color: #fff; }
.f-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.f-btn--lg { height: 44px; padding: 0 20px; font-size: 15px; }
.f-btn--block { width: 100%; }
.f-btn[disabled], .f-btn.is-disabled { opacity: .45; pointer-events: none; }
.f-btn.is-loading { pointer-events: none; }
.f-btn.is-loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 99px;
  border: 2px solid currentColor; border-top-color: transparent; opacity: .7;
  animation: f-spin .7s linear infinite;
}
.f-btn kbd, .f-kbd-hint { font: 700 12px var(--f-font); color: var(--f-ink-4); background: none; padding: 0; }
.f-btn--primary kbd { color: #8C919C; }
.f-iconbtn {
  width: 36px; height: 36px; border: 0; border-radius: var(--f-r); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--f-ink-2); cursor: pointer; position: relative;
  transition: background-color var(--f-dur-1) ease, transform var(--f-dur-1) ease;
}
.f-iconbtn:hover { background: var(--f-sunk); color: var(--f-ink); }
.f-iconbtn:active { transform: scale(.94); }
.f-iconbtn--filled { background: var(--f-sunk); }
.f-iconbtn--raised { background: var(--f-sheet); box-shadow: 0 0 0 1px var(--f-edge); }
.f-iconbtn .f-icon { width: 16px; height: 16px; }
.f-iconbtn__dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 99px; background: var(--f-accent); box-shadow: 0 0 0 2px var(--f-desk); }

@keyframes f-spin { to { transform: rotate(360deg); } }

/* ---------- Eingaben ---------- */
.f-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-field__hint { font-size: 12.5px; font-weight: 500; color: var(--f-ink-3); }
.f-field__error { font-size: 12.5px; font-weight: 600; color: var(--f-warn-ink); }
.f-input, .f-select, .f-textarea {
  width: 100%; height: 40px; border: 0; border-radius: var(--f-r);
  background: var(--f-sunk); color: var(--f-ink); padding: 0 12px;
  font: 600 14px var(--f-font);
  transition: box-shadow var(--f-dur-1) ease, background-color var(--f-dur-1) ease;
  outline: none;
}
.f-textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.f-input::placeholder, .f-textarea::placeholder { color: var(--f-ink-4); font-weight: 500; }
.f-input:hover, .f-select:hover, .f-textarea:hover { background: var(--f-sunk-2); }
.f-input:focus, .f-select:focus, .f-textarea:focus { background: var(--f-sheet); box-shadow: 0 0 0 2px var(--f-accent), 0 0 0 5px var(--f-accent-ring); }
.f-input[aria-invalid="true"], .f-input.is-invalid, .f-select.is-invalid, .f-textarea.is-invalid { box-shadow: 0 0 0 2px var(--f-warn); background: var(--f-sheet); }
.f-input[disabled], .f-select[disabled], .f-textarea[disabled] { opacity: .55; cursor: not-allowed; }
.f-input--raised { background: var(--f-sheet); box-shadow: 0 0 0 1px var(--f-edge); }
.f-select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.f-search {
  height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--f-sunk); border-radius: var(--f-r); color: var(--f-ink-3); min-width: 220px;
  transition: box-shadow var(--f-dur-1) ease, background-color var(--f-dur-1) ease;
}
.f-search:focus-within { background: var(--f-sheet); box-shadow: 0 0 0 2px var(--f-accent), 0 0 0 5px var(--f-accent-ring); }
.f-search input { border: 0; outline: 0; background: transparent; font: 600 14px var(--f-font); color: var(--f-ink); width: 100%; min-width: 0; }
.f-search input::placeholder { color: var(--f-ink-4); font-weight: 500; }
.f-search kbd { font: 700 12px var(--f-font); color: var(--f-ink-4); background: none; padding: 0; }
.f-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.f-check input, input.f-checkbox { width: 17px; height: 17px; accent-color: var(--f-accent); cursor: pointer; margin: 0; }
.f-switch { position: relative; display: inline-flex; width: 40px; height: 24px; flex-shrink: 0; }
.f-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.f-switch span { position: absolute; inset: 0; border-radius: 99px; background: #D5D8DE; transition: background-color var(--f-dur-2) ease; }
.f-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(17, 19, 24, .25); transition: transform var(--f-dur-2) var(--f-ease-out); }
.f-switch input:checked + span { background: var(--f-accent); }
.f-switch input:checked + span::after { transform: translateX(16px); }
.f-switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--f-accent-ring); }
.f-grid { display: grid; gap: 14px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.f-span-2 { grid-column: span 2; } .f-span-all { grid-column: 1 / -1; }
@media (max-width: 720px) { .f-grid { grid-template-columns: minmax(0, 1fr); } .f-span-2 { grid-column: auto; } }

/* ---------- Segment (Statusfilter) ---------- */
.f-seg { position: relative; display: inline-flex; background: var(--f-sunk); border-radius: 12px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.f-seg::-webkit-scrollbar { display: none; }
.f-seg__thumb {
  position: absolute; top: 3px; height: calc(100% - 6px); left: 0; width: 0; border-radius: 10px;
  background: var(--f-sheet); box-shadow: 0 1px 3px rgba(17, 19, 24, .12), 0 0 0 .5px rgba(17, 19, 24, .04);
  transition: transform var(--f-dur-3) var(--f-ease-out), width var(--f-dur-3) var(--f-ease-out);
  pointer-events: none;
}
.f-seg__btn {
  position: relative; height: 34px; padding: 0 14px; border: 0; background: transparent; border-radius: 10px;
  font: 600 13.5px var(--f-font); color: var(--f-ink-2); cursor: pointer; white-space: nowrap;
  transition: color var(--f-dur-2) ease;
}
.f-seg__btn:hover { color: var(--f-ink); }
.f-seg__btn[aria-pressed="true"] { color: var(--f-ink); font-weight: 800; }
.f-seg__count { font-variant-numeric: tabular-nums; color: var(--f-ink-3); margin-left: 4px; }
.f-seg__count--accent { color: var(--f-accent); }
.f-seg__count--warn { color: var(--f-warn-ink); }
.f-seg__count--ok { color: var(--f-ok); }

/* Chips (Filter-Auswahl, Tags) */
.f-chip {
  height: 38px; padding: 0 14px; border: 0; border-radius: var(--f-r); background: var(--f-sunk);
  display: inline-flex; align-items: center; gap: 6px; font: 700 13.5px var(--f-font); color: var(--f-ink); cursor: pointer;
  transition: background-color var(--f-dur-1) ease;
}
.f-chip:hover { background: var(--f-sunk-2); }
.f-chip.is-set { background: var(--f-accent-soft); color: var(--f-accent-ink); }
.f-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--f-sunk); font-size: 12.5px; font-weight: 700; color: var(--f-ink-2); white-space: nowrap; }
kbd.f-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--f-sunk); box-shadow: inset 0 -1px 0 var(--f-sunk-2); font: 700 11.5px var(--f-font); color: var(--f-ink-2); }

/* ---------- Status: Punkt und Wort ---------- */
.f-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.f-status::before { content: ""; width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; background: var(--f-dot, var(--f-ink-4)); box-shadow: var(--f-dot-ring, none); transition: background-color var(--f-dur-3) ease; }
.f-status--draft { --f-dot: var(--f-ink-4); color: var(--f-ink-2); }
.f-status--open, .f-status--sent, .f-status--printed, .f-status--accepted { --f-dot: var(--f-accent); }
.f-status--overdue, .f-status--rejected, .f-status--expired, .f-status--warn { --f-dot: var(--f-warn); color: var(--f-warn-ink); }
.f-status--paid, .f-status--ok, .f-status--converted { --f-dot: var(--f-ok); }
.f-status--partially_paid { --f-dot: conic-gradient(var(--f-ok) 0 var(--f-pct, 50%), var(--f-ok-soft) var(--f-pct, 50%) 100%); }
.f-status--cancelled { --f-dot: transparent; --f-dot-ring: inset 0 0 0 1.5px var(--f-ink-4); color: var(--f-ink-3); text-decoration: line-through; }

/* Verlaufspunkte (Belegstreifen kompakt) */
.f-track { display: inline-flex; gap: 4px; align-items: center; }
.f-track i { width: 7px; height: 7px; border-radius: 99px; background: var(--f-sunk-2); display: block; transition: background-color var(--f-dur-3) ease; }
.f-track i.is-done { background: var(--f-ink); }
.f-track i.is-sent { background: var(--f-accent); }
.f-track i.is-archive { border-radius: 2px; }
.f-track i.is-warn { background: var(--f-warn); }
.f-track i.is-paid { background: var(--f-ok); }

/* ---------- Kennzahlen ---------- */
.f-kpis { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 32px; }
.f-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-kpi__label { font-size: 13px; font-weight: 600; color: var(--f-ink-3); }
.f-kpi__value { font-size: 30px; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-kpi__meta { font-size: 13px; font-weight: 600; color: var(--f-ink-3); }
.f-kpi--warn .f-kpi__label, .f-kpi--warn .f-kpi__value { color: var(--f-warn-ink); }
@media (max-width: 991px) { .f-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .f-kpi__value { font-size: 24px; } }

/* ---------- Flächen ---------- */
.f-panel { background: var(--f-sunk); border-radius: var(--f-r-xl); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.f-panel--tight { padding: 8px; gap: 6px; }
.f-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.f-card { background: var(--f-sheet); border-radius: var(--f-r-lg); padding: 14px 16px; min-width: 0; }
.f-card--edge { box-shadow: 0 0 0 1px var(--f-edge); }
.f-dark { background: var(--f-ink); color: var(--f-sheet); border-radius: var(--f-r-xl); padding: 18px 20px; }
.f-row { display: flex; align-items: center; gap: 12px; }
.f-row--between { justify-content: space-between; }
.f-row--wrap { flex-wrap: wrap; }
.f-stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.f-grow { flex-grow: 1; min-width: 0; }
.f-divider { height: 1px; background: var(--f-line); border: 0; margin: 0; }
.f-dl { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 10px 20px; font-size: 14px; margin: 0; }
.f-dl dt { color: var(--f-ink-3); font-weight: 600; }
.f-dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Spalten-Layouts */
.f-split { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside, 400px); gap: 20px; align-items: start; }
.f-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.f-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .f-split { grid-template-columns: minmax(0, 1fr); } .f-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .f-cols-2, .f-cols-3 { grid-template-columns: minmax(0, 1fr); } }

/* Toolbar über Listen */
.f-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.f-toolbar__right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Tabelle ---------- */
.f-table-wrap { position: relative; margin: 0 -12px; overflow-x: auto; }
.f-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.f-table th {
  height: 40px; padding: 0 12px; text-align: left; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; color: var(--f-ink-3);
  border-bottom: 1px solid var(--f-line);
  position: sticky; top: 0; background: var(--f-sheet); z-index: 2;
}
.f-table th.is-sortable { cursor: pointer; user-select: none; }
.f-table th.is-sortable:hover { color: var(--f-ink); }
.f-table th .f-sort { opacity: 0; margin-left: 4px; transition: opacity var(--f-dur-1) ease, transform var(--f-dur-2) ease; display: inline-block; }
.f-table th.is-sorted .f-sort { opacity: 1; }
.f-table th.is-sorted[aria-sort="ascending"] .f-sort { transform: rotate(180deg); }
.f-table td { height: 52px; padding: 0 12px; border-bottom: 1px solid var(--f-line-soft); vertical-align: middle; }
.f-table td:first-child, .f-table th:first-child { padding-left: 12px; }
.f-table tbody tr { transition: background-color var(--f-dur-1) ease; }
.f-table tbody tr:hover { background: var(--f-hover); }
.f-table tbody tr.is-selected { background: var(--f-accent-soft); }
.f-table tbody tr.is-link { cursor: pointer; }
.f-table .is-num, .f-table td.num, .f-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.f-table .is-strong { font-weight: 800; }
.f-table .is-muted { color: var(--f-ink-2); font-weight: 500; }
.f-table .is-ellipsis { max-width: 1px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-table .is-shrink { width: 1%; white-space: nowrap; }
.f-table a.f-rowlink { color: var(--f-ink); font-weight: 700; }
.f-table .f-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity var(--f-dur-1) ease; }
.f-table tr:hover .f-actions, .f-table tr:focus-within .f-actions { opacity: 1; }
@media (hover: none) { .f-table .f-actions { opacity: 1; } }
.f-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--f-accent); margin: 0; cursor: pointer; }
.f-table tbody.is-stale { opacity: .5; transition: opacity var(--f-dur-2) ease; }
.f-rows-in > tr, .f-rows-in > .f-item { animation: f-row-in var(--f-dur-3) var(--f-ease-out) both; }
@keyframes f-row-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.f-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--f-ink-3); flex-wrap: wrap; }
.f-pager__pages { display: flex; gap: 4px; align-items: center; }
.f-pager__btn { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font: 700 13px var(--f-font); color: var(--f-ink-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.f-pager__btn:hover { background: var(--f-sunk); color: var(--f-ink); }
.f-pager__btn[aria-current="page"] { background: var(--f-ink); color: var(--f-sheet); }
.f-pager__btn[disabled] { opacity: .35; pointer-events: none; }

/* Mobile: Tabellen werden zu Zeilenkarten.
   Zellen mit data-m bekommen einen festen Platz: check | title | amount / sub | status / meta. */
@media (max-width: 720px) {
  .f-table-wrap { margin: 0 -8px; }
  .f-table--cards thead { display: none; }
  .f-table--cards, .f-table--cards tbody { display: block; width: 100%; }
  .f-table--cards tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "check title amount" "check sub status" "check meta meta";
    column-gap: 12px; row-gap: 3px; padding: 12px 8px; border-bottom: 1px solid var(--f-line-soft);
  }
  .f-table--cards td { display: none; }
  .f-table--cards td[data-m] { display: block; height: auto; padding: 0; border: 0; min-width: 0; max-width: none; width: auto; }
  .f-table--cards td[data-m="check"] { grid-area: check; align-self: center; }
  .f-table--cards td[data-m="title"] { grid-area: title; font-weight: 700; }
  .f-table--cards td[data-m="sub"] { grid-area: sub; color: var(--f-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .f-table--cards td[data-m="amount"] { grid-area: amount; text-align: right; font-weight: 800; }
  .f-table--cards td[data-m="status"] { grid-area: status; justify-self: end; font-size: 13px; }
  .f-table--cards td[data-m="meta"] { grid-area: meta; font-size: 12.5px; color: var(--f-ink-3); }
  .f-table--cards td[data-m="meta"][data-label]::before { content: attr(data-label) " "; }
  .f-table--cards tbody tr:not([data-id]) { display: block; }
  .f-table--cards tbody tr:not([data-id]) td { display: block; height: auto; }
  .f-table--cards tr.f-sk-row td:nth-child(n+4) { display: none; }
}

/* Aktionsleiste bei Auswahl */
.f-bulkbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 0);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px;
  background: #111318; color: #fff; border-radius: 14px; box-shadow: var(--f-shadow-float);
  white-space: nowrap; max-width: calc(100vw - 32px); overflow-x: auto;
  animation: f-bar-in var(--f-dur-3) var(--f-ease-out) both;
}
.f-bulkbar[hidden] { display: none; }
.f-bulkbar__label { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.f-bulkbar__all { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #8195FF; font: 700 13px var(--f-font); cursor: pointer; }
.f-bulkbar__sep { width: 1px; height: 22px; background: #2A2D35; flex-shrink: 0; }
.f-bulkbar .f-btn { height: 36px; background: #23262D; color: #fff; }
.f-bulkbar .f-btn:hover { background: #2E323B; }
.f-bulkbar .f-btn--primary { background: #fff; color: #111318; }
.f-bulkbar .f-btn--primary:hover { background: #E9EAEE; }
.f-bulkbar .f-iconbtn { color: #9A9FAB; }
.f-bulkbar .f-iconbtn:hover { background: #23262D; color: #fff; }
@keyframes f-bar-in { from { opacity: 0; transform: translate(-50%, 18px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Zustände ---------- */
.f-sk {
  display: block; border-radius: 6px; height: 12px;
  background: linear-gradient(90deg, var(--f-sunk-2) 0%, var(--f-hover) 45%, var(--f-sunk-2) 90%);
  background-size: 300% 100%;
  animation: f-sk 1.2s linear infinite;
}
.f-sk--box { height: 16px; width: 16px; border-radius: 4px; }
.f-sk--line { height: 12px; }
.f-sk--title { height: 22px; border-radius: 8px; }
@keyframes f-sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.f-progressline { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; z-index: 3; pointer-events: none; }
.f-progressline::after { content: ""; position: absolute; top: 0; width: 40%; height: 2px; background: var(--f-accent); animation: f-prog 1.4s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes f-prog { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.f-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 56px 20px; }
.f-empty__title { font: 600 20px var(--f-font-display); }
.f-empty__text { font-size: 14px; color: var(--f-ink-2); max-width: 380px; }
.f-empty__actions { display: flex; gap: 8px; padding-top: 6px; flex-wrap: wrap; justify-content: center; }
/* Fließtext mit Punkt davor – verträgt gemischten Inhalt (Text, <strong>, Links, Knöpfe) */
.f-alert { display: block; position: relative; padding: 12px 14px 12px 32px; border-radius: var(--f-r); background: var(--f-sunk); font-size: 14px; font-weight: 600; line-height: 1.5; }
.f-alert::before { content: ""; position: absolute; left: 14px; top: 19px; width: 8px; height: 8px; border-radius: 99px; background: var(--f-ink-4); }
.f-alert > .f-icon:first-child { display: none; }
.f-alert .f-btn { margin-left: 8px; vertical-align: middle; }
.f-alert--row { display: flex; align-items: center; gap: 12px; }
.f-alert--warn { background: var(--f-warn-soft); color: var(--f-warn-ink); }
.f-alert--warn::before { background: var(--f-warn); }
.f-alert--ok { background: var(--f-ok-soft); color: var(--f-ok); }
.f-alert--ok::before { background: var(--f-ok); }
.f-alert--info { background: var(--f-accent-soft); color: var(--f-accent-ink); }
.f-alert--info::before { background: var(--f-accent); }
.f-alert__body { flex-grow: 1; }
.f-meter { height: 6px; border-radius: 99px; background: var(--f-sunk-2); overflow: hidden; }
.f-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--f-accent); transition: width var(--f-dur-3) var(--f-ease-out); }
.f-meter--ok > span { background: var(--f-ok); }
.f-meter--warn > span { background: var(--f-warn); }
.f-offline {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 120;
  background: #111318; color: #fff; border-radius: 12px; padding: 10px 16px;
  font-size: 13.5px; font-weight: 700; box-shadow: var(--f-shadow-float);
  display: none; align-items: center; gap: 10px;
}
html.f-is-offline .f-offline { display: flex; }

/* ---------- Verlauf (Timeline) ---------- */
.f-timeline { display: flex; flex-direction: column; }
.f-tl { display: flex; gap: 14px; }
.f-tl__rail { display: flex; flex-direction: column; align-items: center; }
.f-tl__dot { width: 10px; height: 10px; border-radius: 99px; margin-top: 5px; background: var(--f-ink); flex-shrink: 0; }
.f-tl__dot--sent { background: var(--f-accent); }
.f-tl__dot--archive { background: var(--f-accent); border-radius: 3px; }
.f-tl__dot--warn { background: var(--f-warn); }
.f-tl__dot--ok { background: var(--f-ok); }
.f-tl__dot--todo { background: transparent; box-shadow: inset 0 0 0 2px var(--f-ink-4); }
.f-tl__line { width: 2px; flex-grow: 1; background: var(--f-sunk-2); }
.f-tl:last-child .f-tl__line { display: none; }
.f-tl__body { padding-bottom: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-tl__title { font-size: 14px; font-weight: 700; }
.f-tl__meta { font-size: 12.5px; font-weight: 600; color: var(--f-ink-3); }

/* ---------- Menü / Popover ---------- */
.f-menu {
  overflow-y: auto; overscroll-behavior: contain;
  position: fixed; z-index: 110; min-width: 220px; max-width: 320px; padding: 6px;
  background: var(--f-sheet); border-radius: 12px; box-shadow: var(--f-shadow-pop);
  display: flex; flex-direction: column;
  opacity: 0; transform: scale(.96); transform-origin: var(--f-origin, top left); pointer-events: none;
  transition: opacity 140ms var(--f-ease-out), transform 140ms var(--f-ease-out);
}
.f-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.f-menu[hidden] { display: none; }
.f-menu__item {
  min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; width: 100%;
  display: flex; align-items: center; gap: 10px; text-align: left;
  font: 600 14px var(--f-font); color: var(--f-ink); cursor: pointer;
}
.f-body a.f-menu__item { color: var(--f-ink); text-decoration: none; }
.f-menu__item:hover, .f-menu__item:focus-visible, .f-menu__item.is-active { background: var(--f-sunk); outline: none; }
.f-menu__item .f-icon { width: 15px; height: 15px; color: var(--f-ink-3); }
.f-menu__item kbd { margin-left: auto; font: 700 12px var(--f-font); color: var(--f-ink-4); background: none; padding: 0; }
.f-menu__item--danger, .f-body a.f-menu__item--danger { color: var(--f-warn-ink); }
.f-menu__item--danger .f-icon { color: var(--f-warn-ink); }
.f-menu__sep { height: 1px; background: var(--f-line); margin: 4px 0; }
.f-menu__head { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--f-ink-3); }

/* ---------- Dialog ---------- */
dialog.f-dialog {
  border: 0; padding: 8px; border-radius: 20px; background: var(--f-sheet); color: var(--f-ink);
  width: min(var(--w, 560px), calc(100vw - 24px)); max-height: calc(100dvh - 48px);
  box-shadow: 0 24px 64px rgba(17, 19, 24, .28);
  opacity: 0; transform: translateY(8px) scale(.98);
  transition: opacity var(--f-dur-3) var(--f-ease-out), transform var(--f-dur-3) var(--f-ease-out), overlay var(--f-dur-3) allow-discrete, display var(--f-dur-3) allow-discrete;
}
dialog.f-dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog.f-dialog[open] { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog.f-dialog::backdrop { background: rgba(17, 19, 24, 0); transition: background-color var(--f-dur-3) ease, overlay var(--f-dur-3) allow-discrete, display var(--f-dur-3) allow-discrete; }
dialog.f-dialog[open]::backdrop { background: rgba(17, 19, 24, .32); }
@starting-style { dialog.f-dialog[open]::backdrop { background: rgba(17, 19, 24, 0); } }
.f-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 16px 12px; }
.f-dialog__title { margin: 0; font: 600 22px var(--f-font-display); letter-spacing: -.015em; }
.f-dialog__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.f-dialog__foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--f-line); }
.f-dialog__foot .f-grow { color: var(--f-ink-3); font-size: 13px; font-weight: 600; }
@media (max-width: 720px) {
  dialog.f-dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; transform: translateY(24px); }
}

/* ---------- Toasts ---------- */
.f-toasts { position: fixed; right: 20px; top: 20px; z-index: 130; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.f-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(460px, calc(100vw - 40px));
  padding: 8px 8px 8px 16px; min-height: 46px; border-radius: 12px;
  background: #111318; color: #fff; box-shadow: var(--f-shadow-float);
  animation: f-toast-in var(--f-dur-3) var(--f-ease-out) both;
}
.f-toast.is-leaving { animation: f-toast-out 180ms var(--f-ease-in) both; }
.f-toast__dot { width: 8px; height: 8px; border-radius: 99px; background: #A2A7B2; flex-shrink: 0; }
.f-toast--success .f-toast__dot { background: #2BC4A6; }
.f-toast--error .f-toast__dot, .f-toast--danger .f-toast__dot, .f-toast--warning .f-toast__dot { background: #FF8A47; }
.f-toast--info .f-toast__dot { background: #8195FF; }
.f-toast__text { flex-grow: 1; font-size: 14px; font-weight: 700; line-height: 1.4; padding: 4px 0; }
.f-toast__text small { display: block; font-weight: 500; color: #A3A8B4; font-size: 13px; }
.f-toast__btn { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: #2A2D35; color: #fff; font: 700 13px var(--f-font); cursor: pointer; flex-shrink: 0; }
.f-toast__btn:hover { background: #343843; }
.f-toast__close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #8C919C; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.f-toast__close:hover { color: #fff; background: #23262D; }
@keyframes f-toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes f-toast-out { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (max-width: 720px) { .f-toasts { left: 12px; right: 12px; top: auto; bottom: 88px; align-items: stretch; } }

/* ---------- Befehlspalette (Suche + KI) ---------- */
dialog.f-palette {
  border: 0; padding: 0; margin: 12vh auto auto; border-radius: 18px; background: var(--f-sheet); color: var(--f-ink);
  width: min(680px, calc(100vw - 24px)); box-shadow: 0 24px 64px rgba(17, 19, 24, .3); overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(.985);
  transition: opacity 180ms var(--f-ease-out), transform 180ms var(--f-ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete;
}
dialog.f-palette[open] { opacity: 1; transform: none; }
@starting-style { dialog.f-palette[open] { opacity: 0; transform: translateY(-6px) scale(.985); } }
dialog.f-palette::backdrop { background: rgba(17, 19, 24, .28); }
.f-palette__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--f-line); }
.f-palette__input .f-icon { width: 18px; height: 18px; color: var(--f-ink-3); }
.f-palette__input input { flex-grow: 1; border: 0; outline: 0; background: transparent; font: 600 17px var(--f-font); color: var(--f-ink); min-width: 0; }
.f-palette__input input::placeholder { color: var(--f-ink-4); }
.f-palette__list { max-height: min(56vh, 480px); overflow-y: auto; padding: 6px; }
.f-palette__group { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; color: var(--f-ink-3); }
.f-palette__item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: 10px; cursor: pointer;
  color: var(--f-ink); width: 100%; border: 0; background: transparent; text-align: left; font: inherit;
}
.f-body a.f-palette__item { color: var(--f-ink); text-decoration: none; }
.f-palette__item.is-active { background: var(--f-sunk); }
.f-palette__icon { width: 30px; height: 30px; border-radius: 8px; background: var(--f-sunk); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--f-ink-2); }
.f-palette__item.is-active .f-palette__icon { background: var(--f-sheet); }
.f-palette__icon--ai { background: var(--f-accent-soft); color: var(--f-accent); }
.f-palette__text { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.f-palette__title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-palette__subtitle { font-size: 12.5px; font-weight: 500; color: var(--f-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-palette__extra { font-size: 13px; font-weight: 700; color: var(--f-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-palette__foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--f-line); font-size: 12px; font-weight: 600; color: var(--f-ink-3); flex-wrap: wrap; }
.f-palette__foot kbd { margin-right: 4px; }
.f-palette__empty { padding: 28px 18px; text-align: center; color: var(--f-ink-3); font-size: 14px; font-weight: 600; }

/* KI-Elemente */
.f-ai { display: flex; align-items: center; gap: 10px; background: var(--f-accent-soft); border-radius: 12px; padding: 6px 6px 6px 14px; }
.f-ai > .f-icon { width: 17px; height: 17px; color: var(--f-accent); }
.f-ai input, .f-ai textarea { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 14px var(--f-font); color: var(--f-ink); resize: none; padding: 8px 0; }
.f-ai input::placeholder, .f-ai textarea::placeholder { color: var(--f-accent-ink); opacity: .65; }
.f-aibtn { color: var(--f-accent-ink); }
.f-aibtn .f-icon { color: var(--f-accent); }
.f-ai-result { background: var(--f-accent-soft); border-radius: var(--f-r-lg); padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.f-ai-result.is-thinking { position: relative; overflow: hidden; }
.f-ai-result.is-thinking::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: f-sk 1.4s linear infinite; background-size: 300% 100%; }

/* ---------- Reiter ---------- */
.f-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--f-line); overflow-x: auto; scrollbar-width: none; }
.f-tabs::-webkit-scrollbar { display: none; }
.f-tab { height: 40px; padding: 0 12px; border: 0; background: transparent; font: 700 14px var(--f-font); color: var(--f-ink-3); cursor: pointer; position: relative; white-space: nowrap; }
.f-body a.f-tab { color: var(--f-ink-3); display: inline-flex; align-items: center; text-decoration: none; }
.f-tab:hover { color: var(--f-ink); }
.f-tab[aria-selected="true"], .f-tab.is-active { color: var(--f-ink); }
.f-tab[aria-selected="true"]::after, .f-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--f-ink); }

/* ---------- Beleg-Vorschau ---------- */
.f-paper { background: #fff; color: #111318; border-radius: 4px; box-shadow: 0 1px 2px rgba(17, 19, 24, .06), 0 12px 40px rgba(17, 19, 24, .08); }
.f-docstage { background: var(--f-sunk); display: flex; justify-content: center; padding: 24px; overflow: auto; }

/* ---------- Seitenübergang (View Transitions) ---------- */
/* Kein Seitenübergang zwischen Seiten: Die Übergangsebene schluckte Klicks beim schnellen Durchklicken.
   Chrome hält die alte Seite bis zum ersten Bild der neuen stehen – der Wechsel bleibt ruhig. */
@view-transition { navigation: none; }
/* Übergangsebene darf keine Klicks schlucken (schnelles Durchklicken) */
::view-transition { pointer-events: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--f-ease-out); }
/* Navigation wechselt ohne Zwischenbild: alter Schnappschuss weg, neuer sofort voll da (sonst kurz doppelt/dunkler) */
::view-transition-old(f-nav) { display: none; }
::view-transition-new(f-nav) { animation: none; opacity: 1; mix-blend-mode: normal; }
::view-transition-group(f-nav) { animation: none; }
::view-transition-old(f-sheet) { animation: 120ms var(--f-ease-in) both f-vt-out; }
::view-transition-new(f-sheet) { animation: 200ms var(--f-ease-out) both f-vt-in; }
@keyframes f-vt-out { to { opacity: 0; } }
@keyframes f-vt-in { from { opacity: 0; transform: translateY(4px); } }

/* Hilfsklassen */
.f-hide { display: none !important; }
@media (max-width: 991px) { .f-hide-mobile { display: none !important; } }
@media (min-width: 992px) { .f-only-mobile { display: none !important; } }
.f-mt-0 { margin-top: 0; } .f-gap-sm { gap: 8px; } .f-w-100 { width: 100%; }
.f-text-right { text-align: right; }
.f-nowrap { white-space: nowrap; }

/* Bewegung reduzieren: nur Überblendungen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .f-sk { animation: none; }
}

/* Hauptspalte und öffentliche Seiten */
.f-main { min-width: 0; display: flex; flex-direction: column; }
.f-public { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* hidden-Attribut gewinnt immer, auch gegen display-Regeln der Bausteine */
.f-body [hidden] { display: none !important; }
/* Toolbar: rechte Gruppe füllt die Zeile, Suche wächst mit */
.f-toolbar__right { flex: 1 1 auto; justify-content: flex-end; }
.f-toolbar__right .f-search { flex: 1 1 220px; max-width: 360px; }
@media (max-width: 760px) { .f-toolbar__right { justify-content: stretch; } .f-toolbar__right .f-search { max-width: none; } }
.f-rowicon { color: var(--f-ink-3); margin-left: 6px; vertical-align: -2px; }
.f-rowicon--seen { color: var(--f-accent); cursor: help; }

/* Platz für die Aktionsleiste, damit die letzten Zeilen erreichbar bleiben */
.f-body:has(.f-bulkbar:not([hidden])) .f-page { padding-bottom: 112px; }

/* ==========================================================================
   Kompatibilität: Bootstrap-Klassen in HTML, das Skripte zur Laufzeit erzeugen
   (KI-Hilfe, ältere Dialoge). Auf Übergangsseiten überschreibt echtes Bootstrap das.
   Neue Templates verwenden ausschließlich f-Klassen.
   ========================================================================== */
:where(.f-body:not(.f-legacy-page)) .modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 19, 24, .32); overflow-y: auto; }
:where(.f-body:not(.f-legacy-page)) .modal.f-open { display: flex; animation: f-fade var(--f-dur-2) ease both; }
:where(.f-body:not(.f-legacy-page)) .modal .modal-dialog { width: min(560px, 100%); margin: auto; }
:where(.f-body:not(.f-legacy-page)) .modal .modal-dialog.modal-lg { width: min(800px, 100%); }
:where(.f-body:not(.f-legacy-page)) .modal .modal-dialog.modal-xl { width: min(1140px, 100%); }
:where(.f-body:not(.f-legacy-page)) .modal .modal-dialog.modal-sm { width: min(380px, 100%); }
:where(.f-body:not(.f-legacy-page)) .modal-content { background: var(--f-sheet); color: var(--f-ink); border-radius: 20px; box-shadow: 0 24px 64px rgba(17, 19, 24, .28); padding: 8px; animation: f-pop var(--f-dur-3) var(--f-ease-out) both; }
:where(.f-body:not(.f-legacy-page)) .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; border: 0; background: none !important; color: var(--f-ink) !important; }
:where(.f-body:not(.f-legacy-page)) .modal-title { margin: 0; font: 600 20px var(--f-font-display); }
:where(.f-body:not(.f-legacy-page)) .modal-body { padding: 4px 16px 16px; }
:where(.f-body:not(.f-legacy-page)) .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--f-line); }
:where(.f-body:not(.f-legacy-page)) .btn-close { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--f-sunk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5060' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 16px no-repeat; cursor: pointer; filter: none !important; }
@keyframes f-fade { from { opacity: 0; } }
@keyframes f-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
:where(.f-body:not(.f-legacy-page)) .btn { height: 36px; padding: 0 14px; border: 0; border-radius: var(--f-r); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px var(--f-font); background: var(--f-sunk); color: var(--f-ink); cursor: pointer; text-decoration: none; transition: background-color var(--f-dur-1) ease, transform var(--f-dur-1) ease; }
:where(.f-body:not(.f-legacy-page)) .btn:active { transform: scale(.97); }
:where(.f-body:not(.f-legacy-page)) .btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
:where(.f-body:not(.f-legacy-page)) .btn-primary, :where(.f-body:not(.f-legacy-page)) .btn-success, :where(.f-body:not(.f-legacy-page)) .btn-dark { background: var(--f-ink); color: var(--f-sheet); }
:where(.f-body:not(.f-legacy-page)) .btn-danger, :where(.f-body:not(.f-legacy-page)) .btn-outline-danger { background: var(--f-warn-soft); color: var(--f-warn-ink); }
:where(.f-body:not(.f-legacy-page)) .btn-secondary, :where(.f-body:not(.f-legacy-page)) .btn-light, :where(.f-body:not(.f-legacy-page)) .btn-outline-secondary, :where(.f-body:not(.f-legacy-page)) .btn-outline-primary { background: var(--f-sunk); color: var(--f-ink); }
:where(.f-body:not(.f-legacy-page)) .btn:disabled { opacity: .45; pointer-events: none; }
:where(.f-body:not(.f-legacy-page)) .table { width: 100%; border-collapse: collapse; font-size: 14px; }
:where(.f-body:not(.f-legacy-page)) .table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--f-ink-3); padding: 8px; border-bottom: 1px solid var(--f-line); }
:where(.f-body:not(.f-legacy-page)) .table td { padding: 8px; border-bottom: 1px solid var(--f-line-soft); }
:where(.f-body:not(.f-legacy-page)) .text-end { text-align: right; } :where(.f-body:not(.f-legacy-page)) .text-center { text-align: center; }
:where(.f-body:not(.f-legacy-page)) .text-muted { color: var(--f-ink-3) !important; } :where(.f-body:not(.f-legacy-page)) .text-danger { color: var(--f-warn-ink) !important; } :where(.f-body:not(.f-legacy-page)) .text-success { color: var(--f-ok) !important; } :where(.f-body:not(.f-legacy-page)) .text-warning { color: var(--f-warn-ink) !important; }
:where(.f-body:not(.f-legacy-page)) .alert { display: block; padding: 12px 14px; border-radius: var(--f-r); background: var(--f-sunk); font-size: 14px; font-weight: 600; margin-bottom: 12px; border: 0; }
:where(.f-body:not(.f-legacy-page)) .alert-info { background: var(--f-accent-soft); color: var(--f-accent-ink); }
:where(.f-body:not(.f-legacy-page)) .alert-warning, :where(.f-body:not(.f-legacy-page)) .alert-danger { background: var(--f-warn-soft); color: var(--f-warn-ink); }
:where(.f-body:not(.f-legacy-page)) .alert-success { background: var(--f-ok-soft); color: var(--f-ok); }
:where(.f-body:not(.f-legacy-page)) .badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--f-sunk); color: var(--f-ink-2); font-size: 12px; font-weight: 700; }
:where(.f-body:not(.f-legacy-page)) .form-control, :where(.f-body:not(.f-legacy-page)) .form-select { width: 100%; height: 40px; border: 0; border-radius: var(--f-r); background: var(--f-sunk); color: var(--f-ink); padding: 0 12px; font: 600 14px var(--f-font); outline: none; }
:where(.f-body:not(.f-legacy-page)) textarea.form-control { height: auto; min-height: 80px; padding: 10px 12px; }
:where(.f-body:not(.f-legacy-page)) .form-control:focus, :where(.f-body:not(.f-legacy-page)) .form-select:focus { background: var(--f-sheet); box-shadow: 0 0 0 2px var(--f-accent), 0 0 0 5px var(--f-accent-ring); }
:where(.f-body:not(.f-legacy-page)) .form-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--f-ink-2); margin-bottom: 6px; }
:where(.f-body:not(.f-legacy-page)) .spinner-border { display: inline-block; width: 14px; height: 14px; border-radius: 99px; border: 2px solid currentColor; border-top-color: transparent; animation: f-spin .7s linear infinite; }
:where(.f-body:not(.f-legacy-page)) .spinner-border-sm { width: 12px; height: 12px; }
:where(.f-body:not(.f-legacy-page)) .d-none { display: none !important; } :where(.f-body:not(.f-legacy-page)) .d-flex { display: flex !important; } :where(.f-body:not(.f-legacy-page)) .d-inline-flex { display: inline-flex !important; } :where(.f-body:not(.f-legacy-page)) .d-block { display: block !important; }
:where(.f-body:not(.f-legacy-page)) .align-items-center { align-items: center; } :where(.f-body:not(.f-legacy-page)) .justify-content-between { justify-content: space-between; } :where(.f-body:not(.f-legacy-page)) .justify-content-end { justify-content: flex-end; } :where(.f-body:not(.f-legacy-page)) .flex-grow-1 { flex-grow: 1; } :where(.f-body:not(.f-legacy-page)) .w-100 { width: 100%; }
:where(.f-body:not(.f-legacy-page)) .gap-1 { gap: 4px; } :where(.f-body:not(.f-legacy-page)) .gap-2 { gap: 8px; } :where(.f-body:not(.f-legacy-page)) .gap-3 { gap: 12px; }
:where(.f-body:not(.f-legacy-page)) .mb-0 { margin-bottom: 0 !important; } :where(.f-body:not(.f-legacy-page)) .mb-1 { margin-bottom: 4px; } :where(.f-body:not(.f-legacy-page)) .mb-2 { margin-bottom: 8px; } :where(.f-body:not(.f-legacy-page)) .mb-3 { margin-bottom: 12px; } :where(.f-body:not(.f-legacy-page)) .mt-2 { margin-top: 8px; } :where(.f-body:not(.f-legacy-page)) .mt-3 { margin-top: 12px; } :where(.f-body:not(.f-legacy-page)) .me-1 { margin-right: 4px; } :where(.f-body:not(.f-legacy-page)) .me-2 { margin-right: 8px; } :where(.f-body:not(.f-legacy-page)) .ms-1 { margin-left: 4px; } :where(.f-body:not(.f-legacy-page)) .ms-2 { margin-left: 8px; }
:where(.f-body:not(.f-legacy-page)) .fw-semibold, :where(.f-body:not(.f-legacy-page)) .fw-bold { font-weight: 700; } :where(.f-body:not(.f-legacy-page)) .small, :where(.f-body:not(.f-legacy-page)) small { font-size: 12.5px; }
/* Eingaben auf grauen Flächen sind weiß, sonst verschwinden sie */
.f-panel .f-input, .f-panel .f-select, .f-panel .f-textarea, .f-panel .f-search { background-color: var(--f-sheet); }
.f-panel .f-input:hover:not(:focus), .f-panel .f-select:hover:not(:focus), .f-panel .f-textarea:hover:not(:focus) { background-color: var(--f-sheet); box-shadow: 0 0 0 1px color-mix(in srgb, var(--f-ink) 22%, transparent); }
/* Bootstrap-Reiterinhalte ohne Bootstrap */
:where(.f-body:not(.f-legacy-page)) .tab-content > .tab-pane { display: none; }
:where(.f-body:not(.f-legacy-page)) .tab-content > .tab-pane.active { display: block; animation: f-fade var(--f-dur-2) ease both; }

/* ==========================================================================
   Halt geben: Tabellen und Listen stehen auf einer gerahmten Fläche,
   schmale Seiten sind mittig statt links „in der Luft“.
   ========================================================================== */
.f-table-wrap { margin: 0; border-radius: var(--f-r-lg); box-shadow: 0 0 0 1px var(--f-line); background: var(--f-sheet); overflow: auto; }
.f-table th { background: var(--f-hover); }
.f-table th:first-child, .f-table td:first-child { padding-left: 16px; }
.f-table th:last-child, .f-table td:last-child { padding-right: 16px; }
.f-table tbody tr:last-child td { border-bottom: 0; }
.f-table tbody tr { border-radius: 0 !important; }
.f-pager { padding-left: 4px; padding-right: 4px; }
@media (max-width: 720px) {
  .f-table-wrap { margin: 0; border-radius: 12px; }
  .f-table--cards tbody tr { padding: 12px 14px; }
  .f-table--cards tbody tr:last-child { border-bottom: 0; }
}
.f-page--narrow { max-width: 1040px; width: 100%; margin-inline: auto; }
.f-center { margin-inline: auto; }

/* ==========================================================================
   Dunkle Navigation (Konto › Darstellung › Navigation: Dunkel)
   Das Pult wird dunkel, das Blatt bleibt hell bzw. folgt dem Modus.
   ========================================================================== */
html.f-nav-dark { --f-desk: #0F1013; }
html.f-nav-dark[data-theme="dark"] { --f-desk: #050607; }
html.f-nav-dark .f-nav { color: #E9EAEE; --f-nav-ink: #C5C8D0; --f-nav-ink-2: #8C919C; }
html.f-nav-dark .f-nav__tenant span, html.f-nav-dark .f-nav__count { color: #8C919C; }
html.f-nav-dark .f-nav__group { color: #6F7480; }
html.f-nav-dark .f-nav__link .f-icon { color: #8C919C; }
html.f-nav-dark .f-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
html.f-nav-dark .f-nav__link.is-active { background: #23262D; color: #fff; box-shadow: none; }
html.f-nav-dark .f-nav__link.is-active .f-icon { color: color-mix(in srgb, var(--f-accent) 70%, #fff); }
html.f-nav-dark .f-nav__count--warn { color: #FF9F66; }
html.f-nav-dark .f-nav__search { background: #1B1D22; box-shadow: none; color: #9A9FAB; }
html.f-nav-dark .f-nav__search:hover { box-shadow: 0 0 0 1px #2E323B; }
html.f-nav-dark .f-nav__user { color: #E9EAEE; }
html.f-nav-dark .f-nav__user:hover { background: rgba(255, 255, 255, .06); }
html.f-nav-dark .f-nav .f-avatar { background: #23262D; color: #E9EAEE; }
html.f-nav-dark .f-nav .f-iconbtn { color: #9A9FAB; }
html.f-nav-dark .f-nav .f-iconbtn:hover { background: #1B1D22; color: #fff; }
html.f-nav-dark .f-iconbtn__dot { box-shadow: 0 0 0 2px #0F1013; }
html.f-nav-dark .f-mobilebar { color: #E9EAEE; }
html.f-nav-dark .f-mobilebar .f-iconbtn--raised { background: #1B1D22; box-shadow: none; color: #E9EAEE; }
html.f-nav-dark .f-sheet { box-shadow: none; }

/* Empfängerfelder: Adressen als Kärtchen (fluss.js), Vorschläge aus den Kundendaten */
.f-rcpt-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; cursor: text; }
.f-rcpt-field--bare { min-height: 44px; padding: 6px 0; }
.pv-mail__row:has(.f-rcpt-field) { align-items: flex-start; }
.pv-mail__row:has(.f-rcpt-field) .pv-mail__label { padding-top: 13px; }
.f-field > .f-rcpt-field { flex: 0 0 auto; }
.f-rcpt-field--box { min-height: 40px; padding: 5px 8px; border-radius: var(--f-r); background: var(--f-sunk); transition: box-shadow var(--f-dur-1) ease; }
.f-rcpt-field--box:focus-within { box-shadow: inset 0 0 0 1.5px var(--f-accent); }
.f-rcpt-field.is-invalid { box-shadow: inset 0 0 0 1.5px var(--f-warn); }
.f-rcpt-entry { flex: 1 1 90px; min-width: 90px; height: 30px; border: 0; outline: 0; padding: 0 4px; background: transparent; color: var(--f-ink); font: 600 14px var(--f-font); }
.f-rcpt-entry::placeholder { color: var(--f-ink-4); font-weight: 500; }
.f-rcpt-tag { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 30px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--f-accent-soft); color: var(--f-accent-ink); font: 700 13px var(--f-font); }
.f-rcpt-tag__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-rcpt-tag button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; font: 700 15px/1 var(--f-font); cursor: pointer; opacity: .7; }
.f-rcpt-tag button:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.f-rcpt-tag.is-bad { background: var(--f-warn-soft); color: var(--f-warn-ink); }
.f-rcpt-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 0 12px; }
.pv-mail .f-rcpt-suggest { padding-left: 76px; }
.f-rcpt-suggest__label { font-size: 12.5px; font-weight: 700; color: var(--f-ink-3); }
.f-rcpt-sug { display: inline-flex; align-items: center; gap: 2px; }
.f-rcpt-sug[hidden] { display: none !important; }
.f-rcpt-sug button { border: 0; background: none; cursor: pointer; font: 700 13px var(--f-font); border-radius: 8px; }
.f-rcpt-sug__add { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; color: var(--f-accent-ink); background: var(--f-sheet) !important; box-shadow: inset 0 0 0 1px var(--f-line); }
.f-rcpt-sug__add small { font-size: 11.5px; font-weight: 600; color: var(--f-ink-3); }
.f-rcpt-sug__add:hover { box-shadow: inset 0 0 0 1px var(--f-accent); }
.f-rcpt-sug__cc { padding: 6px 6px; color: var(--f-ink-3); font-size: 12px !important; }
.f-rcpt-sug__cc:hover { color: var(--f-ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .pv-mail .f-rcpt-suggest { padding-left: 0; } }

/* Navigation & Menüs: nie unterstrichen – auch nicht beim Klicken, Fokus oder besuchten Links */
.f-body .f-nav a, .f-body .f-nav a:is(:hover, :focus, :focus-visible, :active, :visited),
.f-body .f-drawer a, .f-body .f-drawer a:is(:hover, :focus, :active, :visited),
.f-body a.f-menu__item:is(:hover, :focus, :active), .f-body a.f-btn:is(:hover, :focus, :active) { text-decoration: none !important; }

/* Touch-Geräte (PWA, iOS/Android): Eingabefelder mit mind. 16px, sonst zoomt der Browser beim Antippen hinein */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea, [contenteditable="true"] { font-size: max(16px, 1em) !important; }
}

/* Mobile Kartenzeilen: kein Tabellen-Einzug für die erste/letzte Zelle, keine leere Auswahlspalte */
@media (max-width: 720px) {
  .f-table--cards td[data-m]:first-child { padding-left: 0; }
  .f-table--cards td[data-m]:last-child { padding-right: 0; }
  .f-table--cards tbody tr:where([data-id]:not(:has(td[data-m="check"]))) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title amount" "sub status" "meta meta";
  }
}

/* Listen: Hauptspalte fest, Rest verteilt sich gleichmäßig (keine große Lücke auf breiten Bildschirmen) */
@media (min-width: 1600px) {
  .f-table th.is-main { width: 28%; }
  .f-table--link td.is-ellipsis { width: auto; }
}
/* Mittlere Breiten: Nebenspalten ausblenden statt seitlich überlaufen */
@media (min-width: 721px) and (max-width: 1399px) {
  #customerTable th:nth-child(3), #customerTable td:nth-child(3),
  #customerTable th:nth-child(5), #customerTable td:nth-child(5) { display: none; }
  #il-table th:nth-child(6), #il-table td:nth-child(6) { display: none; }
}
/* Anklickbare Zeilen: überall Hand statt Textcursor */
.f-table--link tbody tr[data-id], .f-table--link tbody tr[data-id] td, .f-table--link tbody tr[data-id] td * { cursor: pointer; }
