:root {
  --awo: #e0001b;
  --awo-dark: #b80016;
  --ink: #000000;
  --muted: #555555;
  --line: #efefef;
  --paper: #ffffff;
  --canvas: #f7f7f7;
  --awo-gray: #efefef;
  --awo-dark-gray: #404040;
  --awo-radius: 4px;
  --awo-pill: 22px;
  --awo-font: AWOFago, Arial, Helvetica, sans-serif;
}

body {
  color: var(--ink);
  font-family: var(--awo-font);
  letter-spacing: -.075px;
  height: 100dvh;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 { color: var(--ink); }
.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after { display: block; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.hamburger-icon { position: relative; }
.hamburger-icon::before,
.hamburger-icon::after { content: ""; position: absolute; left: 0; }
.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }
.mobile-logout { display: none; }
.mobile-logout button { border: 0; background: none; color: var(--awo); font: inherit; font-weight: 700; cursor: pointer; }
.page-header h1 { color: var(--awo); font-size: 44px; font-weight: 400; line-height: 1.15; }
.page-header { align-items: center; margin-bottom: 38px; }
.page-header > div > p:not(.eyebrow) { font-size: 18px; line-height: 1.5; }
.muted, .page-subtitle, small { color: var(--muted); }

.topbar { background: var(--paper); border-bottom-color: var(--awo-gray); height: 88px; }
.brand-logo.compact img { height: 62px; }
.brand-mark.compact {
  padding-left: 30px;
  width: auto;
  min-width: 0;
  max-width: 65%;
}
.brand-mark.compact img { flex-shrink: 0; }
.brand-mark.compact small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 601px) and (max-width: 1180px) {
  .brand-mark.compact small {
    white-space: normal;
    text-wrap: balance;
    max-width: 32ch;
    line-height: 1.2;
  }
}
.top-actions { color: var(--ink); font-weight: 700; }
.user-profile-link { color: var(--ink); text-decoration: none; }
.user-profile-link:hover, .user-profile-link:focus-visible { color: var(--awo); text-decoration: underline; text-underline-offset: 4px; }
.app-nav .mobile-profile-link { display: none; }
@media (max-width: 1180px) { .app-nav .mobile-profile-link { display: flex; } }
.sidebar { background: var(--ink); top: 88px; bottom: 44px; padding-top: 34px; display: flex; flex-direction: column; overflow: hidden; }
.sidebar nav { overflow-y: auto; padding-bottom: 16px; }
.sidebar .values { position: static; margin: auto 14px 0; padding-top: 14px; flex: 0 0 auto; }
.sidebar nav a { border-radius: var(--awo-pill); }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--awo); color: var(--paper); }
.sidebar .nav-caption, .sidebar .values { color: #b2b2b2; }
.app-nav { position: fixed; z-index: 20; inset: 88px 0 auto 0; height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: clamp(18px, 2.2vw, 38px); padding: 0 42px; background: var(--paper); border-bottom: 1px solid var(--awo-gray); }
.app-nav a { position: relative; display: flex; align-items: center; height: 100%; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 700; white-space: nowrap; }
.app-nav a:hover, .app-nav a.active { color: var(--awo); }
.app-nav a.active::after { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: var(--ink); }
.admin-menu { position: relative; height: 100%; }
.admin-menu summary { display: flex; align-items: center; height: 100%; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu summary::after { content: "▾"; margin-left: 7px; font-size: 12px; }
.admin-menu[open] summary, .admin-menu summary:hover { color: var(--awo); }
.admin-menu > div { position: absolute; top: 100%; right: 0; display: grid; min-width: 220px; padding: 8px; background: var(--paper); border: 1px solid var(--awo-gray); box-shadow: 0 10px 24px #0002; }
.admin-menu > div a { min-height: 40px; padding: 0 12px; }
.content { background: var(--paper); position: fixed; inset: 146px 0 44px 0; max-width: none; margin: 0; padding: 42px clamp(24px, 5vw, 72px) 34px; overflow: auto; }
.content:has(.grid-shell) { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--paper); padding: 0; }
.content:has(> .grid-shell) > .page-editor-header { flex: 0 0 auto; }
.content:has(.grid-shell) > .grid-shell { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; }
.content:has(.grid-shell) .e-grid,
.content:has(.grid-shell) .e-grid .e-gridcontent,
.content:has(.grid-shell) .e-grid .e-content { min-height: 0; }
.page-breadcrumb { display: flex; align-items: center; gap: 10px; min-height: 28px; color: var(--muted); font-size: 14px; }
.page-breadcrumb a { color: var(--awo); font-weight: 700; text-decoration: none; }
.page-breadcrumb strong { color: var(--ink); }

.primary,
button.primary,
a.primary,
.auth-card button[type="submit"] {
  background: var(--awo);
  border-color: var(--awo);
  border-radius: var(--awo-pill);
  color: var(--paper);
  font-weight: 700;
}

.primary:hover,
button.primary:hover,
a.primary:hover,
.auth-card button[type="submit"]:hover {
  background: var(--awo-dark);
  border-color: var(--awo-dark);
}

.secondary, button.secondary, a.secondary {
  background: var(--awo-gray);
  border-color: var(--awo-gray);
  border-radius: var(--awo-pill);
  color: var(--ink);
  font-weight: 700;
}

.card, .panel, .auth-card, .stat-card { border-radius: var(--awo-radius); }
.panel, .stats article, .form-card, .grid-shell, .page-editor-header {
  border-color: var(--awo-gray);
  border-radius: var(--awo-radius);
  box-shadow: none;
}
.stats { gap: 24px; }
.stats article { border-top: 5px solid var(--awo); padding: 26px 28px; }
.stats strong { color: var(--ink); font-size: 42px; }
.panel { padding: 30px; }
.panel h2, .form-card h2 { font-weight: 700; }
.quick-links a { color: var(--ink); font-size: 18px; font-weight: 700; padding-block: 18px; }
.quick-links a:hover { color: var(--awo); }
.red-block { background: var(--awo); }
.auth-shell { background: linear-gradient(120deg, var(--awo-gray) 0 64%, var(--awo) 64%); display: grid; grid-template-rows: minmax(0, 1fr) 44px; padding: 0; }
.auth-shell > main { align-self: center; width: min(400px, calc(100vw - 28px)); min-height: 0; max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior-y: contain; }
.auth-card { border-top: 5px solid var(--awo); padding: clamp(18px, 2.5vh, 28px) clamp(22px, 3vw, 34px); }
.auth-card .brand-logo img { height: 58px; }
.auth-card h1 { font-size: 27px; }
.auth-card .brand-mark { margin-bottom: clamp(12px, 2.2vh, 28px); }
.auth-card form { margin-top: clamp(10px, 2vh, 25px); }
.auth-card label { margin-top: clamp(6px, 1.2vh, 13px); }
.auth-card input { padding-block: clamp(8px, 1.3vh, 12px); }
.auth-card .primary { margin-top: clamp(10px, 1.8vh, 18px); }
.first-user { margin-top: clamp(10px, 1.8vh, 22px); }
.auth-card .validation.field-validation-error { display: block; margin-top: 4px; padding: 4px 7px; border-left: 3px solid var(--awo); border-radius: 2px; background: #fdebed; color: #8f0011; font-size: 12px; line-height: 1.35; }
.auth-card input.input-validation-error { border-color: var(--awo); background: var(--paper); box-shadow: none; }
.password-hint { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.eyebrow, .kicker, a { color: var(--awo); }

.site-footer { position: fixed; z-index: 30; inset: auto 0 0; height: 44px; background: var(--paper); border-top: 1px solid #d7d7d7; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 34px; padding: 0 24px; }
.site-footer nav { display: flex; align-items: center; gap: 24px; }
.site-footer__copyright { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.site-footer__heart { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--awo); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-footer .social-links:not(:has(a)) { display: none; }
.site-footer a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--awo); }
.social-links { display: flex; align-items: center; gap: 12px; }
.social-links a { display: grid; place-items: center; }
.social-links svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.social-links svg path, .social-links .social-dot { fill: currentColor; stroke: none; }
.legal-card { width: min(760px, 100%); max-height: calc(100dvh - 92px); overflow: auto; background: var(--paper); border-top: 6px solid var(--awo); padding: 36px 42px; }
.legal-card h1 { color: var(--awo); font-size: 42px; font-weight: 400; }
.legal-card p { color: var(--muted); font-size: 18px; line-height: 1.55; }

.e-grid .e-headercell,
.e-toolbar { background-color: var(--paper); color: var(--ink); }
.page-editor-header,
.page-editor-header .e-toolbar,
.page-editor-header .e-toolbar-items,
.page-editor-header .e-toolbar-item,
.page-editor-header .e-tbar-btn {
  background-color: var(--paper);
}
.page-editor-header {
  width: 100%;
  max-width: 1120px;
}
body > .editor-toolbar-breadcrumb { display: none; }
.e-toolbar .editor-toolbar-breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.editor-toolbar-breadcrumb a { color: var(--awo); font-weight: 700; text-decoration: none; }
.editor-toolbar-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.editor-toolbar-breadcrumb strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; }
.association-breadcrumb ~ .page-editor-header {
  max-width: none;
}
.e-grid .e-headercell { font-weight: 700; }
.e-grid .e-rowcell.e-selectionbackground,
.e-grid .e-row.e-selectionbackground { background-color: #fdebed; }
.e-toolbar .e-toolbar-item .e-tbar-btn:hover,
.e-toolbar .e-toolbar-item .e-tbar-btn:focus { background-color: #fdebed; }
.e-toolbar .e-icons,
.e-grid .e-icons { color: var(--awo); }
.e-btn.e-primary, .e-css.e-btn.e-primary {
  background-color: var(--awo);
  border-color: var(--awo);
  border-radius: var(--awo-pill);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--awo);
  box-shadow: 0 0 0 3px rgba(224, 0, 27, .14);
}

/* Einheitliches kompaktes Formularmuster in der gesamten Verwaltung. */
.form-grid input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.form-grid select {
  height: 32px;
  min-height: 32px;
  padding: 3px 9px;
  line-height: 24px;
}
.form-grid textarea {
  min-height: 96px;
  height: 112px;
  padding: 9px 10px;
  line-height: 1.4;
  resize: vertical;
}
.auth-card input:not([type="checkbox"]):not([type="radio"]),
.contact-field input:not([type="checkbox"]):not([type="radio"]) {
  height: 32px;
  min-height: 32px;
  padding-block: 3px;
}

.status-message {
  margin-bottom: 14px;
  padding: 12px 16px;
  border-left: 5px solid var(--awo);
  background: var(--awo-gray);
  color: var(--ink);
  font-weight: 700;
}
.status-message--error { border-left-color: #8f0011; background: #fdebed; color: #8f0011; }

.detail-tabs { display: flex; gap: 30px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--paper); }
.detail-tabs a { position: relative; flex: 0 0 auto; padding: 15px 2px; color: var(--ink); text-decoration: none; font-weight: 700; }
.detail-tabs a:hover, .detail-tabs a.active { color: var(--awo); }
.detail-tabs a.active::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--ink); }
.detail-content { max-width: 1120px; padding: 34px 0; }
.detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.detail-heading h1 { margin: 0; color: var(--awo); font-size: clamp(34px, 4vw, 52px); font-weight: 400; }
.detail-heading span { color: var(--muted); font-weight: 700; }
.detail-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.detail-data > div { padding: 20px 10px; border-bottom: 1px solid var(--line); }
.detail-data dt { margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.detail-data dd { margin: 0; font-size: 18px; white-space: pre-line; }
.detail-list { display: grid; border-top: 1px solid var(--line); }
.detail-list article, .detail-list > a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 10px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.detail-list > a { cursor: pointer; }
.detail-list > a strong { color: var(--awo); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.detail-list > a:hover, .detail-list > a:focus-visible { background: #fdebed; }
.detail-list > a:focus-visible { outline: 2px solid var(--awo); outline-offset: -2px; }
.detail-list span { color: var(--muted); }

@media (max-width: 700px) {
  .detail-tabs { gap: 22px; }
  .detail-content { padding-top: 24px; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
  .detail-data { grid-template-columns: 1fr; }
  .detail-list article, .detail-list > a { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (max-width: 760px) {
  .auth-shell { background: var(--awo-gray); }
  .app-shell .menu-toggle { display: grid; place-items: center; width: 46px; height: 46px; margin-left: auto; border: 0; background: transparent; padding: 0; color: var(--ink); }
  .app-shell .top-actions { margin-left: 14px; padding-right: 14px; gap: 10px; }
  .app-shell .top-actions > a, .app-shell .top-actions > span { display: none; }
  .app-shell .top-actions form { display: none; }
  .app-nav { display: none; inset: 88px 0 auto; height: auto; max-height: calc(100dvh - 132px); overflow-y: auto; padding: 16px 20px 22px; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 5px solid var(--awo); }
  .nav-open .app-nav { display: flex; }
  .app-nav a { min-height: 48px; }
  .app-nav a.active::after { inset: 8px auto 8px 0; width: 5px; height: auto; }
  .app-nav a.active { padding-left: 16px; }
  .app-nav .mobile-logout { display: block; border-top: 1px solid var(--awo-gray); padding-top: 10px; }
  .admin-menu { width: 100%; height: auto; }
  .admin-menu summary { min-height: 48px; }
  .admin-menu > div { position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .app-nav .mobile-logout button { min-height: 48px; padding: 0; }
  .content { inset: 88px 0 44px; padding: 24px 18px; }
  .page-header h1 { font-size: 36px; }
  .site-footer { justify-content: space-between; gap: 12px; padding-inline: 16px; }
  .site-footer nav { gap: 12px; }
  .site-footer a { font-size: 12px; }
  .legal-card { padding: 24px; }
}

@media (max-height: 760px) {
  .auth-card .brand-logo img { height: 52px; }
  .auth-card h1 { font-size: 26px; margin-block: 2px 5px; }
  .auth-card .muted { margin-block: 6px; }
  .auth-card { font-size: 14px; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .app-shell .menu-toggle { display: grid; place-items: center; width: 46px; height: 46px; margin-left: auto; border: 0; background: transparent; padding: 0; color: var(--ink); }
  .app-shell .top-actions { margin-left: 14px; padding-right: 14px; gap: 10px; }
  .app-shell .top-actions > a, .app-shell .top-actions > span { display: none; }
  .app-shell .top-actions form { display: none; }
  .app-nav { display: none; inset: 88px 0 auto; height: auto; max-height: calc(100dvh - 132px); overflow-y: auto; padding: 16px 24px 22px; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 5px solid var(--awo); }
  .nav-open .app-nav { display: flex; }
  .app-nav a { min-height: 48px; }
  .app-nav a.active::after { inset: 8px auto 8px 0; width: 5px; height: auto; }
  .app-nav a.active { padding-left: 16px; }
  .app-nav .mobile-logout { display: block; border-top: 1px solid var(--awo-gray); padding-top: 10px; }
  .admin-menu { width: 100%; height: auto; }
  .admin-menu summary { min-height: 48px; }
  .admin-menu > div { position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .app-nav .mobile-logout button { min-height: 48px; padding: 0; }
  .content { inset: 88px 0 44px; padding: 30px 28px; }
}

@media (max-width: 480px) {
  .site-footer { height: 44px; gap: 8px; padding-inline: 10px; }
  .site-footer__copyright { gap: 4px; font-size: 11px; }
  .site-footer__heart { width: 14px; height: 14px; }
  .site-footer nav { gap: 9px; }
  .site-footer a { font-size: 11px; }
  .social-links { gap: 8px; }
  .social-links svg { width: 19px; height: 19px; }
}
 .stat-member-link{display:flex;flex-direction:column;color:inherit;text-decoration:none}
 .stat-member-link:hover,.stat-member-link:focus-visible{color:#e30020}
.dashboard-tiles > article { padding: 0; }
.dashboard-tile-link { display: flex; flex-direction: column; height: 100%; padding: 26px 28px; color: inherit; text-decoration: none; }
.dashboard-tile-link:focus-visible { outline: 2px solid var(--awo); outline-offset: 3px; }
.dashboard-tile-link:hover .dashboard-tile-title { color: var(--awo); }
.dashboard-tiles .dashboard-tile-symbol { display: flex; align-items: center; height: 48px; color: var(--ink); }
.app-shell--tiles > .content { top: 88px; }
.app-shell--tiles .top-actions { margin-left: auto; }
.app-shell--tiles .top-actions .dashboard-home-link { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; color: var(--ink); }
.dashboard-home-link:focus-visible { outline: 2px solid var(--awo); outline-offset: 2px; }
.dashboard-home-link:hover { color: var(--awo); }
.editor-toolbar-breadcrumb a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.content > .page-editor-header + .dashboard-tiles { margin-top: 24px; }
@media (max-width: 1180px) {
  .app-shell--tiles .top-actions form { display: block; }
}
@media (max-width: 760px) {
  .page-editor-header .tile-breadcrumb-ancestor { display: none; }
  .page-editor-header .editor-toolbar-breadcrumb a { max-width: 24vw; }
  #dashboardEditorToolbar .editor-toolbar-breadcrumb,
  #sectionEditorToolbar .editor-toolbar-breadcrumb,
  #associationDetailsToolbar .editor-toolbar-breadcrumb { max-width: calc(100vw - 128px); }
  #associationEditorToolbar .editor-toolbar-breadcrumb,
  #publicSettingsEditorToolbar .editor-toolbar-breadcrumb,
  #associationDetailsToolbar:has(#associationDetailsToolbar_edit) .editor-toolbar-breadcrumb { max-width: calc(100vw - 240px); }
  .app-shell--tiles .brand-mark.compact { max-width: calc(100% - 155px); }
  .app-shell--tiles .top-actions { gap: 6px; padding-right: 12px; }
}
