/* ── app.css ──────────────────────────────────────────────────────────────────
   Eingeloggter Bereich der Business-Tools (body.app-mode, app-shell.js):
   eigene Navigation statt Website-Header, Listen, Kundenadressen, Einstellungen.
   Desktop ≥ 1280: Seitenleiste · 1080–1279: schmale Leiste · < 1080: App-Leiste + Tabs.
   ──────────────────────────────────────────────────────────────────────────── */
:root {
  --app-nav-w: 248px;
  --app-bar-h: 56px;
  --app-tabs-h: 64px;
  --app-bg: #f4f7fb;
  --app-line: #e3e9f2;
  --ease-out-soft: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Website-Rahmen ausblenden (app-boot: schon vor dem Laden, gegen Aufblitzen) */
html.app-boot .site-header, html.app-boot .mobile-menu, html.app-boot .site-footer, html.app-boot .page-hero,
html.app-boot main > section:not(.tool-section), html.app-boot .tool-cta-banner, html.app-boot .tool-info,
body.app-mode .site-header, body.app-mode .mobile-menu, body.app-mode .site-footer, body.app-mode .page-hero,
body.app-mode main > section:not(.tool-section), body.app-mode .tool-cta-banner, body.app-mode .tool-info,
body.app-mode .bookmark-bubble { display: none !important; }

.app-chrome { display: none; }
body.app-mode { --header-h: 0px; background: var(--app-bg); padding-left: var(--app-nav-w); }
body.app-mode .app-chrome { display: block; }
body.app-mode .tool-section { padding-top: 28px !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.app-skip { position: fixed; left: 12px; top: -48px; z-index: 10001; background: var(--color-navy); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; transition: top 0.2s; }
.app-skip:focus { top: 12px; }

/* ── Seitenleiste ── */
.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--app-nav-w);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px 16px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--app-line);
}
.app-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-navy); padding: 4px 6px; }
.app-brand img { border-radius: 9px; background: var(--color-navy); flex-shrink: 0; }
.app-brand span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.app-brand strong { font-size: 0.98rem; letter-spacing: -0.01em; }
.app-brand small { font-size: 0.72rem; color: #8a98ab; font-weight: 600; }

.app-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.app-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 0.92rem; font-weight: 600; color: #4a5a70; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.app-nav__item svg { color: #8a98ab; flex-shrink: 0; transition: color 0.15s; }
.app-nav__item:hover { background: rgba(64,126,209,0.08); color: var(--color-navy); }
.app-nav__item.is-active { background: var(--color-eisblau); color: var(--color-navy); }
.app-nav__item.is-active svg { color: var(--color-sky); }
.app-nav__short { display: none; }

.app-nav__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--app-line); }
.app-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; min-width: 0; }
.app-user__avatar, .app-bar__user {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-navy); color: #fff; font-weight: 700; font-size: 0.85rem;
}
.app-user__mail { font-size: 0.8rem; color: var(--color-stahlgrau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; border: none; background: none;
  font-family: var(--font-sans); font-size: 0.84rem; font-weight: 600; color: #6b7a90;
  text-decoration: none; cursor: pointer; text-align: left;
}
.app-nav__link:hover { background: rgba(26,46,87,0.05); color: var(--color-navy); }

/* ── App-Leiste + Tabs (schmal) ── */
.app-bar { display: none; }

@media (max-width: 1279px) and (min-width: 1080px) {
  :root { --app-nav-w: 76px; }
  .app-nav { padding: 16px 10px; align-items: stretch; }
  .app-brand span, .app-nav__label, .app-user__mail, .app-nav__link span { display: none; }
  .app-brand, .app-nav__item, .app-nav__link, .app-user { justify-content: center; }
  .app-nav__item { padding: 12px; }
}

@media (max-width: 1079px) {
  body.app-mode { padding-left: 0; padding-top: var(--app-bar-h); padding-bottom: calc(var(--app-tabs-h) + env(safe-area-inset-bottom, 0px)); }
  .app-nav {
    inset: auto 0 0 0;
    width: auto;
    height: calc(var(--app-tabs-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--app-line);
    gap: 0;
  }
  .app-nav > .app-brand, .app-nav__foot { display: none; }
  .app-nav__list { flex-direction: row; flex: 1; gap: 0; }
  .app-nav__list li { flex: 1; }
  .app-nav__item { flex-direction: column; gap: 3px; padding: 9px 2px 6px; font-size: 0.68rem; border-radius: 12px; justify-content: center; height: 100%; }
  .app-nav__item.is-active { background: none; color: var(--color-sky); }
  .app-nav__label { display: none; }
  .app-nav__short { display: block; }

  .app-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; inset: 0 0 auto 0; height: var(--app-bar-h); z-index: 900;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--app-line);
  }
  .app-brand--bar { padding: 0; gap: 8px; }
  .app-brand--bar strong { font-size: 0.95rem; }
  .app-bar__user { border: none; cursor: pointer; }

  /* Generator: Vorschau-Knopf über den Tabs */
  body.app-mode .preview-fab { bottom: calc(var(--app-tabs-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  body.app-mode .doc-aside { z-index: 10000; }
}

/* ── Generator im App-Modus ── */
body.app-mode .wizard-top__account:empty { display: none; }
body.app-mode .wizard-top { justify-content: flex-end; }

/* ════════════════════════════════
   SEITEN IM KONTO
════════════════════════════════ */
body.app-mode .konto-center { max-width: 1160px; }
.app-page { display: flex; flex-direction: column; gap: 18px; }
.app-page__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.app-page__title { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--color-navy); }
.app-page__sub { margin: 6px 0 0; font-size: 0.92rem; color: var(--color-stahlgrau); max-width: 60ch; }
.app-page__actions { display: flex; gap: 10px; }
.app-loading, .app-none { padding: 24px; text-align: center; color: #8a98ab; font-size: 0.9rem; }
.app-muted { color: #8a98ab; }

/* Kennzahlen */
.app-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.app-stats:empty { display: none; }
.app-stat { background: #fff; border: 1px solid var(--app-line); border-radius: 14px; padding: 14px 16px; }
.app-stat__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8a98ab; }
.app-stat__value { margin: 4px 0 2px; font-size: 1.3rem; font-weight: 800; color: var(--color-navy); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.app-stat__sub { font-size: 0.78rem; color: #8a98ab; }
.app-stat.is-alert { border-color: #f3c4c4; background: #fff7f7; }
.app-stat.is-alert .app-stat__value { color: #c43434; }
.app-stat.is-warn .app-stat__value { color: #b06d00; }
.app-stat.is-good .app-stat__value { color: #23865d; }
@media (max-width: 900px) { .app-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Filter + Suche */
.app-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.app-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--app-line); background: #fff;
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; color: #4a5a70;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.08s ease-out;
}
.app-chip span { font-size: 0.74rem; color: #8a98ab; font-variant-numeric: tabular-nums; }
.app-chip:hover { border-color: #c5d0e0; }
.app-chip:active { transform: scale(0.96); }
.app-chip.is-active { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.app-chip.is-active span { color: rgba(255,255,255,0.7); }
.app-chip--alert:not(.is-active) { color: #c43434; border-color: #f3c4c4; }
.app-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 38px; min-width: 260px;
  background: #fff; border: 1px solid var(--app-line); border-radius: 10px; color: #8a98ab;
}
.app-search:focus-within { border-color: var(--color-sky); box-shadow: 0 0 0 3px rgba(64,126,209,0.12); }
.app-search input { border: none; outline: none; background: none; flex: 1; font-family: var(--font-sans); font-size: 0.88rem; color: var(--color-navy); min-width: 0; }
@media (max-width: 640px) { .app-search { min-width: 0; width: 100%; } }

/* Tabelle */
.app-table-wrap { background: #fff; border: 1px solid var(--app-line); border-radius: 14px; overflow: hidden; }
.app-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.app-table th {
  text-align: left; padding: 10px 14px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8a98ab;
  background: #fafcff; border-bottom: 1px solid var(--app-line);
}
.app-table td { padding: 12px 14px; border-bottom: 1px solid #eef2f7; vertical-align: middle; color: var(--color-navy); }
.app-table tr:last-child td { border-bottom: none; }
.app-table tbody tr { transition: background 0.12s; }
.app-table tbody tr:hover { background: #fafcff; }
.app-table .r { text-align: right; }
.app-nr { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.app-main a { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.app-main strong { font-weight: 600; }
.app-main span { font-size: 0.8rem; color: #8a98ab; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.app-main a:hover strong { color: var(--color-sky); }
.app-amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.app-due { display: block; font-size: 0.74rem; color: #8a98ab; }
.app-due--alert { color: #c43434; font-weight: 600; }
.app-due--warn { color: #b06d00; font-weight: 600; }

/* Status-Pille (natives Select für Tastatur und Screenreader) */
.app-status { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.app-status select {
  appearance: none; -webkit-appearance: none;
  padding: 5px 26px 5px 12px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; cursor: pointer;
  background: #eef2f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: #4a5a70;
}
.app-status select:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(64,126,209,0.3); }
.app-status em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: #c43434; }
.app-status--versendet select { background-color: #fff4e0; color: #9a5b00; }
.app-status--ueberfaellig select { background-color: #fde8e8; color: #b42318; }
.app-status--abgelaufen select { background-color: #fff4e0; color: #9a5b00; }
.app-status--abgelaufen em { color: #b06d00; }
.app-status--bezahlt select, .app-status--angenommen select { background-color: #e3f4ec; color: #1f6b49; }
.app-status--storniert select, .app-status--abgelehnt select { background-color: #f1f3f6; color: #8a98ab; text-decoration: line-through; }
tr.is-storniert .app-amount, tr.is-abgelehnt .app-amount { color: #a0aab8; text-decoration: line-through; }

.app-row-actions { display: inline-flex; gap: 2px; align-items: center; }
.app-icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none; background: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #8a98ab; cursor: pointer; transition: background 0.12s, color 0.12s, transform 0.08s ease-out;
}
.app-icon-btn:hover { background: var(--color-eisblau); color: var(--color-sky); }
.app-icon-btn:active { transform: scale(0.92); }
.app-icon-btn--del:hover { background: #fef1f1; color: #e03a3a; }
.app-text-btn { font-size: 0.82rem; font-weight: 600; color: var(--color-sky); text-decoration: none; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.app-text-btn:hover { background: var(--color-eisblau); }

/* Tabelle auf dem Handy als Karten */
@media (max-width: 760px) {
  .app-table-wrap { background: none; border: none; overflow: visible; }
  .app-table thead { display: none; }
  .app-table, .app-table tbody { display: block; }
  .app-table tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
    background: #fff; border: 1px solid var(--app-line); border-radius: 14px;
    padding: 12px 14px; margin-bottom: 10px;
  }
  .app-table td { border: none; padding: 0; }
  .app-table td.app-main { grid-column: 1 / 2; grid-row: 1; }
  .app-table td.app-amount { grid-column: 2; grid-row: 1; text-align: right; }
  .app-table td.app-nr { grid-column: 1; grid-row: 2; font-size: 0.78rem; color: #8a98ab; font-weight: 600; }
  .app-table td[data-label="Datum"] { display: none; }
  .app-table td[data-label="Fällig"], .app-table td[data-label="Gültig bis"] { grid-column: 2; grid-row: 2; text-align: right; font-size: 0.78rem; color: #8a98ab; }
  .app-table td[data-label="Status"] { grid-column: 1; grid-row: 3; padding-top: 6px; }
  .app-table td:last-child { grid-column: 2; grid-row: 3; text-align: right; padding-top: 4px; }
  .app-main span { max-width: 60vw; }
}

/* Leerer Zustand */
.app-empty { background: #fff; border: 1px dashed #c5d0e0; border-radius: 16px; padding: 40px 24px; text-align: center; color: var(--color-stahlgrau); }
.app-empty__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--color-eisblau); color: var(--color-sky); display: flex; align-items: center; justify-content: center; }
.app-empty h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--color-navy); }
.app-empty p { margin: 0 auto 18px; max-width: 46ch; font-size: 0.9rem; line-height: 1.55; }
.app-empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Kundenadressen */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.app-card { background: #fff; border: 1px solid var(--app-line); border-radius: 14px; display: flex; flex-direction: column; transition: box-shadow 0.15s; }
.app-card:hover { box-shadow: 0 6px 20px rgba(26,46,87,0.06); }
.app-card__body { padding: 16px 16px 12px; flex: 1; }
.app-card h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; color: var(--color-navy); }
.app-card p { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.5; color: #4a5a70; }
.app-card__contact { margin-top: 0 !important; color: var(--color-stahlgrau) !important; }
.app-card__mail a { color: var(--color-sky); text-decoration: none; }
.app-card__note { font-size: 0.8rem !important; color: #8a98ab !important; font-style: italic; }
.app-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-top: 1px solid #eef2f7; font-size: 0.78rem; flex-wrap: wrap; }

/* Dialog (Sheet auf dem Handy) */
.app-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0; border: none; border-radius: 18px;
  box-shadow: 0 24px 64px rgba(10,20,40,0.3);
  animation: dialog-in 0.32s var(--ease-out-soft);
}
.app-dialog::backdrop { background: rgba(10,20,40,0.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in 0.25s ease-out; }
.app-dialog.is-closing { animation: dialog-out 0.18s ease-in forwards; }
.app-dialog__form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.app-dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 10px; }
.app-dialog__head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--color-navy); }
.app-dialog__close { width: 34px; height: 34px; border-radius: 50%; border: none; background: #eef2f7; font-size: 1.3rem; line-height: 1; color: #6b7a90; cursor: pointer; }
.app-dialog__body { padding: 8px 22px 12px; overflow-y: auto; }
.app-dialog__body .span-4 { grid-column: 1 / -1; }
.app-dialog__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid #eef2f7; background: #fafcff; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .app-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; animation-name: sheet-in; }
  .app-dialog.is-closing { animation-name: sheet-out; }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .app-dialog__foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* Einstellungen */
.app-subnav {
  position: sticky; top: 12px; z-index: 5;
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 5px; border-radius: 12px;
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--app-line);
  align-self: flex-start;
}
.app-subnav a { padding: 7px 12px; border-radius: 8px; font-size: 0.84rem; font-weight: 600; color: #4a5a70; text-decoration: none; }
.app-subnav a:hover { background: var(--color-eisblau); color: var(--color-navy); }
@media (max-width: 1079px) { .app-subnav { top: calc(var(--app-bar-h) + 8px); } }
.app-section { background: #fff; border: 1px solid var(--app-line); border-radius: 16px; scroll-margin-top: 80px; }
.app-section > header { padding: 20px 22px 4px; }
.app-section h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--color-navy); letter-spacing: -0.01em; }
.app-section > header p { margin: 4px 0 0; font-size: 0.86rem; color: var(--color-stahlgrau); line-height: 1.5; }
.app-section__body { padding: 16px 22px 22px; }
.app-section h3 { margin: 0 0 10px; font-size: 0.92rem; font-weight: 700; color: var(--color-navy); }
.app-section h3.mt { margin-top: 22px; }
.settings-texts, .settings-account { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-design { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] { width: 42px; height: 38px; padding: 2px; border: 1px solid #d8e2ef; border-radius: 8px; background: #fff; cursor: pointer; flex-shrink: 0; }
.color-row .color-text { font-family: var(--font-mono, monospace); }
@media (max-width: 860px) {
  .settings-texts, .settings-account, .settings-design { grid-template-columns: 1fr; }
}

/* Mini-Vorschau Briefkopf */
.settings-design__preview { position: sticky; top: 72px; }
.mini-doc { background: #e8edf4; border-radius: 12px; padding: 14px; }
.mini-doc__page { background: #fff; aspect-ratio: 210 / 297; border-radius: 3px; padding: 9% 9%; box-shadow: 0 4px 14px rgba(26,46,87,0.12); font-size: 7px; display: flex; flex-direction: column; gap: 8%; overflow: hidden; }
.mini-doc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mini-doc__head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-doc__head img { max-height: 18px; max-width: 70px; object-fit: contain; align-self: flex-start; margin-bottom: 2px; }
.mini-doc__head strong { font-size: 8px; }
.mini-doc__head span { color: #8a94a6; font-size: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-doc__head em { font-style: normal; font-weight: 800; font-size: 12px; }
.mini-doc__addr { display: flex; flex-direction: column; gap: 3px; width: 40%; }
.mini-doc__addr.is-right { margin-left: auto; }
.mini-doc__addr span, .mini-doc__rows span { display: block; height: 4px; border-radius: 2px; background: #e3e8ef; }
.mini-doc__addr span:nth-child(2) { width: 80%; } .mini-doc__addr span:nth-child(3) { width: 60%; }
.mini-doc__bar { height: 9px; border-radius: 1px; }
.mini-doc__rows { display: flex; flex-direction: column; gap: 5px; margin-top: -5%; }
.mini-doc__total { align-self: flex-end; font-weight: 800; font-size: 7px; border-top: 1.5px solid; padding-top: 3px; }

/* Speichern-Leiste */
.app-savebar {
  position: sticky; bottom: 16px; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; border-radius: 14px;
  background: rgba(26, 46, 87, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  color: #fff; font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 12px 32px rgba(26,46,87,0.3);
  animation: savebar-in 0.32s var(--ease-out-soft);
}
.app-savebar div { display: flex; gap: 8px; }
.app-savebar .btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2); }
@keyframes savebar-in { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 1079px) { .app-savebar { bottom: calc(var(--app-tabs-h) + 12px + env(safe-area-inset-bottom, 0px)); } }

/* Generator: Kundenadresse speichern */
.customer-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 0.82rem; color: var(--color-stahlgrau); }
.customer-save__ok { display: inline-flex; align-items: center; gap: 6px; color: #23865d; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .app-dialog, .app-dialog.is-closing, .app-dialog::backdrop, .app-savebar { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .app-nav, .app-bar, .app-subnav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .app-savebar { background: var(--color-navy); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ── Konto-Link unten links (öffnet #konto) ── */
.app-user { border-radius: 10px; text-decoration: none; transition: background 0.15s; padding: 8px; }
.app-user:hover { background: rgba(26,46,87,0.05); }
.app-user.is-active { background: var(--color-eisblau); }
.app-user__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.app-user__label { font-size: 0.86rem; font-weight: 700; color: var(--color-navy); }
.app-bar__user { text-decoration: none; }
.app-bar__user.is-active { box-shadow: 0 0 0 3px rgba(64,126,209,0.35); }
@media (max-width: 1279px) and (min-width: 1080px) { .app-user__text { display: none; } }

/* ── Zeitraum und Sortierung ── */
.app-toolbar--filters { margin-top: -6px; }
.app-filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-select { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: #8a98ab; }
.app-select select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 30px 0 12px; border-radius: 10px;
  border: 1px solid var(--app-line); color: var(--color-navy);
  font-family: var(--font-sans); font-size: 0.86rem; font-weight: 600; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
}
.app-select select:focus-visible { outline: none; border-color: var(--color-sky); box-shadow: 0 0 0 3px rgba(64,126,209,0.12); }
.app-range { display: inline-flex; align-items: center; gap: 6px; color: #8a98ab; }
.app-range .form-input { height: 36px; padding: 0 10px; width: auto; }
.app-th-sort {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: none; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
}
.app-th-sort span { font-size: 0.85em; opacity: 0.45; }
.app-th-sort:hover, .app-th-sort.is-on { color: var(--color-navy); }
.app-th-sort.is-on span { opacity: 1; color: var(--color-sky); }
.app-list-sum { margin: 2px 4px 0; font-size: 0.82rem; color: var(--color-stahlgrau); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .app-toolbar--filters { flex-direction: column; align-items: stretch; }
  .app-select { justify-content: space-between; }
  .app-select select { flex: 1; max-width: 70%; }
  .app-range { width: 100%; }
  .app-range .form-input { flex: 1; }
}

/* ── Konto-Seite ── */
.app-page--account { max-width: 760px; }
.account-id { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 20px !important; }
.account-id__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--color-navy); color: #fff; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.account-id > div { flex: 1; min-width: 0; }
.account-id__mail { font-weight: 700; color: var(--color-navy); overflow: hidden; text-overflow: ellipsis; }
.account-id .konto-note { margin: 2px 0 0; }
.account-form { max-width: 420px; }
.app-section--danger { border-color: #f3c4c4; }
.app-section--danger h2 { color: #b42318; }

/* ── Nummernkreise: Anzahl verbergen ── */
.numbering-privacy { padding: 12px 14px; border-radius: 12px; background: var(--app-bg); border: 1px solid var(--app-line); }
.numbering-privacy .konto-note { margin: 6px 0 0; }
