/* =========================================
   Angebotsheld – Stylesheet
   Modern, hochwertig, handwerklich
   ========================================= */

/* --- CSS-Variablen --- */
:root {
  /* Primär-Blau: 5 Abstufungen für Hierarchie */
  --primaer: #1e3a5f;
  --primaer-hell: #2a5a8f;
  --primaer-dunkel: #0f1f33;
  --primaer-100: #dbeafe;
  --primaer-50: #eff6ff;

  /* Akzent-Gold */
  --akzent: #f59e0b;
  --akzent-hover: #d97706;
  --akzent-hell: #fef3c7;

  /* Semantische Farben */
  --gruen: #059669;
  --gruen-hell: #d1fae5;
  --rot: #dc2626;
  --rot-hell: #fef2f2;

  /* Neutrale Grau-Skala */
  --grau-900: #111827;
  --grau-700: #374151;
  --grau-600: #4b5563;
  --grau-500: #6b7280;
  --grau-400: #9ca3af;
  --grau-300: #d1d5db;
  --grau-200: #e5e7eb;
  --grau-100: #f3f4f6;
  --grau-50: #f9fafb;
  --weiss: #ffffff;

  /* Schatten */
  --schatten-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --schatten: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --schatten-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --schatten-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);

  /* Radien */
  --radius: 10px;
  --radius-sm: 6px;
}

/* --- Reset & Basis --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf4;
  color: var(--grau-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* --- Kopfzeile --- */
/* --- Header (Notion/Linear-Style) --- */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--grau-900);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}

/* Farbiger Akzent-Streifen am oberen Rand */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primaer) 0%, var(--primaer-hell) 50%, var(--akzent) 100%);
}


.header__inhalt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  max-width: 1400px;
  margin: 0 auto;
}

.header__links {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.header__marke {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--grau-900);
  flex-shrink: 0;
}

.header__logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.header__logo img {
  width: 100%;
  height: 100%;
}

.header__titel {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--primaer);
}

/* Vertikaler Trenner */
.header__trenner {
  width: 1px;
  height: 20px;
  background: var(--grau-300);
  margin: 0 14px;
  flex-shrink: 0;
}

/* Workspace / Firma-Switcher */
.header__workspace {
  display: flex;
  align-items: center;
}

.header__firma {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--grau-700);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  text-align: left;
  max-width: 260px;
}

.header__firma > div {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.header__firma-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--grau-100);
  padding: 2px;
}

.header__firma:hover {
  background: rgba(30, 58, 95, 0.04);
  border-color: rgba(30, 58, 95, 0.1);
}

.header__firma-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primaer);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.header__firma-gewerk {
  font-size: 0.68rem;
  color: var(--grau-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.header__firma-chevron {
  color: var(--grau-500);
  flex-shrink: 0;
  margin-left: 2px;
}

/* Rechts: Badge + Avatar */
.header__rechts {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header__gast {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.header__user-menu-wrapper {
  position: relative;
}

/* Avatar-Button (Initialen-Circle) */
.header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primaer) 0%, var(--primaer-hell) 100%);
  color: var(--weiss);
  border: 2px solid rgba(30, 58, 95, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.2s;
  position: relative;
}

.header__avatar:hover {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
  transform: scale(1.05);
}

.header__avatar-initialen {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

.header__user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--weiss);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  border: none;
  z-index: 60;
  overflow: hidden;
  animation: einblenden 0.15s ease-out;
}

.header__user-dropdown-header {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__user-dropdown-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grau-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__user-dropdown-firma {
  font-size: 0.72rem;
  color: var(--grau-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Auth-Links (Anmelden/Registrieren) */
.auth-link {
  color: var(--grau-700);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.auth-link:hover {
  background: var(--grau-100);
  color: var(--grau-900);
}

.auth-link--akzent {
  background: var(--akzent);
  color: var(--grau-900);
  border-color: var(--akzent);
  font-weight: 600;
}

.auth-link--akzent:hover {
  background: var(--akzent-hover);
  border-color: var(--akzent-hover);
}

/* Freemium-Badge + Mobile-Menü: auf Desktop ausblenden */
.header__freemium-badge {
  display: none !important;
}

.header__mobil-badge-wrapper {
  display: none !important;
}

.header__mobil-rechts {
  display: none;
}

/* Upgrade-CTA (kombiniertes Badge mit eingebettetem Zähler) */
.header__upgrade-cta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--weiss);
  background: var(--primaer);
  padding: 4px 14px 4px 5px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
  animation: upgrade-nudge 4s ease-in-out infinite;
}

.header__upgrade-cta__zaehler {
  background: rgba(255, 255, 255, 0.2);
  color: var(--weiss);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  margin-right: 8px;
}

.header__upgrade-cta:hover {
  background: var(--primaer-hell);
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

@keyframes upgrade-nudge {
  0%, 92%, 100% { transform: scale(1); }
  95% { transform: scale(1.05); }
  97% { transform: scale(0.98); }
}

.header__upgrade-cta--mobil {
  font-size: 0.65rem;
  padding: 3px 10px 3px 4px;
}

.header__upgrade-cta--mobil .header__upgrade-cta__zaehler {
  font-size: 0.58rem;
  padding: 2px 6px;
  margin-right: 6px;
}

/* Kontingent-Badge */
.auth-badge {
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--grau-100);
  color: var(--grau-700);
  font-weight: 600;
  border: 1px solid var(--grau-200);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-badge:hover {
  background: var(--grau-200);
}

.auth-badge--pro {
  background: linear-gradient(135deg, var(--akzent) 0%, #fbbf24 100%);
  color: var(--grau-900);
  border-color: var(--akzent);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

.auth-badge--leer {
  background: var(--rot);
  border-color: var(--rot);
}

/* --- Verifizierungs-Notiz (schwebende Karte unten links) --- */
.verif-notiz {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  background: var(--weiss);
  border-radius: 14px;
  padding: 18px 20px;
  width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--grau-200);
  text-align: center;
  animation: verif-notiz-ein 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.verif-notiz--zentriert {
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%) scale(1.15);
  width: 240px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 200;
  animation: none !important;
  transition: none !important;
}
.verif-notiz--zentriert .verif-notiz__text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grau-900);
}
.verif-notiz__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 51, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 190;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.verif-notiz__backdrop--sichtbar {
  opacity: 1;
  pointer-events: auto;
}
@keyframes verif-notiz-ein {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.verif-notiz__close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--grau-300);
  cursor: pointer;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 50%;
  transition: all 0.2s;
}
.verif-notiz__close:hover {
  color: var(--grau-700);
  background: var(--grau-100);
}
.verif-notiz__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 1.1rem;
}
.verif-notiz__text {
  font-size: 0.78rem;
  color: var(--grau-500);
  line-height: 1.4;
  margin-bottom: 12px;
}
.verif-notiz__btn {
  display: block;
  width: 100%;
  padding: 7px 12px;
  background: var(--primaer);
  color: var(--weiss);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.verif-notiz__btn:hover {
  background: var(--primaer-hell);
}
.verif-notiz__btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.verif-notiz__status {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 8px;
}
.verif-notiz__status--erfolg {
  color: var(--gruen);
}
.verif-notiz__status--fehler {
  color: var(--rot);
}
@media (max-width: 640px) {
  .verif-notiz {
    bottom: 16px;
    left: 16px;
    width: 175px;
    padding: 14px 16px;
  }
}

/* --- Willkommens-Toast (nach E-Mail-Bestätigung) --- */
.willkommen-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 300;
  background: var(--weiss);
  border-radius: 14px;
  padding: 24px 28px;
  width: 260px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gruen-hell);
  text-align: center;
  animation: toast-zentriert-ein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toast-zentriert-ein {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.willkommen-toast__close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--grau-300);
  cursor: pointer;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 50%;
  transition: all 0.2s;
}
.willkommen-toast__close:hover {
  color: var(--grau-700);
  background: var(--grau-100);
}
.willkommen-toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gruen);
}
.willkommen-toast__titel {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grau-900);
  margin-bottom: 4px;
}
.willkommen-toast__text {
  font-size: 0.75rem;
  color: var(--grau-500);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .willkommen-toast {
    width: 220px;
    padding: 20px 22px;
  }
}

/* --- Tab-Navigation --- */
.tab-nav {
  background: var(--weiss);
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
  position: sticky;
  top: 56px;
  z-index: 40;
}

.tab-nav__inhalt {
  display: flex;
  gap: 0;
}

.tab-nav__icon {
  display: none;
}

.tab-nav__tab--mehr {
  display: none;
}

/* Bottom Sheet: auf Desktop versteckt, auf Mobile per .versteckt-Klasse gesteuert */
@media (min-width: 601px) {
  .bottom-sheet,
  .bottom-sheet__backdrop {
    display: none !important;
  }
}

.tab-nav__tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--grau-500);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tab-nav__tab:hover {
  color: var(--primaer);
  background: var(--primaer-50);
}

.tab-nav__tab--aktiv {
  color: var(--primaer);
  border-bottom-color: var(--akzent);
}

/* --- Seiten (Hauptbereiche) --- */
.hauptbereich {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  padding-bottom: 48px;
}

.seite {
  animation: einblenden 0.2s ease-out;
}

@keyframes einblenden {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.karte {
  background: var(--weiss);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(30, 58, 95, 0.06), 0 4px 12px rgba(30, 58, 95, 0.04);
  padding: 28px;
  margin-bottom: 24px;
  border: none;
}

.karte__titel {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primaer);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primaer-100);
}

/* --- Custom Autocomplete --- */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--weiss);
  border: 1px solid var(--grau-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--schatten-md);
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.autocomplete-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--grau-100);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item--aktiv {
  background: var(--grau-50);
}

.autocomplete-item--aktiv {
  background: #eef4fb;
}

.autocomplete-item__name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--grau-900);
}

.autocomplete-item__detail {
  font-size: 0.75rem;
  color: var(--grau-500);
}

/* --- Formular --- */
.formular-gruppe {
  margin-bottom: 20px;
}

.formular-gruppe label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grau-700);
  margin-bottom: 6px;
}

.formular-gruppe input,
.formular-gruppe select,
.formular-gruppe textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--grau-300);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--grau-900);
  background: var(--weiss);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 48px;
}

.formular-gruppe select {
  min-height: 48px;
}

/* Passwort-Toggle */
.pw-wrapper {
  position: relative;
}
.pw-wrapper input {
  padding-right: 44px;
}
.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--grau-400);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover {
  color: var(--grau-600);
}

.formular-gruppe input:focus,
.formular-gruppe select:focus,
.formular-gruppe textarea:focus {
  outline: none;
  border-color: var(--primaer-hell);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
  background: var(--primaer-50);
}

.formular-gruppe input::placeholder,
.formular-gruppe textarea::placeholder {
  color: var(--grau-500);
  font-size: 0.85rem;
}

/* Segment Toggle (Privat/Geschäftskunde) */
.segment-toggle {
  display: flex;
  background: var(--grau-100);
  border-radius: 10px;
  padding: 3px;
  border: none !important;
}

.segment-toggle__btn {
  flex: 1;
  padding: 11px 14px !important;
  font-size: 0.84rem !important;
  font-weight: 600;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  background: transparent !important;
  color: var(--grau-500) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.segment-toggle__btn--aktiv {
  background: var(--weiss) !important;
  color: var(--primaer) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

.formular-gruppe textarea {
  resize: vertical;
}

.formular-hinweis {
  display: block;
  font-size: 0.75rem;
  color: var(--grau-500);
  margin-top: 3px;
  line-height: 1.4;
}

.feldgruppe {
  border: 1.5px solid var(--grau-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--grau-50);
}

.feldgruppe legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primaer);
  padding: 0 8px;
}

/* Moderne Formular-Sektionen */
.formular-sektion {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--grau-100);
}

.formular-sektion:last-of-type {
  border-bottom: none;
  margin-bottom: 16px;
  padding-bottom: 0;
}

.formular-sektion__titel {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primaer-hell);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 14px;
  padding-bottom: 8px;
  padding-left: 10px;
  border-bottom: 1px solid var(--grau-200);
  border-left: 3px solid var(--primaer);
}

.formular-zeile {
  display: flex;
  gap: 16px;
}

.formular-zeile .formular-gruppe {
  flex: 1;
  min-width: 0;
}

.formular-gruppe--schmal {
  flex: 0 0 160px !important;
}

/* --- Stepper (Schrittanzeige) --- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  padding: 14px 28px;
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}

.stepper__schritt {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background 0.2s;
}

.stepper__schritt:hover {
  background: var(--primaer-50);
}

.stepper__nr {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--grau-100);
  color: var(--grau-400);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  border: 2px solid var(--grau-200);
}

.stepper__icon {
  opacity: 0.45;
  transition: opacity 0.35s;
}

.stepper__text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grau-400);
  transition: color 0.35s;
  white-space: nowrap;
}

.stepper__linie {
  flex: 1;
  height: 3px;
  background: var(--grau-200);
  margin: 0 8px;
  min-width: 40px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .stepper {
    padding: 8px 12px;
    margin-bottom: 16px;
    gap: 0;
  }

  .stepper__schritt {
    gap: 5px;
    padding: 8px 2px;
  }

  .stepper__nr {
    width: 30px;
    height: 30px;
  }

  .stepper__text {
    font-size: 0.72rem;
  }

  .stepper__linie {
    min-width: 16px;
    margin: 0 3px;
  }

  .stepper__icon {
    width: 12px;
    height: 12px;
  }
}

.stepper__linie-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primaer), var(--akzent));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper__linie--aktiv .stepper__linie-fill {
  width: 100%;
}

.stepper__schritt--aktiv .stepper__nr {
  background: var(--primaer);
  color: var(--weiss);
  border-color: var(--primaer);
  box-shadow: 0 3px 12px rgba(30, 58, 95, 0.3);
  transform: scale(1.08);
}

.stepper__schritt--aktiv .stepper__icon {
  opacity: 1;
}

.stepper__schritt--aktiv .stepper__text {
  color: var(--primaer);
  font-weight: 700;
}

.stepper__schritt--erledigt .stepper__nr {
  background: var(--primaer);
  color: var(--weiss);
  border-color: var(--gruen);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.stepper__schritt--erledigt .stepper__icon {
  opacity: 1;
}

.stepper__schritt--erledigt .stepper__text {
  color: var(--primaer);
}

/* --- Formular Steps --- */
.formular-step {
  animation: stepEinblenden 0.3s ease-out;
}

@keyframes stepEinblenden {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.btn--step-weiter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--primaer);
  color: var(--weiss);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.btn--step-weiter:active {
  transform: scale(0.98);
}

.btn--step-zurueck {
  display: none;
}

.btn--zurueck-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  background: none;
  color: var(--grau-500);
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.btn--zurueck-link:hover {
  color: var(--primaer);
}

.btn--zurueck-link:active {
  color: var(--primaer-dunkel);
}

/* --- KI-Textarea --- */
.ki-textarea-wrapper {
  position: relative;
  border-radius: var(--radius);
}

.ki-textarea-wrapper::before {
  display: none;
}

.ki-textarea-wrapper textarea {
  padding-bottom: 36px;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s;
}

.ki-textarea-wrapper:focus-within textarea {
  border-color: var(--akzent);
  box-shadow: 0 0 0 1px var(--akzent);
}

.ki-textarea-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primaer-hell);
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.08), rgba(245, 158, 11, 0.08));
  padding: 4px 10px;
  border-radius: 10px;
  letter-spacing: 0.03em;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s;
}

.ki-textarea-badge__icon {
  color: var(--akzent);
  animation: kiBadgePuls 2s ease-in-out infinite;
}

.ki-textarea-wrapper:focus-within .ki-textarea-badge {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.12), rgba(245, 158, 11, 0.15));
  color: var(--primaer);
}

@keyframes kiBadgePuls {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

.label-optional {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--grau-400);
  margin-left: 4px;
}

/* --- Generieren-Button --- */
.btn--generieren {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--primaer);
  color: var(--weiss);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.25);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn--generieren__shimmer,
.btn--generieren__sparkles {
  display: none;
}

.btn--generieren:hover {
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.35);
  transform: translateY(-1px);
}

.btn--generieren:active {
  transform: translateY(0);
}

.btn--generieren:disabled {
  background: var(--grau-300);
  color: var(--grau-500);
  box-shadow: none;
  transform: none;
}

/* Blitz und Text in Orange */
.btn--generieren__blitz {
  position: relative;
  z-index: 1;
  margin-right: 8px;
  color: var(--akzent);
  filter: none;
  animation: none;
}

.btn--generieren .btn__text {
  color: var(--akzent);
}

/* --- Stundensatz Toggle --- */
.btn--stundensatz-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--grau-600);
  background: var(--grau-50);
  border: 1.5px dashed var(--grau-300);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
}

.btn--stundensatz-toggle:hover {
  border-color: var(--primaer);
  color: var(--primaer);
  background: rgba(30, 58, 95, 0.03);
}

.btn--stundensatz-toggle.aktiv {
  color: var(--primaer);
  border-color: var(--primaer);
  border-style: solid;
  background: rgba(30, 58, 95, 0.04);
}

.btn--stundensatz-toggle svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn--stundensatz-toggle.aktiv svg {
  transform: rotate(45deg);
}

.stundensatz-feld {
  animation: stundensatzEin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--primaer-50);
  border-radius: 12px;
  border: 1px solid var(--primaer-100);
}

@keyframes stundensatzEin {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 120px; }
}

.stundensatz-hinweis {
  display: block;
  font-size: 0.7rem;
  color: var(--grau-400);
  margin-top: 4px;
}

.formular-gruppe--stundensatz-optional {
  margin-top: -4px;
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primaer {
  background: var(--primaer);
  color: var(--weiss);
  width: 100%;
  box-shadow: var(--schatten);
}

.btn--primaer:hover {
  background: var(--primaer-hell);
  box-shadow: var(--schatten-md);
}

.btn--primaer:disabled {
  background: var(--grau-300);
  color: var(--grau-500);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--akzent {
  background: var(--akzent);
  color: var(--grau-900);
  font-weight: 700;
}

.btn--akzent:hover {
  background: var(--akzent-hover);
}

.btn--email {
  background: var(--gruen);
  color: var(--weiss);
  font-weight: 700;
}

.btn--email:hover {
  background: #047857;
}

.btn--sekundaer {
  background: var(--grau-100);
  color: var(--grau-700);
  border: 1.5px solid var(--grau-300);
}

.btn--sekundaer:hover {
  background: var(--grau-200);
  border-color: var(--grau-300);
}

.btn--ghost {
  background: transparent;
  color: var(--grau-500);
  border: none;
  font-size: 0.82rem;
}
.btn--ghost:hover {
  color: var(--grau-700);
  background: var(--grau-100);
}

/* Adress-Warnung im Vorschau */
.vorschau__adress-warnung {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--grau-900);
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.vorschau__adress-warnung:hover {
  background: #fde68a;
}

/* Tooltip-Karten für Erstbenutzer */
.vorschau__tipp {
  position: relative;
  background: var(--primaer);
  color: var(--weiss);
  font-size: 0.75rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  line-height: 1.4;
  animation: tipp-pulse 2s ease-in-out infinite;
  cursor: pointer;
}
.vorschau__tipp::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: var(--primaer);
  transform: rotate(45deg);
}
@keyframes tipp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.btn__laden {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn__laden::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--weiss);
  border-radius: 50%;
  animation: drehen 0.7s linear infinite;
}

@keyframes drehen {
  to { transform: rotate(360deg); }
}

/* --- Generierungs-Overlay --- */
.generierung-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.generierung-overlay__blitz {
  font-size: 3rem;
  animation: blitz-puls 1.2s ease-in-out infinite;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 12px rgba(30, 58, 95, 0.3));
}

@keyframes blitz-puls {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
}

.generierung-overlay__text {
  font-size: 1rem;
  color: var(--primaer);
  font-weight: 600;
  margin-bottom: 20px;
  transition: opacity 0.3s;
}

.generierung-overlay__fortschritt {
  width: 200px;
  height: 4px;
  background: var(--grau-200);
  border-radius: 2px;
  overflow: hidden;
}

.generierung-overlay__balken {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primaer), var(--primaer-hell));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* --- Success-Toast --- */
.success-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--gruen);
  color: var(--weiss);
  padding: 12px 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 250;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.success-toast.sichtbar {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.success-toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Aktionsbereich --- */
.aktionen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.aktionen__gruppe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.aktionen__zurueck {
  margin-top: 4px;
  text-align: center;
}

.aktionen .btn--primaer {
  width: auto;
}

/* --- Hinweis-Banner --- */
.hinweis-banner {
  background: linear-gradient(135deg, #fffbf0, #fef6e4);
  border: 1px solid #f0e4c8;
  border-left: 3px solid var(--akzent);
  padding: 11px 14px;
  font-size: 0.8rem;
  color: var(--grau-700);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
}

.hinweis-banner__icon {
  flex-shrink: 0;
  color: var(--akzent-hover);
}

/* --- Fehler-Banner --- */
.fehler-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rot);
  color: var(--weiss);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--schatten-lg);
  z-index: 100;
  max-width: 90%;
}

.fehler-schliessen {
  background: none;
  border: none;
  color: var(--weiss);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.8;
}

.fehler-schliessen:hover {
  opacity: 1;
}

/* --- Angebots-Vorschau --- */
.angebots-vorschau {
  font-size: 0.88rem;
}

.vorschau__meta {
  background: var(--primaer-50);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--grau-700);
  border: 1px solid var(--primaer-100);
}

.vorschau__kopf {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 14px;
}

.vorschau__firma,
.vorschau__kunde {
  flex: 1;
  min-width: 180px;
}

.vorschau__firma h3,
.vorschau__kunde h3 {
  font-size: 0.72rem;
  color: var(--grau-500);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 5px;
  font-weight: 600;
}

.vorschau__anschreiben {
  background: linear-gradient(135deg, var(--primaer-50), #eef2ff);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--grau-700);
  font-style: italic;
  border: 1px solid var(--primaer-100);
  line-height: 1.7;
  font-size: 0.85rem;
}

/* Positionstabelle */
.positionen-tabelle {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--grau-200);
}

.positionen-tabelle th {
  background: var(--primaer);
  color: var(--weiss);
  padding: 9px 10px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.positionen-tabelle th:nth-child(1) { width: 44px; }
.positionen-tabelle th:nth-child(2) { width: auto; }
.positionen-tabelle th:nth-child(3) { width: 80px; }
.positionen-tabelle th:nth-child(4) { width: 90px; }
.positionen-tabelle th:nth-child(5) { width: 90px; }

.positionen-tabelle th:nth-child(n+3) {
  text-align: right;
}

.positionen-tabelle td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--grau-200);
  font-size: 0.83rem;
}

.positionen-tabelle td:nth-child(n+3) {
  text-align: right;
  white-space: nowrap;
}

.positionen-tabelle tbody tr:nth-child(even) {
  background: var(--grau-50);
}

.positionen-tabelle tbody tr:hover {
  background: #eef2ff;
}

/* Klickbare Positionen */
.pos-klickbar {
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.positionen-tabelle .pos-klickbar:hover {
  background: #dbeafe;
}

.pos-mobil-karte.pos-klickbar:hover {
  box-shadow: var(--schatten);
  border-color: var(--primaer-hell);
}

/* Klickbare Vorschau-Felder (Inline-Edit) */
.vorschau__feld--klickbar {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s, box-shadow 0.15s;
  position: relative;
}

.vorschau__feld--klickbar:hover {
  background: rgba(42, 90, 143, 0.04);
  box-shadow: inset 0 0 0 1.5px rgba(42, 90, 143, 0.15);
}

.vorschau__feld--klickbar:hover::after {
  content: '✎';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.7rem;
  color: var(--primaer-hell);
  opacity: 0.7;
}

.vorschau__feld--aktiv {
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--primaer-hell), 0 2px 8px rgba(30, 58, 95, 0.08);
  padding: 14px;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.vorschau__feld--aktiv .edit-feld,
.vorschau__feld--aktiv label,
.vorschau__feld--aktiv h3 {
  width: 100%;
  align-self: stretch;
  margin-bottom: 10px;
}

.inline-edit-fertig,
.pos-karte__fertig {
  background: var(--primaer);
  color: var(--weiss);
  border: none;
  border-radius: 99px;
  padding: 6px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
  letter-spacing: 0.01em;
  margin-top: 8px;
}

.inline-edit-fertig::before,
.pos-karte__fertig::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.inline-edit-fertig:hover,
.pos-karte__fertig:hover {
  background: var(--primaer-hell);
  box-shadow: 0 3px 12px rgba(30, 58, 95, 0.3);
  transform: translateY(-1px);
}

.vorschau__kontakt {
  font-size: 0.78rem;
  color: var(--grau-500);
  margin-top: 4px;
}

.vorschau__info-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border: 1px solid rgba(42, 90, 143, 0.15);
  border-left: 3px solid var(--primaer);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.vorschau__info-banner:hover {
  box-shadow: 0 4px 16px rgba(42, 90, 143, 0.12);
  transform: translateY(-1px);
}
.vorschau__info-banner-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.vorschau__info-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vorschau__info-banner-text strong {
  font-size: 0.85rem;
  color: var(--grau-900);
}
.vorschau__info-banner-text span {
  font-size: 0.78rem;
  color: var(--grau-500);
  line-height: 1.4;
}
.vorschau__info-banner-pfeil {
  font-size: 1.4rem;
  color: var(--primaer);
  font-weight: 300;
  flex-shrink: 0;
}

/* Klickbare Firma/Kunde Blöcke brauchen padding für hover */
.vorschau__firma.vorschau__feld--klickbar,
.vorschau__kunde.vorschau__feld--klickbar {
  padding: 8px;
  margin: -8px;
  margin-bottom: 0;
}

.vorschau__anschreiben.vorschau__feld--klickbar {
  padding: 14px;
}

.vorschau__hinweise.vorschau__feld--klickbar {
  padding: 10px 14px;
}

/* Aktive (editierte) Positionskarte */
.pos-karte--aktiv {
  border-color: var(--primaer-hell);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
  background: var(--weiss);
}

/* Read-only Karte im Inline-Edit-Modus */
.pos-karte--lesbar {
  background: var(--grau-50);
  border: 1px solid var(--grau-200);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.pos-karte--lesbar:hover {
  box-shadow: var(--schatten);
  border-color: var(--primaer-hell);
}

/* pos-karte__fertig → vereinheitlicht mit .inline-edit-fertig oben */

/* Entwurf-Hinweis in Rechnungsaktionen */
.vorschau-summary__entwurf {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}

.entwurf-hinweis {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fffbf0, #fef6e4);
  border: 1px solid #f0e4c8;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--grau-700);
  line-height: 1.45;
}

.entwurf-hinweis svg {
  flex-shrink: 0;
  color: var(--akzent-hover);
}

/* Mobile Positionskarten */
.positionen-mobil {
  display: none;
}

.pos-mobil-karte {
  background: var(--weiss);
  border: 1px solid var(--grau-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.pos-mobil-karte:nth-child(even) {
  background: var(--grau-50);
}

.pos-mobil-karte__kopf {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.pos-mobil-karte__nr {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primaer);
  background: rgba(30, 58, 95, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.pos-mobil-karte__gp {
  font-weight: 700;
  color: var(--primaer);
  font-size: 0.88rem;
  white-space: nowrap;
}

.pos-mobil-karte__beschreibung {
  font-size: 0.82rem;
  color: var(--grau-700);
  margin-bottom: 4px;
  line-height: 1.5;
}

.pos-mobil-karte__details {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--grau-500);
}

.pos-mobil-karte__details span {
  white-space: nowrap;
}

/* --- Editierbare Felder --- */
.edit-feld {
  width: 100%;
  padding: 7px 9px;
  border: 1.5px solid var(--grau-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--grau-900);
  background: var(--weiss);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-feld:focus {
  outline: none;
  border-color: var(--primaer-hell);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.edit-feld--name {
  font-weight: 600;
  font-size: 0.92rem;
}

.edit-feld--anschreiben {
  font-style: italic;
  line-height: 1.7;
  resize: vertical;
  min-height: 70px;
}

/* --- Positionskarten --- */
.positionen-titel {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primaer);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primaer);
}

.pos-karte {
  background: var(--primaer-50);
  border: 1px solid var(--primaer-100);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.pos-karte:hover {
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}

.pos-karte__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pos-karte__nr {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primaer);
  background: var(--primaer-100);
  padding: 2px 9px;
  border-radius: 12px;
}

.pos-karte__loeschen {
  background: none;
  border: none;
  color: var(--grau-500);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  line-height: 1;
}

.pos-karte__loeschen:hover {
  background: var(--rot-hell);
  color: var(--rot);
}

.pos-karte__feld {
  margin-bottom: 8px;
}

.pos-karte__feld:last-child {
  margin-bottom: 0;
}

.pos-karte__feld label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--grau-500);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 3px;
}

.pos-karte__zeile {
  display: flex;
  gap: 8px;
}

.pos-karte__feld--klein {
  flex: 1;
  min-width: 0;
}

/* Position hinzufügen */
.btn--position-add {
  width: 100%;
  padding: 10px;
  background: var(--weiss);
  border: 2px dashed var(--grau-300);
  border-radius: var(--radius);
  color: var(--grau-500);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-bottom: 16px;
}

.btn--position-add:hover {
  border-color: var(--primaer-hell);
  color: var(--primaer);
  background: rgba(30, 58, 95, 0.03);
}

/* Summenbereich */
.summen {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 14px;
}

.summen__zeile {
  display: flex;
  justify-content: space-between;
  width: 240px;
  font-size: 0.88rem;
  color: var(--grau-500);
}

/* MwSt-Toggle */
.mwst-toggle {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 4px;
}
.mwst-toggle__btn {
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--grau-300);
  border-radius: 99px;
  background: var(--weiss);
  color: var(--grau-500);
  cursor: pointer;
  transition: all 0.15s;
}
.mwst-toggle__btn:hover {
  border-color: var(--primaer);
  color: var(--primaer);
}
.mwst-toggle__btn--aktiv {
  background: var(--primaer);
  color: #fff;
  border-color: var(--primaer);
}

.summen__zeile--brutto {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primaer);
  border-top: 2px solid var(--primaer);
  padding-top: 6px;
  margin-top: 4px;
}

.summen__editierbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.summen__input {
  width: 100px;
  padding: 3px 6px;
  border: 1.5px solid var(--grau-300);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  text-align: right;
  color: var(--grau-900);
  background: var(--weiss);
  transition: border-color 0.15s;
}

.summen__input:focus {
  outline: none;
  border-color: var(--primaer-hell);
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.summen__input--brutto {
  font-weight: 700;
  color: var(--primaer);
  font-size: 1rem;
  width: 120px;
}

.summen__klickbar {
  cursor: pointer;
  border-bottom: 1px dashed var(--grau-300);
  transition: all 0.15s;
}

.summen__klickbar:hover {
  color: var(--primaer);
  border-bottom-color: var(--primaer);
}

/* --- Rabatt --- */
.summen__zeile--rabatt {
  color: var(--grau-700, #374151);
}

.summen__rabatt-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summen__rabatt-betrag {
  color: var(--grau-700, #374151);
  font-weight: 600;
}

.rabatt-entfernen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.1);
  color: var(--grau-700, #374151);
  font-size: 0.85rem;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s;
}

.rabatt-entfernen:hover {
  background: rgba(192, 57, 43, 0.2);
}

.summen__rabatt-hinzufuegen {
  margin-top: 4px;
  padding-top: 4px;
}

.rabatt-link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--primaer);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(27, 42, 74, 0.06);
  transition: all 0.15s;
  border: 1px solid transparent;
}

.rabatt-link:hover {
  background: rgba(27, 42, 74, 0.12);
  border-color: var(--primaer);
}

.rabatt-dialog {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--grau-50);
  border: 1px solid var(--grau-200);
  border-radius: var(--radius-sm);
}

.rabatt-dialog__inhalt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rabatt-dialog__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grau-600);
  text-transform: none;
  letter-spacing: 0;
}

.rabatt-dialog__zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rabatt-dialog__select {
  padding: 6px 10px;
  border: 1px solid var(--grau-300);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #fff;
  width: 56px;
}

.rabatt-dialog__input {
  padding: 6px 10px;
  border: 1px solid var(--grau-300);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  width: 80px;
}

.rabatt-dialog__input:focus,
.rabatt-dialog__select:focus {
  outline: none;
  border-color: var(--primaer);
  box-shadow: 0 0 0 2px rgba(27, 42, 74, 0.1);
}

.rabatt-dialog__aktionen {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.vorschau__hinweise {
  font-size: 0.8rem;
  color: var(--grau-500);
  padding: 10px 14px;
  background: var(--grau-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--grau-200);
}

/* --- Historie --- */
.historie-leer {
  text-align: center;
  color: var(--grau-500);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* --- Swipe-Container für Listeneinträge --- */
.swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: -8px;
}

.swipe-container:last-child {
  margin-bottom: 0;
}

.swipe-action {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--weiss);
  font-size: 0.72rem;
  font-weight: 600;
  flex-direction: column;
  gap: 4px;
}

.swipe-action--left {
  right: 0;
  background: #e53e3e;
}

.swipe-action--right {
  left: 0;
  background: var(--primaer);
}

.swipe-action svg {
  width: 20px;
  height: 20px;
}

.historie-eintrag {
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  background: var(--weiss);
  box-shadow: 0 1px 4px rgba(30, 58, 95, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.historie-eintrag--klickbar {
  cursor: pointer;
}

.historie-eintrag--klickbar:hover {
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.1);
  transform: translateY(-1px);
}

.historie-eintrag__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.historie-eintrag__nr {
  font-weight: 700;
  color: var(--primaer);
  font-size: 0.88rem;
}

.historie-eintrag__rechts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.historie-eintrag__datum {
  font-size: 0.78rem;
  color: var(--grau-500);
}

.historie-loeschen-btn {
  background: none;
  border: none;
  color: var(--grau-400);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.historie-loeschen-btn:hover {
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.08);
}

.historie-eintrag__details {
  display: flex;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--grau-700);
  flex-wrap: wrap;
}

.historie-eintrag__betrag {
  font-weight: 600;
  color: var(--grau-900);
  width: 100%;
}

/* --- Auth-Seiten --- */
.auth-karte {
  max-width: 440px;
  margin: 0 auto;
}

.auth-karte .btn--primaer {
  margin-top: 8px;
}

.auth-link-container {
  text-align: center;
  margin-top: 16px;
}

.auth-link-container a,
.auth-link a {
  color: var(--primaer-hell);
  font-weight: 500;
}

.auth-link-container a:hover,
.auth-link a:hover {
  color: var(--primaer);
}

.auth-fehler {
  background: var(--rot-hell);
  color: var(--rot);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
}

.auth-erfolg {
  background: var(--gruen-hell);
  color: var(--gruen);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 14px;
  border: 1px solid #a7f3d0;
}

.auth-info {
  background: var(--gruen-hell);
  color: #065f46;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid #a7f3d0;
}

.auth-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--grau-500);
}

/* --- Overlay --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 31, 51, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.overlay__inhalt {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--schatten-lg);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.overlay__inhalt h2 {
  color: var(--primaer);
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.overlay__inhalt p {
  color: var(--grau-500);
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.overlay__aktionen {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.overlay__aktionen .btn {
  flex: 1;
  text-decoration: none;
  text-align: center;
}

.overlay__schliessen {
  background: none;
  border: none;
  color: var(--grau-500);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 6px;
}

.overlay__schliessen:hover {
  color: var(--grau-700);
}

.btn--gefahr {
  background: #fff5f5;
  color: #c53030;
  border: 1.5px solid #feb2b2;
}

.btn--gefahr:hover {
  background: #fed7d7;
  border-color: #fc8181;
}

/* --- Upgrade-Box --- */
.overlay__inhalt--breit {
  max-width: 680px;
}

.upgrade-tarife {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

/* Upgrade-Tarif Tabs (Mobile) */
.upgrade-tabs {
  display: none;
  background: var(--grau-100);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
}

.upgrade-tabs button {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grau-500);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.upgrade-tabs button.aktiv {
  background: var(--weiss);
  color: var(--primaer);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .upgrade-tarife {
    grid-template-columns: 1fr;
  }

  .upgrade-tabs {
    display: flex;
  }

  .upgrade-tarife {
    gap: 0;
  }

  .upgrade-box {
    padding: 20px;
  }

  .upgrade-box.versteckt-mobil {
    display: none;
  }

  .upgrade-preis {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .upgrade-empfohlen-badge {
    top: -8px;
    font-size: 0.6rem;
  }

  .overlay__inhalt--breit {
    padding: 24px 20px;
  }
}

.upgrade-box {
  background: linear-gradient(135deg, var(--grau-50), #eef2ff);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--grau-200);
  position: relative;
}

.upgrade-box--empfohlen {
  border: 2px solid var(--akzent);
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.upgrade-empfohlen-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--akzent);
  color: var(--grau-900);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.upgrade-box h3 {
  color: var(--primaer);
  margin-bottom: 6px;
}

.upgrade-preis {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primaer);
  margin-bottom: 14px;
}

.upgrade-preis span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--grau-500);
}

.upgrade-features {
  list-style: none;
  margin-bottom: 14px;
  text-align: left;
}

.upgrade-features li {
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--grau-700);
}

.upgrade-features li::before {
  content: '\2713';
  color: var(--gruen);
  font-weight: 700;
  margin-right: 8px;
}

.upgrade-hinweis {
  font-size: 0.8rem;
  color: var(--grau-500);
  font-style: italic;
}

/* Upgrade-Overlay: Tarif-Karten (identisch mit Checkout-Seite) */
.tarif-auswahl__zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
  margin-bottom: 20px;
}

.tarif-auswahl__zurueck:hover {
  color: var(--weiss);
}

.tarif-auswahl__titel {
  color: var(--weiss);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.tarif-auswahl__untertitel {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-bottom: 32px;
}

.tarif-karten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tarif-karte {
  background: var(--weiss);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 3px solid transparent;
}

.tarif-karte:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.tarif-karte--empfohlen {
  border-color: var(--akzent);
}

.tarif-karte__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--akzent);
  color: var(--primaer-dunkel);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tarif-karte__name {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primaer);
  margin-bottom: 8px;
}

.tarif-karte__preis {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primaer-dunkel);
  line-height: 1.1;
  margin-bottom: 4px;
}

.tarif-karte__preis span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--grau-500);
}

.tarif-karte__mwst {
  font-size: 0.78rem;
  color: var(--grau-400);
  margin-bottom: 24px;
}

.tarif-karte__features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tarif-karte__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--grau-700);
}

.tarif-karte__features li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--primaer);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 4.5L6.5 11L3 7.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.tarif-karte__btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.tarif-karte__btn--starter {
  background: var(--primaer);
  color: var(--weiss);
}

.tarif-karte__btn--starter:hover {
  background: var(--primaer-dunkel);
}

.tarif-karte__btn--profi {
  background: var(--akzent);
  color: var(--primaer-dunkel);
}

.tarif-karte__btn--profi:hover {
  background: #ffc940;
}

.tarif-auswahl__hinweis {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.83rem;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .tarif-karten {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tarif-karte {
    padding: 28px 24px;
  }

  .tarif-karte__preis {
    font-size: 2.2rem;
  }
}

/* --- E-Mail-Status --- */
.email-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 10px;
}

.email-status--erfolg {
  background: var(--gruen-hell);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.email-status--fehler {
  background: var(--rot-hell);
  color: var(--rot);
  border: 1px solid #fecaca;
}

/* --- Firma-Anzeige im Formular --- */
.firma-anzeige {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--grau-50), #eef2ff);
  border: 1px solid var(--grau-200);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.firma-anzeige__logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--weiss);
  border: 1px solid var(--grau-200);
}

.firma-anzeige__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.firma-anzeige__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primaer);
}

.firma-anzeige__gewerk {
  font-size: 0.75rem;
  color: var(--grau-500);
}

.firma-anzeige__aendern {
  background: none;
  border: none;
  color: var(--primaer-hell);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.firma-anzeige__aendern:hover {
  background: rgba(30, 58, 95, 0.08);
  color: var(--primaer);
}

/* --- Onboarding-Banner --- */
/* --- Onboarding (mehrstufig) --- */
.onboarding {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--weiss);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: onboardingEinblenden 0.4s ease;
}

@keyframes onboardingEinblenden {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding__fortschritt {
  padding: 20px 28px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.onboarding__fortschritt-bar {
  flex: 1;
  height: 5px;
  background: var(--grau-100);
  border-radius: 99px;
  overflow: hidden;
}

.onboarding__fortschritt-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--akzent), #f59e0b);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding__fortschritt-text {
  font-size: 0.72rem;
  color: var(--grau-400);
  font-weight: 500;
  white-space: nowrap;
}

.onboarding__schritt {
  display: none;
  padding: 28px 28px 32px;
}

.onboarding__schritt--aktiv {
  display: block;
  animation: onboardingSchrittEin 0.35s ease;
}

@keyframes onboardingSchrittEin {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.onboarding__hero {
  text-align: center;
  margin-bottom: 24px;
}

.onboarding__hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #fff8ee, #fff0d4);
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

.onboarding__hero-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}

.onboarding__hero-emoji--success {
  animation: onboardingBounce 0.6s ease;
}

@keyframes onboardingBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.onboarding__titel {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--grau-900);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.onboarding__untertitel {
  font-size: 0.88rem;
  color: var(--grau-500);
  line-height: 1.6;
  margin: 0;
}

/* Features-Liste */
.onboarding__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.onboarding__feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--grau-50);
  border-radius: 12px;
  border: 1px solid var(--grau-100);
  transition: border-color 0.2s;
}

.onboarding__feature:hover {
  border-color: var(--grau-200);
}

.onboarding__feature-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--weiss);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.onboarding__feature strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--grau-900);
  margin-bottom: 1px;
}

.onboarding__feature span {
  font-size: 0.78rem;
  color: var(--grau-500);
  line-height: 1.4;
}

/* Formular */
.onboarding__form {
  text-align: left;
}

.onboarding__feld {
  margin-bottom: 16px;
}

.onboarding__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grau-700);
  margin-bottom: 6px;
}

.onboarding__input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--grau-200);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--weiss);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.onboarding__input:focus {
  outline: none;
  border-color: var(--primaer);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.onboarding__textarea {
  resize: vertical;
  min-height: 60px;
}

.onboarding__hint {
  display: block;
  font-size: 0.75rem;
  color: var(--grau-400);
  margin-top: 5px;
  line-height: 1.4;
}

.onboarding__btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  margin-top: 8px;
  transition: all 0.2s;
}

.onboarding__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.2);
}

.onboarding__btn--gross {
  padding: 16px;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.onboarding__skip {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--grau-400);
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.onboarding__skip:hover {
  color: var(--grau-600);
}

/* Checkliste */
.onboarding__checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.onboarding__check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #166534;
}

.onboarding__check-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #22c55e;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.onboarding__check--skip {
  background: var(--grau-50);
  border-color: var(--grau-200);
  color: var(--grau-500);
}

.onboarding__check--skip .onboarding__check-icon {
  background: var(--grau-300);
}

/* Tipp-Box */
.onboarding__tipps {
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffbf0, #fef6e4);
  border: 1px solid #fde68a;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--grau-700);
  line-height: 1.6;
  margin-bottom: 20px;
}

.onboarding__tipps strong {
  color: var(--akzent-dunkel, #b45309);
}

/* Mobile Anpassungen */
@media (max-width: 600px) {
  .onboarding {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }
  .onboarding__schritt {
    flex: 1;
    display: none;
    flex-direction: column;
  }
  .onboarding__schritt--aktiv {
    display: flex;
  }
  .onboarding__form {
    margin-top: auto;
  }
  .onboarding__hero {
    padding-top: 12px;
  }
}

/* --- Gewerk-Erkennung Card --- */
.gewerk-card {
  padding: 8px 0;
}
.gewerk-card__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.gewerk-card__titel {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--grau-900);
  margin-bottom: 8px;
}
.gewerk-card__text {
  font-size: 0.9rem;
  color: var(--grau-500);
  margin-bottom: 16px;
  line-height: 1.5;
}
.gewerk-card__vorschlag {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primaer), var(--primaer-hell));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.gewerk-card__frage {
  font-size: 0.95rem;
  color: var(--grau-600);
  margin-bottom: 16px;
}
.gewerk-card__buttons {
  display: flex;
  gap: 10px;
}
.gewerk-card__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}
.gewerk-card__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--grau-200);
  border-top-color: var(--primaer);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Gewerk Manuell-Auswahl --- */
.gewerk-manuell {
  margin-top: 20px;
  padding: 20px;
  background: var(--grau-50);
  border-radius: 14px;
  border: 1px solid var(--grau-200);
  text-align: left;
  animation: gewerkSlideUp 0.3s ease;
}
@keyframes gewerkSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.gewerk-manuell__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.gewerk-manuell__icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--grau-200);
  flex-shrink: 0;
}
.gewerk-manuell__titel {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grau-900);
  margin: 0;
}
.gewerk-manuell__hint {
  font-size: 0.8rem;
  color: var(--grau-400);
  margin: 2px 0 0;
}
.gewerk-manuell__input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--grau-200);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.gewerk-manuell__input:focus {
  outline: none;
  border-color: var(--primaer);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}
.gewerk-manuell__btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* --- Onboarding Banner (Schritt 2: Firma) --- */
.onboarding-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--grau-50);
  border: 1px solid var(--grau-200);
  border-radius: var(--radius);
  margin-bottom: 16px;
  text-align: left;
}

.onboarding-banner__icon {
  flex-shrink: 0;
  line-height: 1;
}

.onboarding-banner strong {
  display: block;
  font-size: 0.92rem;
  color: var(--grau-900);
  margin-bottom: 4px;
}

.onboarding-banner p {
  font-size: 0.82rem;
  color: var(--grau-500);
  margin: 0;
  line-height: 1.5;
}

/* --- Profil-Overlay --- */
.overlay__inhalt--profil {
  max-width: 600px;
}

.firmen-eintrag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--grau-200);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: var(--weiss);
  transition: all 0.2s;
  cursor: pointer;
}

.firmen-eintrag:hover {
  border-color: var(--primaer-hell);
  background: var(--primaer-50);
  box-shadow: var(--schatten-sm);
}

.firmen-eintrag--aktiv {
  border-color: var(--primaer);
  border-left: 3px solid var(--primaer);
  background: rgba(30, 58, 95, 0.08);
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1), 0 2px 8px rgba(30, 58, 95, 0.06);
}

.firmen-eintrag__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.firmen-eintrag__name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--grau-900);
}

.firmen-eintrag__details {
  font-size: 0.72rem;
  color: var(--grau-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firmen-eintrag__aktionen {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.firmen-eintrag__btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: all 0.2s;
}

.firmen-eintrag__btn--edit {
  color: var(--primaer-hell);
}

.firmen-eintrag__btn--edit:hover {
  background: rgba(30, 58, 95, 0.08);
}

.firmen-eintrag__btn--del {
  color: var(--grau-500);
}

.firmen-eintrag__btn--del:hover {
  background: var(--rot-hell);
  color: var(--rot);
}

.firmen-eintrag__aktiv-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gruen);
  background: var(--gruen-hell);
  padding: 2px 7px;
  border-radius: 10px;
}

/* --- Akkordeon-Sektionen Verbesserungen --- */
.akkordeon {
  margin-bottom: 12px;
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.akkordeon:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.akkordeon.offen {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.akkordeon__status--ok::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gruen);
  margin-right: 4px;
  vertical-align: middle;
}

/* --- Firmen-Speichern-Bar (Sticky Save) --- */
.firmen-speichern-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 24px;
  border-top: 1px solid var(--grau-200);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 10;
}

/* --- Gewerk-Suche --- */
.gewerk-suche {
  position: relative;
}

.gewerk-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--weiss);
  border: 1.5px solid var(--primaer-hell);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 300;
  box-shadow: var(--schatten-md);
}

.gewerk-option {
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.1s;
}

.gewerk-option:hover {
  background: #eef2ff;
  color: var(--primaer);
}

.gewerk-option--hervorgehoben {
  background: var(--grau-50);
}

/* --- Hilfklassen --- */
.versteckt {
  display: none !important;
}

/* --- Fußzeile --- */
.footer {
  background: var(--primaer);
  color: rgba(255, 255, 255, 0.85);
  padding: 32px 0 24px;
  font-size: 0.78rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--akzent) 0%, var(--primaer-hell) 50%, var(--primaer) 100%);
}

.footer--kompakt {
  padding: 14px 0 12px;
}

.footer--kompakt::before {
  height: 3px;
}

.footer__inhalt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer--kompakt .footer__inhalt {
  gap: 0;
}

.footer__marke {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__logo {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}

.footer__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--weiss);
  display: block;
  line-height: 1.2;
}

.footer__claim {
  font-size: 0.72rem;
  opacity: 0.6;
  display: block;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer--kompakt .footer__links {
  gap: 6px 16px;
  align-items: center;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.15s;
}

.footer--kompakt .footer__links a {
  font-size: 0.72rem;
}

.footer__links a:hover {
  color: var(--weiss);
}

.footer__copy {
  font-size: 0.7rem;
  opacity: 0.45;
}

.footer--kompakt .footer__copy {
  font-size: 0.65rem;
  margin: 0;
}

/* Desktop: Logo + Links nebeneinander */
.footer--kompakt .footer__inhalt {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer--kompakt .footer__marke--desktop {
  display: flex;
}

/* --- Rechtstexte (Impressum, Datenschutz, AGB) --- */
.rechtstext {
  line-height: 1.7;
}

.rechtstext h2 {
  margin-bottom: 8px;
  color: var(--primaer);
}

.rechtstext h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--primaer);
  font-size: 1rem;
}

.rechtstext h4 {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.rechtstext p,
.rechtstext ul {
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--grau-700);
}

.rechtstext ul {
  padding-left: 20px;
}

.rechtstext li {
  margin-bottom: 4px;
}

.rechtstext__hinweis {
  color: var(--grau-500);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.rechtstext a {
  color: var(--primaer-hell);
}

/* --- Mobile Header (nur auf Mobile sichtbar) --- */
.header__mobil-rechts {
  display: none; /* auf Desktop versteckt */
}

.header__mobil-menu-wrapper {
  position: relative;
}

.header__mobil-trigger {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primaer);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  color: var(--weiss);
  padding: 0;
  max-width: none;
  overflow: visible;
}

.header__mobil-trigger:hover {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

.header__mobil-firma,
.header__mobil-user {
  display: none;
}

.header__mobil-dropdown-header {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__mobil-dropdown-firma {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primaer);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__mobil-dropdown-user {
  font-size: 0.72rem;
  color: var(--grau-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__mobil-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--weiss);
  border-radius: var(--radius-sm);
  box-shadow: var(--schatten-lg);
  border: 1px solid var(--grau-200);
  z-index: 60;
  overflow: hidden;
  animation: einblenden 0.15s ease-out;
}

.header__mobil-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grau-700);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.header__mobil-dropdown-item:hover {
  background: var(--grau-50);
  color: var(--primaer);
}

.header__mobil-dropdown-item--link {
  text-decoration: none;
  color: var(--grau-700);
}

.header__mobil-dropdown-item--logout {
  color: var(--rot);
}

.header__mobil-dropdown-item--logout:hover {
  background: var(--rot-hell);
  color: var(--rot);
}

.header__mobil-dropdown-icon {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.header__mobil-dropdown-trenner {
  height: 1px;
  background: var(--grau-200);
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .header__inhalt {
    padding: 0 12px;
    height: 50px;
    position: relative;
  }

  .header__links {
    gap: 0;
    min-width: 0;
  }

  .header__marke {
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }

  .header__logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .header__titel {
    font-size: 1rem;
    white-space: nowrap;
  }

  /* Desktop workspace auf Mobile ausblenden */
  .header__workspace {
    display: none !important;
  }

  /* Desktop avatar + badge + upgrade-cta auf Mobile ausblenden */
  .header__rechts .header__user-menu-wrapper,
  .header__rechts > .auth-badge,
  .header__rechts > .header__upgrade-cta {
    display: none !important;
  }

  /* Formular-Zeile auf Mobile stapeln */
  .formular-zeile {
    flex-direction: column;
    gap: 0;
  }

  .formular-gruppe--schmal {
    flex: 1 1 auto !important;
  }

  /* Mobile: Guest bar - compact layout */
  .header__gast:not(.versteckt) {
    display: flex !important;
  }

  .header__gast .auth-link {
    font-size: 0.7rem;
    padding: 5px 10px;
    white-space: nowrap;
  }

  /* Mobile Kasten ausblenden – Profil ist jetzt in der Bottom Navigation */
  .header__mobil-rechts,
  .header__mobil-rechts:not(.versteckt) {
    display: none !important;
  }

  /* Freemium-Badge + Upgrade-CTA Wrapper auf Mobile */
  .header__mobil-badge-wrapper:not(.versteckt) {
    display: flex !important;
    align-items: center;
    gap: 6px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }

  .header__mobil-badge-wrapper .header__freemium-badge:not(.versteckt) {
    display: inline-flex !important;
    position: static;
    transform: none;
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .header__upgrade-cta--mobil:not(.versteckt) {
    display: inline-flex !important;
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  /* Verif-Karte auf Mobile: kompaktes Banner oben statt schwebender Karte */
  .verif-notiz:not(.verif-notiz--zentriert) {
    position: fixed;
    bottom: auto;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    border-bottom: 1px solid var(--grau-200);
    animation: verif-mobil-ein 0.3s ease-out;
  }

  .verif-notiz:not(.verif-notiz--zentriert) .verif-notiz__icon {
    width: 32px;
    height: 32px;
    margin: 0;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .verif-notiz:not(.verif-notiz--zentriert) .verif-notiz__text {
    flex: 1;
    margin-bottom: 0;
    font-size: 0.75rem;
    min-width: 0;
  }

  .verif-notiz:not(.verif-notiz--zentriert) .verif-notiz__btn {
    width: auto;
    white-space: nowrap;
    padding: 6px 12px;
    flex-shrink: 0;
  }

  .verif-notiz:not(.verif-notiz--zentriert) .verif-notiz__close {
    position: static;
    flex-shrink: 0;
    order: 4;
  }

  .verif-notiz:not(.verif-notiz--zentriert) .verif-notiz__status {
    margin-top: 0;
    margin-left: auto;
  }

  @keyframes verif-mobil-ein {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Zentrierte Verif-Karte auf Mobile: modale Karte in der Mitte */
  .verif-notiz.verif-notiz--zentriert {
    position: fixed;
    top: auto;
    bottom: 50%;
    left: 50%;
    right: auto;
    width: 260px;
    transform: translate(-50%, 50%) scale(1.15);
    border-radius: 14px;
    padding: 18px 20px;
    display: block;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--grau-200);
    animation: none !important;
    transition: none !important;
  }

  .verif-notiz.verif-notiz--zentriert .verif-notiz__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    font-size: 1.1rem;
  }

  .verif-notiz.verif-notiz--zentriert .verif-notiz__text {
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grau-900);
  }

  .verif-notiz.verif-notiz--zentriert .verif-notiz__btn {
    width: 100%;
    padding: 7px 12px;
  }

  .verif-notiz.verif-notiz--zentriert .verif-notiz__close {
    position: absolute;
    top: 6px;
    right: 8px;
  }

  .tab-nav {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: none;
    border-top: 1px solid rgba(30, 58, 95, 0.08);
    box-shadow: 0 -4px 16px rgba(30, 58, 95, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .tab-nav__inhalt {
    padding: 0;
  }

  .tab-nav__tab {
    padding: 6px 4px 8px;
    font-size: 0.65rem;
    border-bottom: none;
    border-top: 2.5px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    color: var(--grau-400);
    transition: color 0.2s, border-top-color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-nav__tab:hover {
    background: none;
  }

  .tab-nav__tab:active {
    background: var(--primaer-50);
  }

  .tab-nav__icon {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s;
  }

  .tab-nav__label {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
  }

  .tab-nav__tab--aktiv {
    border-bottom-color: transparent;
    border-top-color: var(--primaer);
    color: var(--primaer);
  }

  .tab-nav__tab--aktiv .tab-nav__icon {
    transform: scale(1.1);
  }

  .hauptbereich {
    padding-bottom: 80px;
    padding-top: 8px;
  }

  /* Gradient-Linien auf Mobile dünner */
  .header::before,
  .footer::before {
    height: 2px;
  }

  /* Mehr-Tab: nur auf Mobile sichtbar */
  .tab-nav__tab--mehr {
    display: flex;
  }



  /* --- Bottom Sheet --- */
  .bottom-sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    opacity: 0;
    animation: bottomSheetBackdropEin 0.25s ease-out forwards;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-sheet__backdrop.versteckt {
    display: none;
  }

  .bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 201;
    background: var(--weiss);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    padding: 0 0 env(safe-area-inset-bottom);
    transform: translateY(0);
    animation: bottomSheetHoch 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  .bottom-sheet.versteckt {
    display: none;
  }

  .bottom-sheet__griff {
    width: 36px;
    height: 4px;
    background: var(--grau-300);
    border-radius: 2px;
    margin: 10px auto 6px;
  }

  .bottom-sheet__header {
    padding: 8px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .bottom-sheet__firma {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primaer);
  }

  .bottom-sheet__user {
    font-size: 0.78rem;
    color: var(--grau-500);
  }

  .bottom-sheet__trenner {
    height: 1px;
    background: var(--grau-200);
    margin: 0 20px;
  }

  .bottom-sheet__nav {
    padding: 8px 0 12px;
  }

  .bottom-sheet__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--grau-700);
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-sheet__item:active {
    background: var(--grau-50);
  }

  .bottom-sheet__item--link {
    text-decoration: none;
    color: var(--grau-700);
  }

  .bottom-sheet__item--logout {
    color: var(--rot);
  }

  .bottom-sheet__item--logout:active {
    background: rgba(220, 38, 38, 0.06);
  }

  .bottom-sheet__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  @keyframes bottomSheetHoch {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  @keyframes bottomSheetRunter {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
  }

  @keyframes bottomSheetBackdropEin {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes bottomSheetBackdropAus {
    from { opacity: 1; }
    to { opacity: 0; }
  }

  .karte {
    padding: 16px;
  }

  .feldgruppe {
    padding: 12px;
  }

  /* Angebotskarten-Layout Mobile */
  .historie-eintrag__nr {
    font-size: 0.82rem;
  }

  .historie-eintrag__details {
    font-size: 0.8rem;
  }


  .aktionen {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Mobile Button-Hierarchie: Primär → Sekundär → Danger → Ghost */
  .aktionen .btn--primaer { order: 1; }
  .aktionen .btn--sekundaer,
  .aktionen .btn--rechnung { order: 2; }
  .aktionen .btn--danger,
  .aktionen .btn--gefahr { order: 3; }
  .aktionen .btn--ghost { order: 4; }

  /* Sekundäre/tertiäre Buttons dezenter auf Mobile */
  .aktionen .btn--sekundaer,
  .aktionen .btn--rechnung {
    background: var(--weiss);
    border: 1.5px solid var(--grau-300);
    color: var(--grau-700);
    font-size: 0.85rem;
    padding: 10px 16px;
  }

  .vorschau__kopf {
    flex-direction: column;
  }

  .summen__zeile {
    width: 100%;
  }

  .positionen-tabelle {
    display: none;
  }

  .positionen-mobil {
    display: block;
    margin-bottom: 16px;
  }

  .pos-karte {
    padding: 12px;
  }

  .pos-karte__zeile {
    flex-wrap: wrap;
  }

  .pos-karte__feld--klein {
    flex-basis: calc(50% - 4px);
  }

  .edit-feld--name {
    font-size: 0.85rem;
  }

  /* Textareas auf Mobile größer & bei Focus expandieren */
  textarea.edit-feld {
    min-height: 80px;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: min-height 0.2s ease;
  }
  textarea.edit-feld:focus {
    min-height: 140px;
  }
  .edit-feld--anschreiben {
    min-height: 100px;
  }
  .edit-feld--anschreiben:focus {
    min-height: 180px;
  }

  .footer__inhalt {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .footer__links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  /* Kompakter Footer in der App: eine Zeile, kein übergroßes Touch-Target */
  .footer--kompakt {
    padding: 10px 0 8px;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .footer--kompakt .footer__inhalt {
    flex-direction: column;
  }

  .footer--kompakt .footer__marke--desktop {
    display: none;
  }

  .footer--kompakt .footer__links {
    gap: 4px 12px;
  }

  .footer--kompakt .footer__links a {
    min-height: unset;
    padding: 4px 0;
    font-size: 0.68rem;
  }

  .footer--kompakt .footer__copy {
    font-size: 0.6rem;
  }

  /* Rechnungs-Positionsfelder: iOS-Zoom verhindern + größere Touch-Targets */
  .pos-karte input,
  .pos-karte textarea {
    font-size: 16px;
    min-height: 44px;
  }
}

/* --- Cookie-Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primaer-dunkel);
  color: var(--weiss);
  padding: 16px 24px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner__inhalt {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner__inhalt p {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.5;
  min-width: 200px;
}

.cookie-banner__inhalt a {
  color: var(--akzent);
}

.cookie-banner__aktionen {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn--klein {
  padding: 6px 14px;
  font-size: 0.78rem;
}

/* --- PWA & Mobile Touch Fixes --- */

/* Alle interaktiven Elemente: Mindestgröße 44x44px für Touch */
@media (max-width: 600px) {
  .btn--klein {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
  }

  .header__gast .auth-link {
    font-size: 0.78rem;
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .tab-nav__tab {
    padding: 6px 4px 8px;
    min-height: 56px;
  }

  .verif-notiz__close,
  .willkommen-toast__close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header__mobil-trigger {
    min-width: 44px;
    min-height: 44px;
  }
}

/* 300ms Tap-Delay eliminieren */
a, button, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}

/* PWA Standalone: Status-Bar Abstand (iOS safe areas) */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
  }

  .cookie-banner {
    padding-bottom: env(safe-area-inset-bottom);
  }

  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primaer);
  color: var(--weiss);
  padding: 14px 20px;
  z-index: 999;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none;
}

.pwa-install-banner.sichtbar {
  display: block;
  transform: translateY(0);
}

.pwa-install-banner__inhalt {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-install-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.pwa-install-banner__text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.4;
}

.pwa-install-banner__text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.pwa-install-banner__btn {
  background: var(--akzent);
  color: var(--primaer-dunkel);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

.pwa-install-banner__btn:active {
  transform: scale(0.96);
}

.pwa-install-banner__schliessen {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-banner__schliessen:hover {
  color: var(--weiss);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pwa-install-banner {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* =========================================
   Dashboard
   ========================================= */

#seiteDashboard {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 8px;
}

/* --- Dashboard Header --- */
.dashboard__header {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--primaer) 0%, var(--primaer-hell) 100%);
  margin: -16px -16px 16px -16px;
  padding: 20px 16px 18px;
  border-radius: 0 0 16px 16px;
}

.dashboard__gruss {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--weiss);
  margin-bottom: 2px;
  white-space: nowrap;
}

.dashboard__subtitel {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}

.dashboard__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  background: var(--akzent);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
  flex: 1;
}

.dashboard__cta:hover {
  background: var(--akzent-hover);
  transform: translateY(-1px);
}

.dashboard__cta--sekundaer {
  background: rgba(255, 255, 255, 0.15);
  color: var(--weiss);
}

.dashboard__cta--sekundaer:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dashboard__cta-gruppe {
  display: flex;
  gap: 10px;
}

/* --- KPI-Karten --- */
.dashboard__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard__kpi {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.dashboard__kpi:hover {
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.12);
  transform: translateY(-1px);
}

.dashboard__kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primaer-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primaer);
}

.dashboard__kpi-icon--akzent {
  background: var(--akzent-hell);
  color: var(--akzent-hover);
}

.dashboard__kpi-icon--warn {
  background: rgba(220, 38, 38, 0.1);
  color: var(--rot);
}

.dashboard__kpi--warn {
  background: var(--rot-hell);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}
.dashboard__kpi--warn .dashboard__kpi-wert {
  color: var(--rot);
}

.dashboard__kpi--umsatz {
  background: var(--gruen-hell);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
}
.dashboard__kpi--umsatz .dashboard__kpi-icon {
  background: rgba(5, 150, 105, 0.15);
  color: var(--gruen);
}
.dashboard__kpi--umsatz .dashboard__kpi-wert {
  color: var(--gruen);
}

.dashboard__kpi-inhalt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard__kpi-wert {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primaer);
  line-height: 1.15;
}

.dashboard__kpi-label {
  font-size: 0.7rem;
  color: var(--grau-500);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Karten */
.dashboard__karte {
  background: var(--weiss);
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.06);
}

/* --- Preischeck Widget --- */
.preischeck-widget {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a5a8f 60%, #3b7dbd 100%);
  border: none;
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.25);
}
.preischeck-widget::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
}
.preischeck-widget::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}
.preischeck-header {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.preischeck-titel-zeile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.preischeck-icon-kreis {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--akzent);
}
.preischeck-titel {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--weiss);
  margin: 0 0 3px;
}
.preischeck-untertitel {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.preischeck-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.preischeck-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.preischeck-input-icon {
  position: absolute;
  left: 14px;
  color: var(--grau-400);
  pointer-events: none;
}
.preischeck-input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.12);
  color: var(--weiss);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.preischeck-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.preischeck-input:focus {
  outline: none;
  border-color: var(--akzent);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.preischeck-btn {
  white-space: nowrap;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 160px;
  background: var(--akzent);
  color: var(--grau-900);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.preischeck-btn:hover {
  background: var(--akzent-hover);
  transform: translateY(-1px);
}
.preischeck-btn:active {
  transform: translateY(0);
}
.preischeck-beispiele {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.preischeck-beispiel {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.preischeck-beispiel:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--akzent);
  color: var(--weiss);
}
.preischeck-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: preischeckSpin 0.7s linear infinite;
}
.preischeck-spinner--gross {
  width: 24px;
  height: 24px;
  border-color: rgba(30,58,95,0.15);
  border-top-color: var(--primaer);
}
@keyframes preischeckSpin {
  to { transform: rotate(360deg); }
}
.preischeck-ergebnis {
  margin-top: 16px;
}
.preischeck-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: var(--grau-500);
  font-size: 0.95rem;
  justify-content: center;
}
.preischeck-fehler {
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid #fecaca;
}
.preischeck-limit {
  background: var(--akzent-hell);
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: #92400e;
  border: 1px solid #fde68a;
}
.preischeck-limit strong {
  display: block;
  margin-bottom: 4px;
}
.preischeck-limit p {
  margin: 0;
}
.preischeck-ergebnis-karte {
  background: var(--weiss);
  border-radius: var(--radius);
  border: 1px solid var(--grau-200);
  overflow: hidden;
}
.preischeck-preis-bereich {
  background: linear-gradient(135deg, var(--primaer) 0%, var(--primaer-hell) 100%);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.preischeck-preis {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preischeck-preis-range {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.preischeck-preis-einheit {
  font-size: 0.85rem;
  opacity: 0.8;
}
.preischeck-durchschnitt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.preischeck-durchschnitt-label {
  font-size: 0.8rem;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}
.preischeck-durchschnitt-wert {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--akzent);
}
.preischeck-details {
  padding: 16px 24px;
}
.preischeck-details-text {
  font-size: 0.92rem;
  color: var(--grau-700);
  line-height: 1.55;
  margin: 0 0 8px;
}
.preischeck-quelle {
  font-size: 0.8rem;
  color: var(--grau-500);
  margin: 0;
  font-style: italic;
}
.preischeck-kontingent {
  padding: 10px 24px;
  background: #f9fafb;
  border-top: 1px solid var(--grau-200);
  font-size: 0.8rem;
  color: var(--grau-500);
  text-align: center;
}

/* Preischeck responsive */
@media (max-width: 640px) {
  .preischeck-widget {
    padding: 20px 16px 16px;
  }
  .preischeck-icon-kreis {
    width: 36px;
    height: 36px;
  }
  .preischeck-icon-kreis svg {
    width: 16px;
    height: 16px;
  }
  .preischeck-titel {
    font-size: 1.05rem;
  }
  .preischeck-input-row {
    flex-direction: column;
  }
  .preischeck-input {
    padding: 12px 12px 12px 38px;
  }
  .preischeck-btn {
    min-width: auto;
    width: 100%;
    padding: 12px 20px;
  }
  .preischeck-beispiele {
    gap: 6px;
  }
  .preischeck-preis-bereich {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }
  .preischeck-durchschnitt {
    align-items: flex-start;
  }
  .preischeck-preis-range {
    font-size: 1.25rem;
  }
  .preischeck-details {
    padding: 14px 18px;
  }
  .preischeck-kontingent {
    padding: 10px 18px;
  }
}

.dashboard__karte-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dashboard__karte-titel {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primaer);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.dashboard__karte-header .dashboard__karte-titel {
  margin-bottom: 0;
}

.dashboard__karte > .dashboard__karte-titel {
  margin-bottom: 14px;
}

.dashboard__link {
  background: none;
  border: none;
  color: var(--grau-500);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s;
}

.dashboard__link:hover {
  background: rgba(30, 58, 95, 0.06);
  color: var(--primaer);
  text-decoration: none;
}

/* Dashboard eigener Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .dashboard-container {
    padding: 0 12px;
  }
}

/* Content Grid: 2 Spalten */
.dashboard__content-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 14px;
  align-items: start;
}
.dashboard__col-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dashboard__col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}
/* Rechte Spalte: Karten füllen den Platz gleichmäßig */
.dashboard__col-right .dashboard__sidebar-karte {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#dashboardAngebote,
#dashboardRechnungen {
  flex: 1;
  min-height: 0;
}

/* Klickbare KPI-Karte */
.dashboard__kpi--klickbar {
  cursor: pointer;
}
.dashboard__kpi--klickbar:hover {
  border-color: var(--akzent);
}

/* Sidebar-Karten */
.dashboard__sidebar-karte {
  background: var(--weiss);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.06);
}
.dashboard__sidebar-karte .dashboard__karte-header {
  margin-bottom: 4px;
}
.dashboard__sidebar-karte .dashboard__liste-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  gap: 10px;
  overflow: hidden;
  margin: 0;
  border-bottom: 1px solid var(--grau-100);
  cursor: pointer;
  transition: background 0.1s;
}
.dashboard__sidebar-karte .dashboard__liste-item:last-child {
  border-bottom: none;
}
.dashboard__sidebar-karte .dashboard__liste-item:hover {
  background: var(--primaer-50);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.dashboard__sidebar-karte .dashboard__liste-links {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.dashboard__sidebar-karte .dashboard__liste-name {
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--grau-900);
}
.dashboard__sidebar-karte .dashboard__liste-detail {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--grau-500);
}
.dashboard__sidebar-karte .dashboard__liste-rechts {
  flex-shrink: 0;
  text-align: right;
}
.dashboard__sidebar-karte .dashboard__liste-betrag {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--grau-900);
}
.dashboard__sidebar-karte .dashboard__status {
  font-size: 0.6rem;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Tab-Switcher (nur Mobile sichtbar) */
.dashboard__tab-switcher {
  display: none;
  background: var(--grau-100);
  border-radius: 10px;
  padding: 3px;
  gap: 0;
  grid-column: 1 / -1;
}

.dashboard__tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grau-500);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.dashboard__tab--aktiv {
  background: var(--weiss);
  color: var(--primaer);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Scrollbare Listen */
#dashboardAngebote,
#dashboardRechnungen {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--grau-200) transparent;
}
#dashboardAngebote::-webkit-scrollbar,
#dashboardRechnungen::-webkit-scrollbar {
  width: 3px;
}
#dashboardAngebote::-webkit-scrollbar-thumb,
#dashboardRechnungen::-webkit-scrollbar-thumb {
  background: var(--grau-200);
  border-radius: 3px;
}

/* Legacy Spalten */
.dashboard__spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Listen-Items (generisch) */
.dashboard__liste-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--grau-100);
  cursor: pointer;
  transition: background 0.1s;
}

.dashboard__liste-item:last-child {
  border-bottom: none;
}

.dashboard__liste-item:hover {
  background: var(--grau-50);
}

.dashboard__liste-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dashboard__liste-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--grau-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard__liste-detail {
  font-size: 0.78rem;
  color: var(--grau-500);
}

.dashboard__liste-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.dashboard__liste-betrag {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grau-900);
}

.dashboard__status {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dashboard__status--offen {
  background: var(--primaer-100);
  color: var(--primaer);
}

.dashboard__status--gruen {
  background: var(--gruen-hell);
  color: var(--gruen);
}

.dashboard__status--rot {
  background: var(--rot-hell);
  color: var(--rot);
}

.dashboard__leer {
  text-align: center;
  color: var(--grau-400);
  font-size: 0.82rem;
  padding: 28px 0;
}

/* Chart */
.dashboard__chart {
  height: 160px;
  display: flex;
  align-items: flex-end;
}

.dashboard__chart-leer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grau-400);
  font-size: 0.85rem;
  height: 100%;
}

.dashboard__chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 10px;
  padding-top: 24px;
}

.dashboard__chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.dashboard__chart-bar-wrapper {
  width: 100%;
  max-width: 48px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.dashboard__chart-bar-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--grau-100);
  border-radius: 6px 6px 0 0;
}

.dashboard__chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--primaer-hell) 0%, var(--primaer) 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
  position: relative;
  z-index: 1;
  opacity: 0.4;
}

.dashboard__chart-bar--null {
  min-height: 0;
  height: 0 !important;
}

.dashboard__chart-bar--aktuell {
  opacity: 1;
  background: linear-gradient(180deg, var(--akzent) 0%, var(--akzent-hover) 100%);
  box-shadow: 0 -2px 8px rgba(245, 158, 11, 0.3);
}

.dashboard__chart-bar--hat-wert {
  opacity: 0.7;
}

.dashboard__chart-col:hover .dashboard__chart-bar {
  opacity: 0.9;
}

.dashboard__chart-col:hover .dashboard__chart-bar--aktuell {
  opacity: 1;
}

.dashboard__chart-wert {
  font-size: 0.7rem;
  color: var(--grau-500);
  margin-bottom: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard__chart-wert--aktuell {
  color: var(--akzent-hover);
  font-weight: 700;
}

.dashboard__chart-label {
  font-size: 0.75rem;
  color: var(--grau-500);
  margin-top: 8px;
  font-weight: 500;
}

.dashboard__chart-label--aktuell {
  color: var(--primaer);
  font-weight: 700;
}

/* Dashboard Responsive */
@media (max-width: 1024px) {
  .dashboard__content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .dashboard__col-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .dashboard__col-right .dashboard__sidebar-karte {
    max-height: 350px;
  }
  .dashboard__kpis {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .dashboard__col-right {
    grid-template-columns: 1fr;
  }
  .dashboard__kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dashboard__header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .dashboard__cta-gruppe {
    width: 100%;
  }

  .dashboard__cta {
    justify-content: center;
  }

  .dashboard__kpi {
    padding: 14px;
  }

  .dashboard__kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .dashboard__kpi-icon svg {
    width: 17px;
    height: 17px;
  }

  .dashboard__kpi-wert {
    font-size: 1.35rem;
  }

  .dashboard__chart-bars {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .dashboard__gruss {
    font-size: 1.15rem;
  }

  .dashboard__kpi {
    padding: 10px;
    gap: 8px;
  }

  .dashboard__kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }
  .dashboard__kpi-icon svg {
    width: 15px;
    height: 15px;
  }

  .dashboard__kpi-wert {
    font-size: 1.2rem;
  }

  .dashboard__kpi-label {
    font-size: 0.58rem;
  }

  .dashboard__chart {
    height: 120px;
  }

  .dashboard__cta-gruppe {
    flex-direction: row;
  }
  .dashboard__cta {
    padding: 8px 10px;
    font-size: 0.7rem;
    gap: 4px;
  }
  .dashboard__cta svg {
    width: 13px;
    height: 13px;
  }

}

@media (max-width: 360px) {
  .dashboard__cta span:not(svg) {
    font-size: 0.65rem;
  }
  .dashboard__kpi-icon {
    display: none;
  }
}

/* --- Mobile Dashboard: kompakt & ohne Scrollen --- */
@media (max-width: 600px) {
  .dashboard__header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 10px;
    padding: 18px 16px 16px;
  }
  .dashboard__subtitel {
    display: block;
    margin-bottom: 14px;
  }
  .dashboard__gruss {
    font-size: 1.4rem;
  }

  .dashboard__cta-gruppe {
    flex-direction: row;
    width: 100%;
    gap: 10px;
  }
  .dashboard__cta {
    padding: 11px 12px;
    font-size: 0.85rem;
    gap: 6px;
    flex: 1;
  }
  .dashboard__cta svg {
    width: 14px;
    height: 14px;
  }

  .dashboard__kpis {
    gap: 8px;
    margin-bottom: 10px;
  }

  /* "Was kostet" auf Mobile einklappbar */
  .preischeck-widget {
    padding: 16px;
    border-radius: 12px;
  }
  .preischeck-header {
    margin-bottom: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .preischeck-widget .preischeck-body {
    display: none;
  }
  .preischeck-widget.preischeck-widget--offen .preischeck-body {
    display: block;
    margin-top: 10px;
  }
  .preischeck-toggle-icon {
    display: block !important;
    transition: transform 0.2s;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
  }
  .preischeck-widget--offen .preischeck-toggle-icon {
    transform: rotate(180deg);
  }
  .preischeck-titel-zeile {
    gap: 10px;
    align-items: center;
  }
  .preischeck-icon-kreis {
    width: 34px;
    height: 34px;
  }

  /* Chart kompakter */
  .dashboard__karte {
    padding: 12px;
  }
  .dashboard__chart {
    height: 100px;
  }
  .dashboard__chart-wert {
    font-size: 0.6rem;
  }
  .dashboard__chart-label {
    font-size: 0.65rem;
    margin-top: 4px;
  }

  /* Tab-Switcher auf Mobile anzeigen */
  .dashboard__tab-switcher {
    display: flex;
    margin: 0 12px 0;
  }

  /* Sidebar-Karten: Full-Width mit Tabs */
  .dashboard__sidebar-karte {
    padding: 12px 14px;
    box-shadow: none;
  }
  .dashboard__sidebar-karte .dashboard__karte-header {
    display: none;
  }
  .dashboard__col-right .dashboard__sidebar-karte--rechnungen {
    display: none;
  }
  .dashboard__sidebar-karte .dashboard__liste-item {
    padding: 8px 0;
  }
  .dashboard__sidebar-karte .dashboard__liste-name {
    font-size: 0.9rem;
    white-space: normal;
  }
  .dashboard__sidebar-karte .dashboard__liste-detail {
    font-size: 0.75rem;
  }
  .dashboard__sidebar-karte .dashboard__liste-betrag {
    font-size: 0.9rem;
  }
  .dashboard__sidebar-karte .dashboard__status {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 6px;
  }
  .dashboard__karte-titel {
    font-size: 0.8rem;
  }

  /* Content-Grid: Sidebar vor Chart auf Mobile */
  .dashboard__content-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .dashboard__col-right {
    order: -1;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 -12px;
    width: calc(100% + 24px);
  }
  .dashboard__col-right .dashboard__sidebar-karte {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .dashboard__col-left {
    gap: 10px;
    order: 1;
  }
  .dashboard__col-right .dashboard__sidebar-karte {
    max-height: none;
  }

  /* Hauptbereich: kein vertikales Zentrieren auf Dashboard */
  .hauptbereich {
    padding-bottom: 70px !important;
  }
}


/* =========================================
   Rechnungen
   ========================================= */

/* --- Rechnungen-Header --- */
.rechnungen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rechnungen-header__titel {
  font-size: 1.1rem;
  color: var(--grau-900);
  margin: 0;
}

@media (max-width: 600px) {
  .rechnungen-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .rechnungen-header .btn--klein {
    text-align: center;
  }
}

/* --- Leerer Zustand --- */
.rechnungen-leer {
  text-align: center;
  padding: 48px 20px;
  color: var(--grau-500);
}

.rechnungen-leer__icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.rechnungen-leer__hinweis {
  font-size: 0.82rem;
  color: var(--grau-300);
  margin-top: 4px;
}

/* --- Status-Badges --- */
.rechnung-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rechnung-badge--entwurf {
  background: var(--grau-200);
  color: var(--grau-700);
}

.rechnung-badge--offen {
  background: var(--primaer-100);
  color: var(--primaer);
}

.rechnung-badge--bezahlt {
  background: var(--gruen-hell);
  color: var(--gruen);
}

.rechnung-badge--storniert {
  background: var(--rot-hell);
  color: var(--rot);
}

.rechnung-badge--ueberfaellig {
  background: var(--rot-hell);
  color: var(--rot);
  font-weight: 600;
  animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.rechnung-badge--abgelaufen {
  background: var(--grau-200);
  color: var(--grau-500);
  text-decoration: line-through;
}

/* --- Rechnung Status-Banner --- */
.rechnung-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.rechnung-status-banner--entwurf {
  background: var(--grau-50);
  color: var(--grau-700);
  border: 1px solid var(--grau-200);
}

.rechnung-status-banner--offen {
  background: var(--primaer-50);
  color: var(--primaer);
  border: 1px solid var(--primaer-100);
}

.rechnung-status-banner--bezahlt {
  background: var(--gruen-hell);
  color: var(--gruen);
  border: 1px solid #a7f3d0;
}

.rechnung-status-banner--storniert {
  background: var(--rot-hell);
  color: var(--rot);
  border: 1px solid #fecaca;
}

.rechnung-status-banner--ueberfaellig {
  background: var(--akzent-hell);
  color: var(--akzent-hover);
  border: 1px solid #fde68a;
}

.rechnung-status-banner__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* --- Vorschau-Meta (Rechnungsfelder) --- */
.vorschau-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--grau-700);
}

@media (max-width: 480px) {
  .vorschau-meta {
    grid-template-columns: 1fr;
  }
}

/* --- Vorschau-Summen --- */
.vorschau-summen {
  margin-top: 16px;
  border-top: 1px solid var(--primaer-100);
  padding-top: 12px;
}

.summen-zeile {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--grau-700);
}

.summen-zeile--gesamt {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primaer);
  border-top: 2px solid var(--primaer);
  margin-top: 6px;
  padding-top: 8px;
}

.summen-zeile--hinweis {
  font-size: 0.8rem;
  color: var(--grau-500);
  font-style: italic;
  justify-content: flex-start;
}

.summen-zeile--rabatt,
.summen__zeile--rabatt {
  color: var(--grau-700, #374151);
}

.summen-zeile--skonto {
  font-size: 0.8rem;
  color: var(--primaer);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--grau-200);
}

.summen__rabatt-aktionen {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  padding-top: 6px;
}

/* --- Storno-Referenz --- */
.rechnung-storno-ref {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--rot-hell);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--rot);
}

/* --- Button-Varianten für Rechnungen --- */
.btn--danger {
  background: #fff5f5;
  color: #c53030;
  border: 1.5px solid #feb2b2;
}

.btn--danger:hover {
  background: #fed7d7;
  border-color: #fc8181;
}

.btn--rechnung {
  background: #2563eb;
  color: var(--weiss);
  border-color: #2563eb;
}

.btn--rechnung:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* --- Listensuche --- */
/* Status-Filter */
.status-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.status-filter__btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--grau-200);
  border-radius: 99px;
  background: var(--weiss);
  color: var(--grau-500);
  cursor: pointer;
  transition: all 0.15s;
}
.status-filter__btn:hover {
  border-color: var(--primaer);
  color: var(--primaer);
}
.status-filter__btn--aktiv {
  background: var(--primaer);
  color: #fff;
  border-color: var(--primaer);
}

.listen-suche {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1.5px solid var(--grau-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.listen-suche:focus {
  border-color: var(--primaer);
}

/* --- Angebots-Status-Select --- */
.angebot-status-select {
  padding: 2px 6px;
  font-size: 0.72rem;
  border: 1px solid var(--grau-200);
  border-radius: var(--radius-sm);
  background: var(--weiss);
  cursor: pointer;
  font-family: inherit;
}

/* --- E-Mail-Status (Rechnungen) --- */
.email-status {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  text-align: center;
}

.email-status--erfolg {
  background: var(--gruen-hell);
  color: var(--gruen);
}

.email-status--fehler {
  background: var(--rot-hell);
  color: var(--rot);
}

/* =========================================
   Vorschau Summary Header
   ========================================= */
.vorschau-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: var(--primaer);
  border-radius: var(--radius);
  color: var(--weiss);
  position: sticky;
  top: 56px;
  z-index: 40;
}

.vorschau-summary__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-right: 12px;
}

.vorschau-summary__kunde {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vorschau-summary__status {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  color: var(--weiss);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 3px 24px 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  width: fit-content;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.vorschau-summary__status:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.vorschau-summary__status option {
  background: var(--primaer);
  color: var(--weiss);
}

.vorschau-summary__betrag {
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.vorschau-summary__aktionen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn--summary-bezahlt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn--summary-bezahlt:hover {
  background: var(--gruen);
  border-color: var(--gruen);
}

/* Bezahlt-Button (Banner) */
.btn--banner-bezahlt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: var(--primaer);
  border: 1.5px solid var(--primaer);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn--banner-bezahlt:hover {
  background: var(--primaer);
  color: #fff;
}

/* Überfällig-Banner Aktionen */
.mahnung-ueberfaellig-banner__aktionen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =========================================
   Floating Action Bar
   ========================================= */
.floating-actions {
  display: flex;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  gap: 10px;
  z-index: 90;
  padding: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: 500px;
  width: auto;
}

.floating-actions--versteckt {
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
}

.floating-actions__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.floating-actions__btn.btn--sekundaer {
  padding: 10px 14px;
  background: var(--weiss);
  border: 1.5px solid var(--grau-300);
  color: var(--grau-700);
}

/* Mehr Padding unten für Content, damit Floating Bar nichts verdeckt */
#seiteVorschau,
#seiteRechnungVorschau {
  padding-bottom: 80px;
}

@media (max-width: 600px) {
  .floating-actions {
    bottom: 70px; /* über der Bottom Navigation */
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
    width: auto;
  }

  .floating-actions--versteckt {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
  }

  .floating-actions__btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .floating-actions__btn.btn--sekundaer {
    flex: 0;
    padding: 12px 14px;
  }

  #seiteVorschau,
  #seiteRechnungVorschau {
    padding-bottom: 90px;
  }
}

/* ===== Mahnwesen (Dunning System) ===== */

/* Dashboard: Überfällige Rechnungen Warnung */
.mahnung-warnung {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(30, 58, 95, 0.04);
  border: 1px solid var(--grau-200);
  border-left: 3px solid var(--akzent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.mahnung-warnung__text {
  flex: 1;
}

.mahnung-warnung__text strong {
  display: block;
  color: var(--primaer);
  font-size: 0.88rem;
  font-weight: 700;
}

.mahnung-warnung__text p {
  color: var(--grau-500);
  font-size: 0.78rem;
  margin: 2px 0 0;
  line-height: 1.4;
}

.mahnung-warnung .btn {
  flex-shrink: 0;
  margin-top: 0;
  text-align: center;
  justify-content: center;
  background: var(--primaer);
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-color: #dc2626;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.mahnung-warnung .btn:hover {
  background: var(--primaer-hell);
}

/* Rechnung-Detail: Überfällig-Banner */
.mahnung-ueberfaellig-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 58, 95, 0.04);
  border: 1px solid var(--grau-200);
  border-left: 3px solid var(--akzent);
  border-radius: 8px;
  margin-bottom: 16px;
}

.mahnung-ueberfaellig-banner__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.mahnung-ueberfaellig-banner__text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--grau-700);
  font-weight: 500;
}

/* Mahnung senden Button */
.mahnung-senden-btn {
  background: var(--primaer);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.mahnung-senden-btn:hover {
  background: var(--primaer-hell);
}

/* Mahnungs-Historie */
.mahnung-historie {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--grau-200);
}

.mahnung-historie__titel {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grau-700);
  margin-bottom: 12px;
}

.mahnung-historie__leer {
  font-size: 0.82rem;
  color: var(--grau-400);
  font-style: italic;
}

.mahnung-historie__eintrag {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--grau-300);
}

.mahnung-historie__eintrag--stufe1 { border-left-color: #f59e0b; }
.mahnung-historie__eintrag--stufe2 { border-left-color: #ea580c; }
.mahnung-historie__eintrag--stufe3 { border-left-color: #dc2626; }
.mahnung-historie__eintrag--stufe4 { border-left-color: #991b1b; }

.mahnung-historie__stufe {
  font-weight: 600;
  font-size: 0.82rem;
  min-width: 140px;
}

.mahnung-historie__details {
  flex: 1;
  font-size: 0.8rem;
  color: var(--grau-500);
}

.mahnung-historie__datum {
  font-size: 0.78rem;
  color: var(--grau-400);
  white-space: nowrap;
}

/* Mahnung Dialog */
.mahnung-dialog {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  padding: 16px;
}

.mahnung-dialog__inhalt {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.mahnung-dialog__kopf {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--grau-200);
}

.mahnung-dialog__kopf h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--grau-900);
}

.mahnung-dialog__kopf p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--grau-500);
}

.mahnung-dialog__body {
  padding: 20px 24px;
}

.mahnung-dialog__feld {
  margin-bottom: 14px;
}

.mahnung-dialog__feld label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grau-700);
  margin-bottom: 4px;
}

.mahnung-dialog__feld input,
.mahnung-dialog__feld select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--grau-300);
  border-radius: 6px;
  font-size: 0.88rem;
}

.mahnung-dialog__zusammenfassung {
  background: #f9fafb;
  border: 1px solid var(--grau-200);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
}

.mahnung-dialog__zeile {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
  color: var(--grau-600);
}

.mahnung-dialog__zeile--gesamt {
  border-top: 2px solid #dc2626;
  margin-top: 8px;
  padding-top: 8px;
  font-weight: 700;
  color: #dc2626;
  font-size: 0.95rem;
}

.mahnung-dialog__fuss {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--grau-200);
}

/* Überfällig-Tage Badge in Rechnungsliste */
.ueberfaellig-tage {
  font-size: 0.7rem;
  color: var(--grau-500);
  margin-right: 6px;
}

@media (max-width: 600px) {
  .mahnung-warnung {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mahnung-warnung .btn {
    align-self: stretch;
    text-align: center;
  }

  .mahnung-dialog__inhalt {
    max-width: 100%;
  }

  .mahnung-historie__eintrag {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
