:root {
  --blue: #0097d7;
  --blue-dark: #0078ac;
  --ink: #130f2d;
  --navy: #1f4789;
  --teal: #57bcbc;
  --yellow: #efc40f;
  --page: #ffffff;
  --surface: #ffffff;
  --soft: #eaf6fb;
  --line: #dce7ed;
  --muted: #60727d;
  --success: #16725a;
  --danger: #a63b3b;
  --shadow: 0 8px 24px rgba(19, 15, 45, .06);
}

* { box-sizing: border-box; }
html { color-scheme: light; overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "Plus Jakarta Sans", sans-serif; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--blue-dark); }

.app-header { position: sticky; top: 0; z-index: 20; background: #ffffff; border-bottom: 1px solid var(--blue); }
.brand-row { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 116px; padding: 20px 24px; background: #f1f7fa; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-home { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.brand-home:hover .brand-copy strong { color: var(--blue-dark); }
.brand-home:focus-visible { outline: 3px solid rgba(0,151,215,.22); outline-offset: 5px; border-radius: 4px; }
.brand-logo { display: block; width: 172px; height: auto; object-fit: contain; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: var(--blue); font-weight: 700; letter-spacing: -1.5px; box-shadow: 0 9px 20px rgba(0,151,215,.24); }
.brand-copy strong, .brand-copy span { display: block; }
.brand-copy strong { font-size: 1rem; }
.brand-copy span { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.app-footer { max-width: 1120px; margin: 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding: 18px 24px 25px; color: var(--muted); font-size: .76rem; }
.app-footer a { color: var(--blue-dark); text-decoration: none; font-weight: 700; }
.app-footer a:hover { text-decoration: underline; }
.footer-link { border: 0; padding: 0; background: transparent; color: var(--blue-dark); font: inherit; font-weight: 700; }
.footer-link:hover { text-decoration: underline; }
.footer-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.app-footer .footer-separator { color: var(--line); }
.public-shell .app-footer { width: min(820px, 100%); padding-right: 0; }
.user-menu { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; }
.mail-header-button { border-color: var(--blue); color: var(--blue-dark); gap: 6px; }
.mobile-action-icon { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--navy); font-weight: 700; }
.account-menu { position: relative; flex: 0 0 auto; }
.account-menu-trigger { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.account-menu-trigger:hover .header-avatar { box-shadow: 0 0 0 4px rgba(0,151,215,.16); }
.account-menu-trigger:focus-visible { outline: 3px solid rgba(0,151,215,.3); outline-offset: 2px; }
.header-avatar { width: 42px; height: 42px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(7,16,56,.16); }
.header-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-menu-dropdown { position: absolute; z-index: 110; top: calc(100% + 8px); right: 0; width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(7,16,56,.18); }
.account-menu-dropdown[hidden] { display: none; }
.account-menu-name { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.account-menu-dropdown button { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--navy); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.account-menu-dropdown button:hover, .account-menu-dropdown button:focus-visible { background: var(--soft); color: var(--blue-dark); outline: none; }
.account-menu-dropdown button.active { background: var(--soft); color: var(--blue-dark); }
.account-menu-dropdown .account-menu-logout { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: #a83e49; }
.mobile-menu-toggle, .mobile-nav-head, .mobile-menu-backdrop { display: none; }
.mobile-nav-service, .mobile-nav-account, .mobile-nav-account-actions { display: none; }
.top-nav { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 0; padding: 16px 0 0; overflow: visible; }
.top-nav::-webkit-scrollbar { display: none; }
.nav-button { min-width: 0; min-height: 48px; white-space: normal; border: 0; padding: 10px 6px 9px; color: var(--blue-dark); background: transparent; font-size: .72rem; line-height: 1.2; font-weight: 600; text-transform: uppercase; overflow-wrap: anywhere; }
.nav-button:hover { background: var(--soft); color: var(--blue-dark); }
.nav-button.active { color: #fff; background: #0078a8; }

.shell { max-width: 1120px; margin: 0 auto; padding: 62px 24px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.page-head h1 { color: var(--blue-dark); text-transform: uppercase; }
.page-head p { color: var(--muted); margin: 7px 0 0; max-width: 690px; line-height: 1.55; }
.participant-select-list { display: grid; gap: 10px; }
.participant-select-row { display: grid; grid-template-columns: 24px 48px minmax(0,1fr); align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f5fbfe; cursor: pointer; }
.participant-select-row:hover { border-color: var(--blue); background: #eef9fd; }
.participant-select-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.participant-select-row span { min-width: 0; }
.participant-select-row strong, .participant-select-row small { display: block; }
.participant-select-row small { color: var(--muted); margin-top: 3px; }
.participant-editor-actions { margin-top: 22px; justify-content: flex-end; }
.mobile-status-board { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); padding: 10px 14px; font-weight: 600; }
.button:hover { border-color: var(--blue); }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.danger { color: var(--danger); }
.button.small { padding: 7px 10px; font-size: .84rem; }
.button.block { width: 100%; }

.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; margin-bottom: 18px; border-radius: 13px; border: 1px solid #ead98b; background: #fff9df; color: #5f5215; line-height: 1.5; }
.notice strong { display: block; margin-bottom: 2px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.stat, .panel { background: var(--surface); border: 1px solid var(--line); border-top-color: var(--blue); border-radius: 4px; box-shadow: var(--shadow); }
.stat { padding: 17px; }
.stat span { display: block; color: var(--muted); font-size: .85rem; }
.stat strong { display: block; margin-top: 6px; font-size: 1.7rem; }
.stat.attention strong { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.overview-events-panel, .overview-panel-full { grid-column: 1 / -1; }
.overview-events-panel .list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.overview-events-panel .list-row { min-width: 0; border-bottom: 1px solid var(--line); }
.overview-events-panel .list-row > div { min-width: 0; overflow-wrap: anywhere; }
.overview-events-panel .list > .empty { grid-column: 1 / -1; }
.overview-events-panel .list-row:last-child { border-bottom: 0; }
.panel { padding: 18px; }
.panel h2, .panel h3 { margin: 0 0 14px; }
.panel h2 { font-size: 1.16rem; }
.panel h3 { font-size: 1rem; }
.panel-subtitle { color: var(--muted); margin: -7px 0 14px; font-size: .86rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.view-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.view-switch .button { border: 0; padding: 7px 10px; }
.view-switch .button.active { background: var(--blue); color: #fff; }
.events-layout.list { grid-template-columns: 1fr; }
.events-layout.list .event-list-row { position: relative; padding: 11px 120px 11px 16px; cursor: pointer; }
.events-layout.list .event-list-row h2 { margin: 0 0 3px; font-size: 1rem; }
.events-layout.list .event-list-row .panel-subtitle { margin: 0; font-size: .82rem; }
.events-layout.list .event-list-row:not(.expanded) .event-image,
.events-layout.list .event-list-row:not(.expanded) .event-details,
.events-layout.list .event-list-row:not(.expanded) .participant-head,
.events-layout.list .event-list-row:not(.expanded) .list { display: none; }
.events-layout.list .event-list-row:not(.expanded) .participant-counts { margin: 7px 0 0; }
.events-layout.list .event-list-row::after { content: 'Details öffnen'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--blue-dark); font-size: .78rem; font-weight: 700; }
.events-layout.list .event-list-row.expanded { padding: 18px; }
.events-layout.list .event-list-row.expanded::after { content: 'Details schliessen'; top: 18px; transform: none; }
.events-layout.list .event-list-row.expanded .event-image { aspect-ratio: 16 / 5; }
.control { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 10px 11px; }
.toolbar .search { flex: 1 1 260px; }
.directory-property-filter { position: relative; flex: 0 0 auto; }
.directory-property-filter > summary { display: inline-flex; align-items: center; min-height: 42px; list-style: none; cursor: pointer; }
.directory-property-filter > summary::-webkit-details-marker { display: none; }
.directory-property-filter > summary::before { content: '☷'; margin-right: 7px; font-size: 1rem; }
.directory-property-filter[open] > summary { border-color: var(--blue); background: var(--soft); color: var(--blue-dark); }
.directory-property-filter form { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(320px,calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 42px rgba(7,16,56,.18); }
.directory-property-filter form > strong, .directory-property-filter form > small { display: block; }
.directory-property-filter form > small { margin: 10px 0 14px; color: var(--muted); line-height: 1.45; }
.directory-property-options { display: grid; gap: 8px; margin-top: 12px; }
.directory-property-options .check { min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.directory-property-filter form .button { width: 100%; justify-content: center; }
.directory-value { display: inline-block; max-width: 260px; overflow-wrap: anywhere; }
.event-period-filter, .event-date-sort { flex: 0 1 190px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--blue); border-radius: 2px; box-shadow: none; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
.compact-directory table { min-width: 560px; }
.compact-directory th, .compact-directory td { padding-top: 10px; padding-bottom: 10px; }
.compact-directory td:last-child, .compact-directory th:last-child { width: 1%; white-space: nowrap; text-align: right; }
.attendance-rate { display: inline-flex; flex-direction: column; min-width: 72px; }
.attendance-rate strong { color: var(--blue-dark); font-size: 1rem; }
.attendance-rate small { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.attendance-stat small { display: block; color: var(--muted); margin-top: 2px; }
.percentage-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.percentage-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.deactivation-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; border-color: #efc7c7; }
.danger-button { border-color: #c63636; background: #fff; color: #a72222; }
.danger-button:hover { background: #fff1f1; }
.inactive-row { opacity: .68; background: #fafafa; }
.profile-crm-panel { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: center; margin-top: 18px; }
.profile-photo-column { text-align: center; }
.profile-photo, .profile-photo-placeholder { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 50%; object-fit: cover; border: 3px solid var(--soft); }
.profile-photo-placeholder { display: grid; place-items: center; background: var(--soft); color: var(--blue-dark); font-size: 2rem; font-weight: 800; }
.profile-photo-actions { justify-content: center; }
.profile-photo-column > small { display: block; margin-top: 8px; color: var(--muted); }
.crm-percent { color: var(--blue-dark); font-size: 1.7rem; }
.whatsapp-status { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.whatsapp-status strong, .whatsapp-status small { display: block; }
.whatsapp-status small { margin-top: 4px; color: var(--muted); }
.reminder-recipients { min-height: 44px; height: auto; line-height: 1.5; }
.api-resource-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.api-resource-field legend { margin-bottom: 9px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.api-resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.api-resource-grid .check { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f5fafc; }
.copy-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.api-security-notice { margin-top: 18px; }
.documentation-index { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0; }
.documentation-index a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-dark); text-decoration: none; font-size: .78rem; font-weight: 700; }
.documentation-index a:hover { border-color: var(--blue); background: var(--soft); }
.documentation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.documentation-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; scroll-margin-top: 175px; }
.documentation-card h2 { margin: 0 0 7px; color: var(--navy); font-size: 1.05rem; }
.documentation-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.documentation-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--blue-dark); font-weight: 800; }
.documentation-support { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.documentation-support h2 { margin-bottom: 5px; }
.documentation-support p { margin: 0; color: var(--muted); }
.documentation-faq { margin-top: 18px; scroll-margin-top: 175px; }
.documentation-questions { display: grid; gap: 10px; margin-top: 18px; }
.documentation-questions details { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.documentation-questions summary { padding: 14px 16px; color: var(--navy); font-weight: 750; cursor: pointer; }
.documentation-questions details[open] summary { border-bottom: 1px solid var(--line); background: #f4f9fb; color: var(--blue-dark); }
.documentation-questions p { margin: 0; padding: 14px 16px; color: var(--muted); line-height: 1.55; }
.documentation-development { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; scroll-margin-top: 175px; border-color: #9ed7eb; background: #f6fcfe; }
.documentation-development h2 { margin: 10px 0 6px; }
.documentation-development p { margin: 5px 0 0; color: var(--muted); }
.account-profile-panel { margin-bottom: 18px; }
.account-profile-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 28px; align-items: start; }
.account-photo-column { display: flex; flex-direction: column; align-items: stretch; gap: 9px; text-align: center; }
.account-photo-column .profile-photo, .account-photo-column .profile-photo-placeholder { width: 160px; height: 160px; }
.account-photo-column .button { justify-content: center; }
.account-photo-column small { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.account-profile-fields { margin-top: 18px; }
.account-save-actions { margin-top: 20px; justify-content: flex-end; }
.account-security-grid { margin-top: 18px; }
.form-section-title { grid-column: 1/-1; margin: 24px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--blue-dark); }
.form-section-title.first { margin-top: 0; padding-top: 0; border-top: 0; }
.approval-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; }
.approval-panel h2 { margin-bottom: 4px; }
.approval-meta { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.security-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.membership-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; color: var(--blue-dark); background: #f4f9fb; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; }
.sort-button:hover { color: var(--ink); }
.sort-arrow { min-width: 12px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f9fcfd; }
tbody tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.person strong, .person small { display: block; }
.person small { color: var(--muted); margin-top: 2px; }
.row-link { border: 0; padding: 0; background: transparent; color: inherit; text-align: left; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; background: var(--soft); color: var(--navy); font-size: .78rem; font-weight: 700; }
.badge.good { background: #e6f7f1; color: var(--success); }
.badge.warn { background: #fff4c7; color: #775e00; }
.badge.danger { background: #fdecec; color: var(--danger); }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-row:first-child { padding-top: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row small { display: block; color: var(--muted); margin-top: 3px; }
.birthday-reminder-row .actions { margin-left: auto; justify-content: flex-end; }
.muted { color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label, .legend { font-size: .84rem; font-weight: 700; color: var(--muted); }
.field .field-error { display: block; margin-top: 7px; color: #b4232c; font-weight: 700; }
.field .field-error[hidden] { display: none; }
.field input.invalid { border-color: #b4232c; box-shadow: 0 0 0 3px rgba(180,35,44,.1); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 11px; }
.field textarea { min-height: 94px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(0,151,215,.16); border-color: var(--blue); }
.form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section h2 { margin-bottom: 4px; }
.form-section > p { margin: 0 0 15px; color: var(--muted); }
.check { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 13px; border-radius: 12px; background: var(--soft); line-height: 1.5; cursor: pointer; }
.field .check input, .check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--blue); }
.check span { min-width: 0; }
.optional { font-weight: 400; color: var(--muted); }

.detail-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 18px; }
.detail-hero .avatar { width: 58px; height: 58px; font-size: 1.1rem; }
.detail-hero h1, .detail-hero p { margin: 0; }
.detail-hero p { color: var(--muted); margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.fact { padding: 11px 0; border-bottom: 1px solid var(--line); }
.fact span, .fact strong { display: block; }
.fact span { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted); font-size: .82rem; }
.attendance { display: flex; align-items: center; gap: 9px; }
.participant-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 17px 0 4px; }
.participant-head h3 { margin: 0; }
.participant-counts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.participant-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.event-image { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; margin: -18px -18px 17px; width: calc(100% + 36px); border-bottom: 2px solid var(--blue); background: var(--soft); }
.event-card { cursor: pointer; }
.event-card:hover { border-color: var(--blue); box-shadow: 0 10px 28px rgba(0,151,215,.12); }
.event-card:focus-visible { outline: 3px solid rgba(0,151,215,.22); outline-offset: 3px; }
.attendance-checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.attendance-checklist li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.attendance-checklist li:last-child { border-bottom: 0; }
.attendance-checklist .person { flex: 1 1 auto; }
.attendance-one-click, .payment-one-click { min-width: 118px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; color: var(--muted); font-weight: 800; }
.attendance-one-click.present, .payment-one-click.paid { border-color: #9ddac6; background: #e6f7f1; color: var(--success); }
.event-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0 0 15px; border-top: 1px solid var(--blue); }
.event-detail { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.event-detail span, .event-detail strong { display: block; }
.event-detail span { color: var(--muted); font-size: .74rem; margin-bottom: 3px; }
.event-detail strong { font-size: .84rem; }
.image-preview { display: block; width: min(100%, 440px); height: 220px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.image-preview[hidden] { display: none; }
#page-event-image-preview-wrap { max-width: 440px; }
.image-placeholder { display: grid; place-items: center; align-content: center; gap: 6px; width: min(100%, 440px); height: 220px; padding: 20px; border: 1px dashed #9fc9dc; border-radius: 10px; background: #f2f9fc; color: var(--muted); text-align: center; }
.image-placeholder[hidden] { display: none; }
.image-placeholder span { color: var(--blue); font-size: 2rem; line-height: 1; }
.image-placeholder strong { color: var(--ink); }
.image-placeholder small { font-size: .78rem; }
@media (max-width: 520px) { .image-preview { height: 180px; } }
@media (max-width: 520px) { .image-placeholder { height: 180px; } }
.switch { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 11px; font-size: .8rem; font-weight: 700; }
.switch.on { border-color: #9ddac6; background: #e6f7f1; color: var(--success); }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(19,15,45,.48); }
.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 80px rgba(19,15,45,.28); }
.modal-head, .modal-body, .modal-foot { padding: 18px 20px; }
.modal-head { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.guest-import-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 240px; margin-top: 18px; padding: 28px; border: 2px dashed var(--line); border-radius: 16px; background: var(--soft); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.guest-import-dropzone:hover, .guest-import-dropzone:focus-within, .guest-import-dropzone.is-dragging { border-color: var(--blue); background: color-mix(in srgb, var(--soft) 72%, var(--blue) 28%); outline: none; }
.guest-import-dropzone.is-dragging { transform: scale(1.01); }
.guest-import-dropzone.has-file { border-style: solid; border-color: var(--success); }
.guest-import-dropzone strong { color: var(--ink); font-size: 1.1rem; }
.guest-import-dropzone small { display: block; color: var(--muted); }
.guest-import-drop-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--blue); font-size: 1.9rem; font-weight: 800; box-shadow: 0 5px 16px rgba(19,15,45,.08); }
.guest-import-choose { pointer-events: none; }
.guest-import-file { max-width: 100%; margin-top: 4px; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.system-update-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.system-update-meta > div { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.system-update-meta span, .system-update-meta strong { display: block; overflow-wrap: anywhere; }
.system-update-meta span { margin-bottom: 5px; color: var(--muted); font-size: .8rem; }
.system-update-notes { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.system-update-notes h3 { margin: 0 0 8px; }
.system-update-notes ul { margin: 0; padding-left: 20px; }
.system-update-actions { margin: 18px 0 10px; }
.guest-import-review-modal { width: min(980px, 100%); }
.import-review-notice { margin-bottom: 18px; }
.import-duplicate-confirm { margin-top: 12px; }
.notice .import-duplicate-confirm span { display: inline; }
.guest-import-review-modal .form-section-title { scroll-margin-top: 20px; }
.crm-field-manager-list { margin: 18px 0 24px; }
.crm-field-manager-list h3, .crm-field-create-form h3 { margin: 0 0 12px; }
.crm-field-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.crm-field-card > div { min-width: 0; }
.crm-field-card strong, .crm-field-card small { display: block; overflow-wrap: anywhere; }
.crm-field-card small { margin-top: 4px; color: var(--muted); }
.crm-field-card.is-inactive { opacity: .7; border-style: dashed; }
.crm-field-create-form { padding-top: 20px; border-top: 1px solid var(--line); }
.crm-scope-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.crm-scope-field legend { margin-bottom: 8px; font-size: .85rem; font-weight: 700; }
.crm-scope-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.crm-scope-grid .check { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.toast { position: fixed; z-index: 60; right: 22px; bottom: 22px; max-width: min(390px, calc(100% - 44px)); padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.public-shell { min-height: 100vh; background: linear-gradient(135deg,#edf8fc,#f9fbff); padding: 34px 18px; }
.public-card { width: min(820px,100%); margin: 0 auto; padding: 25px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.public-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.public-brand .brand-logo { width: 190px; }
.public-card h1 { margin: 0 0 8px; }
.public-card > p { color: var(--muted); margin: 0 0 22px; line-height: 1.55; }
.login-shell { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg,#edf8fc,#f9fbff); padding: 44px 18px 0; }
.login-card { width: min(460px,100%); margin: auto; padding: 28px; border-radius: 18px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 15px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.login-brand .brand-logo { width: 145px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand span { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.login-card h1 { margin: 0 0 5px; }
.login-card > p { color: var(--muted); margin: 0 0 20px; }
.login-card .field { margin-top: 14px; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 16px 0; font-size: .84rem; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--blue-dark); font: inherit; font-weight: 700; cursor: pointer; }
.login-submit { width: 100%; justify-content: center; padding: 12px 16px; }
.login-first-access { margin-top: 10px; }
.login-demo { margin-top: 20px; }
.local-code { display: block; margin: 7px 0; color: var(--ink); font-size: 1.35rem; font-weight: 800; letter-spacing: .18em; }
.two-factor-inline { max-width: 560px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.login-help { text-align: center; font-size: .82rem; margin: 18px 0 0 !important; }
.login-shell .app-footer { margin-top: 34px; }

@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .overview-events-panel .list { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .detail-hero { grid-template-columns: auto 1fr; }
  .detail-hero .actions { grid-column: 1/-1; }
  .profile-crm-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .event-period-filter, .event-date-sort { width: 100%; flex-basis: auto; }
  .documentation-grid { grid-template-columns: 1fr; }
  .documentation-index { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .documentation-index a { display: flex; align-items: center; border-radius: 10px; }
  .documentation-support, .documentation-development { align-items: stretch; flex-direction: column; }
  .documentation-support .button, .documentation-development .button { width: 100%; justify-content: center; }
  .app-footer { flex-wrap: wrap; justify-content: center; }
  .api-resource-grid, .copy-field { grid-template-columns: 1fr; }
  .copy-field .button { width: 100%; justify-content: center; }
  .app-header { position: relative; }
  .brand-row { min-height: 0; padding: 10px 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .brand { width: auto; min-width: 0; gap: 10px; }
  .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
  .brand-logo { width: 82px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: .9rem; line-height: 1.25; }
  .brand-copy span { font-size: .76rem; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; align-self: center; min-height: 44px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-size: .82rem; font-weight: 700; }
  .mobile-menu-toggle .menu-icon { position: relative; display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--blue-dark); }
  .mobile-menu-toggle .menu-icon::before, .mobile-menu-toggle .menu-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 3px; border-radius: 2px; background: var(--blue-dark); }
  .mobile-menu-toggle .menu-icon::before { top: -7px; }
  .mobile-menu-toggle .menu-icon::after { top: 7px; }
  .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { outline: 3px solid rgba(0,151,215,.25); outline-offset: 2px; }
  .user-menu { display: none; }
  .user-menu > span { display: none; }
  .user-menu .avatar { display: grid; }
  .user-menu .button { flex: 1 1 0; max-width: 170px; justify-content: center; padding: 8px 10px; font-size: .78rem; }
  .account-menu-dropdown { position: fixed; top: auto; right: 14px; bottom: 14px; width: min(260px,calc(100vw - 28px)); }
  .top-nav { position: fixed; inset: 0 auto 0 0; z-index: 102; width: min(84vw,320px); max-width: none; margin: 0; padding: 0 0 24px; display: flex; flex-direction: column; background: #fff; box-shadow: 14px 0 34px rgba(7,16,56,.22); overflow-y: auto; transform: translateX(-105%); transition: transform .22s ease; }
  .top-nav.mobile-open { transform: translateX(0); }
  .mobile-nav-head { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 14px 16px 14px 20px; color: var(--navy); background: #f1f7fa; border-bottom: 1px solid var(--line); }
  .mobile-menu-close { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); font-family: Arial,sans-serif; font-size: 1.65rem; line-height: 1; text-align: center; }
  .mobile-nav-account { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px; background: #f8fbfd; }
  .mobile-nav-account .header-avatar { width: 46px; height: 46px; }
  .mobile-nav-account div { min-width: 0; }
  .mobile-nav-account strong, .mobile-nav-account span { display: block; overflow-wrap: anywhere; }
  .mobile-nav-account strong { color: var(--navy); font-size: .82rem; }
  .mobile-nav-account span { margin-top: 2px; color: var(--muted); font-size: .7rem; }
  .mobile-nav-account-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 0 14px 14px; background: #f8fbfd; border-bottom: 1px solid var(--line); }
  .mobile-nav-account-actions button { min-height: 42px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; background: #fff; color: var(--blue-dark); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; }
  .mobile-nav-account-actions button:hover { background: var(--soft); }
  .mobile-nav-account-actions button.active { background: #0078a8; color: #fff; border-color: #0078a8; }
  .nav-button { width: 100%; min-width: 0; min-height: 54px; padding: 14px 20px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; text-align: left; white-space: normal; line-height: 1.2; font-size: .78rem; }
  .nav-button.active { border-left-color: var(--navy); border-bottom-color: var(--line); }
  .mobile-nav-service { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding: 18px 16px 0; border-top: 1px solid var(--line); }
  .mobile-nav-service button, .mobile-nav-service a { min-height: 46px; padding: 11px 8px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--blue-dark); font: inherit; font-size: .76rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
  .mobile-nav-service button:hover, .mobile-nav-service a:hover { background: var(--soft); }
  .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 101; width: 100%; height: 100%; border: 0; background: rgba(7,16,56,.48); }
  .mobile-menu-backdrop:not([hidden]) { display: block; }
  body.mobile-menu-open { overflow: hidden; }
  body.mobile-menu-open .app-header { z-index: 100; }
  .shell { padding: 24px 14px 42px; }
  .page-head { margin-bottom: 16px; gap: 12px; }
  .page-head h1 { font-size: 1.62rem; line-height: 1.1; }
  .page-head p { margin-top: 6px; font-size: .9rem; line-height: 1.45; }
  .notice { padding: 12px; font-size: .86rem; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .stat { padding: 14px; min-height: 108px; }
  .stat strong { font-size: 1.5rem; }
  .form-grid, .facts { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .page-head .actions, .page-head .button { width: 100%; }
  .toolbar { flex-direction: column; }
  .toolbar .control, .toolbar .search, .view-switch { width: 100%; flex-basis: auto; }
  .view-switch .button { flex: 1; }
  .events-layout.list .event-list-row,
  .events-layout.list .event-list-row.expanded { padding: 14px; }
  .events-layout.list .event-list-row::after,
  .events-layout.list .event-list-row.expanded::after { position: static; display: block; margin-top: 10px; transform: none; }
  .panel { padding: 14px; }
  .table-wrap { margin-inline: -14px; border-left: 0; border-right: 0; }
  .mobile-card-table { margin-inline: 0; overflow: visible; border: 0; background: transparent; }
  .mobile-card-table table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; min-width: 0; }
  .mobile-card-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .mobile-card-table tbody { display: grid; gap: 12px; }
  .mobile-card-table tr { padding: 14px; overflow: hidden; border: 1px solid var(--line); border-top: 2px solid var(--blue); border-radius: 12px; background: var(--surface); box-shadow: 0 7px 20px rgba(7,16,56,.05); }
  .mobile-card-table td { display: grid; grid-template-columns: minmax(104px,.42fr) minmax(0,.58fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; white-space: normal; }
  .mobile-card-table td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
  .mobile-card-table .directory-primary { display: block; padding-top: 0; }
  .mobile-card-table .directory-primary::before, .mobile-card-table .directory-actions::before, .mobile-card-table .empty::before { display: none; }
  .mobile-card-table .directory-actions { display: block; width: 100%; padding: 11px 0 0; border-bottom: 0; text-align: right; }
  .mobile-card-table .directory-actions .button, .mobile-card-table .directory-actions .actions { width: 100%; justify-content: center; }
  .mobile-card-table .person { min-width: 0; }
  .mobile-card-table .empty { display: block; padding: 14px 0; text-align: center; }
  .directory-property-filter { width: 100%; }
  .directory-property-filter > summary { width: 100%; justify-content: center; }
  .directory-property-filter form { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .crm-field-card { align-items: stretch; flex-direction: column; }
  .crm-field-card .button { width: 100%; }
  .crm-scope-grid { grid-template-columns: 1fr; }
  th, td { padding: 10px 11px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .event-details { grid-template-columns: 1fr; }
  .events-layout.list .event-image { aspect-ratio: 16 / 7; }
  .participant-head { align-items: stretch; flex-direction: column; }
  .participant-actions { align-items: stretch; flex-direction: column; }
  .mobile-attendance .attendance-checklist { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .mobile-attendance .attendance-checklist li { min-width: 0; padding: 12px; align-items: stretch; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .mobile-attendance .attendance-checklist .person { flex-basis: auto; min-width: 0; align-items: flex-start; }
  .mobile-attendance .attendance-checklist .person .avatar { width: 32px; height: 32px; font-size: .72rem; }
  .mobile-attendance .attendance-checklist .person strong { font-size: .86rem; line-height: 1.25; }
  .mobile-attendance .attendance-checklist .person small { font-size: .7rem; }
  .attendance-one-click, .payment-one-click { width: 100%; min-width: 0; min-height: 44px; font-size: .82rem; }
  .attendance-checklist.compact li { flex-wrap: nowrap; align-items: center; }
  .attendance-checklist.compact .person { flex-basis: auto; }
  .event-detail-image .event-image { margin: -14px -14px 14px; width: calc(100% + 28px); }
  .list-row { align-items: flex-start; }
  .deactivation-panel, .approval-panel, .membership-panel, .security-heading, .whatsapp-status { align-items: stretch; flex-direction: column; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: calc(100vh - 16px); }
  .modal-head, .modal-body, .modal-foot { padding: 14px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .button { width: 100%; justify-content: center; }
  .public-card { padding: 18px; }
  .public-brand { align-items: flex-start; }
  .public-brand .brand-logo { width: 120px; }
  .login-shell { padding: 18px 12px 0; }
  .login-card { padding: 20px 16px; }
  .login-brand { align-items: flex-start; }
  .login-brand .brand-logo { width: 105px; }
  .login-options { align-items: flex-start; flex-direction: column; }
  .app-footer { justify-content: center; flex-wrap: wrap; padding: 16px 14px 22px; }
}

/* Sicherheitsanforderungen fuer den spaeteren Produktivbetrieb. */
.security-production-panel { border-color: #d5a227; background: #fffdf6; }
.security-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.security-heading h2 { margin-bottom: 4px; }
.danger-notice { margin: 0 0 18px; border-color: #e2a4a4; background: #fff1f1; color: #671f1f; }
.security-requirements { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.security-requirements > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.security-requirements strong, .security-requirements span { display: block; }
.security-requirements strong { margin-bottom: 5px; color: var(--ink); }
.security-requirements span { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.security-spec-link { margin: 16px 0 0; color: var(--muted); font-size: .88rem; }
.contact-editor-panel { margin: 18px 0; border-color: var(--blue); scroll-margin-top: 16px; }
.contact-editor-panel[hidden] { display: none; }
.contact-history { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-history h3 { margin-bottom: 8px; }
.data-transfer-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.data-transfer-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.data-transfer-card h3 { margin-bottom: 6px; }
.data-transfer-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.45; }
.import-confirmation { margin: 14px 0; }
.statistics-kpis .stat small { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.year-comparison { margin-bottom: 18px; }
.year-comparison-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.year-comparison-head .field { width: 210px; margin: 0; }
.year-comparison-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin: 18px 0 10px; }
.year-comparison-summary > div { display: flex; align-items: center; gap: 8px; }
.year-comparison-summary b { color: var(--muted); font-size: .86rem; }
.year-comparison-controls { display: grid; grid-template-columns: minmax(240px,1fr) minmax(150px,.55fr); gap: 12px; min-width: min(100%,520px); }
.year-comparison-controls .field { margin: 0; }
.membership-contribution { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.membership-contribution > div { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7fbfd; }
.membership-contribution span, .membership-contribution strong, .membership-contribution small { display: block; }
.membership-contribution span { color: var(--muted); font-size: .82rem; }
.membership-contribution strong { margin: 5px 0; color: var(--blue-dark); font-size: 1.28rem; }
.membership-contribution small { color: var(--muted); line-height: 1.4; }
.chart-dot { width: 12px; height: 12px; border-radius: 50%; }
.chart-dot.current { background: #008bc9; }
.chart-dot.comparison { background: #32b8a6; }
.year-trend { margin-left: auto; padding: 7px 11px; border-radius: 999px; font-size: .84rem; font-weight: 700; }
.year-trend.positive { background: #e4f7ef; color: #137957; }
.year-trend.negative { background: #fdeaea; color: #b83232; }
.year-trend.neutral { background: #eef3f6; color: var(--muted); }
.year-chart-wrap { overflow-x: auto; }
.year-chart { display: block; width: 100%; min-width: 650px; height: auto; }
.chart-grid line { stroke: #dce8ee; stroke-width: 1; }
.chart-grid text { fill: #71808a; font-size: 11px; text-anchor: end; }
.chart-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.current { stroke: #008bc9; }
.chart-line.comparison { stroke: #32b8a6; }
.chart-months text { fill: #71808a; font-size: 11px; text-anchor: middle; }
.year-comparison > small { color: var(--muted); }
.statistics-grid { margin: 18px 0; }
.stat-bars { display: grid; gap: 16px; margin-top: 20px; }
.stat-bar-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.stat-bar-row > div:first-child span { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.stat-bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e9f1f5; }
.stat-bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.stat-bar-track.good > span { background: #25a574; }
.statistics-events { margin-top: 18px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f1f9fc; }
.statistics-period { margin-bottom: 16px; }
.statistics-period-fields { display: grid; grid-template-columns: minmax(170px,1fr) minmax(170px,1fr) auto auto; align-items: end; gap: 12px; }
.statistics-period-fields .field { margin: 0; }
.statistics-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eff5f8; }
.statistics-tabs button { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.statistics-tabs button.active { background: var(--blue); color: #fff; }
.settings-tabs { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eff5f8; }
.settings-tabs button { min-height: 46px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.settings-tabs button.active { background: var(--blue); color: #fff; box-shadow: 0 2px 7px rgba(0,139,201,.18); }
.settings-tabs + .grid-2 > [hidden] { display: none; }
.settings-tabs + .grid-2 { grid-template-columns: minmax(0,1fr); }
.settings-tabs + .grid-2 > .panel { grid-column: 1 / -1; width: 100%; }
.settings-mobile-select { display: none; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.settings-mobile-select label { margin-bottom: 7px; }
.settings-mobile-select select { width: 100%; min-height: 48px; font-weight: 700; }
@media (max-width: 820px) {
  .settings-mobile-select { display: block; }
  .settings-tabs { display: none; }
}
.role-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.role-summary > div { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7fbfd; }
.role-summary strong, .role-summary span { display: block; }
.role-summary span { margin-top: 4px; color: var(--muted); font-size: .88rem; }
.user-access-list { display: grid; gap: 12px; margin-top: 18px; }
.user-access-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.user-access-summary { display: grid; grid-template-columns: minmax(260px,1fr) auto auto; align-items: center; gap: 16px; padding: 14px; }
.user-access-meta { display: grid; justify-items: end; gap: 4px; }
.user-access-meta small { color: var(--muted); }
.user-access-editor { padding: 16px; border-top: 1px solid var(--line); background: #f8fbfd; }
.user-access-editor[hidden] { display: none; }
.permission-field { margin: 0; padding: 0; border: 0; }
.permission-field legend { margin-bottom: 8px; color: var(--muted); font-weight: 700; }
.permission-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.permission-grid label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); line-height: 1.3; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.permission-grid label:hover { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,151,215,.09); }
.permission-grid label:has(input:checked) { border-color: var(--blue); background: var(--soft); color: var(--blue-dark); font-weight: 700; }
.permission-grid label span { min-width: 0; overflow-wrap: anywhere; }
.permission-grid input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: var(--blue); }
.distribution-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.distribution-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.distribution-card h3 { margin-bottom: 14px; }
.distribution-card .field[hidden] { display: none; }
.distribution-status-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.distribution-status-options label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #f7fbfd; cursor: pointer; }
.distribution-status-options label:has(input:checked) { border-color: var(--blue); background: var(--soft); color: var(--blue-dark); font-weight: 700; }
.distribution-status-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.direct-mail-panel { grid-column: 1/-1; }
.direct-mail-layout { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }
.direct-mail-panel .field[hidden] { display: none; }
.direct-mail-recipient-info { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #bde1f1; border-radius: 10px; background: var(--soft); }
.direct-mail-recipient-info strong, .direct-mail-recipient-info span { display: block; }
.direct-mail-recipient-info span { color: var(--muted); font-size: .82rem; text-align: right; }
.mail-composer { display: grid; gap: 8px; }
.mail-format-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #f4f9fb; }
.mail-format-toolbar button, .mail-format-toolbar select, .mail-format-toolbar input { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 6px 9px; }
.mail-format-toolbar button:hover { border-color: var(--blue); background: var(--soft); }
.mail-format-toolbar input[type="color"] { width: 44px; padding: 4px; }
.mail-format-toolbar .mail-link-url { min-width: 210px; }
.mail-format-toolbar .mail-link-url[hidden] { display: none; }
.mail-html-editor { min-height: 260px; margin-top: -8px; padding: 15px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: #fff; line-height: 1.55; }
.mail-html-editor:focus { outline: 3px solid rgba(0,151,215,.16); border-color: var(--blue); }
.mail-html-editor:empty::before { content: attr(data-placeholder); color: #89969e; pointer-events: none; }
.mail-composer > small { color: var(--muted); line-height: 1.45; }
.mail-attachments { margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfd; }
.mail-attachments input[type="file"] { background: #fff; }
.mail-attachment-list { display: grid; gap: 8px; margin-top: 12px; }
.mail-attachment-list > .muted { margin: 0; }
.mail-attachment-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mail-attachment-item strong, .mail-attachment-item small { display: block; overflow-wrap: anywhere; }
.mail-attachment-item small { margin-top: 3px; color: var(--muted); }
.tips-toolbar { display: grid; grid-template-columns: minmax(0,2fr) minmax(220px,1fr); gap: 14px; margin-bottom: 18px; }
.tips-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.admin-edit-note { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); }
.tip-template-card { display: flex; flex-direction: column; min-width: 0; }
.tip-template-card .tip-view { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.tip-template-card .tip-view[hidden], .tip-template-card .tip-editor[hidden] { display: none; }
.tip-template-card h2 { margin-top: 14px; }
.tip-template-card .tip-view > p { flex: 1; margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.tip-template-card details { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7fbfd; }
.tip-template-card summary { padding: 12px 14px; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.tip-template-card pre { max-height: 360px; margin: 0; padding: 14px; overflow: auto; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font: inherit; font-size: .84rem; line-height: 1.55; }
.tip-template-card .tip-view > small { display: block; margin-top: 12px; color: var(--muted); }
.tip-editor { width: 100%; }
.tip-text-editor { min-height: 360px; font-family: inherit; line-height: 1.5; }
.official-resources { margin-top: 18px; }
.resource-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.resource-links a { display: block; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f6fbfd; text-decoration: none; }
.resource-links a:hover { border-color: var(--blue); }
.resource-links strong, .resource-links span { display: block; }
.resource-links span { margin-top: 5px; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.status-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.status-stat-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.status-stat-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-stat-card > div:first-child span, .status-stat-card small { color: var(--muted); }
.status-stat-card b { display: block; margin: 12px 0 8px; font-size: 1.7rem; }
.status-stat-card small { display: block; margin-top: 8px; }
.conversion-panel { margin-bottom: 18px; }
.conversion-kpis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.conversion-kpis > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbfd; }
.conversion-kpis span, .conversion-kpis strong, .conversion-kpis small { display: block; }
.conversion-kpis span { color: var(--muted); font-size: .82rem; }
.conversion-kpis strong { margin: 7px 0; color: var(--blue-dark); font-size: 1.8rem; }
.conversion-kpis small { color: var(--muted); line-height: 1.4; }
.membership-funnel { display: grid; grid-template-columns: repeat(3,minmax(110px,1fr) auto) minmax(130px,1.15fr); align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.membership-funnel > div { display: grid; align-content: center; min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbfd; text-align: center; }
.membership-funnel > div.success { border-color: #9ddac6; background: #eaf9f3; }
.membership-funnel > div.alumni { border-color: #ead98b; background: #fff9df; }
.membership-funnel span, .membership-funnel strong { display: block; }
.membership-funnel span { color: var(--muted); font-size: .78rem; }
.membership-funnel strong { margin-top: 5px; font-size: 1.45rem; }
.membership-funnel > i { align-self: center; color: var(--blue); font-style: normal; font-weight: 800; }
.alumni-summary { margin: 14px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.conversion-note { margin: 18px 0 0; }
.statistics-people th button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.statistics-person-toolbar { display: grid; grid-template-columns: minmax(0,2fr) minmax(220px,1fr); gap: 14px; }
.contact-tips-panel { margin-bottom: 18px; }
.contact-tip-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.contact-tip-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f6fbfd; }
.contact-tip-grid strong, .contact-tip-grid span { display: block; }
.contact-tip-grid strong { margin-bottom: 5px; }
.contact-tip-grid span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.contact-tip { display: inline-block; max-width: 260px; color: #6b4e00; font-size: .82rem; line-height: 1.35; }
.email-template-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 18px; margin-top: 18px; }
.email-template-editors { display: grid; gap: 16px; }
.email-template-editors textarea { min-height: 170px; }
.email-template-editors .code-editor { min-height: 260px; font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size: .84rem; line-height: 1.5; }
.email-editor-toolbar { display:flex; flex-wrap:wrap; gap:6px; padding:8px; border:1px solid #cbd9e2; border-bottom:0; border-radius:8px 8px 0 0; background:#f4f8fb; }
.email-editor-toolbar button { min-height:34px; padding:6px 10px; border:1px solid #cbd9e2; border-radius:6px; background:#fff; color:#17152f; font:inherit; cursor:pointer; }
.email-editor-toolbar button:hover { border-color:#009dda; color:#007aa9; }
.email-visual-editor { box-sizing:border-box; min-height:330px; padding:18px; overflow:auto; border:1px solid #cbd9e2; border-radius:0 0 8px 8px; background:#fff; font:16px/1.55 Arial,sans-serif; color:#17152f; outline:none; }
.email-visual-editor:focus { border-color:#009dda; box-shadow:0 0 0 3px #009dda20; }
.email-visual-editor h1,.email-visual-editor h2,.email-visual-editor h3 { color:#007aa9; }
.template-placeholders { display: flex; flex-wrap: wrap; gap: 8px; }
.email-preview-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.email-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f5fafc; }
.email-preview-subject { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
#email-template-preview { display: block; width: 100%; min-height: 460px; border: 0; background: #fff; }
@media (max-width: 700px) {
  .year-comparison-controls, .membership-contribution { grid-template-columns: 1fr; width: 100%; min-width: 0; }
  .role-summary { grid-template-columns: 1fr; }
  .user-access-summary { grid-template-columns: 1fr; align-items: start; }
  .user-access-meta { justify-items: start; }
  .user-access-summary .button { width: 100%; }
  .permission-grid { grid-template-columns: 1fr; }
  .account-profile-layout { grid-template-columns: 1fr; }
  .account-photo-column { width: min(100%,280px); margin: 0 auto; }
  .security-requirements, .data-transfer-grid { grid-template-columns: 1fr; }
  .statistics-events .table-wrap { overflow-x: auto; }
  .statistics-events table { min-width: 680px; }
  .email-template-layout { grid-template-columns: 1fr; }
  #email-template-preview { min-height: 360px; }
  .statistics-period-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .statistics-period-fields .button { width: 100%; }
  .status-stat-grid { grid-template-columns: 1fr; }
  .statistics-people .table-wrap { overflow-x: auto; }
  .statistics-people table { min-width: 620px; }
  .statistics-person-toolbar, .contact-tip-grid { grid-template-columns: 1fr; }
  .settings-mobile-select { display: block; }
  .settings-tabs { display: none; }
  .distribution-layout { grid-template-columns: 1fr; }
  .distribution-card .actions .button { width: 100%; justify-content: center; }
  .tips-toolbar, .tips-grid, .resource-links { grid-template-columns: 1fr; }
  .tip-template-card .actions .button { width: 100%; justify-content: center; text-align: center; }
  .conversion-kpis { grid-template-columns: 1fr; }
  .membership-funnel { grid-template-columns: 1fr; overflow: visible; }
  .membership-funnel > i { justify-self: center; transform: rotate(90deg); }
}

@media (min-width: 861px) {
  .top-nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
.dues-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.dues-toolbar > .field { min-width: 180px; }
.dues-amount-form { display: flex; align-items: end; gap: 10px; }
.dues-amount-form .field { min-width: 210px; }
.dues-stats .stat:last-child strong { font-size: 1.18rem; }
.dues-table td { vertical-align: middle; }
.dues-actions { display: grid; grid-template-columns: repeat(2,minmax(110px,1fr)); gap: 7px; min-width: 260px; }
.dues-actions .button { width: 100%; white-space: nowrap; }
@media (max-width: 800px) {
  .dues-toolbar, .dues-amount-form { align-items: stretch; flex-direction: column; }
  .dues-toolbar > .field, .dues-amount-form .field { min-width: 0; width: 100%; }
  .dues-actions { min-width: 220px; }
}
@media (max-width: 560px) {
  .account-save-actions .button { width: 100%; justify-content: center; }
  .direct-mail-recipient-info { align-items: flex-start; flex-direction: column; }
  .direct-mail-recipient-info span { text-align: left; }
  .distribution-status-options { grid-template-columns: 1fr; }
  .year-comparison-head { align-items: stretch; flex-direction: column; }
  .year-comparison-head .field { width: 100%; }
  .year-trend { width: 100%; margin-left: 0; text-align: center; }
  .statistics-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .statistics-tabs button { flex: 0 0 auto; min-width: 145px; scroll-snap-align: start; }
  .statistics-period-fields { grid-template-columns: 1fr; }
  .email-preview-head { align-items: flex-start; flex-direction: column; }
  .security-heading .badge { align-self: flex-start; }
  .distribution-panel .table-wrap { margin-inline: 0; }
}
@media (max-width: 360px) {
  .mobile-attendance .attendance-checklist { grid-template-columns: 1fr; }
  .brand-logo { width: 70px; }
  .brand-copy strong { font-size: .82rem; }
  .brand-copy span { font-size: .7rem; }
  .user-menu .button { font-size: .72rem; padding-inline: 7px; }
  .nav-button { font-size: .61rem; padding-inline: 4px; }
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 0; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

/* Teilnehmerauswahl: bewusst am Dateiende, damit keine ältere Regel sie überschreibt. */
.participant-editor-panel .participant-select-list { display: grid; gap: 10px; }
.participant-search-bar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 16px; margin-bottom: 18px; }
.participant-search-bar .field { margin: 0; }
.participant-search-bar input { width: 100%; }
.participant-search-bar > span { min-width: 100px; padding: 12px 0; color: var(--muted); text-align: right; font-weight: 700; }
.participant-editor-panel .participant-select-row { display: grid; grid-template-columns: 24px 48px minmax(0,1fr); align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f5fbfe; cursor: pointer; }
.participant-editor-panel .participant-select-row input { grid-column: 1; width: 20px; height: 20px; margin: 0; }
.participant-editor-panel .participant-select-row .avatar { grid-column: 2; }
.participant-editor-panel .participant-select-row > span { grid-column: 3; display: block; min-width: 0; }
.participant-editor-panel .participant-select-row strong, .participant-editor-panel .participant-select-row small { display: block; }
@media (max-width: 520px) {
  .participant-search-bar { grid-template-columns: 1fr; gap: 4px; }
  .participant-search-bar > span { padding: 0; text-align: left; }
  .participant-editor-panel .participant-select-row { grid-template-columns: 22px 40px minmax(0,1fr); gap: 10px; padding: 12px; }
  .participant-editor-actions { flex-direction: column-reverse; }
  .participant-editor-actions .button { width: 100%; }
}

@media (max-width: 560px) {
  .mobile-attendance .attendance-checklist { display: none; }
  .mobile-status-board { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .mobile-status-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f1f6f8; }
  .mobile-status-tabs button { min-height: 44px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
  .mobile-status-tabs button:only-child { grid-column: 1/-1; }
  .mobile-status-tabs button.active { background: var(--blue); color: #fff; box-shadow: 0 2px 7px rgba(0,139,201,.2); }
  .mobile-status-column { display: none; gap: 10px; }
  .mobile-status-column.active { display: grid; }
  .mobile-status-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fffaf0; }
  .mobile-status-group.completed { background: #f1fbf6; }
  .mobile-status-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .mobile-status-title h3 { margin: 0; font-size: .95rem; }
  .mobile-status-title span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: #fff; font-weight: 700; }
  .mobile-status-people { display: grid; }
  .mobile-status-person { display: grid; grid-template-columns: 38px minmax(0,1fr) 28px; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
  .mobile-status-person:last-child { border-bottom: 0; }
  .mobile-status-person .avatar { width: 36px; height: 36px; font-size: .74rem; }
  .mobile-status-person strong, .mobile-status-person small { display: block; }
  .mobile-status-person small { color: var(--muted); margin-top: 2px; }
  .mobile-status-person b { color: var(--blue); text-align: center; }
  .mobile-status-group.completed .mobile-status-person b { color: #13825b; }
  .mobile-status-people .empty { padding: 12px; margin: 0; }
}
.event-template-picker{margin-bottom:18px}
.event-template-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
@media (max-width:700px){.event-template-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.event-template-options .button{width:100%;white-space:normal}}
.person-status-head{display:flex;align-items:center;gap:12px;min-width:330px;margin:0}
.person-status-head label{flex:0 0 auto;margin:0;color:var(--blue);font-weight:700;text-transform:uppercase}
.person-status-head select{min-width:220px}
@media (max-width:700px){.person-status-head{display:grid;width:100%;min-width:0;gap:6px}.person-status-head select{width:100%;min-width:0}}
.person-save-sticky{position:sticky;top:var(--person-save-top,192px);z-index:19;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-8px 0 18px;padding:12px 14px;border:1px solid var(--blue);border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(15,46,75,.16);backdrop-filter:blur(8px)}
.person-save-sticky[hidden]{display:none}
.person-save-sticky span strong,.person-save-sticky span small{display:block}.person-save-sticky span small{margin-top:2px;color:var(--muted)}
@media (max-width:700px){.person-save-sticky{top:var(--person-save-top,8px);align-items:stretch;flex-direction:column}.person-save-sticky .button{width:100%}}

/* Benutzerverwaltung und Einstellungen – übersichtliche Produktionsansicht */
@media (min-width: 861px) {
  .settings-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.role-guide { margin-top: 16px; border: 1px solid var(--line); border-radius: 11px; background: #f7fbfd; }
.role-guide summary { padding: 13px 15px; color: var(--blue); font-weight: 750; cursor: pointer; }
.role-guide .role-summary { margin: 0; padding: 0 14px 14px; }
.user-access-list { gap: 10px; }
.user-access-card { box-shadow: 0 2px 8px rgba(18,32,55,.035); }
.user-access-summary { grid-template-columns: minmax(280px,1.4fr) minmax(190px,.7fr) minmax(310px,.9fr); padding: 16px; }
.user-access-person small { line-height: 1.35; }
.user-access-person small + small { color: #6e7e89; }
.user-access-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; min-width: 0; width: 100%; align-items: stretch; }
.user-access-actions .button { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; height: auto; padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; text-align: center; }
.user-access-actions .button:first-child:not(:only-child) { grid-column: 1 / -1; }
.user-invitation-status { max-width: 220px; text-align: right; }
.user-security-confirmation { background: #f1fbf6; border-color: #bfe7cf; }
.custom-role-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.custom-role-card { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7fbfd; }
.custom-role-card p { margin: 9px 0 5px; color: var(--ink); line-height: 1.5; }
.custom-role-card small { color: var(--muted); }
.role-permission-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.role-permission-tags span { padding: 5px 8px; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: .72rem; font-weight: 700; }
.custom-role-empty { grid-column: 1/-1; border: 1px dashed var(--line); border-radius: 12px; }
.server-log-actions { justify-content: space-between; margin-top: 14px; }
@media (max-width: 1080px) {
  .user-access-summary { grid-template-columns: minmax(250px,1fr) minmax(180px,.7fr); }
  .user-access-actions { grid-column: 1 / -1; width: 100%; }
  .user-invitation-status { max-width: none; }
}

/* Heller/Dunkler Farbmodus */
.theme-toggle { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--blue-dark); box-shadow: 0 2px 8px rgba(18,32,55,.08); cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.theme-toggle:hover { border-color: var(--blue); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid rgba(0,151,215,.28); outline-offset: 2px; }
.theme-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
.theme-toggle-login { position: fixed; z-index: 30; top: 20px; right: 20px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #27b7ef;
  --blue-dark: #72d2f5;
  --ink: #edf5f8;
  --navy: #cfeeff;
  --page: #0d151c;
  --surface: #15212a;
  --soft: #20323d;
  --line: #334651;
  --muted: #a9bac4;
  --success: #73d7b3;
  --danger: #ff9a9a;
  --shadow: 0 10px 28px rgba(0,0,0,.24);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .app-header { background: var(--page); }
html[data-theme="dark"] .login-shell { background: linear-gradient(135deg,#0b151c,#121e28); }
html[data-theme="dark"] .public-shell { background: linear-gradient(135deg,#0b151c,#121e28); }
html[data-theme="dark"] .brand-row { background: #111e27; }
html[data-theme="dark"] .brand-logo { background: #fff; border-radius: 4px; }
html[data-theme="dark"] .account-menu-dropdown,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .public-card,
html[data-theme="dark"] .documentation-questions details,
html[data-theme="dark"] .mobile-status-title span { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .account-menu-dropdown .account-menu-logout { color: #ffb7bd; border-top-color: #435966; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] [contenteditable="true"] { background: #101a22; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #7f929d; }
html[data-theme="dark"] th { background: #1b2a34; }
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .documentation-questions details[open] summary,
html[data-theme="dark"] .participant-select-row:hover { background: #1b2b35; }
html[data-theme="dark"] .participant-select-row,
html[data-theme="dark"] .participant-editor-panel .participant-select-row,
html[data-theme="dark"] .api-resource-grid .check,
html[data-theme="dark"] .role-guide,
html[data-theme="dark"] .custom-role-card,
html[data-theme="dark"] .settings-tabs,
html[data-theme="dark"] .mobile-status-tabs,
html[data-theme="dark"] .user-access-card,
html[data-theme="dark"] .distribution-card,
html[data-theme="dark"] .tip-template-card,
html[data-theme="dark"] .directory-property-options .check { background: #172630; }
html[data-theme="dark"] .directory-property-filter form { background: #14212a; border-color: #435966; box-shadow: 0 18px 46px rgba(0,0,0,.5); }
html[data-theme="dark"] .directory-property-filter[open] > summary { background: #153b4b; color: #aee9ff; border-color: #43bde9; }
html[data-theme="dark"] .notice { background: #332f1d; border-color: #665d2b; color: #f1e6a8; }
html[data-theme="dark"] .notice.danger-notice,
html[data-theme="dark"] .badge.danger { background: #3b2226; color: #ffb1b1; }
html[data-theme="dark"] .badge.good,
html[data-theme="dark"] .user-security-confirmation { background: #17362d; color: #91e4c6; border-color: #315f50; }
html[data-theme="dark"] .badge.warn { background: #3b3317; color: #f4dc75; }
html[data-theme="dark"] .inactive-row { background: #111b22; }
html[data-theme="dark"] .danger-button { background: #3b2226; color: #ffb1b1; border-color: #9c4f57; }
html[data-theme="dark"] .danger-button:hover { background: #4a272d; color: #ffd0d0; }
html[data-theme="dark"] .person-save-sticky { background: rgba(21,33,42,.96); }
html[data-theme="dark"] .mobile-status-group { background: #302918; }
html[data-theme="dark"] .mobile-status-group.completed { background: #17332a; }
html[data-theme="dark"] .documentation-development { background: #132833; }
html[data-theme="dark"] .permission-grid label { background: #1a2a34; color: #e8f1f5; border-color: #435966; }
html[data-theme="dark"] .permission-grid label:hover { background: #223843; color: #fff; border-color: #72d2f5; box-shadow: 0 0 0 2px rgba(114,210,245,.12); }
html[data-theme="dark"] .permission-grid label:has(input:checked) { background: #153b4b; color: #aee9ff; border-color: #43bde9; box-shadow: inset 3px 0 0 #43bde9; }
html[data-theme="dark"] .permission-grid input { color-scheme: dark; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="dark"] .mobile-menu-toggle { background: #172630; color: #e9f7fc; border-color: #4b6370; }
html[data-theme="dark"] .mobile-menu-toggle .menu-icon,
html[data-theme="dark"] .mobile-menu-toggle .menu-icon::before,
html[data-theme="dark"] .mobile-menu-toggle .menu-icon::after { background: #72d2f5; }
html[data-theme="dark"] .top-nav { background: #101b23; color: #edf5f8; box-shadow: 14px 0 38px rgba(0,0,0,.55); }
html[data-theme="dark"] .mobile-nav-head { background: #162630; color: #edf5f8; border-color: #3e5663; }
html[data-theme="dark"] .mobile-menu-close { background: #20323d; color: #edf5f8; border-color: #526b78; }
html[data-theme="dark"] .mobile-nav-account,
html[data-theme="dark"] .mobile-nav-account-actions { background: #13212a; border-color: #3e5663; }
html[data-theme="dark"] .mobile-nav-account strong { color: #f4fafc; }
html[data-theme="dark"] .mobile-nav-account span { color: #b8c8d1; }
html[data-theme="dark"] .mobile-nav-account-actions button,
html[data-theme="dark"] .mobile-nav-service button,
html[data-theme="dark"] .mobile-nav-service a { background: #1a2a34; color: #a9e5fa; border-color: #4b6370; }
html[data-theme="dark"] .mobile-nav-account-actions button:hover,
html[data-theme="dark"] .mobile-nav-service button:hover,
html[data-theme="dark"] .mobile-nav-service a:hover { background: #263c48; color: #fff; }
html[data-theme="dark"] .mobile-nav-account-actions button.active { background: #0078a8; color: #fff; border-color: #6ad7ff; }
html[data-theme="dark"] .nav-button { color: #b9e9fa; border-bottom-color: #344b57; }
html[data-theme="dark"] .nav-button:hover { background: #1c303b; color: #fff; }
html[data-theme="dark"] .nav-button.active { background: #0078a8; color: #fff; border-left-color: #8ae1ff; }
html[data-theme="dark"] .mobile-nav-service { border-top-color: #3e5663; }

@media (max-width: 700px) {
  .theme-toggle { width: 40px; height: 40px; }
  .theme-toggle-login { top: 14px; right: 14px; }
}
@media (max-width: 700px) {
  .user-management-heading { align-items: stretch; }
  .user-management-heading .button { width: 100%; }
  .user-access-summary { grid-template-columns: 1fr; }
  .user-access-meta { justify-items: start; }
  .user-invitation-status { text-align: left; }
  .user-access-actions { grid-template-columns: 1fr; min-width: 0; }
  .custom-role-grid { grid-template-columns: 1fr; }
  .server-log-actions { flex-direction: column; }
  .server-log-actions .button { width: 100%; }
  .system-update-meta { grid-template-columns: 1fr; }
  .system-update-actions { flex-direction: column; }
  .system-update-actions .button { width: 100%; }
  .birthday-reminder-row { align-items: stretch; flex-direction: column; }
  .birthday-reminder-row .actions { width: 100%; margin-left: 0; justify-content: flex-start; }
  .birthday-reminder-row .actions .button { width: 100%; }
}
