/* Nachrichten verwenden dieselben Farben und Abstände wie die übrigen Karten. */
.pm-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; padding: .3rem; margin: 1rem 0; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); }
.pm-tabs > button { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem .6rem; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.pm-tabs > button.is-active { background: var(--mint); color: var(--tanne); }
.pm-tabs .icon { flex-shrink: 0; width: 20px; height: 20px; }
.pm-count { display: inline-grid; min-width: 24px; height: 24px; padding: 0 5px; place-items: center; border-radius: 99px; background: var(--tanne); color: white; font-size: .75rem; line-height: 1; font-weight: 700; }
.pm-board-layout, .pm-board-list { display: grid; gap: 1rem; min-width: 0; }
.pm-board-tools { padding: 0; overflow: hidden; }
.pm-compose-disclosure > summary { display: flex; gap: .75rem; align-items: center; padding: 1rem; list-style: none; cursor: pointer; }
.pm-compose-disclosure > summary::-webkit-details-marker { display: none; }
.pm-compose-disclosure > summary > span:nth-child(2) { flex: 1; min-width: 0; }
.pm-compose-disclosure summary strong, .pm-compose-disclosure summary small { display: block; }
.pm-compose-disclosure summary small { color: var(--muted); font-size: .8rem; margin-top: .12rem; }
.pm-compose-disclosure summary > .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
.pm-compose-disclosure[open] summary > .icon { transform: rotate(90deg); }
.pm-section-icon { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; background: var(--mint); color: var(--tanne); border-radius: 13px; }
.pm-section-icon .icon { width: 22px; height: 22px; }
.pm-board-form { display: grid; gap: .8rem; padding: 0 1rem 1rem; }
.pm-board-fields { display: grid; gap: .8rem; padding: 0; margin: 0; min-width: 0; border: 0; }
.pm-board-form .field, .pm-board-filters .field, .pm-conversation-filters .field, .pm-direct-form .field { margin: 0; min-width: 0; }
.pm-board-form textarea, .pm-direct-form textarea { resize: vertical; min-height: 82px; }
.pm-board-form .field small, .pm-compose-hint, .pm-send-hint { color: var(--muted); font-size: .74rem; line-height: 1.4; }
.pm-form-grid { display: grid; align-items: end; gap: .8rem; grid-template-columns: 1fr 1fr; }
.pm-form-grid .field > select, .pm-form-grid .field > input { min-height: 54px; height: 54px; }
.pm-checkbox { display: flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .84rem; cursor: pointer; }
.pm-checkbox input { width: 19px; height: 19px; accent-color: var(--klee); }
.pm-checkbox .icon { width: 18px; height: 18px; color: var(--tanne); }
.pm-compose-hint { padding: .7rem; margin: 0; background: #fffbea; border-radius: 10px; }
.pm-board-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); gap: .6rem; padding: 1rem; border-top: 1px solid var(--line); background: #fafcfb; }
.pm-search { position: relative; }
.pm-search > .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.pm-search input { padding-left: 2.35rem; min-height: 44px; }
.pm-board-message { padding: 1.1rem; min-width: 0; }
.pm-board-message--important { border-color: #e5ca75; }
.pm-board-message.is-highlighted { outline: 3px solid #76b78e; outline-offset: 3px; }
.pm-board-labels { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; align-items: center; }
.pm-category, .pm-pinned { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .5rem; border-radius: 8px; font-size: .71rem; font-weight: 700; color: var(--tanne); background: #edf4f0; }
.pm-category .icon, .pm-pinned .icon { width: 15px; height: 15px; }
.pm-category--important { background: #fff5cd; color: #886300; }
.pm-category--event { background: #e9f3f9; color: #216b8b; }
.pm-category--material { background: #f3efe5; color: #76643b; }
.pm-pinned { color: var(--muted); background: transparent; }
.pm-board-author { display: flex; gap: .65rem; align-items: center; min-width: 0; }
.pm-board-author > .member-avatar { width: 40px; height: 40px; flex: 0 0 40px; }
.pm-board-author > span { min-width: 0; }
.pm-board-author > span:not(.member-avatar) { flex: 1; }
.pm-board-author strong, .pm-board-author small { display: block; }
.pm-board-author strong { font-size: .9rem; overflow-wrap: anywhere; }
.pm-board-author small { color: var(--muted); font-size: .73rem; margin-top: .05rem; }
.pm-board-body { margin: 1rem 0 .8rem; line-height: 1.6; overflow-wrap: anywhere; }
.pm-expiry { display: block; margin-top: .8rem; color: var(--muted); font-size: .72rem; }
.pm-board-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: .7rem; min-height: 44px; }
.pm-ack { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.pm-ack > small { color: var(--muted); font-size: .74rem; }
.pm-ack .button { min-height: 44px; }
.pm-ack--done:disabled { opacity: 1; color: var(--tanne); border-color: transparent; background: var(--mint); box-shadow: none; }
.pm-message-menu { position: relative; flex-shrink: 0; }
.pm-message-menu > summary { list-style: none; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 1.5rem; letter-spacing: 1px; }
.pm-message-menu > summary::-webkit-details-marker { display: none; }
.pm-message-menu > div { position: absolute; z-index: 8; right: 0; top: calc(100% + 4px); width: 230px; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-hover); }
.pm-message-menu > div > button { width: 100%; display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .65rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: .82rem; text-align: left; cursor: pointer; }
.pm-message-menu > div > button:hover { background: #f0f6f2; }
.pm-message-menu .icon { width: 18px; height: 18px; flex-shrink: 0; }
.pm-message-menu > div > .pm-menu-danger { color: var(--danger); }
.pm-reference { display: flex; align-items: center; gap: .3rem; min-width: 0; border: 1px solid #c4d7cd; border-radius: 11px; background: #f6faf7; overflow: hidden; }
.pm-reference__open { display: flex; align-items: center; gap: .55rem; width: 100%; min-width: 0; min-height: 54px; padding: .65rem .7rem; border: 0; background: transparent; color: var(--tanne); text-align: left; font: inherit; cursor: pointer; }
.pm-reference__open > .icon { flex: 0 0 20px; width: 20px; height: 20px; }
.pm-reference__open > span:not(.icon) { flex: 1; min-width: 0; }
.pm-reference__open strong, .pm-reference__open small { display: block; overflow-wrap: anywhere; }
.pm-reference__open strong { font-size: .81rem; line-height: 1.3; }
.pm-reference__open small { font-size: .7rem; color: var(--muted); margin-top: .15rem; }
.pm-reference.is-unavailable { border-color: var(--line); }
.pm-reference__open:disabled { cursor: default; color: var(--muted); }
.pm-reference > .button { flex-shrink: 0; min-width: 44px; min-height: 44px; padding: .4rem; }
.pm-direct { display: grid; grid-template-columns: minmax(260px, .38fr) minmax(0, .62fr); gap: 1rem; min-width: 0; }
.pm-conversations, .pm-chat { margin: 0; padding: 0; min-width: 0; height: clamp(450px, 68dvh, 760px); display: flex; flex-direction: column; overflow: hidden; }
.pm-conversations__head { padding: 1rem 1rem .7rem; }
.pm-conversations__head h2 { font-size: 1.05rem; margin: 0; }
.pm-conversations__head p { font-size: .76rem; color: var(--muted); margin: .25rem 0 0; line-height: 1.45; }
.pm-conversations > .pm-reference { margin: 0 .8rem .5rem; flex-shrink: 0; }
.pm-conversation-filters { padding: 0 .8rem .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; border-bottom: 1px solid var(--line); }
.pm-conversation-filters > .field { flex: 1 1 160px; }
.pm-unread-filter { min-height: 44px; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .77rem; font-weight: 700; background: white; color: var(--muted); cursor: pointer; }
.pm-unread-filter.is-active { border-color: #a9cbb8; color: var(--tanne); background: var(--mint); }
.pm-conversation-list { min-height: 0; overflow-y: auto; flex: 1; padding: .35rem; overscroll-behavior: contain; }
.pm-conversation-row { display: flex; width: 100%; min-height: 80px; align-items: center; gap: .55rem; padding: .7rem .6rem; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pm-conversation-row + .pm-conversation-row { margin-top: .15rem; }
.pm-conversation-row > .member-avatar { width: 40px; height: 40px; flex: 0 0 40px; }
.pm-conversation-row:hover, .pm-conversation-row.is-selected { border-color: #c5ddcf; background: #edf6f0; }
.pm-conversation-row__body { flex: 1; min-width: 0; }
.pm-conversation-row__body > span { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.pm-conversation-row__body strong { min-width: 0; font-size: .83rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-conversation-row__body time { flex-shrink: 0; color: var(--muted); font-size: .62rem; }
.pm-conversation-row__body small { display: block; margin-top: .22rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .74rem; color: var(--muted); }
.pm-conversation-row__body em { color: var(--tanne); font-style: normal; }
.pm-conversation-row > .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.pm-retention { flex-shrink: 0; display: flex; align-items: flex-start; gap: .35rem; margin: 0; padding: .8rem 1rem; border-top: 1px solid var(--line); font-size: .69rem; line-height: 1.45; color: var(--muted); }
.pm-retention .icon { width: 16px; height: 16px; flex-shrink: 0; }
.pm-list-empty { color: var(--muted); text-align: center; padding: 1.4rem .7rem; font-size: .82rem; }
.pm-chat-placeholder { min-height: 450px; display: grid; place-items: center; margin: 0; background: #fafcfb; }
.pm-chat-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pm-chat-head > .member-avatar { width: 44px; height: 44px; flex: 0 0 44px; }
.pm-chat-head > div { min-width: 0; }
.pm-chat-head h2 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.pm-chat-head p { font-size: .73rem; margin: .15rem 0 0; color: var(--muted); }
.pm-chat-back { display: none; }
.pm-thread { flex: 1; min-height: 100px; padding: 1rem; overflow-y: auto; background: #f7faf8; overscroll-behavior: contain; }
.pm-day { display: flex; justify-content: center; margin: .1rem 0 1rem; }
.pm-day:not(:first-child) { margin-top: 1.25rem; }
.pm-day > span { padding: .2rem .55rem; color: var(--muted); background: #edf2ef; border-radius: 99px; font-size: .66rem; }
.pm-bubble-row { display: flex; margin: .5rem 0; min-width: 0; }
.pm-bubble-row.is-own { justify-content: flex-end; }
.pm-bubble { max-width: 86%; min-width: 80px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .7rem .8rem; background: white; }
.pm-bubble-row.is-own .pm-bubble { background: #e5f2e9; border-color: #cce3d4; border-radius: 14px 14px 4px 14px; }
.pm-bubble p { margin: 0; font-size: .87rem; line-height: 1.5; overflow-wrap: anywhere; }
.pm-bubble > .pm-reference { margin-bottom: .5rem; }
.pm-bubble .pm-reference__open { padding: .5rem; }
.pm-receipt { display: block; text-align: right; margin-top: .4rem; color: #586f60; font-size: .62rem; }
.pm-bubble.is-pending { border-style: dashed; }
.pm-bubble-row.is-own .pm-bubble.has-error { border-color: #d48686; background: #fff2f1; }
.pm-inline-action { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 44px; margin-top: .4rem; padding: .4rem .5rem; border: 1px solid #a9c8b5; border-radius: 8px; background: white; color: var(--tanne); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.pm-inline-action .icon { width: 17px; height: 17px; }
.pm-bubble .pm-send-error { color: #a23232; font-size: .71rem; margin-top: .45rem; }
.pm-failed-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pm-chat-empty { height: 100%; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; color: var(--muted); }
.pm-chat-empty > .icon { width: 32px; height: 32px; color: #91b19d; }
.pm-chat-empty p { font-size: .84rem; }
.pm-direct-form { position: relative; flex-shrink: 0; padding: .85rem 1rem; border-top: 1px solid var(--line); background: white; }
.pm-direct-form > .pm-reference { margin-bottom: .6rem; }
.pm-direct-form__row { display: flex; align-items: flex-end; gap: .6rem; min-width: 0; }
.pm-direct-form__row > .field { flex: 1; min-width: 0; }
.pm-direct-form__row textarea { display: block; min-height: 60px; max-height: 130px; padding: .65rem .75rem; font-size: .85rem; }
.pm-direct-form__row .button { flex-shrink: 0; min-height: 50px; padding: .65rem 1rem; }
.pm-send-hint { display: block; margin-top: .45rem; font-size: .64rem; }
.pm-load-error { margin-bottom: 1rem; }
.pm-load-error .button { margin-top: .5rem; }
.pm-shared-campaign__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.pm-share-button { min-height: 44px; color: var(--tanne); background: white; }
.pm-board-layout [hidden], .pm-direct [hidden] { display: none !important; }
.pm-tabs button:focus-visible, .pm-conversation-row:focus-visible, .pm-compose-disclosure > summary:focus-visible, .pm-message-menu summary:focus-visible, .pm-reference__open:focus-visible { outline: 3px solid var(--klee); outline-offset: 2px; }
@media (min-width: 1050px) {
  .pm-board-layout { grid-template-columns: minmax(260px, .34fr) minmax(0, .66fr); align-items: start; }
  .pm-board-tools { position: sticky; top: 1rem; }
  .pm-board-filters, .pm-form-grid { grid-template-columns: minmax(0, 1fr); }
  .pm-board-form .button { width: 100%; }
}
@media (max-width: 760px) {
  .pm-direct { display: block; }
  .pm-direct:not(.pm-direct--open) .pm-chat-placeholder { display: none; }
  .pm-direct--open .pm-conversations { display: none; }
  .pm-conversations { height: auto; min-height: 420px; max-height: 72dvh; }
  .pm-chat { height: clamp(340px, calc(100dvh - 405px), 680px); }
  .pm-chat-back { display: inline-flex; flex-shrink: 0; min-width: 44px; min-height: 44px; padding: .4rem; }
  .pm-chat-head { gap: .5rem; padding: .65rem; }
  .pm-chat-head > .member-avatar { width: 38px; height: 38px; flex-basis: 38px; }
  .pm-conversation-row { min-height: 86px; padding: .75rem; }
  .pm-conversation-row__body strong { font-size: .92rem; }
  .pm-conversation-row__body small { font-size: .79rem; }
  .pm-board-filters { grid-template-columns: minmax(0, 1fr); }
  .pm-bubble { max-width: 91%; }
  .pm-direct-form__row textarea, .pm-board-form textarea, .pm-board-form select, .pm-board-form input, .pm-board-filters input, .pm-board-filters select, .pm-conversation-filters input { font-size: 16px; }
}
@media (max-width: 420px) {
  .pm-tabs > button { font-size: .8rem; gap: .2rem; padding: .6rem .1rem; }
  .pm-tabs .icon { width: 15px; height: 15px; }
  .pm-tabs .pm-count { min-width: 18px; height: 18px; font-size: .62rem; }
  .pm-form-grid { grid-template-columns: minmax(0, 1fr); }
  .pm-board-message { padding: .85rem; }
  .pm-thread { padding: .7rem; }
  .pm-direct-form { padding: .7rem; }
  .pm-direct-form__row { gap: .4rem; }
  .pm-direct-form__row .button { padding: .6rem .7rem; font-size: .8rem; }
  .pm-chat-head h2 { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .pm-compose-disclosure summary > .icon { transition: none; } }
