/* Gemeinsame Navigation: eine kompakte Kopfzeile, native Dropdowns. */
header.app-header { position: sticky; top: 0; z-index: 2000; padding: 8px 24px; }
.app-header .header-content { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 20px; max-width: 1600px; margin: auto; }
.app-header h1 { margin: 0; font-size: 21px; line-height: 1.3; min-width: 0; }
header .central-brand { color: inherit; text-decoration: none; white-space: nowrap; }
.app-header .central-main-nav { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; width: auto; }
.kv-dropdown { position: relative; }
.kv-dropdown > summary, .kv-mobile-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; padding: 10px 12px; min-height: 44px; border-radius: 8px; color: inherit; font-size: 14px; }
.kv-dropdown > summary { white-space: nowrap; max-width: 230px; overflow-wrap: anywhere; }
.central-main-nav > .kv-dropdown:last-child > summary { white-space: normal; max-width: 180px; }
.kv-dropdown > summary::-webkit-details-marker, .kv-mobile-group > summary::-webkit-details-marker, .mobile-nav-button::-webkit-details-marker { display: none; }
.kv-dropdown > summary::marker, .kv-mobile-group > summary::marker { content: ''; }
.nav-chevron { font-size: 11px; flex-shrink: 0; }
.kv-dropdown[open] > summary, .kv-mobile-group[open] > summary, .nav-group-active > summary { background: rgb(255 255 255 / 12%); }
.kv-dropdown-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 2010; min-width: 240px; max-width: min(340px, calc(100vw - 32px)); padding: 7px; background: #263238; color: #fff; border: 1px solid #52616b; border-radius: 10px; box-shadow: 0 8px 25px rgb(0 0 0 / 25%); }
.kv-dropdown-menu a, .kv-menu-button, .mobile-nav-menu .mobile-nav-link { display: block; width: 100%; box-sizing: border-box; min-height: 44px; padding: 12px; margin: 0; border: 0; border-radius: 7px; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; text-align: left; text-decoration: none; cursor: pointer; }
.kv-dropdown-menu a:hover, .kv-menu-button:hover, .mobile-nav-link:hover { background: rgb(255 255 255 / 12%); text-decoration: none; }
.kv-dropdown-menu a[aria-current="page"], .mobile-nav-menu a[aria-current="page"] { background: rgb(100 160 255 / 24%); font-weight: 700; }
.kv-dropdown-menu form, .kv-mobile-submenu form { margin: 0; }
.app-header .mobile-nav { display: none; }
.app-header :is(a, button, summary):focus-visible { outline: 3px solid #90c5ff; outline-offset: 2px; }
.page-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 12px; color: #65758a; }
.page-breadcrumbs a { color: #315d90; }
/* Seitenkopf: Titel und Zusatz links, alle Seitenaktionen rechts oben. */
.container .page-header.unified-page-header { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 20px; width: 100%; }
.page-heading { flex: 1; min-width: 0; }
.page-header > div:has(> .unified-page-header) { flex: 1; min-width: 0; }
.unified-page-header h1, .unified-page-header h2 { margin: 0; font-size: 25px; line-height: 1.3; overflow-wrap: anywhere; }
.page-heading .count { margin-top: 5px; line-height: 1.5; }
.page-title-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-left: auto; flex-shrink: 0; }
a.page-title-action, .kunde-name-aktionen > .kv-v3-visit-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; margin: 0; border: 1px solid #d4e0ee; border-radius: 8px; background: #f5f9ff; color: #315d90; text-decoration: none; font-size: 19px; line-height: 1; }
a.page-title-action:hover { background: #e6effc; }
a.page-title-action:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }
.kunde-name-aktionen { display: flex; align-items: flex-start; gap: 6px; }
.kunde-name-aktionen > h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Gemeinsame Profil- und Administrationsoberfläche. */
.account-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; border-bottom: 1px solid #d4e0ee; padding-bottom: 8px; }
.account-tabs a { padding: 11px 16px; min-height: 44px; border-radius: 8px; color: #315d90; }
.account-tabs a[aria-current="page"] { background: #e2edfc; font-weight: 700; }
.account-form { max-width: 1000px; }
.account-form fieldset { min-width: 0; padding: 20px; border: 1px solid #dce5ef; }
.account-form legend { padding: 0 6px; font-size: 18px; font-weight: 700; }
.account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.account-field.full { grid-column: 1 / -1; }
.account-field input, .account-field textarea, .account-field select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #bdcbd9; border-radius: 7px; font: inherit; }
.account-field small, .account-form .count { color: #65758a; line-height: 1.5; }
.account-form .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-form .button { min-height: 44px; }
.account-message { padding: 12px 16px; border-left: 4px solid #248352; border-radius: 6px; background: #e9f6ee; }
.account-message[role="alert"] { background: #fff0ed; border-color: #bd4131; }
html[data-theme="dark"] .kv-dropdown-menu, html[data-theme="dark"] .mobile-nav-menu { background: #202d38; border-color: #526b88; color: #e5edf6; }
html[data-theme="dark"] .page-breadcrumbs, html[data-theme="dark"] .account-field small { color: #a5b5c7; }
html[data-theme="dark"] .page-breadcrumbs a, html[data-theme="dark"] .account-tabs a { color: #b9d3ff; }
html[data-theme="dark"] a.page-title-action, html[data-theme="dark"] .kunde-name-aktionen > .kv-v3-visit-icon { background: #24364a; color: #b9d3ff; border-color: #526b88; }
html[data-theme="dark"] .account-tabs, html[data-theme="dark"] .account-form fieldset { border-color: #405366; }
html[data-theme="dark"] .account-tabs a[aria-current="page"] { background: #2c4260; }
html[data-theme="dark"] .account-message { background: #203c32; }
html[data-theme="dark"] .account-message[role="alert"] { background: #482d2a; }
.calendar-conflicts { border-left: 4px solid #c78412; }
.calendar-conflict-item { padding: 12px 0; border-top: 1px solid #dce5ef; }
.calendar-conflict-item p { overflow-wrap: anywhere; font-size: 13px; }
.calendar-conflict-item form { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar-conflict-item button { padding: 10px; border-radius: 8px; cursor: pointer; }
@media (max-width: 1000px) {
    header.app-header { padding: 7px 16px; }
    .app-header .central-main-nav { display: none !important; }
    .app-header .mobile-nav { display: block; position: relative; margin-left: auto; }
    .app-header .header-content { flex-direction: row; align-items: center; gap: 10px; }
    .app-header h1 { font-size: 19px; }
    .app-header .mobile-nav-button { width: 44px; height: 44px; min-width: 44px; }
    .app-header .mobile-nav-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; }
    .kv-mobile-group { width: 100%; border-bottom: 1px solid rgb(255 255 255 / 12%); }
    .kv-mobile-group:last-child { border-bottom: 0; }
    .kv-mobile-group > summary { font-weight: 600; }
    .kv-mobile-submenu { padding: 3px 0 8px 12px; }
}
@media (max-width: 700px) {
    .unified-page-header h2 { font-size: 22px; }
    .account-fields { grid-template-columns: minmax(0, 1fr); }
    .account-form fieldset { padding: 16px; }
    .page-title-actions { flex-shrink: 1; }
}
@media (max-width: 380px) { .app-header h1 { font-size: 16px; } }
@media print {
    header.app-header, .page-breadcrumbs, .page-title-actions, .account-tabs { display: none !important; }
}

/* Kartenreiter direkt neben dem Seitentitel; auf schmalen Geräten umbrechen. */
.page-heading-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.page-heading-line .map-view-switch { margin: 0; padding: 0; border: 0; }
