/* AHO-MGM 1.0.130: final, scoped capture polish; loaded AFTER the existing design.
   Use existing /testung components, native markup and local SVG icons. */
:root {
  --u130-border: #d8e4e9;
  --u130-ink: #183847;
  --u130-muted: #566e7a;
  --u130-accent: #087f78;
  --u130-soft: #eaf7f5;
  --u130-white: rgba(255,255,255,.96);
}
/* Make the form navigation a normal row to avoid overlapping the top bar or inputs. */
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-entry-quicknav {
  position:relative!important; top:auto!important; inset:auto!important;
  z-index:1!important; margin-bottom:16px!important; min-width:0!important;
  overflow-x:auto!important; overflow-y:hidden!important;
  scroll-snap-type:x proximity;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-entry-quicknav a {
  scroll-snap-align:start;
}
html body:is(.page-entry,.page-information-contacts,.page-events-hub) :is(.aho-form-section,.stat113-panel,.stat113-category-grid) {
  scroll-margin-top:92px!important;
}
/* Shared visual rhythm across every capture module. */
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] section.aho-form-section.u125-capture-panel,
html body.page-information-contacts .stat113-form[data-capture-ui="testing"] section.stat113-panel {
  border-radius:18px!important; padding:20px!important;
  border:1px solid var(--u130-border)!important;
  background:var(--u130-white)!important;
  box-shadow:0 14px 30px rgba(26,55,73,.045)!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .u125-panel-heading {
  margin-bottom:18px!important; padding-bottom:14px!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-fieldset {
  border-radius:14px!important; border-color:var(--u130-border)!important;
  background:rgba(244,248,250,.70)!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-fieldset > legend {
  color:var(--u130-ink)!important; line-height:1.4!important;
  font-size:.86rem!important; font-weight:800!important;
}
/* All shared choice cards: never clip long content or put a white slab behind text. */
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice,
html body.page-testing-capture .stat113-form[data-capture-ui="testing"] label.u128-choice {
  grid-template-columns:32px minmax(0,1fr) 20px!important;
  grid-template-rows:auto!important; gap:12px!important;
  min-height:62px!important; height:auto!important;
  align-items:center!important; padding:12px 13px!important;
  overflow:visible!important; border-radius:13px!important;
  transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice :is(.aho73-choice__content,.u123-choice-label,.aho73-choice__label),
html body.page-testing-capture .stat113-form[data-capture-ui="testing"] label.u128-choice .u123-choice-label {
  white-space:normal!important; overflow:visible!important;
  overflow-wrap:normal!important; word-break:normal!important;
  hyphens:auto!important; text-overflow:clip!important;
  background:transparent!important; box-shadow:none!important;
  line-height:1.45!important; font-size:.82rem!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice .u123-choice-mark {
  align-self:center!important;justify-self:end!important; flex:0 0 auto!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice:has(input:checked) {
  border-color:#62aaa2!important; background:var(--u130-soft)!important;
  box-shadow:inset 3px 0 0 var(--u130-accent),0 8px 18px rgba(8,127,120,.055)!important;
}
/* 1 — BERATUNG: long labels get naturally wider cards; two explicit long entries span 2. */
html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-choice-grid--field-referral_sources,
  .aho-choice-grid--field-target_groups,
  .aho-choice-grid--field-topics
).u128-choice-grid {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,238px),1fr))!important;
  grid-auto-rows:auto!important; gap:12px!important;
}
html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-choice-grid--field-referral_sources,
  .aho-choice-grid--field-target_groups,
  .aho-choice-grid--field-topics
) label.u128-choice {
  min-height:74px!important; align-items:start!important;
}
html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-choice-grid--field-referral_sources,
  .aho-choice-grid--field-target_groups,
  .aho-choice-grid--field-topics
) label.u128-choice :is(.u125-choice-icon,.u123-choice-mark) {
  margin-top:2px!important;
}
html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-choice-grid--field-referral_sources,
  .aho-choice-grid--field-target_groups
) label.u128-choice:is([data-choice-value="professional_referral"],[data-choice-value="refugees_migrants"]) {
  grid-column:span 2!important;
}
html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] #social-person .u126-consult-stack {
  display:grid!important; grid-template-columns:1fr!important; gap:16px!important;
}
/* 2 — INFORMATIONSKONTAKTE: aligned summaries + four fully independent input cards. */
html body.page-information-contacts .stat114-contact-summary {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important; margin-bottom:18px!important;
}
html body.page-information-contacts .stat114-summary-card {
  display:flex!important; flex-direction:column!important; justify-content:center!important;
  gap:8px!important; min-width:0!important; min-height:112px!important;
  padding:18px!important; border-radius:16px!important;
  border:1px solid var(--u130-border)!important;
  background:linear-gradient(180deg,#fff,#f8fbfc)!important;
}
html body.page-information-contacts .stat114-summary-card > span {color:var(--u130-muted)!important;font-size:.79rem!important;}
html body.page-information-contacts .stat114-summary-card strong {font-size:1.55rem!important;line-height:1.2!important;white-space:normal!important;}
html body.page-information-contacts .stat113-contact-cards {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
html body.page-information-contacts .stat113-contact-row {
  display:flex!important; flex-direction:column!important; justify-content:space-between!important;
  gap:14px!important; min-height:202px!important; padding:18px!important;
  border-radius:16px!important; border:1px solid var(--u130-border)!important;
  background:#fbfdfd!important; overflow:visible!important;
}
html body.page-information-contacts .stat113-contact-row__label {
  display:flex!important; align-items:flex-start!important; gap:12px!important;
  min-width:0!important; margin:0!important;
}
html body.page-information-contacts .stat113-contact-row__label strong {display:block!important;font-size:.94rem!important;line-height:1.3!important;}
html body.page-information-contacts .stat113-contact-row__label small {display:block!important;line-height:1.45!important;}
html body.page-information-contacts .stat114-contact-inputs {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important; width:100%!important;
}
html body.page-information-contacts .stat114-contact-input {
  display:flex!important; flex-direction:column!important; gap:8px!important;
  min-width:0!important; margin:0!important;
}
html body.page-information-contacts .stat114-contact-input > span:first-child {
  font-weight:760!important; font-size:.78rem!important;line-height:1.3!important;
}
html body.page-information-contacts .u128-inline-step {
  display:grid!important; grid-template-columns:40px minmax(0,1fr) 40px!important;
  min-height:46px!important; width:100%!important; border-radius:12px!important;
}
html body.page-information-contacts .u128-inline-step button,
html body.page-information-contacts .u128-inline-step button:last-child {
  width:40px!important; height:46px!important; display:grid!important;place-items:center!important;
}
html body.page-information-contacts .u128-inline-step input {
  height:46px!important; text-align:center!important; font-size:1.08rem!important;
  font-weight:800!important; min-width:0!important;
}
/* 3 — VERANSTALTUNGEN: hub tiles and individual event capture forms. */
html body.page-events-hub .u128-capture-hub .stat113-category-grid {
  display:grid!important; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))!important;
  gap:16px!important;
}
html body.page-events-hub .u128-capture-hub .stat113-category-card {
  display:grid!important; grid-template-columns:48px minmax(0,1fr) 34px!important;
  align-items:center!important; gap:14px!important;
  min-height:138px!important; padding:20px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#fff,#fbfcff)!important;
  border:1px solid var(--u130-border)!important;
}
html body.page-events-hub .stat113-category-card__copy {
  min-width:0!important;overflow-wrap:break-word!important;white-space:normal!important;
}
html body.page-events-hub .stat113-category-card__copy strong {font-size:1.02rem!important;line-height:1.35!important;}
html body.page-events-hub .stat113-category-card__copy small {font-size:.81rem!important;line-height:1.45!important;}
html body.page-events-hub .stat113-category-card__arrow {
  display:grid!important;place-items:center!important;width:34px!important;height:34px!important;
  border:1px solid #dce4f6!important;border-radius:10px!important;background:#f4f6fd!important;
}
html body.page-events-hub .stat113-category-card__arrow svg {width:17px!important;height:17px!important;}
html body.page-entry--events .app-shell .aho-entry-form[data-capture-ui="testing"] .aho96-event-basics-grid {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;align-items:start!important;
}
html body.page-entry--events .app-shell .aho-entry-form[data-capture-ui="testing"] .aho96-event-basics-grid > * {
  min-width:0!important; max-width:100%!important;
}
/* 4 — ÖFFENTLICHKEITSARBEIT: balanced tiles, long content, responsive metric steppers. */
html body.page-entry--public-relations .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-choice-grid--field-content_format,
  .aho-choice-grid--field-target_groups,
  .aho-choice-grid--field-platforms
).u128-choice-grid {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;
  gap:12px!important;
}
html body.page-entry--public-relations .app-shell .aho-entry-form[data-capture-ui="testing"] :is(
  .aho-public-basics-grid,.aho-public-metrics-grid
) {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:15px!important;align-items:start!important;
}
html body.page-entry--public-relations .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-public-crosspost-row {
  display:flex!important; align-items:flex-start!important; gap:12px!important;
  min-width:0!important; border-radius:14px!important;
}
html body.page-entry--public-relations .app-shell .aho-entry-form[data-capture-ui="testing"] .u130-metric-field {
  min-width:0!important; display:flex!important;flex-direction:column!important; gap:9px!important;
}
/* 5 — SPRITZENTAUSCH: large, equal-width material cards and centered amounts. */
html body.page-entry--needle-exchange .app-shell .aho-entry-form[data-capture-ui="testing"] .aho97-needle-amount-grid {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;align-items:start!important;
}
html body.page-entry--needle-exchange .app-shell .aho-entry-form[data-capture-ui="testing"] .aho97-needle-amount-grid > .aho-field {
  min-width:0!important; padding:14px!important;
  border:1px solid var(--u130-border)!important; border-radius:15px!important;
  background:#fafcfd!important;
}
html body.page-entry--needle-exchange .app-shell .aho-entry-form[data-capture-ui="testing"] .aho97-needle-amount-grid > .aho-field > label {
  display:block!important;min-height:22px!important;font-weight:780!important;
}
/* 6 — INVENTAR: distinct identifier cards, more legible product/batch grid. */
html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-scan-workspace {
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;align-items:stretch!important;
}
html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-scan-workspace .aho-scan-field {
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:8px!important;min-width:0!important;
  padding:17px!important;border-radius:15px!important;border:1px solid var(--u130-border)!important;
  background:#f9fcfd!important;
}
html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-scan-workspace input {
  width:100%!important;min-width:0!important;max-width:100%!important;
}
html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-entry-grid--4 {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;
}
/* Precise unified number control, responsive without overlapping content. */
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-number-control {
  display:block!important; width:100%!important; max-width:420px!important;
  min-width:0!important; margin-inline:auto!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-number-stepper {
  width:100%!important; grid-template-columns:44px 44px minmax(96px,1fr) 44px!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-number-presets {
  justify-content:center!important;gap:7px!important;
}
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-number-presets button {
  padding:0 9px!important;min-height:28px!important;
}
/* Clear focus, sensible smaller-screen columns, protect longer labels. */
html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] :is(input,button,select,textarea):focus-visible,
html body.page-information-contacts .stat113-form[data-capture-ui="testing"] :is(input,button,select,textarea):focus-visible {
  outline:2px solid rgba(8,127,120,.65)!important;outline-offset:2px!important;
}
@media (max-width:1080px) {
  html body.page-information-contacts .stat113-contact-cards {grid-template-columns:1fr!important;}
  html body.page-entry--needle-exchange .app-shell .aho-entry-form[data-capture-ui="testing"] .aho97-needle-amount-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-scan-workspace {grid-template-columns:1fr!important;}
}
@media (max-width:760px) {
  html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] section.aho-form-section.u125-capture-panel,
  html body.page-information-contacts .stat113-form[data-capture-ui="testing"] section.stat113-panel {padding:16px!important;}
  html body.page-information-contacts .stat114-contact-summary {grid-template-columns:1fr!important;}
  html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(.aho-choice-grid--field-referral_sources,.aho-choice-grid--field-target_groups) label.u128-choice:is([data-choice-value="professional_referral"],[data-choice-value="refugees_migrants"]) {grid-column:auto!important;}
  html body.page-entry--events .app-shell .aho-entry-form[data-capture-ui="testing"] .aho96-event-basics-grid,
  html body.page-entry--public-relations .app-shell .aho-entry-form[data-capture-ui="testing"] :is(.aho-public-basics-grid,.aho-public-metrics-grid),
  html body.page-entry--inventory .app-shell .aho-entry-form[data-capture-ui="testing"] .aho-entry-grid--4 {grid-template-columns:1fr!important;}
}
@media (max-width:560px) {
  html body.page-information-contacts .stat114-contact-inputs {grid-template-columns:1fr!important;}
  html body.page-entry--needle-exchange .app-shell .aho-entry-form[data-capture-ui="testing"] .aho97-needle-amount-grid {grid-template-columns:1fr!important;}
  html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice {min-height:60px!important;}
  html body.page-entry--social-work .app-shell .aho-entry-form[data-capture-ui="testing"] :is(.aho-choice-grid--field-referral_sources,.aho-choice-grid--field-target_groups,.aho-choice-grid--field-topics).u128-choice-grid {grid-template-columns:1fr!important;}
}
@media (prefers-reduced-motion:reduce) {
  html body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice {transition:none!important;}
}
/* Dark appearance keeps the same hierarchy without bright embedded cards. */
:root[data-theme="dark"], :root[data-theme-mode="dark"] {
  --u130-border:#385464;
  --u130-ink:#edf6fa;
  --u130-muted:#adbfca;
  --u130-soft:#173b3a;
  --u130-white:rgba(22,38,49,.97);
}
:root[data-theme="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] section.aho-form-section.u125-capture-panel,
:root[data-theme-mode="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] section.aho-form-section.u125-capture-panel,
:root[data-theme="dark"] body.page-information-contacts .stat113-form[data-capture-ui="testing"] section.stat113-panel,
:root[data-theme-mode="dark"] body.page-information-contacts .stat113-form[data-capture-ui="testing"] section.stat113-panel {
  background:var(--u130-white)!important;
  border-color:var(--u130-border)!important;
}
:root[data-theme="dark"] body.page-information-contacts :is(.stat114-summary-card,.stat113-contact-row),
:root[data-theme-mode="dark"] body.page-information-contacts :is(.stat114-summary-card,.stat113-contact-row),
:root[data-theme="dark"] body.page-events-hub .stat113-category-card,
:root[data-theme-mode="dark"] body.page-events-hub .stat113-category-card,
:root[data-theme="dark"] body.page-entry--needle-exchange .aho97-needle-amount-grid > .aho-field,
:root[data-theme-mode="dark"] body.page-entry--needle-exchange .aho97-needle-amount-grid > .aho-field,
:root[data-theme="dark"] body.page-entry--inventory .aho-scan-workspace .aho-scan-field,
:root[data-theme-mode="dark"] body.page-entry--inventory .aho-scan-workspace .aho-scan-field {
  background:#1b303d!important;
  border-color:var(--u130-border)!important;
  color:var(--u130-ink)!important;
}
:root[data-theme="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice,
:root[data-theme-mode="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice {
  color:var(--u130-ink)!important;
  border-color:var(--u130-border)!important;
  background:#1c303d!important;
}
:root[data-theme="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice:has(input:checked),
:root[data-theme-mode="dark"] body.page-entry .app-shell .aho-entry-form[data-capture-ui="testing"] label.u128-choice:has(input:checked) {
  background:var(--u130-soft)!important;
}
