/* Shared surfaces inherit their palette before page-specific rules paint. */
.public-body .login-layout{min-height:100dvh;padding-block:3rem}.login-copy h1{font-size:clamp(3rem,6vw,6rem);letter-spacing:-.055em;white-space:nowrap}
.company-picker{max-width:960px;margin:4vh auto}.company-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;margin-top:24px}.company-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;min-height:200px;width:100%;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer;text-decoration:none;box-sizing:border-box}.company-tile:hover{border-color:var(--blue);background:var(--hover,#edf4ff)}.company-tile img{max-width:180px;max-height:70px;padding:12px;background:#071525;border-radius:10px}.company-tile:disabled{cursor:default;opacity:.65}.company-monogram{font-size:2.4rem;font-weight:800}.company-tile small{color:var(--muted)}
.user-menu-panel{padding:14px;min-width:300px}.user-menu-identity{padding:10px 8px 16px}.start-choice{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--ink);padding:12px;border-radius:8px;cursor:pointer}.start-choice:hover,.start-choice[aria-pressed=true]{background:var(--selection,#e9f1ff)}.appearance-panel{right:100%;margin-right:12px}.appearance-panel:after{content:'';position:absolute;left:100%;top:0;width:14px;height:100%}.appearance-menu>summary{list-style:none}.appearance-menu[open]>summary{background:var(--hover,#edf4ff)}
.document-items,.document-columns,.document-resizer,.customer-tabs,.customer-tab,.file-view-info,.editor-toolbar,.customer-facts>div{border-color:var(--line)!important}.document-open,.document-open:visited{color:var(--ink)}.document-open:hover{background:var(--hover,#edf4ff);color:var(--ink)}.button:not(.primary):not(.danger){background:var(--surface);color:var(--ink);border:1px solid var(--line)}.document-help,.document-columns,.section-note{color:var(--muted)}
.auto-save-status{position:fixed;bottom:14px;right:24px;padding:9px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:.8rem;z-index:100}.auto-save-status[data-state=error]{color:#e16363}.live-search-status{font-size:.8rem;color:var(--muted)}.page-preview-pages{display:grid;gap:12px}.page-preview-pages img{width:100%;height:auto;background:white}.page-preview{overflow:auto;max-height:75dvh}.file-view-sidebar .page-preview{max-height:calc(100dvh - 180px)}
@media(max-width:800px){.appearance-panel{margin-right:0}.login-copy h1{white-space:normal}.company-picker{margin:0}.auto-save-status{right:10px;bottom:10px}}
.customer-search button[type=submit],.document-toolbar>button,.customer-search div>button{display:none}.editor-status{order:3;border-top:1px solid var(--line)}

/* Original branding; never approximate the logo with a font. */
.login-copy .login-brand{margin:0 0 24px;line-height:1;white-space:normal}
.login-brand img{width:min(100%,560px);height:auto;display:block}
.login-brand .brand-on-dark{display:none}
[data-theme=dark] .login-brand .brand-on-light{display:none}
[data-theme=dark] .login-brand .brand-on-dark{display:block}
@media(prefers-color-scheme:dark){[data-theme=system] .login-brand .brand-on-light{display:none}[data-theme=system] .login-brand .brand-on-dark{display:block}}
/* Open records are separate from the sections within the current record. */
.app-head>.topbar{border-bottom:0;box-shadow:none}
.app-head .customer-tabs{padding:12px 16px 0;gap:5px;border:0;background:var(--surface);scrollbar-width:thin}
.customer-tabs .customer-tab{border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:transparent;box-shadow:none;min-width:130px;max-width:260px}
.customer-tabs .customer-tab[aria-current=true]{background:var(--canvas);box-shadow:inset 0 3px var(--blue)}
.customer-tabs .customer-tab:hover{background:var(--hover,#edf4ff)}
.customer-tabs .customer-tab a,.customer-tabs .customer-tab button{color:var(--muted)}
.customer-tabs .customer-tab[aria-current=true] a{color:var(--ink)}
.customer-tabs .customer-tab button{border-radius:6px;margin-right:4px;padding:4px 8px}
.customer-tabs .customer-tab button:hover{background:var(--selection,#e9f1ff);color:var(--ink)}
.topbar-customer nav{padding:3px;gap:2px;border-radius:10px;background:var(--canvas)}
.topbar-customer nav a{color:var(--muted)}
.topbar-customer nav a[aria-current=page]{background:var(--selection,#e9f1ff);color:var(--ink)}
.user-menu>summary:hover,.user-menu[open]>summary,.user-menu summary:hover{background:var(--hover,#edf4ff);color:var(--ink)}
.favorite-chip,.favorite-toggle{background:var(--surface);color:var(--ink);border-color:var(--line)}
.favorite-chip:hover,.favorite-toggle:hover{background:var(--hover,#edf4ff);border-color:var(--blue)}
.favorite-toggle[aria-pressed=true]{background:var(--selection,#e9f1ff);border-color:var(--line);color:var(--blue)}
.meta-results{width:min(540px,calc(100vw - 32px))}
.command-result{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:11px 12px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer}
.command-result small{color:var(--muted);font-size:.75rem;line-height:1.5}
.command-result strong{overflow-wrap:anywhere}
.command-result:hover,.command-result[aria-selected=true]{background:var(--selection,#e9f1ff);color:var(--ink)}

.customer-tabs .customer-tab:only-child{max-width:520px;flex:1}
.customer-facts section{border-color:var(--line)}

/* Compact customer context in the existing topbar; record tabs stay unchanged. */
.workspace-greeting{color:var(--muted);font-size:.8rem}
.topbar .customer-context{display:flex;align-items:center;gap:20px;flex:1;min-width:0}

.topbar--customer .meta-search{flex:0 1 280px}
.editor-page.editor-focus .customer-context{display:none}
@media(max-width:1400px){.topbar .customer-context{gap:12px}.topbar--customer .user-copy{display:none}.topbar--customer .meta-search{flex-basis:220px}}
@media(max-width:1100px){.topbar .customer-context{align-items:flex-start;flex-direction:column;gap:2px}.topbar--customer{gap:12px}}
@media(max-width:780px){.workspace-greeting{display:none}.topbar--customer{flex-wrap:wrap}.topbar .customer-context{order:10;flex-basis:100%;flex-direction:row;align-items:center}}
@media(max-width:480px){.topbar .customer-context{flex-direction:column;align-items:stretch}}

/* Inactive tabs keep their silhouette without competing with the active tab. */
.customer-tabs .customer-tab:not([aria-current=true]){border-color:color-mix(in srgb,var(--muted) 24%,transparent)!important;background:color-mix(in srgb,var(--ink) 2%,transparent)}
.customer-tabs .customer-tab:not([aria-current=true]):hover{background:color-mix(in srgb,var(--ink) 7%,transparent);border-color:color-mix(in srgb,var(--muted) 45%,transparent)!important}
.customer-tabs .customer-tab:focus-within{outline:2px solid var(--blue);outline-offset:-2px}

/* Customer navigation lives directly beneath the persistent customer tabs. */
.customer-record-menu{display:flex;align-items:center;gap:22px;flex-shrink:0;overflow-x:auto;padding:8px 24px;border-bottom:1px solid color-mix(in srgb,var(--muted) 25%,transparent);background:var(--surface);white-space:nowrap}
.customer-record-menu a,.platform-global-menu a{color:var(--muted);text-decoration:none;padding:7px 0;border-bottom:2px solid transparent}
.customer-record-menu a[aria-current=page]{color:var(--ink);border-bottom-color:var(--blue);font-weight:600}
.customer-record-menu a:focus-visible,.platform-global-menu a:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.customer-record-menu [aria-disabled],.platform-global-menu [aria-disabled]{color:var(--muted);opacity:.7}
.customer-record-menu small,.platform-global-menu small{font-size:.65rem}
.platform-global-menu{display:flex;gap:16px;align-items:center;white-space:nowrap;font-size:.8rem}
.topbar .customer-context{flex:1;min-width:150px}
@media(max-width:1100px){.platform-global-menu{flex-wrap:wrap;gap:8px 14px}.customer-record-menu{padding:6px 16px;gap:18px}}
@media(max-width:700px){.platform-global-menu{order:4;width:100%;overflow-x:auto;flex-wrap:nowrap}.customer-record-menu{padding:6px 10px}.topbar{flex-wrap:wrap}}

/* Keep the original logo distinct from the environment indicator. */
.shell-logo{display:block;max-width:100%}
.shell-logo img{max-width:100%;filter:none}
.shell-logo .shell-logo-on-dark{display:none}
[data-theme=dark] .shell-logo .shell-logo-on-light{display:none}
[data-theme=dark] .shell-logo .shell-logo-on-dark{display:block}
@media(prefers-color-scheme:dark){
  [data-theme=system] .shell-logo .shell-logo-on-light{display:none}
  [data-theme=system] .shell-logo .shell-logo-on-dark{display:block}
}
.shell-logo.shell-logo--dark .shell-logo-on-light{display:none}
.shell-logo.shell-logo--dark .shell-logo-on-dark{display:block}
.sidebar-brand .shell-logo{width:176px}
.sidebar-brand .shell-logo img{height:auto;max-height:56px}
.mobile-brand .shell-logo img{filter:none}
.environment-badge{display:inline-flex;align-items:center;flex-shrink:0;max-width:160px;padding:5px 9px;border:1px solid #a87926;border-radius:6px;background:#fff4d8;color:#704600;font-size:.65rem;font-weight:750;line-height:1.4;letter-spacing:.06em;overflow-wrap:anywhere}
[data-theme=dark] .environment-badge{background:#392d18;color:#ffda88;border-color:#967239}
@media(prefers-color-scheme:dark){[data-theme=system] .environment-badge{background:#392d18;color:#ffda88;border-color:#967239}}
@media(max-width:480px){.environment-badge{max-width:96px;padding:4px 6px;font-size:.6rem}}

/* Keep the viewport width stable when records have different content heights. */
html{scrollbar-gutter:stable}

.company-tile:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
/* Office-Speicherstatus nach „Bearbeitung beenden“: deutlich sichtbar, am Handy als Balken (5–10 s Speicherweg von ONLYOFFICE). */
.office-save-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:.9rem;font-weight:600;color:var(--ink);box-shadow:0 8px 24px rgba(7,21,37,.18)}
.office-save-status[data-state=saving]::before{content:"";width:14px;height:14px;border-radius:50%;border:2px solid var(--line-strong);border-top-color:var(--blue);animation:office-save-spin .9s linear infinite;flex-shrink:0}
.office-save-status[data-state=saved]{color:var(--success);border-color:var(--success)}
.office-save-status[data-state=saved]::before{content:"✓"}
.office-save-status[data-state=error]{border-color:var(--danger);color:var(--danger)}
.office-save-status button{font:inherit;font-size:.8rem;font-weight:500}
@keyframes office-save-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.office-save-status[data-state=saving]::before{animation:none;border-top-color:var(--line-strong)}}
@media(max-width:800px){.office-save-status{left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));justify-content:center;padding:14px 16px;font-size:1rem;border-radius:12px}}

/* Gesperrte Knöpfe sichtbar als gesperrt (TEST-Befund 17.10.). */
.button:disabled,.button[aria-disabled=true]{opacity:.5;cursor:not-allowed;box-shadow:none;filter:grayscale(.6)}
/* Gutachten: Pflichtangaben für die Freigabe dezent markieren – Balken links und leichter Gelbton, in hell und dunkel lesbar. */
.form-field:has([data-release-required]) label::after{content:" · Pflicht für Freigabe";font-weight:400;font-size:.78em;color:var(--muted,#65728a)}
.form-field [data-release-required]{box-shadow:inset 3px 0 0 #d9a520;background-image:linear-gradient(rgba(234,179,8,.08),rgba(234,179,8,.08))}

#eintrag{scroll-margin-top:90px}
/* Handy: Suchvorschläge über die volle Breite statt links aus dem Bild (TEST-Befund 17.10.). */
@media(max-width:700px){.meta-results{position:fixed;top:calc(env(safe-area-inset-top,0px) + 64px);left:8px;right:8px;width:auto;max-height:calc(100dvh - 90px)}}
/* Handy: Dokumente scrollen mit der ganzen Seite statt in kleinen Innenfenstern (TEST-Befund 17.10.). */
@media(max-width:760px){
 body:has(.document-browser),.app-shell:has(.document-browser){height:auto;min-height:100dvh;overflow:visible}
 .app-main:has(.document-browser){height:auto}
 .page-shell:has(.document-browser){flex:none;display:block}
 .document-browser{display:flex;flex-direction:column;gap:10px}
 .document-tree,.document-results{overflow:visible}
 .document-tree-scroll{max-height:32dvh}
 .document-controls{max-height:none;overflow:visible}
 .document-content,.document-content.without-preview{display:flex;flex-direction:column}
 .document-file-pane{overflow:visible}
 .document-items{flex:none;overflow:visible;max-height:none}
 .document-inspector{height:75dvh;flex:none;border-left:0;border-top:1px solid var(--line,#dce4f1)}
 .document-items--list .document-open{min-width:0;grid-template-columns:24px minmax(0,1fr) 40px 62px}
 .document-items--list .document-date{display:none}
}
/* Kopfzeile: Seitentitel statt „Dein persönlicher Arbeitsplatz“, aktiver Menüpunkt erkennbar (Wunsch 17.10.). */
.workspace-title{margin:0;font-size:1rem;font-weight:700;color:var(--ink,#101a28);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:28ch}
.platform-global-menu a[aria-current=page]{color:var(--ink,#101a28);font-weight:700;box-shadow:inset 0 -2px 0 var(--blue,#0874e8)}
/* „Sperren“ nur als Schloss-Symbol neben dem Benutzer (Wunsch 18.10.); Text bleibt für Screenreader. */
.topbar-actions .workspace-lock-trigger{border:0;background:transparent;padding:6px;border-radius:8px;color:var(--ink,#101a28);box-shadow:none}
.topbar-actions .workspace-lock-trigger:hover{background:var(--hover,#edf3fa)}
/* Kundenakte: Reiter ohne Balken, Pfeile zum Schieben, Kundenkopf, Bereiche (Handy: Leiste unten) */
.customer-tabs-bar{display:flex;align-items:flex-end;gap:6px;padding:10px 16px 0;flex-shrink:0;background:transparent;box-shadow:inset 0 -1px var(--line)}
.customer-tabs-bar:has(.customer-tabs:empty){display:none}
.customer-tabs-bar>.customer-tabs,.app-main .customer-tabs-bar>.customer-tabs{flex:1;min-width:0;padding:0;border:0;background:transparent;box-shadow:inset 0 -1px var(--line);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;align-items:flex-end}
.customer-tabs-bar>.customer-tabs::-webkit-scrollbar{display:none}
.customer-tabs-scroll{flex:none;align-self:center;width:30px;height:30px;margin-bottom:4px;border:0;border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(16,26,40,.2);display:flex;align-items:center;justify-content:center;cursor:pointer}
.customer-tabs-scroll[hidden]{display:none}
.customer-tabs-scroll:disabled{opacity:.35;cursor:default}
.customer-tabs-scroll:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.app-body .customer-tabs-bar .customer-tab{background:transparent;border:1px solid transparent;border-bottom:0;margin-bottom:1px;box-shadow:none}
.app-body .customer-tabs-bar .customer-tab:hover{background:var(--hover,#edf4ff)}
/* aktiver Reiter: kein Strich unten – geht nahtlos in den Kundenkopf über */
.app-body .customer-tabs-bar .customer-tab[aria-current=true],.app-body .customer-tabs-bar .customer-tab[aria-current=true]:hover{background:var(--surface);border:1px solid var(--line);border-bottom:0;margin-bottom:0;padding-bottom:1px;box-shadow:inset 0 3px var(--blue);position:relative;z-index:1}
.editor-page.editor-focus .customer-tabs-bar{display:none}
.customer-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:14px 24px;background:var(--surface);flex-shrink:0}
.customer-head-avatar{flex:none;width:42px;height:42px;border-radius:11px;background:#071525;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.05rem}
.customer-head-main{flex:1;min-width:180px;display:flex;flex-direction:column;gap:5px}
.customer-head-name{font-size:1.1rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-head-chips{display:flex;flex-wrap:wrap;gap:6px}
.customer-chip{font-size:.72rem;background:var(--canvas);color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 9px;white-space:nowrap}
.customer-head-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
.customer-head-actions .button{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;padding:7px 11px}
.customer-record-menu{gap:4px;padding:8px 20px;align-items:center}
.customer-record-menu a{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border:0;border-radius:9px;font-size:.85rem}
.customer-record-menu a:hover{background:var(--hover,#edf4ff);color:var(--ink)}
.customer-record-menu a[aria-current=page]{background:#071525;color:#fff;border:0}
[data-theme=dark] .customer-record-menu a[aria-current=page]{background:var(--blue-2,#4e99f5);color:#06101d}
.customer-record-menu .label-short{display:none}
.editor-page.editor-focus .customer-record-menu{display:none}
@media(max-width:700px){
  .customer-tabs-bar{padding:6px 8px 0}
  .customer-head{padding:10px 12px;gap:8px 12px}
  .customer-head-avatar{width:34px;height:34px;font-size:.9rem;border-radius:9px}
  .customer-head-name{font-size:1rem}
  .customer-head-actions{margin-left:0;width:100%;flex-wrap:nowrap;overflow-x:auto}
  .customer-head-actions .button{flex:none}
  .customer-record-menu{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;gap:0;padding:0 0 env(safe-area-inset-bottom);background:#071525;border:0;overflow-x:auto;justify-content:space-between}
  .customer-record-menu a{flex:1 0 58px;flex-direction:column;gap:3px;padding:9px 2px 10px;border-radius:0;font-size:.68rem;color:#b8c6d8;text-align:center}
  .customer-record-menu a:hover{background:transparent;color:#fff}
  .customer-record-menu a[aria-current=page],[data-theme=dark] .customer-record-menu a[aria-current=page]{background:#1c3350;color:#fff;box-shadow:inset 0 3px #0874e8}
  .customer-record-menu .label-long{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .customer-record-menu .label-short{display:block}
  .app-body:has(.customer-record-menu) .page-shell{padding-bottom:84px}
}
/* Gutachten-PDF in der Plattform ansehen */
.report-viewer{display:flex;flex-direction:column;gap:12px}
.report-viewer-bar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px}
.report-viewer-bar h1{margin:4px 0 0;font-size:1.25rem}
.report-viewer-bar .form-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.report-viewer-bar form{margin:0}
.report-viewer-frame{width:100%;height:calc(100vh - 260px);min-height:520px;border:1px solid var(--line);border-radius:10px;background:#525659}
@media(max-width:700px){.report-viewer-frame{height:70vh;min-height:400px}}
/* Handy: Menü, Suche, Umgebung, Schloss und Benutzer in einer Zeile */
@media(max-width:700px){
  .app-head>.topbar,html[data-interaction-mode="touch"] .app-head>.topbar{flex-wrap:wrap;align-items:center;gap:6px 8px;height:auto;min-height:0;padding:8px 10px}
  .app-head>.topbar .mobile-brand,.app-head>.topbar .workspace-greeting{display:none}
  .app-head>.topbar .mobile-menu{order:1;flex:none}
  .app-head>.topbar .meta-search{order:2;flex:1 1 0;min-width:0;max-width:none;margin:0}
  .app-head>.topbar .meta-search .command-trigger{min-height:38px;padding-block:6px}
  .app-head>.topbar .topbar-actions{order:3;flex:none;margin:0;gap:4px}
  .app-head>.topbar .environment-badge{font-size:.58rem;padding:2px 5px;letter-spacing:.04em}
  .app-head>.topbar .workspace-lock-trigger{padding:4px}
  .app-head>.topbar .user-menu summary{padding:0;gap:0}
  .app-head>.topbar .user-copy,.app-head>.topbar .user-menu-chevron{display:none}
  .app-head>.topbar .user-avatar{display:grid;width:34px;height:34px}
  .app-head>.topbar .platform-global-menu{order:4;flex-basis:100%;width:100%}
}
.report-viewer-object{width:100%;height:100%;border:0;display:block}
.report-viewer-frame:has(.report-viewer-object){overflow:hidden}
.report-viewer-pages{height:auto!important;min-height:200px;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px}
.report-viewer-pages canvas{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.35);max-width:100%}
.report-viewer-status{color:#e7edf4;margin:8px;font-size:.85rem}
/* Gutachten: Schritte nacheinander, gesperrte Schritte grau, erledigte mit Haken */
.assessment-steps .step-locked{padding:.55rem .8rem;border-radius:.5rem;color:var(--muted,#65728a);opacity:.55;cursor:not-allowed;border:1px dashed var(--line,#d6dee8)}

.step-missing ul{margin:.4rem 0 0;padding-left:1.2rem}
/* Pflicht für Freigabe: nur solange leer gelb hinterlegt (auch auf dem Handy und im dunklen Modus sichtbar) */
.form-field [data-release-required]{box-shadow:none;background-image:none;border-left:3px solid #d9a520!important}
.form-field [data-release-required][data-empty]{background-color:#fdf6e3!important;background-image:none}
[data-theme=dark] .form-field [data-release-required][data-empty]{background-color:#3a3220!important}
@media(prefers-color-scheme:dark){[data-theme=system] .form-field [data-release-required][data-empty]{background-color:#3a3220!important}}
.form-field [data-release-required]:not([data-empty]){border-left-color:#1e7a46!important}
/* Gutachten-Ansicht: Strg+P druckt nicht die Plattformseite, sondern zeigt den Hinweis auf „Drucken“ */
.report-print-hint{display:none}
@media print{
  .app-body .sidebar,.app-body .topbar,.app-body .customer-tabs-bar,.app-body .customer-head,.app-body .customer-record-menu,
  .report-viewer-bar .form-actions,.report-viewer-frame,.report-viewer .section-note,.report-viewer .notice{display:none!important}
  .report-print-hint{display:block;font-size:14pt;margin-top:2cm}
}
/* Neuigkeiten nach der Anmeldung: Karten oben rechts, einzeln wegklickbar */
.announcements{position:fixed;top:76px;right:20px;z-index:120;display:grid;gap:10px;width:min(380px,calc(100vw - 32px))}
.announcement{display:flex;gap:12px;align-items:flex-start;padding:14px 14px 14px 16px;border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 10px 30px rgba(8,20,40,.18);animation:announcement-in .25s ease-out}
.announcement>div{flex:1;min-width:0}.announcement .eyebrow{margin:0 0 2px}.announcement strong{display:block;font-size:.92rem}.announcement p:not(.eyebrow){margin:6px 0 0;color:var(--muted);font-size:.82rem;line-height:1.45}
.announcement form{margin:0}.announcement-close{border:0;background:transparent;color:var(--muted);font-size:1.3rem;line-height:1;padding:2px 6px;border-radius:8px;cursor:pointer}.announcement-close:hover,.announcement-close:focus-visible{color:var(--ink);background:var(--canvas)}
@keyframes announcement-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.announcement{animation:none}}
@media(max-width:700px){.announcements{top:auto;right:16px;left:16px;width:auto;bottom:calc(84px + env(safe-area-inset-bottom))}}
@media print{.announcements{display:none}}

.announcement-chat{display:inline-block;margin-top:10px;font-size:.8rem;font-weight:600;color:var(--blue)}

/* Kopfbereich fixiert (20.10.2026): Leiste, Kunden-Reiter, Kundenkopf und Menü bleiben stehen, nur der Inhalt scrollt.
   Ruhezustand kompakter; beim Scrollen rücken Kundenname und Menü in eine Zeile. Handy (≤780 px): wie bisher. */
@media(min-width:781px){
  .app-head{position:sticky;top:0;z-index:30;background:var(--surface);transition:box-shadow .15s ease}
  .app-head>.topbar{position:static}
  html.is-scrolled .app-head{box-shadow:0 8px 18px -12px rgba(8,20,40,.45)}
  .app-head>.topbar,html[data-interaction-mode="touch"] .app-head>.topbar{height:60px;min-height:60px;padding-block:0}
  .app-head .customer-tabs-bar{padding-top:6px}
  .app-head .customer-tab a{font-size:.92rem;padding:6px 12px}
  .app-head .customer-head{padding:9px 24px;gap:10px 16px}
  .app-head .customer-head-avatar{width:36px;height:36px;border-radius:10px;font-size:.95rem}
  .app-head .customer-head-main{flex-direction:row;align-items:center;flex-wrap:wrap;gap:4px 12px}
  .app-head .customer-record-menu{padding-block:6px}
  /* beim Scrollen: eine Zeile */
  html.is-scrolled .app-head .customer-bar{display:flex;align-items:center;gap:12px;border-bottom:1px solid color-mix(in srgb,var(--muted) 25%,transparent);background:var(--surface)}
  html.is-scrolled .app-head .customer-head{flex:0 1 auto;flex-wrap:nowrap;min-width:0;padding:6px 0 6px 24px}
  html.is-scrolled .app-head .customer-head-avatar,html.is-scrolled .app-head .customer-head-chips{display:none}
  html.is-scrolled .app-head .customer-head-main{min-width:0;flex:0 1 auto}
  html.is-scrolled .app-head .customer-head-name{max-width:clamp(160px,22vw,340px);font-size:1rem}
  html.is-scrolled .app-head .customer-record-menu{flex:1 1 auto;min-width:0;border-bottom:0;padding:6px 8px}
  html.is-scrolled .app-head .customer-head-actions{order:3;margin-left:0;flex-wrap:nowrap}
  html.is-scrolled .app-head .customer-head-actions .button{padding:6px 8px}
  html.is-scrolled .app-head .customer-head-actions .button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  html.is-scrolled .app-head .customer-bar>.customer-head{order:1}
  html.is-scrolled .app-head .customer-bar>.customer-record-menu{order:2}
  /* Gutachten: Schrittleiste bleibt unter dem Kopfbereich sichtbar */
  .assessment-steps{position:sticky;top:var(--app-head-h,0px);z-index:5;background:var(--surface);margin-top:0;padding-top:.6rem}
}
@media(max-width:780px){.app-head{display:contents}}
@media print{.app-head{position:static;box-shadow:none}}
/* Adresssuche (Vorschlagsliste unter dem Feld Straße) */
.address-suggest-wrap{position:relative}
.address-suggest-wrap>input{width:100%}
.address-suggest{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:40;margin:0;padding:4px;list-style:none;max-height:320px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 30px -12px rgba(8,20,40,.35)}
.address-suggest li[role=option]{display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding:8px 10px;border-radius:7px;cursor:pointer;color:var(--ink)}
.address-suggest li[role=option] span{color:var(--muted);font-size:.85rem;white-space:nowrap}
.address-suggest li[aria-selected=true],.address-suggest li[role=option]:hover{background:color-mix(in srgb,var(--blue) 14%,transparent)}
.address-suggest-source{padding:4px 10px 2px;font-size:.7rem;color:var(--muted);text-align:right}
@media(max-width:780px){.address-suggest li[role=option]{flex-direction:column;gap:2px}.address-suggest li[role=option] span{white-space:normal}}

/* App-Installation im Benutzermenü */
.user-menu-panel [data-app-install][hidden],.user-menu-panel [data-app-install-hint][hidden]{display:none}
.user-menu-panel .app-install-hint{margin:0 8px 8px;line-height:1.45}
