/* baeurle.eng.st — Portal-Layout auf Basis von be.css (Dashboard-Muster aus dem UI-Baukasten, Abschnitt 08). */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; }
.skip:focus { left: 16px; background: var(--color-text); color: var(--color-bg); padding: 8px 16px; border-radius: 999px; }
.small { font-size: 13px; }
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ellipsis-cell { max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad { padding: 24px; }
.pad-sm { padding: 20px; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { padding: 0; margin-bottom: 8px; }

/* — App-Hülle: Seitenleiste ≥ 1024 px, darunter Kopfleiste + Tab-Leiste — */
.app { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 64px; display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 16px; align-items: start; }
.app-side { position: sticky; top: 24px; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; min-height: calc(100vh - 48px); }
.app-brand { display: block; margin: 6px 12px 32px; color: var(--color-text); }
.app-brand .wordmark { height: 28px; max-width: 100%; }
.app-nav { display: flex; flex-direction: column; gap: 4px; }
.app-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--color-text); text-decoration: none; transition: background .15s; }
.app-nav a:hover { background: color-mix(in srgb, #ffffff 80%, transparent); color: var(--color-text); }
.app-nav a[aria-current="page"] { background: var(--color-text); color: var(--color-bg); }
.app-user { margin-top: auto; display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: 18px; background: color-mix(in srgb, #ffffff 60%, transparent); }
.app-user-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px; border-radius: 14px; color: var(--color-text); text-decoration: none; }
.app-user-card:hover { color: var(--color-accent); }
.app-user-card .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.app-user-card .who strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-card .who small { font-size: 12px; color: var(--color-neutral-700); }
.app-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 10px 10px 24px; }
.topbar h1 { margin: 0 auto 0 0; font-size: 22px; letter-spacing: -.015em; }
.topbar-search { position: relative; flex: 1 1 220px; max-width: 360px; display: flex; align-items: center; margin: 0; }
.topbar-search svg { position: absolute; left: 16px; pointer-events: none; }
.topbar-search .input { padding-left: 42px; }
.app-tabs { display: none; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs a, .app-tabs button { display: flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; background: color-mix(in srgb, #ffffff 60%, transparent); color: var(--color-text); -webkit-tap-highlight-color: transparent; }
.app-tabs a[aria-current="page"] { background: var(--color-text); color: var(--color-bg); }
.app-tabs form { display: contents; }
.app-mobile-header { display: none; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.off { background: var(--color-neutral-400); }
.app-mobile-header .btn-icon { padding: 0; }

@media (max-width: 1023.98px) {
  .app { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .app-side { display: none; }
  .app-tabs { display: flex; order: 2; }
  .topbar { order: 1; }
  .app-main > :not(.topbar):not(.app-tabs) { order: 3; }
  .app-mobile-header { display: block; }
}
@media (max-width: 719.98px) {
  .topbar { padding: 12px; }
  .topbar h1 { padding-left: 8px; }
  .topbar-search { max-width: 100%; flex-basis: 100%; }
  .pad { padding: 20px; }
  .pad-sm { padding: 12px; }
}

/* — Zeilen der Übersicht — */
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1280px) { .dash-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.bar-value { font-size: clamp(22px, 2vw, 28px); font-weight: 800; font-variant-numeric: tabular-nums; }

/* — Kacheln (Subsysteme, Dienste) — */
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; min-height: 200px; color: var(--color-text); text-decoration: none; transition: background .25s, color .25s; }
a.tile:hover { background: var(--color-accent); color: var(--color-bg); }
a.tile:hover .tile-icon { background: color-mix(in srgb, #ffffff 20%, transparent); color: var(--color-bg); }
.tile-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--color-accent-100); color: var(--color-accent-700); transition: background .25s, color .25s; }
.tile-icon.sm { width: 40px; height: 40px; border-radius: 12px; }
.tile-icon.off { background: var(--color-neutral-200); color: var(--color-neutral-600); }
.tile-title { margin-top: auto; font-size: clamp(20px, 1.8vw, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.tile-text { font-size: 14px; line-height: 1.45; }
.tile-go { position: absolute; top: 22px; right: 22px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; min-width: 0; }
.tile.has-actions .tile-link { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.tile.has-actions > :not(.tile-link) { position: relative; pointer-events: none; }
.tile.has-actions .tile-action { pointer-events: auto; z-index: 1; }
.tile.has-actions:hover { background: #ffffff; }
.tile.has-actions:hover .tile-title { color: var(--color-accent); }

/* — Listenzeilen (wie „Projektliste“ im Baukasten) — */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 8px 16px; align-items: center; padding: 14px 20px; border-radius: 22px; color: var(--color-text); text-decoration: none; }
a.list-row:hover { background: #ffffff; color: var(--color-accent); }
.list-title { font-size: clamp(16px, 1.4vw, 19px); font-weight: 800; letter-spacing: -.01em; min-width: 0; }
.list-title small { font-weight: 400; font-size: 12px; letter-spacing: 0; }
.list-meta { font-size: 14px; color: var(--color-neutral-700); min-width: 0; }
.list-end { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.list-end form { display: inline; }
@media (max-width: 719.98px) {
  .list-row { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .list-meta, .list-end { grid-column: 1 / -1; justify-content: flex-start; }
}

/* — Formulare, Dialoge — */
.upload-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-form .input { width: auto; max-width: 100%; flex: 1 1 240px; }
.switch-row { justify-content: space-between; min-height: 44px; font-size: 14px; cursor: pointer; flex-wrap: nowrap; gap: 16px; }
.switch-row > span:first-child { flex: 1 1 auto; min-width: 0; }
.switch-row > .switch { flex: none; }
.user-pick { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; padding: 12px 16px; border-radius: 20px; background: color-mix(in srgb, #ffffff 60%, transparent); }
dialog.dialog-wide { max-width: min(760px, calc(100vw - 32px)); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--color-neutral-700); }
.facts dd { margin: 0; font-weight: 600; }

/* — Anmelden, Fehler, Gastzugang — */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); padding: clamp(24px, 5vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.auth-logo { height: 40px; display: flex; align-items: center; color: var(--color-text); margin-bottom: 8px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth-head h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.03em; margin: 0; }
.auth-head p { margin: 0; }
.auth-foot { font-size: 13px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-foot a { color: var(--color-neutral-700); text-decoration: none; }
.error-code { font-size: 14px; font-weight: 800; color: var(--color-accent); }
.guest-tag { white-space: normal; }
.guest-main { padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; }
.module-host { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* — Footer: Support, Datenschutz, Impressum – mittig unter dem Inhalt — */
.legal-links { display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.legal-links a { color: var(--color-neutral-700); text-decoration: none; }
.legal-links a:hover { color: var(--color-accent); }
.legal-contact { font-size: 12px; }
.app-foot { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.guest-foot { padding-bottom: 32px; }
.legal { max-width: 860px; font-size: 15px; line-height: 1.65; }
.legal h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; margin: 0 0 16px; }
.legal h2 { font-size: 17px; letter-spacing: -.01em; margin: 28px 0 8px; }
.legal p, .legal ul { margin: 0 0 12px; max-width: 72ch; }
.legal ul { padding-left: 20px; }
.legal-lead { font-size: 17px; color: var(--color-neutral-700); }
.legal-stand { margin-top: 28px !important; font-size: 13px; color: var(--color-neutral-700); }
mark.legal-missing { background: var(--color-danger-100); color: var(--color-danger); padding: 0 4px; border-radius: 6px; font-weight: 600; }

/* — Datenbank — */
.db-cols { display: flex; flex-wrap: wrap; gap: 6px; }
.db-col { display: inline-flex; flex-direction: column; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, #ffffff 60%, transparent); font-size: 13px; }
.db-col small { font-size: 11px; color: var(--color-neutral-700); }
.db-col.is-ext { background: var(--color-accent-100); box-shadow: inset 0 0 0 1px var(--color-accent-300); }
.db-table th, .db-table td { white-space: nowrap; font-size: 13px; }
.db-owner { color: var(--color-accent-700); text-transform: none; letter-spacing: 0; }

/* — Siegel im Footer — */
.site-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.trust-badges { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.trust-badges img { height: 40px; width: auto; }

/* — Zwei-Faktor — */
.twofa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.twofa-qr { width: 196px; height: 196px; margin: 12px 0 8px; padding: 8px; border-radius: 16px; background: #fff; }
.twofa-qr svg { width: 100%; height: 100%; display: block; }
.twofa-key { font-size: 13px; letter-spacing: .06em; word-break: break-all; }
.otp-input { font-size: 22px; letter-spacing: .3em; text-align: center; }

/* — Websites (Verwaltung) — */
.ws-mark { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--ws, var(--color-accent)); color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.ws-mark-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
.ws-name { font-size: 20px; letter-spacing: -.02em; }
.ws-card { box-shadow: inset 0 4px 0 var(--ws); }
.ws-head { box-shadow: inset 4px 0 0 var(--ws); }
.ws-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ws-tabs a { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; background: color-mix(in srgb, #ffffff 60%, transparent); color: var(--color-text); }
.ws-tabs a[aria-current="page"] { background: var(--color-text); color: var(--color-bg); }
.ws-editor { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ws-editor { grid-template-columns: minmax(0, 1fr); } }
.ws-body { font-size: 14px; line-height: 1.55; min-height: 320px; }
.ws-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ws-thumb { aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, #fff 70%, transparent); display: flex; align-items: center; justify-content: center; font: inherit; font-size: 11px; font-weight: 700; }
.ws-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ws-thumb span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ws-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.ws-media-item { margin: 0; padding: 10px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ws-media-item img, .ws-media-pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.ws-media-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: color-mix(in srgb, #fff 70%, transparent); font-weight: 800; }
.ws-color { width: 72px; height: 44px; padding: 4px; }
.ws-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.ws-danger { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-danger) 30%, transparent); }
.input-sm { min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; width: auto; }

/* BE Tracking – Gesamt-Admin */
.trk-live { gap: 8px; }
.trk-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: trk-pulse 1.6s ease-in-out infinite; }
@keyframes trk-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .trk-dot { animation: none; } }
.trk-card { border-top: 4px solid var(--ws, var(--color-accent)); }
.trk-card.is-active { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.trk-filter .seg { max-width: 100%; }
.trk-bars { gap: clamp(1px, .4vw, 8px); }
.trk-row { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 14px; overflow: hidden; }
.trk-row > :not(.trk-fill) { position: relative; min-width: 0; }
.trk-row strong { font-variant-numeric: tabular-nums; flex: none; }
.trk-fill { position: absolute; inset: 0 auto 0 0; background: var(--color-accent-100); border-radius: 10px; }
.trk-gut { background: #dcfce7; color: #166534; }
.trk-mittel { background: #fef3c7; color: #92400e; }
.trk-schlecht { background: var(--color-danger-100); color: var(--color-danger); }
.trk-hours { display: flex; align-items: flex-end; gap: 2px; height: 90px; padding: 0 4px; }
.trk-hours span { flex: 1; background: var(--color-accent-200); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.trk-journey { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #ffffff 45%, transparent); }
.trk-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.trk-path code { background: var(--color-accent-100); padding: 2px 8px; border-radius: 8px; overflow-wrap: anywhere; }

/* Fußzeile: BE-Zeichen, Links und Sprache in einer Reihe – Portal und Websites */
.foot-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 20px; }
.be-mark { display: inline-flex; padding: 6px; border-radius: 10px; opacity: .8; }
.be-mark:hover { opacity: 1; background: color-mix(in srgb, currentColor 7%, transparent); }
.be-mark img { width: auto; height: 18px; display: block; }
@media (max-width: 560px) { .foot-row .legal-links { order: 3; width: 100%; } }   /* Handy: BE und Sprache oben, Links darunter */

/* Sprachwahl mit Flaggen (circle-flags, MIT) */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; font-weight: 700; letter-spacing: .02em; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: color-mix(in srgb, #ffffff 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text) 8%, transparent); transition: box-shadow .15s, background .15s; }
.lang-switch summary:hover { background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text) 16%, transparent); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.lang-switch[open] .lang-chev { transform: rotate(180deg); }
.lang-chev { opacity: .55; transition: transform .15s; }
.lang-flag { width: 24px; height: 24px; border-radius: 50%; flex: none; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-switch summary .lang-flag { width: 22px; height: 22px; }
.lang-panel { position: absolute; z-index: 60; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; border-radius: 20px; background: var(--color-bg);
  box-shadow: 0 24px 60px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.06); animation: lang-in .14s ease-out; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .lang-panel { animation: none; } }
.lang-head { margin: 4px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-700); }
.lang-panel ul { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 380px); overflow: auto; }
.lang-panel li a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.lang-panel li a:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.lang-panel li a[aria-current="true"] { background: var(--color-accent-100); }
.lang-names { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.lang-names strong { font-size: 14px; }
.lang-names small { font-size: 12px; color: var(--color-neutral-700); }
.lang-check { color: var(--color-accent); flex: none; }
.lang-more { display: block; margin: 6px 4px 2px; padding: 8px 10px; border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); font-size: 13px; color: var(--color-accent); text-decoration: none; }
.lang-more:hover { text-decoration: underline; }
.foot-row .lang-panel, .site-foot .lang-panel, .guest-foot .lang-panel, .auth-foot .lang-panel { top: auto; bottom: calc(100% + 8px); right: 50%; translate: 50% 0; text-align: left; }
.i18n-flag { width: 20px; height: 20px; border-radius: 50%; vertical-align: -5px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.legal-note { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--color-accent-100); margin: 0 0 16px; }

/* Sprachen & Übersetzungen */
.i18n-lang { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.i18n-lang:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.i18n-progress { position: relative; }
.i18n-progress > span { background: var(--color-accent-200); }
.i18n-progress > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--color-accent); }
.i18n-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px; border-radius: 16px; background: color-mix(in srgb, #ffffff 45%, transparent); }
.i18n-row form { display: inline; }
/* Aufklapp-Formulare (Entfernen, Import) als kleines Fenster unter dem Knopf – nie breiter als der Bildschirm */
.i18n-remove { position: relative; }
.i18n-remove form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; flex-wrap: wrap; width: max-content; max-width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; background: var(--color-bg); box-shadow: 0 16px 40px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06); }
.i18n-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .i18n-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.i18n-src { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.i18n-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #ffffff 55%, transparent); }
.i18n-item.is-long .i18n-text { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; max-height: 360px; overflow: auto; }
.i18n-item.is-long textarea { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.i18n-dst { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.i18n-dst textarea { width: 100%; resize: vertical; }
.i18n-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--color-accent-100); font-size: 14px; }
.i18n-warn { margin: 0; padding: 6px 10px; border-radius: 10px; background: #fef3c7; color: #92400e; }
.i18n-save { position: sticky; bottom: 12px; z-index: 5; }
.i18n-import { position: relative; }
.i18n-import form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 80vw); }
@media (max-width: 1023.98px) {             /* schmal: im Fluss unter dem Knopf statt als Fenster */
  .i18n-import[open], .i18n-remove[open] { flex-basis: 100%; }
  .i18n-import form, .i18n-remove form { position: static; width: 100%; max-width: none; margin-top: 6px; box-shadow: none; padding: 0; background: none; }
}
.i18n-matrix td, .i18n-matrix th { white-space: nowrap; }
.i18n-ok { color: #15803d; font-weight: 700; text-decoration: none; }
.i18n-draft { color: var(--color-neutral-700); text-decoration: none; }
.i18n-flag.lg { width: 32px; height: 32px; margin-right: 2px; vertical-align: middle; }
.i18n-matrix th .i18n-flag { width: 16px; height: 16px; vertical-align: -3px; }
.i18n-flag { display: inline-block; }
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; padding: 2px; }
.flag-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, #ffffff 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text) 8%, transparent); cursor: pointer; }
.flag-tile:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text) 20%, transparent); }
.flag-tile:has(input:checked) { box-shadow: 0 0 0 2px var(--color-accent); background: var(--color-accent-100); }
.flag-tile:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.flag-tile input { position: absolute; opacity: 0; pointer-events: none; }
.flag-tile img { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag-tile span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.flag-tile strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-tile small { font-size: 12px; color: var(--color-neutral-700); }
[data-flag-custom] { display: none; }
form:has(input[value="eigene"]:checked) [data-flag-custom] { display: grid; }

/* Projekte – überall derselbe Kopf */
.pj-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pj-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pj-id strong { font-size: 17px; letter-spacing: -.01em; }
.pj-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pj-card { gap: 12px; box-shadow: inset 0 4px 0 var(--ws); }
.pj-features { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-feature { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--color-text) 6%, transparent); color: var(--color-neutral-700); }
.pj-feature.is-on { background: var(--color-accent-100); color: var(--color-accent-800); }
.kind-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.kind-pick label { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; cursor: pointer; background: color-mix(in srgb, #ffffff 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-text) 10%, transparent); }
.kind-pick label:has(input:checked) { box-shadow: 0 0 0 2px var(--color-accent); background: var(--color-accent-100); }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick label:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.embed-code { white-space: pre-wrap; word-break: break-all; font-size: 13px; padding: 14px 16px; border-radius: 14px; background: var(--color-text); color: var(--color-bg); margin: 0; }
form:has(input[name="kind"][value="website"]:checked) [data-kind]:not([data-kind~="website"]),
form:has(input[name="kind"][value="static"]:checked) [data-kind]:not([data-kind~="static"]),
form:has(input[name="kind"][value="extern"]:checked) [data-kind]:not([data-kind~="extern"]),
form:has(input[name="kind"][value="park"]:checked) [data-kind]:not([data-kind~="park"]) { display: none; }
.kas-box { box-shadow: inset 4px 0 0 var(--color-accent); }
.kas-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.kas-path { font-size: 15px; padding: 6px 12px; border-radius: 10px; background: var(--color-text); color: var(--color-bg); word-break: break-all; }
.app-nav-group { display: block; margin: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-700); }

/* Datenschutz-Anfragen */
.privacy-late { color: var(--color-danger); font-weight: 700; }
.privacy-soon { color: #b45309; font-weight: 600; }
.privacy-act[open] summary { margin-bottom: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Zu erledigen – aus den Daten abgeleitet */
.todo-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; font-size: 14px; }
.todo-row:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.todo-err { box-shadow: inset 3px 0 0 var(--color-danger); }
.todo-warn { box-shadow: inset 3px 0 0 var(--color-accent); }
@media (max-width: 640px) { .todo-row { grid-template-columns: auto minmax(0, 1fr); } .todo-row > .muted, .todo-row > [aria-hidden] { display: none; } }
form:has(input[name="features[]"][value="mitglieder"]:not(:checked)) [data-needs-login] { display: none; }

/* Marke & Style Guide (/marke) */
.sg { display: flex; flex-direction: column; gap: 28px; }
.sg-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg); }
.sg-title { font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 0; }
.sg-hero-logo { width: clamp(180px, 24vw, 340px); height: auto; }
.sg-nav { position: sticky; top: 8px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 6px; border-radius: 999px; scrollbar-width: none; }
.sg-nav::-webkit-scrollbar { display: none; }
.sg-nav a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--color-neutral-800); text-decoration: none; }
.sg-nav a:hover { background: var(--color-accent-100); color: var(--color-accent-800); }
.sg-section { scroll-margin-top: 72px; display: flex; flex-direction: column; gap: 14px; }
.sg-section > h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; }
.sg-lead { margin: 0; max-width: 70ch; color: var(--color-neutral-800); }
.sg-h3 { font-size: 15px; font-weight: 700; margin: 10px 0 0; }
.sg-block { display: flex; flex-direction: column; gap: 10px; }
.sg-block-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.sg-block-head p { margin: 2px 0 0; }
.sg-variants, .sg-dos, .sg-donts, .sg-seals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sg-variant, .sg-do, .sg-dont, .sg-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-variant figcaption, .sg-do figcaption, .sg-dont figcaption { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sg-card figcaption { font-size: 14px; }
.sg-stage { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 150px; padding: 28px; border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-text) 8%, transparent); }
.sg-on-light { background: #ffffff; }
.sg-on-dark { background: var(--color-text); }
.sg-stage img { max-width: 100%; height: auto; }
.sg-wortmarke img { width: min(220px, 100%); }
.sg-bildmarke img { height: 64px; width: auto; }
.sg-app img { width: 88px; height: 88px; }
.sg-do .sg-stage img, .sg-dont .sg-stage img { width: min(180px, 100%); }
.sg-files { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-files a { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--color-accent-100); color: var(--color-accent-800); text-decoration: none; }
.sg-files a:hover { background: var(--color-accent-200); }
.sg-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
/* Schutzzone: gestrichelter Rahmen = Mindestabstand, x-Marken an allen Seiten */
.sg-clear { display: flex; align-items: center; justify-content: center; padding: 28px; border-radius: 20px; background: repeating-linear-gradient(45deg, var(--color-accent-100) 0 8px, #ffffff 8px 16px); }
.sg-clear-box { position: relative; background: #ffffff; outline: 2px dashed var(--color-accent); }
.sg-clear-word .sg-clear-box { padding: 20px; }          /* Wortmarke 200 px breit → „B“ ≈ 20 px hoch = x */
.sg-clear-word img { width: 200px; display: block; }
.sg-clear-icon .sg-clear-box { padding: 24px; }
.sg-clear-icon img { height: 48px; display: block; }
.sg-x { position: absolute; font-size: 12px; font-weight: 700; color: var(--color-accent-700); line-height: 1; }
.sg-x-top { top: 8px; left: 50%; transform: translateX(-50%); }
.sg-x-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.sg-x-left { left: 6px; top: 50%; transform: translateY(-50%); }
.sg-x-right { right: 6px; top: 50%; transform: translateY(-50%); }
.sg-min { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.sg-min > div { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: #ffffff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-text) 8%, transparent); }
.sg-ok, .sg-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 13px; font-weight: 800; color: #ffffff; flex: none; }
.sg-ok { background: #15803d; }
.sg-no { background: var(--color-danger); }
.sg-do figcaption, .sg-dont figcaption { flex-direction: row; align-items: center; gap: 8px; }
.sg-do .sg-stage { box-shadow: inset 0 0 0 2px color-mix(in srgb, #15803d 45%, transparent); }
.sg-dont .sg-stage { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--color-danger) 45%, transparent); }
/* Farben */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sg-swatches.is-core { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sg-swatch { display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; font: inherit; color: var(--color-text); background: #ffffff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-text) 8%, transparent); transition: transform .15s; }
.sg-swatch:hover { transform: translateY(-2px); }
.sg-swatch:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.sg-chip { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; height: 76px; padding: 10px 12px; font-weight: 800; font-size: 20px; }
.is-core .sg-chip { height: 120px; font-size: 28px; }
.sg-chip small { font-size: 11px; font-weight: 600; opacity: .9; }
.sg-swatch-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
/* Schrift */
.sg-type { display: flex; flex-direction: column; border-radius: var(--radius-lg); padding: 8px 24px; }
.sg-type-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }
.sg-type-row:last-child { border-bottom: 0; }
@media (max-width: 719.98px) {
  .sg-hero { grid-template-columns: minmax(0, 1fr); }
  .sg-hero-logo { order: -1; width: 200px; }
  .sg-type-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sg-type { padding: 4px 18px; }
  .sg-variants, .sg-dos, .sg-donts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .sg-stage { min-height: 110px; padding: 18px; }
}
@media print { .sg-nav { display: none; } .sg-section { break-inside: avoid-page; } }
/* Einrichtung: MariaDB-Felder nur bei MariaDB, Server-Prüfung */
form:has(input[name="driver"][value="sqlite"]:checked) .setup-mysql { display: none; }
.setup-checks summary { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.setup-checks ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
/* System */
.sy-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.sy-facts dt { color: var(--color-neutral-700); }
.sy-facts dd { margin: 0; overflow-wrap: anywhere; }
