/* Ergänzungen zur HTMX-Oberfläche (zusätzlich zu Tailwind) */
.material-symbols-outlined { font-size: 22px; vertical-align: middle; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request.htmx-swap-target, .htmx-request > .htmx-swap-target { opacity: .55; }
details > summary { list-style: none; cursor: pointer; }
[data-install][hidden] { display: none !important; }     /* Tailwind-Klasse flex würde hidden sonst überstimmen */
/* Demo-Video als Fenster über der Seite (_nav.html, ui.js), rund 75 % des Bildschirms (Breite oder Höhe, je nachdem was zuerst greift; 3.5rem = Kopfzeile); margin mit !important, weil space-y der Seitenleiste ihn sonst überschreibt */
.video-dialog { margin: auto !important; padding: 0; border: 0; border-radius: 1rem; background: #18181b; width: min(75vw, calc((75vh - 3.5rem) * 16 / 9)); max-height: calc(100vh - 2rem); overflow: hidden; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .5); }
.video-dialog::backdrop { background: rgb(2 6 23 / .75); }
.video-dialog video { aspect-ratio: 16 / 9; height: auto; max-height: calc(100vh - 6rem); background: #000; }
@media (max-width: 640px) { .video-dialog { width: calc(100vw - 2rem); } }   /* Smartphone: fast volle Breite */
/* Demo-Video und Geführte Tour in der Seitenleiste: pastellgrün hinterlegt, zu Sitzungsbeginn 10 s pulsierend (ui.js setzt nav-pulse) */
.nav-hilite { color: #166534; background: #dcfce7; }
.nav-hilite:hover, .nav-hilite:focus-visible { background: #bbf7d0; }
.dark .nav-hilite { color: #bbf7d0; background: rgb(22 163 74 / .18); }
.dark .nav-hilite:hover, .dark .nav-hilite:focus-visible { background: rgb(22 163 74 / .3); }
.nav-hilite.nav-pulse { animation: nav-pulse 2s ease-in-out 5; }
@keyframes nav-pulse {
  0%, 100% { background: #dcfce7; box-shadow: 0 0 0 0 rgb(34 197 94 / 0); }
  50% { background: #bbf7d0; box-shadow: 0 0 0 4px rgb(34 197 94 / .25); }
}
.dark .nav-hilite.nav-pulse { animation-name: nav-pulse-dark; }
@keyframes nav-pulse-dark {
  0%, 100% { background: rgb(22 163 74 / .18); box-shadow: 0 0 0 0 rgb(34 197 94 / 0); }
  50% { background: rgb(22 163 74 / .38); box-shadow: 0 0 0 4px rgb(34 197 94 / .25); }
}
@media (prefers-reduced-motion: reduce) { .nav-hilite.nav-pulse { animation: none; } }
.video-close { color: #e4e4e7; background: rgb(255 255 255 / .08); }
.video-close:hover, .video-close:focus-visible { background: rgb(255 255 255 / .18); }
/* KI-Suche-Knopf: PPM-grün mit Glow in der festen Kopfzeile (base.html) vor Feedback */
.ki-search-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; height: 2.25rem; padding: 0 1rem; margin-right: .25rem;
  border-radius: .625rem; background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: #fff; font-size: .9375rem; font-weight: 800;
  box-shadow: 0 6px 16px -4px rgb(22 163 74 / .65), 0 0 12px rgb(34 197 94 / .35); transition: transform .15s, box-shadow .15s, filter .15s; }
.ki-search-badge:hover, .ki-search-badge:focus-visible { transform: translateY(-1px); filter: brightness(1.06);
  box-shadow: 0 10px 20px -6px rgb(22 163 74 / .8), 0 0 16px rgb(34 197 94 / .45); outline: none; }
.ki-search-badge:focus-visible { box-shadow: 0 0 0 3px #bbf7d0; }
@media (max-width: 640px) { .ki-search-badge { width: 2.25rem; padding: 0; justify-content: center; margin-right: 0; } .ki-search-badge-label { display: none; } }
/* Feedback-Knopf: orange in der festen Kopfzeile (base.html), damit er auffällt, ohne Inhalte zu verdecken */
.feedback-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; height: 2.25rem; padding: 0 1rem; margin-right: .25rem;
  border-radius: .625rem; background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); color: #fff; font-size: .9375rem; font-weight: 800;
  box-shadow: 0 6px 14px -6px rgb(234 88 12 / .7); transition: transform .15s, box-shadow .15s, filter .15s; }
.feedback-badge:hover, .feedback-badge:focus-visible { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 18px -8px rgb(234 88 12 / .8); outline: none; }
.feedback-badge:focus-visible { box-shadow: 0 0 0 3px #fed7aa; }
@media (max-width: 640px) { .feedback-badge { width: 2.25rem; padding: 0; justify-content: center; margin-right: 0; } .feedback-badge-label { display: none; } }
/* Feedback-Dialog (fb-*): orangener Kopf, Art als Kacheln, Felder mit orangem Fokus, abgesetzter Fuß */
.fb-dialog { margin: auto; padding: 0; border: 0; border-radius: 1.25rem; width: calc(100% - 2rem); max-width: 46rem; max-height: calc(100vh - 2rem);
  overflow: auto; background: #fff; color: #1e293b; box-shadow: 0 30px 60px -15px rgb(15 23 42 / .45), 0 0 0 1px rgb(15 23 42 / .06); }
.dark .fb-dialog { background: #18181b; color: #f4f4f5; box-shadow: 0 30px 60px -15px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .08); }
.fb-dialog::backdrop { background: rgb(15 23 42 / .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.fb-dialog[open] { animation: fb-in .18s ease-out; }
@keyframes fb-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fb-dialog[open] { animation: none; } }
.fb-head { display: flex; align-items: center; gap: .875rem; padding: 1.25rem 1.25rem 1.25rem 1.5rem; color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
/* KI-Suche-Modal (.ki-dialog): gleiche Struktur wie .fb-dialog, aber breiter und in PPM-Grün */
.ki-dialog { max-width: 64rem; }
.ki-dialog .fb-head { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.ki-dialog .fb-req { color: #16a34a; }
.ki-dialog .fb-input:focus { border-color: #16a34a; box-shadow: 0 0 0 4px rgb(22 163 74 / .15); }
.ki-dialog .fb-textarea { min-height: 5.5rem; }
.ki-dialog .fb-btn-primary { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); box-shadow: 0 8px 16px -6px rgb(22 163 74 / .55); }
.ki-dialog .fb-btn-primary:hover, .ki-dialog .fb-btn-primary:focus-visible { box-shadow: 0 12px 20px -8px rgb(22 163 74 / .7); }
.fb-head-icon { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: .875rem; display: flex; align-items: center; justify-content: center;
  background: rgb(255 255 255 / .2); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.fb-head .fb-title { color: #fff; }
.fb-title { font-size: 1.1875rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: #0f172a; }
.dark .fb-title { color: #fff; }
.fb-subtitle { font-size: .875rem; color: rgb(255 255 255 / .88); margin-top: .125rem; }
.fb-subtitle-dark { font-size: .9rem; color: #64748b; max-width: 24rem; margin: 0 auto; }
.dark .fb-subtitle-dark { color: #a1a1aa; }
.fb-close { width: 2.25rem; height: 2.25rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: .625rem;
  color: #fff; background: transparent; transition: background .15s; }
.fb-close:hover, .fb-close:focus-visible { background: rgb(255 255 255 / .2); outline: none; }
.fb-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.mail-test-to { width: 100%; }
@media (min-width: 640px) { .mail-test-to { width: 16rem; } }
.fb-thanks { display: flex; gap: .75rem; align-items: flex-start; border-radius: .875rem; padding: .875rem 1rem; font-size: .875rem; line-height: 1.5;
  background: #fff7ed; color: #7c2d12; border: 1px solid #fed7aa; }
.fb-thanks strong { color: #9a3412; }
.dark .fb-thanks { background: rgb(249 115 22 / .1); color: #fed7aa; border-color: rgb(249 115 22 / .25); }
.dark .fb-thanks strong { color: #fdba74; }
.fb-thanks-icon { font-size: 22px; color: #f97316; font-variation-settings: 'FILL' 1; flex-shrink: 0; margin-top: .05rem; }
.fb-attach { display: flex; align-items: center; gap: .5rem; max-width: 16rem; padding: .375rem .625rem .375rem .375rem; border-radius: .75rem;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #c2410c; font-size: .8125rem; font-weight: 600; }
.dark .fb-attach { border-color: #3f3f46; background: #27272a; color: #fdba74; }
.fb-attach:hover { border-color: #f97316; }
.fb-attach-img { width: 3rem; height: 3rem; border-radius: .5rem; object-fit: cover; }
.fb-attach-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.dark .fb-attach-name { color: #e4e4e7; }
.fb-optional { font-weight: 500; color: #94a3b8; margin-left: .25rem; }
.fb-drop { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1rem; border: 1.5px dashed #cbd5e1; border-radius: .875rem;
  background: #f8fafc; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dark .fb-drop { border-color: #52525b; background: #27272a; }
.fb-drop:hover, .fb-drop.fb-drop-over, .fb-drop:focus-within { border-color: #f97316; background: #fff7ed; }
.dark .fb-drop:hover, .dark .fb-drop.fb-drop-over, .dark .fb-drop:focus-within { background: rgb(249 115 22 / .1); }
.fb-drop-icon { font-size: 28px; color: #f97316; }
.fb-drop-text { font-size: .875rem; color: #334155; }
.dark .fb-drop-text { color: #e4e4e7; }
.fb-drop-text strong { color: #ea580c; }
.fb-drop-hint { font-size: .75rem; color: #94a3b8; }
.fb-drop.fb-drop-full { display: none; }
.fb-files { display: grid; gap: .5rem; margin-top: .5rem; }
.fb-files:empty { display: none; }
.fb-file { display: flex; align-items: center; gap: .625rem; padding: .375rem .5rem .375rem .375rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; }
.dark .fb-file { border-color: #3f3f46; background: #27272a; }
.fb-file-thumb { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: .5rem; object-fit: cover; background: #fff7ed; color: #ea580c;
  display: flex; align-items: center; justify-content: center; }
.dark .fb-file-thumb { background: rgb(249 115 22 / .15); }
.fb-file-name { flex: 1; min-width: 0; font-size: .8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-file-size { font-size: .75rem; color: #94a3b8; flex-shrink: 0; }
.fb-file-remove { width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }
.fb-file-remove:hover, .fb-file-remove:focus-visible { background: #fee2e2; color: #dc2626; outline: none; }
.dark .fb-file-remove:hover { background: rgb(127 29 29 / .4); }
.fb-file-error { font-size: .75rem; color: #dc2626; margin-top: .375rem; }
.fb-label { display: block; font-size: .8125rem; font-weight: 700; color: #334155; margin-bottom: .5rem; }
.dark .fb-label { color: #d4d4d8; }
.fb-req { color: #ea580c; }
.fb-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 480px) { .fb-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fb-kind { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .125rem; padding: .75rem .375rem .625rem;
  border-radius: .875rem; border: 1.5px solid #e2e8f0; background: #f8fafc; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.dark .fb-kind { border-color: #3f3f46; background: #27272a; }
.fb-kind:hover { border-color: #fdba74; transform: translateY(-1px); }
.fb-kind-icon { font-size: 24px; color: #94a3b8; transition: color .15s; }
.fb-kind-name { font-size: .875rem; font-weight: 700; color: #1e293b; }
.dark .fb-kind-name { color: #f4f4f5; }
.fb-kind-hint { font-size: .6875rem; color: #94a3b8; line-height: 1.2; }
.fb-kind:has(input:checked) { border-color: #f97316; background: #fff7ed; box-shadow: 0 0 0 3px rgb(249 115 22 / .15); }
.dark .fb-kind:has(input:checked) { background: rgb(249 115 22 / .12); }
.fb-kind:has(input:checked) .fb-kind-icon { color: #ea580c; font-variation-settings: 'FILL' 1; }
.fb-kind:has(input:focus-visible) { box-shadow: 0 0 0 3px rgb(249 115 22 / .35); }
.fb-input { display: block; width: 100%; border-radius: .75rem; border: 1.5px solid #e2e8f0; background: #fff; color: inherit;
  padding: .7rem .875rem; font-size: .9375rem; transition: border-color .15s, box-shadow .15s; }
.dark .fb-input { border-color: #3f3f46; background: #27272a; }
.fb-input::placeholder { color: #94a3b8; }
.fb-input:hover { border-color: #cbd5e1; }
.dark .fb-input:hover { border-color: #52525b; }
.fb-input:focus { outline: none; border-color: #f97316; box-shadow: 0 0 0 4px rgb(249 115 22 / .15); }
.fb-textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.fb-field { position: relative; display: block; }
.fb-field-icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); font-size: 20px; color: #94a3b8; pointer-events: none; }
.fb-input-icon { padding-left: 2.6rem; }
.fb-count { display: block; text-align: right; font-size: .75rem; color: #94a3b8; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.fb-alert { display: flex; gap: .625rem; align-items: flex-start; border-radius: .75rem; padding: .75rem .875rem; font-size: .875rem;
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.dark .fb-alert { background: rgb(127 29 29 / .3); color: #fca5a5; border-color: rgb(248 113 113 / .3); }
.fb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9; background: #f8fafc; }
.dark .fb-foot { border-color: #27272a; background: #1f1f23; }
.fb-note { display: flex; align-items: flex-start; gap: .375rem; font-size: .75rem; line-height: 1.4; color: #64748b; flex: 1 1 14rem; }
.dark .fb-note { color: #a1a1aa; }
.fb-note .material-symbols-outlined { margin-top: .05rem; }
.fb-actions { display: flex; gap: .5rem; margin-left: auto; }
.fb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: .75rem; padding: .65rem 1.125rem;
  font-size: .9rem; font-weight: 700; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .15s, border-color .15s; }
.fb-btn-ghost { border: 1.5px solid #e2e8f0; background: #fff; color: #334155; }
.dark .fb-btn-ghost { border-color: #3f3f46; background: #27272a; color: #e4e4e7; }
.fb-btn-ghost:hover { border-color: #cbd5e1; background: #f1f5f9; }
.dark .fb-btn-ghost:hover { background: #3f3f46; }
.fb-btn-primary { color: #fff; background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); box-shadow: 0 8px 16px -6px rgb(234 88 12 / .55); }
.fb-btn-primary:hover, .fb-btn-primary:focus-visible { transform: translateY(-1px); box-shadow: 0 12px 20px -8px rgb(234 88 12 / .7); outline: none; }
.fb-btn-primary:disabled { opacity: .6; transform: none; cursor: progress; }
@media (max-width: 480px) { .fb-actions { width: 100%; } .fb-actions .fb-btn { flex: 1; padding-left: .75rem; padding-right: .75rem; } .fb-actions .fb-btn-primary { flex: 1.6; } .fb-body { padding: 1.25rem; } .fb-foot { padding: 1rem 1.25rem; } }
.fb-done { padding: 2.25rem 1.5rem 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.fb-done-icon { width: 4rem; height: 4rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); box-shadow: 0 0 0 8px rgb(34 197 94 / .15); animation: fb-pop .3s ease-out; }
.fb-done-icon .material-symbols-outlined { font-size: 34px; font-weight: 700; }
@keyframes fb-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-done .fb-btn { margin-top: .5rem; min-width: 8rem; }
details > summary::-webkit-details-marker { display: none; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .6; }
.dark input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
@media print {
  #sidebar, header, #toasts, .no-print { display: none !important; }
  main { overflow: visible !important; }
}

/* Auswahllisten: deckender Hintergrund, lesbare Einträge. Ohne color-scheme zeichnet der Browser die
   aufgeklappte Liste hell, die Schrift erbt aber die helle Farbe des Dunkelmodus und wird unlesbar.
   :where() hält die Spezifität niedrig, damit Tailwind-Klassen an einzelnen Listen weiter gewinnen. */
html { color-scheme: light; }
html.dark { color-scheme: dark; }
select { background-color: #fff; color: #0f172a; }
:where(.dark) select { background-color: #27272a; color: #f4f4f5; }
select option, select optgroup { background-color: #fff; color: #0f172a; }
:where(.dark) select option, :where(.dark) select optgroup { background-color: #27272a; color: #f4f4f5; }
select:disabled, input:disabled { cursor: not-allowed; }

/* Farbig hinterlegte RAG-Auswahl */
select.rag-gruen, .rag-box.rag-gruen { background-color: #d1fae5; border-color: #a7f3d0; color: #064e3b; }
select.rag-gelb, .rag-box.rag-gelb  { background-color: #fef3c7; border-color: #fde68a; color: #78350f; }
select.rag-rot, .rag-box.rag-rot   { background-color: #fee2e2; border-color: #fecaca; color: #7f1d1d; }
select.rag-gruen option, select.rag-gelb option, select.rag-rot option { background: #fff; color: #0f172a; }
select.rag-gruen:disabled, select.rag-gelb:disabled, select.rag-rot:disabled { opacity: 1; }
.dark select.rag-gruen, .dark .rag-box.rag-gruen { background-color: rgba(2,44,34,.6); border-color: #064e3b; color: #a7f3d0; }
.dark select.rag-gelb, .dark .rag-box.rag-gelb  { background-color: rgba(69,26,3,.6);  border-color: #78350f; color: #fde68a; }
.dark select.rag-rot, .dark .rag-box.rag-rot   { background-color: rgba(69,10,10,.6); border-color: #7f1d1d; color: #fecaca; }

/* Bestätigungsdialog */
#confirm-dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
#confirm-dialog[open] { animation: confirm-pop .14s ease-out; }
@keyframes confirm-pop { from { transform: translateY(6px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* Umsatzkurve: Linien zeichnen sich von links nach rechts, Punkte erscheinen nacheinander */
.rv-chart .rv-draw { animation: rv-reveal 1.1s cubic-bezier(.22, .8, .3, 1) both; }
.rv-chart .rv-late { animation-delay: .45s; }
.rv-chart .rv-fade { animation: rv-fade 1.2s ease-out .3s both; }
.rv-chart .rv-dot { animation: rv-pop .35s ease-out backwards; }
@keyframes rv-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rv-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .rv-chart .rv-draw, .rv-chart .rv-fade, .rv-chart .rv-dot { animation: none; }
}

/* Kippschalter (Konfigurationen) */
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 24px; border-radius: 9999px; background: #cbd5e1; transition: background .15s; }
.switch .knob { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 9999px; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .3); transition: transform .15s; }
.switch input:checked ~ .track { background: #16a34a; }
.switch input:checked ~ .knob { transform: translateX(20px); }
.switch input:focus-visible ~ .track { outline: 2px solid #16a34a; outline-offset: 2px; }
.dark .switch .track { background: #3f3f46; }
.dark .switch input:checked ~ .track { background: #16a34a; }
/* Gesperrt (z. B. PMO-Rolle): grau, auch wenn eingeschaltet */
.switch input:disabled ~ .track, .dark .switch input:disabled ~ .track { background: #94a3b8; cursor: not-allowed; }
.dark .switch input:disabled ~ .track { background: #52525b; }

/* Info-Blase an Symbol-Knöpfen (ui.js: title bzw. data-tip) */
.ui-tip { position: fixed; z-index: 1000; max-width: 260px; padding: 5px 9px; border-radius: 8px;
  background: #0f172a; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.35; pointer-events: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .25); animation: ui-tip-in .08s ease-out; }
.dark .ui-tip { background: #f4f4f5; color: #18181b; }
@keyframes ui-tip-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ui-tip { animation: none; } }

/* Statuspunkt am Menüpunkt KI-Suche: grün pulsierend = aktiv, rot = aus/kein gültiger Schlüssel */
.ki-dot { position: relative; margin-left: auto; width: .625rem; height: .625rem; border-radius: 9999px; flex: none; }
.ki-dot-on { background: #22c55e; }
.ki-dot-on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #22c55e; animation: ki-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
.ki-dot-off { background: #ef4444; }
@keyframes ki-ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ki-dot-on::after { animation: none; } }
.bg-\[\#16a34a\] > .ki-dot { box-shadow: 0 0 0 2px #fff; }

/* Anlageassistent (project/new.html, gesteuert über ui.js [data-wizard]).
   Ohne JavaScript (.wiz-js fehlt) stehen alle Schritte untereinander, Stepper und Blättern sind aus. */
.wiz-steps { display: none; }
.wiz-js .wiz-steps { display: flex; gap: .25rem; list-style: none; margin: 0; padding: .75rem 1rem;
  border-bottom: 1px solid #e2e8f0; overflow-x: auto; }
.dark .wiz-js .wiz-steps, .dark .wiz-steps { border-color: #27272a; }
.wiz-steps li { flex: 1 1 0; min-width: 0; }
.wiz-step-btn { width: 100%; display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: .6rem;
  font-size: .8rem; font-weight: 600; color: #64748b; text-align: left; }
.wiz-step-btn:hover { background: #f1f5f9; }
.dark .wiz-step-btn { color: #a1a1aa; }
.dark .wiz-step-btn:hover { background: #27272a; }
.wiz-num { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 9999px; display: inline-flex; align-items: center;
  justify-content: center; font-size: .75rem; border: 2px solid #cbd5e1; color: #64748b; background: #fff; }
.dark .wiz-num { border-color: #3f3f46; background: #18181b; color: #a1a1aa; }
.wiz-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-step-btn.is-done .wiz-num { border-color: #16a34a; background: #dcfce7; color: #15803d; }
.dark .wiz-step-btn.is-done .wiz-num { background: rgba(22,163,74,.2); color: #86efac; }
.wiz-step-btn.is-active { color: #0f172a; }
.dark .wiz-step-btn.is-active { color: #fff; }
.wiz-step-btn.is-active .wiz-num { border-color: #16a34a; background: #16a34a; color: #fff; }
@media (max-width: 767px) { .wiz-step-btn:not(.is-active) .wiz-label { display: none; } .wiz-steps li { flex: none; } .wiz-steps li:has(.is-active) { flex: 1 1 auto; } }
.wiz-step + .wiz-step { border-top: 1px solid #e2e8f0; padding-top: 1rem; }
.dark .wiz-step + .wiz-step { border-color: #27272a; }
form[data-wizard]:not(.wiz-js) :is(.wiz-summary-step, [data-wiz-prev], [data-wiz-next], .wiz-counter) { display: none !important; }
.wiz-js .wiz-step { display: none; border-top: 0 !important; padding-top: 0 !important; }
.wiz-js .wiz-step.is-active { display: block; animation: wiz-in .15s ease-out; }
.wiz-js :is([data-wiz-prev], [data-wiz-next], [data-wiz-submit])[hidden] { display: none !important; }
@keyframes wiz-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wiz-sum { border: 1px solid #e2e8f0; border-radius: .75rem; padding: .75rem 1rem; }
.dark .wiz-sum { border-color: #27272a; }
.wiz-sum-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem;
  font-weight: 700; font-size: .875rem; }
.wiz-sum-head button { font-size: .75rem; font-weight: 600; color: #16a34a; }
.wiz-sum-head button:hover { text-decoration: underline; }
.wiz-sum dl { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .2rem 1rem; font-size: .8rem; margin: 0; }
.wiz-sum dt { color: #64748b; }
.dark .wiz-sum dt { color: #a1a1aa; }
.wiz-sum dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.wiz-sum-empty { font-size: .8rem; color: #94a3b8; font-style: italic; }
@media (max-width: 639px) { .wiz-sum dl { grid-template-columns: 1fr; } .wiz-sum dd { margin-bottom: .3rem; } }

/* Anlageassistent: Produktauswahl (Schritt 3) und Standorte (Schritt 4) */
.wiz-cats { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.wiz-cat { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #e2e8f0; border-radius: 9999px;
  padding: .3rem .7rem; font-size: .75rem; font-weight: 600; color: #475569; background: #fff; }
.wiz-cat:hover { border-color: #16a34a; }
.wiz-cat.is-active { background: #16a34a; border-color: #16a34a; color: #fff; }
.dark .wiz-cat { background: #18181b; border-color: #3f3f46; color: #d4d4d8; }
.dark .wiz-cat.is-active { background: #16a34a; border-color: #16a34a; color: #fff; }
.wiz-cat-n:empty { display: none; }
.wiz-cat-n { min-width: 1.1rem; padding: 0 .3rem; border-radius: 9999px; background: #dcfce7; color: #15803d; font-size: .7rem; text-align: center; }
.wiz-cat.is-active .wiz-cat-n { background: #fff; }
.wiz-prod-list { display: grid; gap: .5rem; }
.wiz-prod { border: 1px solid #e2e8f0; border-radius: .75rem; }
.dark .wiz-prod { border-color: #27272a; }
.wiz-prod.is-selected { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a inset; }
.wiz-prod.is-hidden { display: none; }
.wiz-prod-head { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem .9rem; cursor: pointer; }
.wiz-prod-head input[type="checkbox"] { margin-top: .2rem; width: 1rem; height: 1rem; accent-color: #16a34a; flex: none; }
.wiz-prod-detail { display: none; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; padding: 0 .9rem .8rem 2.65rem; align-items: end; }
.wiz-prod.is-selected .wiz-prod-detail, .wiz-prod-detail.is-open { display: grid; }
.wiz-custom-row .wiz-prod-detail { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; }
@media (max-width: 639px) {
  .wiz-prod-detail, .wiz-custom-row .wiz-prod-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: .9rem; }
  .wiz-prod-head { flex-wrap: wrap; }
}
.wiz-custom { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed #cbd5e1; }
.dark .wiz-custom { border-color: #3f3f46; }
.wiz-custom-row { border: 1px solid #fde68a; background: #fffbeb; border-radius: .75rem; padding: .8rem .9rem; }
.dark .wiz-custom-row { border-color: #78350f; background: rgba(69,26,3,.25); }
.wiz-total { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.25rem; margin-top: 1rem; padding: .6rem .9rem;
  border-radius: .75rem; background: #f8fafc; font-size: .8rem; color: #475569; }
.wiz-total strong { color: #0f172a; font-variant-numeric: tabular-nums; }
.dark .wiz-total { background: #09090b; color: #a1a1aa; }
.dark .wiz-total strong { color: #fff; }

/* Geführte Tour (static/js/tour.js, Schritte aus ui/_tour.html): Spotlight dunkelt alles außer dem Ziel ab,
   die Sprechblase gleitet mit dem Spotlight zum nächsten Schritt. */
.tour-layer { position: fixed; inset: 0; z-index: 70; opacity: 0; transition: opacity .25s ease-out; }
.tour-layer.is-on { opacity: 1; }
.tour-block { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 3px #16a34a, 0 0 0 9999px rgba(15, 23, 42, .58);
  transition: left .45s cubic-bezier(.22, .8, .3, 1), top .45s cubic-bezier(.22, .8, .3, 1),
              width .45s cubic-bezier(.22, .8, .3, 1), height .45s cubic-bezier(.22, .8, .3, 1); }
.tour-spot::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid #4ade80;
  animation: tour-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.tour-bubble { position: fixed; width: 400px; max-width: calc(100vw - 24px); padding: 22px 24px 20px; border-radius: 20px;
  background: #fff; color: #334155; border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 24px 60px -8px rgba(15, 23, 42, .38);
  transition: left .45s cubic-bezier(.22, .8, .3, 1), top .45s cubic-bezier(.22, .8, .3, 1); outline: none; }
.tour-bubble::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #16a34a, #4ade80); }
.tour-bubble.is-center { width: 440px; padding: 28px 28px 22px; }
.dark .tour-bubble { background: #18181b; color: #d4d4d8; border-color: #3f3f46; box-shadow: 0 24px 60px -8px rgba(0, 0, 0, .7); }
.tour-bubble.is-sheet { width: auto; right: 12px; padding: 20px 18px 16px; }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: inherit; border: inherit; display: none; transform: rotate(45deg); }
.tour-arrow.is-right { display: block; left: -8px; border-top-color: transparent; border-right-color: transparent; }
.tour-arrow.is-left { display: block; right: -8px; border-bottom-color: transparent; border-left-color: transparent; }
.tour-arrow.is-bottom { display: block; top: -8px; border-bottom-color: transparent; border-right-color: transparent; }
.tour-arrow.is-top { display: block; bottom: -8px; border-top-color: transparent; border-left-color: transparent; }
.tour-head { display: flex; align-items: center; gap: .6rem; }
.tour-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: #dcfce7; color: #15803d; }
.tour-icon .material-symbols-outlined { font-size: 21px; }
.dark .tour-icon { background: rgba(22, 163, 74, .2); color: #86efac; }
.tour-count { flex: 1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #16a34a; }
.dark .tour-count { color: #4ade80; }
.tour-x { width: 32px; height: 32px; margin: -6px -8px 0 0; align-self: flex-start; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; }
.tour-x:hover { background: #f1f5f9; color: #0f172a; }
.dark .tour-x { color: #a1a1aa; }
.dark .tour-x:hover { background: #27272a; color: #fff; }
.tour-title { margin: .9rem 0 .4rem; font-size: 1.2rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: #0f172a; }
.tour-bubble.is-center .tour-title { font-size: 1.35rem; }
.dark .tour-title { color: #fff; }
.tour-text { margin: 0; font-size: .95rem; line-height: 1.6; }
.tour-body.tour-in { animation: tour-in .3s ease-out; }
.tour-dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 1.1rem 0 1rem; }
.tour-dots span { width: 7px; height: 7px; border-radius: 9999px; background: #cbd5e1; transition: width .3s, background .3s; }
.tour-dots span.is-done { background: #86efac; }
.tour-dots span.is-active { width: 22px; background: #16a34a; }
.dark .tour-dots span { background: #3f3f46; }
.dark .tour-dots span.is-done { background: #166534; }
.dark .tour-dots span.is-active { background: #22c55e; }
.tour-foot { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .9rem; border-top: 1px solid #f1f5f9; }
.dark .tour-foot { border-top-color: #27272a; }
.tour-foot button { min-height: 38px; padding-left: 1.1rem; padding-right: 1.1rem; border-radius: 10px; }
.tour-foot [hidden] { display: none; }
.tour-foot .tour-cancel { margin-right: auto; padding-left: .75rem; padding-right: .75rem; }
.tour-opt { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-size: 12.5px; line-height: 1.4; color: #64748b; cursor: pointer; user-select: none; }
.tour-opt input { width: 16px; height: 16px; flex-shrink: 0; margin: 0; accent-color: #16a34a; cursor: pointer; }
.dark .tour-opt { color: #a1a1aa; }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tour-ping { 0% { transform: scale(1); opacity: .9; } 80%, 100% { transform: scale(1.06); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tour-layer, .tour-spot, .tour-bubble, .tour-dots span { transition: none; }
  .tour-spot::after, .tour-body.tour-in { animation: none; }
}
@media print { .tour-layer { display: none !important; } }

/* Projektverlauf-Leiste (project/_projektverlauf.html): Stationen mit Verbindungslinie, ohne neue Tailwind-Klassen */
.lc-steps { display: flex; gap: 0; list-style: none; margin: 0; padding: 0 0 .25rem; }
.lc-step { position: relative; flex: 1 1 0; min-width: 6.5rem; display: flex; flex-direction: column; align-items: center;
           text-align: center; gap: .15rem; padding: 0 .25rem; }
.lc-step::before { content: ""; position: absolute; top: .875rem; left: -50%; width: 100%; height: 2px; background: #cbd5e1; z-index: 0; }
.lc-step:first-child::before { display: none; }
.lc-step.lc-done::before, .lc-step.lc-current::before { background: #10b981; }
.lc-dot { position: relative; z-index: 1; width: 1.75rem; height: 1.75rem; border-radius: 9999px; display: inline-flex;
          align-items: center; justify-content: center; font-size: .75rem; font-weight: 700;
          background: #fff; border: 2px solid #cbd5e1; color: #64748b; }
.lc-done .lc-dot { background: #10b981; border-color: #10b981; color: #fff; }
.lc-current .lc-dot { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.18); }
.lc-open .lc-label { color: #64748b; }
.dark .lc-step::before { background: #3f3f46; }
.dark .lc-step.lc-done::before, .dark .lc-step.lc-current::before { background: #059669; }
.dark .lc-dot { background: #18181b; border-color: #52525b; color: #a1a1aa; }
.dark .lc-done .lc-dot { background: #059669; border-color: #059669; color: #fff; }
.dark .lc-current .lc-dot { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.3); }
.dark .lc-open .lc-label { color: #a1a1aa; }

/* Standorte (project/_tab_standorte.html, _sites_body.html, static/js/standortkarte.js) */
.site-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 9999px; margin-right: .3rem; vertical-align: middle; background: #94a3b8; }
.site-geliefert { background: #10b981; } .site-in-Arbeit { background: #2563eb; } .site-offen { background: #94a3b8; }
.site-blockiert { background: #dc2626; } .site-ohne-Zuordnung { background: #8b5cf6; }
.site-regions { display: grid; gap: .35rem .9rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.site-region { display: grid; grid-template-columns: minmax(0, 1fr) 6rem auto; align-items: center; gap: .5rem;
               padding: .15rem .25rem; border-radius: .4rem; }
.site-region:hover { background: rgba(148,163,184,.12); }
.site-bar { display: flex; height: .45rem; border-radius: 9999px; overflow: hidden; background: #e2e8f0; }
.dark .site-bar { background: #3f3f46; }
.site-bar-done { background: #10b981; } .site-bar-work { background: #2563eb; } .site-bar-block { background: #dc2626; }
.site-layout { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.site-items { max-height: 34rem; overflow-y: auto; }
.site-item { border-top: 1px solid #f1f5f9; cursor: pointer; outline: none; }
.site-item:first-child { border-top: 0; }
.site-item:hover, .site-item:focus-visible { background: #f8fafc; }
.site-item.is-active { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }
.dark .site-item { border-top-color: #27272a; }
.dark .site-item:hover, .dark .site-item:focus-visible { background: #1f1f23; }
.dark .site-item.is-active { background: rgba(37,99,235,.15); }
.site-map-wrap { position: relative; isolation: isolate; background: #f8fafc; }
.dark .site-map-wrap { background: #18181b; }
.site-map { height: 22rem; width: 100%; z-index: 0; }
.site-legend { display: flex; flex-wrap: wrap; gap: .25rem .8rem; padding: .4rem .75rem; border-top: 1px solid #e2e8f0; color: #64748b; }
.dark .site-legend { border-top-color: #27272a; color: #a1a1aa; }
@media (min-width: 1024px) {
  .site-layout.site-with-map { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .site-with-map .site-map-wrap { position: sticky; top: 1rem; }
  .site-map { height: 34rem; }
}
.site-cluster span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
                     border-radius: 9999px; color: #fff; font: 700 12px/1 system-ui, sans-serif;
                     border: 3px solid rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.site-cluster { background: transparent; border: 0; }
.dark .leaflet-tile-pane { filter: brightness(.7) invert(1) contrast(.85) hue-rotate(200deg) saturate(.35); }
.dark .is-sat .leaflet-tile-pane { filter: none; }           /* Luftbild nicht umfärben */
/* Standortkarte als Vollbild (standortkarte.js, openFull): Smartphone mit wischbaren Karten, Desktop als Fenster */
.site-full-btn { position: absolute; top: .6rem; right: .6rem; z-index: 500; display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .8rem; border-radius: 9999px; font-size: .8rem; font-weight: 700; color: #0f172a; background: #fff;
  border: 1px solid #e2e8f0; box-shadow: 0 4px 14px rgba(15, 23, 42, .18); transition: transform .15s, box-shadow .15s; }
.site-full-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 23, 42, .22); }
.site-full-btn[hidden] { display: none; }
.dark .site-full-btn { background: #18181b; color: #fff; border-color: #3f3f46; }
.sitefs { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .25s ease-out; }
.sitefs.is-on { opacity: 1; }
.sitefs.is-closing { opacity: 0; transition-duration: .2s; }
.sitefs-win { position: absolute; inset: 0; overflow: hidden; background: #f8fafc; }
.dark .sitefs-win { background: #18181b; }
.sitefs-map { position: absolute; inset: 0; z-index: 0; }
.sitefs-head { position: absolute; z-index: 2; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center;
  justify-content: space-between; gap: .5rem; padding: .45rem .45rem .45rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(15, 23, 42, .18); }
.dark .sitefs-head { background: rgba(24, 24, 27, .94); }
.sitefs-titlebox { display: flex; align-items: baseline; gap: .6rem; min-width: 0; }
.sitefs-title { font-weight: 800; font-size: 1rem; color: #0f172a; }
.dark .sitefs-title { color: #fff; }
.sitefs-count { font-size: .75rem; font-weight: 700; color: #16a34a; font-variant-numeric: tabular-nums; }
.sitefs-close { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #475569; }
.sitefs-close:hover { background: #f1f5f9; color: #0f172a; }
.dark .sitefs-close { color: #a1a1aa; }
.dark .sitefs-close:hover { background: #27272a; color: #fff; }
.sitefs-list { position: absolute; z-index: 2; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 12px;
  padding: 10px 11vw 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sitefs-list::-webkit-scrollbar { display: none; }
.sitefs-card { position: relative; flex: 0 0 78vw; max-width: 360px; scroll-snap-align: center; padding: 14px 16px 12px; border-radius: 18px;
  background: #fff; color: #334155; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(15, 23, 42, .22); cursor: pointer; outline: none;
  transform: scale(.93); opacity: .78; transition: transform .3s cubic-bezier(.22, .8, .3, 1), opacity .3s, box-shadow .3s; }
.sitefs-card.is-active { transform: none; opacity: 1; box-shadow: 0 16px 40px rgba(15, 23, 42, .3); }
.sitefs-card:focus-visible { box-shadow: 0 0 0 3px #16a34a, 0 16px 40px rgba(15, 23, 42, .3); }
.dark .sitefs-card { background: #18181b; color: #d4d4d8; border-color: #3f3f46; }
.sitefs.is-on .sitefs-list { animation: sitefs-up .45s cubic-bezier(.22, .8, .3, 1) both; }
.sitefs-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.sitefs-name { font-weight: 800; font-size: .95rem; line-height: 1.3; color: #0f172a; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .sitefs-name { color: #fff; }
.sitefs-pill { flex-shrink: 0; white-space: nowrap; border-radius: 8px; padding: .1rem .45rem; font-size: 11px; font-weight: 700; background: #f1f5f9; color: #334155; }
.sitefs-pill.st-geliefert { background: #d1fae5; color: #065f46; } .sitefs-pill.st-in-Arbeit { background: #dbeafe; color: #1e3a8a; }
.sitefs-pill.st-blockiert { background: #fee2e2; color: #991b1b; } .sitefs-pill.st-ohne-Zuordnung { background: #ede9fe; color: #5b21b6; }
.dark .sitefs-pill { background: #27272a; color: #d4d4d8; }
.dark .sitefs-pill.st-geliefert { background: rgba(16, 185, 129, .18); color: #6ee7b7; } .dark .sitefs-pill.st-in-Arbeit { background: rgba(37, 99, 235, .22); color: #93c5fd; }
.dark .sitefs-pill.st-blockiert { background: rgba(220, 38, 38, .2); color: #fca5a5; } .dark .sitefs-pill.st-ohne-Zuordnung { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.sitefs-addr { margin-top: .15rem; font-size: .8rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .sitefs-addr { color: #a1a1aa; }
.sitefs-meta { display: flex; flex-wrap: wrap; gap: .2rem .75rem; margin-top: .45rem; font-size: 11.5px; color: #64748b; }
.dark .sitefs-meta { color: #a1a1aa; }
.sitefs-meta .is-late { font-weight: 700; color: #b91c1c; } .sitefs-meta .is-ok { font-weight: 700; color: #047857; }
.dark .sitefs-meta .is-late { color: #fca5a5; } .dark .sitefs-meta .is-ok { color: #6ee7b7; }
.sitefs-info { margin-top: .3rem; font-size: 11.5px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitefs-link { display: inline-block; margin-top: .55rem; font-size: .8rem; font-weight: 700; color: #16a34a; }
.sitefs-link:hover { text-decoration: underline; }
.dark .sitefs-link { color: #4ade80; }
/* Standort-Pins: Stecknadel in Statusfarbe mit Fabriksymbol, Nummer oben rechts (rot bei Verzug) */
.spin-wrap { background: transparent; border: 0; }
.spin { position: absolute; left: 0; top: 0; width: 30px; height: 40px; transform-origin: 50% 100%; transition: transform .2s cubic-bezier(.22, .8, .3, 1.4); }
.spin::before { content: ""; position: absolute; left: 1px; top: 1px; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(15, 23, 42, .35); }
.spin .material-symbols-outlined { position: absolute; left: 0; top: 4px; width: 30px; text-align: center; font-size: 17px; line-height: 22px; color: #fff;
  font-variation-settings: 'FILL' 1; }
.spin b { position: absolute; top: -7px; left: 19px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9999px; font-size: 10px; line-height: 15px;
  font-weight: 800; text-align: center; color: #0f172a; background: #fff; border: 1.5px solid var(--c); box-shadow: 0 1px 3px rgba(15, 23, 42, .3);
  font-variant-numeric: tabular-nums; }
.spin.is-late b { background: #dc2626; border-color: #fff; color: #fff; }
.spin-wrap:hover .spin { transform: scale(1.12); }
.spin.is-active { transform: scale(1.3); animation: spin-pop .35s cubic-bezier(.22, .8, .3, 1.4); }
.spin.is-active::after { content: ""; position: absolute; left: 5px; bottom: -4px; width: 20px; height: 8px; border-radius: 50%; border: 2px solid var(--c);
  animation: spin-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes spin-pop { from { transform: scale(.4) translateY(10px); opacity: 0; } to { transform: scale(1.3); opacity: 1; } }
/* Vollbild Desktop: Maus über einem Eintrag links lässt den Pin hüpfen */
.spin.is-bounce { transform: scale(1.25); animation: spin-bounce .55s cubic-bezier(.3, 0, .5, 1) infinite alternate; }
.spin-hover { pointer-events: none; }
@keyframes spin-bounce { from { transform: scale(1.25) translateY(0); } to { transform: scale(1.25) translateY(-12px); } }
.sitefs-num { cursor: pointer; transition: transform .15s; }
.sitefs-num:hover { transform: scale(1.15); }
.sitefs-pop .leaflet-popup-content { margin: 10px 14px; font-size: 12.5px; line-height: 1.45; }
.sitefs-pop a { font-weight: 700; color: #16a34a; }
.dark .sitefs-pop a { color: #4ade80; }
.leaflet-bar a.sitefs-fit { display: flex; align-items: center; justify-content: center; }
.leaflet-bar a.sitefs-fit .material-symbols-outlined { font-size: 18px; }
@keyframes spin-ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.site-num, .sitefs-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  margin-right: .4rem; border-radius: 9999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--c); vertical-align: 1px;
  font-variant-numeric: tabular-nums; }
.sitefs-num.is-late { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #dc2626; }
.sitefs-pos { display: flex; align-items: center; margin-bottom: .4rem; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #64748b;
  font-variant-numeric: tabular-nums; }
.dark .sitefs-pos { color: #a1a1aa; }
.dark .sitefs-num.is-late { box-shadow: 0 0 0 2px #18181b, 0 0 0 3.5px #f87171; }
.sitefs.no-anim, .sitefs.no-anim .sitefs-win, .sitefs.no-anim .sitefs-list { transition: none; animation: none !important; }
@keyframes sitefs-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes sitefs-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sitefs-win { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {           /* Smartphone: Umschalter Karte/Satellit unter der Kopfzeile */
  .sitefs-map .leaflet-top { top: calc(max(12px, env(safe-area-inset-top)) + 58px); }
}
@media (min-width: 768px) {
  .sitefs-win { inset: 3vh 3vw; border-radius: 22px; display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #e2e8f0; box-shadow: 0 30px 80px rgba(15, 23, 42, .45); }
  .dark .sitefs-win { border-color: #3f3f46; }
  .sitefs.is-on .sitefs-win { animation: sitefs-win .35s cubic-bezier(.22, .8, .3, 1); }
  .sitefs-head { position: static; grid-column: 1; grid-row: 1; border-radius: 0; box-shadow: none; padding: 1rem .75rem 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0; background: #fff; backdrop-filter: none; }
  .dark .sitefs-head { background: #18181b; border-bottom-color: #27272a; }
  .sitefs-title { font-size: 1.15rem; }
  .sitefs-list { position: static; grid-column: 1; grid-row: 2; flex-direction: column; gap: 10px; padding: 12px; overflow-x: hidden; overflow-y: auto;
    scroll-snap-type: none; background: #f8fafc; scrollbar-width: thin; }
  .dark .sitefs-list { background: #111113; }
  .sitefs.is-on .sitefs-list { animation: none; }
  .sitefs-card { flex: none; max-width: none; transform: none; opacity: 1; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: border-color .2s, box-shadow .2s, background .2s; }
  .sitefs-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 16px rgba(15, 23, 42, .1); }
  .sitefs-card.is-active { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a, 0 8px 22px rgba(22, 163, 74, .18); }
  .dark .sitefs-card:hover { border-color: #52525b; }
  .sitefs-card.is-hover:not(.is-active) { border-color: #94a3b8; background: #f8fafc; box-shadow: 0 6px 16px rgba(15, 23, 42, .12); }
  .dark .sitefs-card.is-hover:not(.is-active) { border-color: #71717a; background: #27272a; }
  .dark .sitefs-card.is-active { border-color: #22c55e; box-shadow: 0 0 0 1px #22c55e; }
  .sitefs-map { position: relative; inset: auto; grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .sitefs, .sitefs-card { transition: none; }
  .sitefs.is-on .sitefs-list, .sitefs.is-on .sitefs-win, .spin.is-active, .spin.is-active::after, .spin.is-bounce { animation: none; }
}
@media print { .sitefs, .site-full-btn { display: none !important; } }
.dark .leaflet-popup-content-wrapper, .dark .leaflet-popup-tip { background: #27272a; color: #f4f4f5; }
.dark .leaflet-control-attribution { background: rgba(24,24,27,.8); color: #a1a1aa; }
.dark .leaflet-control-attribution a { color: #93c5fd; }
.dark .leaflet-bar a { background: #27272a; color: #f4f4f5; border-bottom-color: #3f3f46; }

/* Kundenbaum (_portfolio_tree.html) und Lieferumfang: aufklappbar ohne Skript */
.ct-summary { cursor: pointer; }
.ct-chevron { transition: transform .15s; }
details[open] > summary .ct-chevron { transform: rotate(90deg); }

/* Kompakte Werkzeugknöpfe (Ansicht-Schalter aller Listen, Portfolio-Kopfzeile: Seiten, Filter-Schalter) */
.tool-btn { height: 2rem; min-width: 2rem; padding: 0 .45rem; display: inline-flex; align-items: center;
            justify-content: center; font-size: 13px; font-weight: 600; line-height: 1; }
.tool-btn .material-symbols-outlined { font-size: 18px; }
.tool-select { height: 2rem; padding: 0 .4rem; font-size: 13px; }

/* Kein Scroll-Anchoring im Inhaltsbereich: htmx fügt neue Listen vor den alten ein; Chrome hielt sonst das
   fokussierte Filterfeld (bzw. den angetippten Knopf) im Blick und sprang mit ihm ans Seitenende (v. a. Smartphone). */
#main { overflow-anchor: none; }

/* KI-Suche-Antwort: strukturiertes Markdown (Listen, Überschriften, Hinweise, Code-Badges) */
.ki-answer { line-height: 1.6; }
.ki-answer > :first-child { margin-top: 0; }
.ki-answer > :last-child { margin-bottom: 0; }
.ki-answer p { margin: .6rem 0; }
.ki-answer h3 { margin: 1.05rem 0 .4rem; font-size: .95rem; font-weight: 700; color: #0f172a; }
.ki-answer h4 { margin: .85rem 0 .3rem; font-size: .875rem; font-weight: 700; color: #1e293b; }
.dark .ki-answer h3 { color: #f4f4f5; }
.dark .ki-answer h4 { color: #e4e4e7; }
.ki-answer ol, .ki-answer ul { margin: .5rem 0; padding-left: 1.35rem; }
.ki-answer ol { list-style: decimal; }
.ki-answer ul { list-style: disc; }
.ki-answer ol ul, .ki-answer ul ul { list-style: circle; margin: .25rem 0 .35rem; }
.ki-answer li { margin: .25rem 0; }
.ki-answer li::marker { color: #16a34a; font-weight: 600; }
.ki-answer strong { font-weight: 600; color: #0f172a; }
.dark .ki-answer strong { color: #ffffff; }
.ki-answer code { padding: .1rem .35rem; border-radius: .375rem; font-size: .8125rem;
  background: #f1f5f9; color: #0f172a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dark .ki-answer code { background: #27272a; color: #e4e4e7; }
.ki-answer blockquote { margin: .75rem 0; padding: .5rem .85rem; border-left: 3px solid #16a34a;
  background: #f0fdf4; border-radius: 0 .5rem .5rem 0; color: #14532d; }
.dark .ki-answer blockquote { background: rgba(20, 83, 45, .25); color: #bbf7d0; }
.ki-answer a { color: #16a34a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ki-answer a:hover { color: #15803d; }
.dark .ki-answer a { color: #4ade80; }
.dark .ki-answer a:hover { color: #86efac; }
.fb-reply-summary { list-style: none; }
.fb-collapse-summary { list-style: none; }
.fb-collapse-summary::-webkit-details-marker, .fb-reply-summary::-webkit-details-marker { display: none; }

/* KI-Suche: Hinweis „Keine Internetsuche angeschlossen“, orange hinterlegt (Farbe wie der Feedback-Knopf) */
.ki-offline-note { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.ki-offline-note .material-symbols-outlined { color: #ea580c; }
.dark .ki-offline-note { background: rgb(234 88 12 / .16); color: #fed7aa; border-color: rgb(234 88 12 / .45); }
.dark .ki-offline-note .material-symbols-outlined { color: #fb923c; }
