/* Stationplaner Shell: ausgelagerter ModalHost + CardModal + Confirm + Toast */
.spModalLayer{position:fixed;inset:0;z-index:999990;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.42);backdrop-filter:blur(8px)}
.spModalLayer.open{display:flex}.sp-modal-open{overflow:hidden!important}
.spModalCard{width:min(1080px,calc(100vw - 32px));max-height:calc(100vh - 48px);background:#fff;color:#0f172a;border:1px solid #dbe5f2;border-radius:24px;box-shadow:0 34px 90px rgba(15,23,42,.28);overflow:hidden;display:flex;flex-direction:column}
.spCardModalWide{width:min(1280px,calc(100vw - 32px))}
.spModalHead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 14px;border-bottom:1px solid #edf2f8;background:linear-gradient(180deg,#fff,#f8fbff)}
.spModalKicker{font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;color:#64748b;margin-bottom:4px}.spModalTitle{margin:0;font-size:22px;line-height:1.1;font-weight:950;letter-spacing:-.035em;color:#0f172a}.spModalClose{width:38px;height:38px;border-radius:13px;border:1px solid #dbe5f2;background:#fff;color:#475569;cursor:pointer;font-weight:950}.spModalClose:hover{background:#eef5ff;color:#145cff}
.spModalBody{overflow:auto;padding:18px 20px 20px}.spModalMeta{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 14px}.spModalPill{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbe5f2;background:#f8fbff;color:#475569;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900}.spModalFoot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-top:1px solid #edf2f8;background:#fbfdff}.spModalActions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.spModalBtn{height:40px;padding:0 14px;border-radius:13px;border:1px solid #dbe5f2;background:#fff;color:#0f172a;cursor:pointer;font-weight:950;font-size:13px}.spModalBtn:hover{background:#f3f6fb}.spModalBtn.primary{background:#145cff;color:#fff;border-color:#145cff}.spModalBtn.danger{color:#dc2626;border-color:#fecaca;background:#fff7f7}.spModalStatus{min-width:0;color:#64748b;font-size:12px;font-weight:850}.spModalStatus.bad{color:#dc2626}.spConfirmBox{max-width:560px}.spConfirmText{color:#475569;line-height:1.5;font-weight:700}
.spCardModalGrid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(340px,.95fr);gap:16px}.spCardMainPane{min-width:0}.spCardForm{display:grid;grid-template-columns:1.3fr .9fr .7fr;gap:12px}.spCardForm .full{grid-column:1/-1}.spField{display:grid;gap:6px}.spField label{font-size:11px;font-weight:950;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.spField input,.spField textarea,.spField select{width:100%;border:1px solid #dbe5f2;background:#fff;color:#0f172a;border-radius:14px;padding:11px 12px;outline:0;font:inherit;font-size:13px;font-weight:800}.spField textarea{min-height:300px;resize:vertical;line-height:1.5;font-weight:650}.spField input:focus,.spField textarea:focus,.spField select:focus{border-color:rgba(20,92,255,.42);box-shadow:0 0 0 4px rgba(20,92,255,.10)}
.spSideStack{display:flex;flex-direction:column;gap:12px}.spSideCard{border:1px solid #dbe5f2;background:#fff;border-radius:18px;padding:13px;box-shadow:0 10px 26px rgba(15,23,42,.055)}.spSideHead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;font-size:13px;font-weight:950;color:#0f172a}.spSideEmpty,.spSideHint{color:#64748b;font-size:12px;font-weight:800;line-height:1.4}.spSideHint{margin-top:8px}
.spCustomerSelectors{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:10px}.spCustomerSelectors label{display:grid;gap:5px;color:#64748b;font-size:10.5px;font-weight:950;text-transform:uppercase;letter-spacing:.04em}.spCustomerSelectors select,.spApprovalSelectLabel select{width:100%;height:38px;border:1px solid #dbe5f2;border-radius:12px;background:#fff;color:#0f172a;padding:0 9px;font-size:12px;font-weight:850;outline:0}.spCustomerSelectors select:focus,.spApprovalSelectLabel select:focus{border-color:rgba(20,92,255,.42);box-shadow:0 0 0 4px rgba(20,92,255,.10)}.spCustomerBadge{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid rgba(14,165,233,.24);background:rgba(14,165,233,.09);color:#075985;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:950}.spCustomerBadge span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spApprovalStatus{font-size:11px;font-weight:950;color:#145cff;background:#eef5ff;border:1px solid #d7e5fb;border-radius:999px;padding:4px 8px;white-space:nowrap}.spApprovalSelectLabel{display:grid;gap:5px;margin-bottom:10px;color:#64748b;font-size:10.5px;font-weight:950;text-transform:uppercase;letter-spacing:.04em}.spApprovalPearls{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:8px 0 12px}.spApprovalPearls:before{content:"";position:absolute;left:10%;right:10%;top:14px;height:2px;background:#d8e1ee}.spApprovalPearls.rank-1:before{background:linear-gradient(90deg,#22c55e 0 25%,#d8e1ee 25%)}.spApprovalPearls.rank-2:before{background:linear-gradient(90deg,#22c55e 0 50%,#d8e1ee 50%)}.spApprovalPearls.rank-3:before{background:linear-gradient(90deg,#22c55e 0 75%,#d8e1ee 75%)}.spApprovalPearls.rank-4:before{background:#22c55e}.spApprovalStep{position:relative;z-index:1;display:grid;justify-items:center;gap:6px;text-align:center;color:#667085;font-size:10.5px;font-weight:900}.spApprovalPearl{width:28px;height:28px;border-radius:999px;border:2px solid #cbd5e1;background:#fff;box-shadow:0 0 0 5px #fff}.spApprovalStep.is-done .spApprovalPearl{background:#22c55e;border-color:#16a34a}.spApprovalStep.is-current .spApprovalPearl{background:#64748b;border-color:#475569}.spApprovalStep.is-done{color:#166534}.spApprovalStep.is-current{color:#344054}.spApprovalActions{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 10px}.spMiniBtn{height:32px;border-radius:10px;border:1px solid #dbe5f2;background:#fff;color:#0f172a;padding:0 9px;font-size:11.5px;font-weight:950;cursor:pointer}.spMiniBtn:hover{background:#f3f6fb}.spMiniBtn.primary{background:#145cff;border-color:#145cff;color:#fff}.spHistoryList{display:grid;gap:8px}.spHistoryItem{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:start;border:1px solid #e3ebf6;background:#fbfdff;border-radius:12px;padding:9px;color:#344054;font-size:12px}.spHistoryAvatar{width:30px;height:30px;border-radius:999px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#2563eb,#22c55e);font-size:12px;font-weight:950}.spHistoryItem b{display:block;color:#101828;font-size:12px}.spHistoryItem small{display:block;color:#667085;font-weight:750;margin-top:2px;line-height:1.35}
.spAttachmentRow{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #e7eef8;background:#f8fbff;border-radius:12px;padding:8px 9px;font-size:12px;font-weight:850}.spAttachmentRow+ .spAttachmentRow{margin-top:7px}.spAttachmentRow>div{min-width:0}.spAttachmentRow span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spAttachmentRow a{color:#145cff;text-decoration:none;font-weight:950;flex:0 0 auto}.spAttachmentRow audio{width:100%;margin-top:7px;display:block}
.spChatList{display:grid;gap:8px;max-height:220px;overflow:auto}.spChatMsg{border:1px solid #e7eef8;background:#f8fbff;border-radius:13px;padding:9px}.spChatMsg b{font-size:12px;color:#0f172a}.spChatMsg small{display:block;margin-top:2px;color:#64748b;font-size:10.5px;font-weight:800}.spChatMsg p{margin:6px 0 0;color:#334155;font-size:12px;line-height:1.35;white-space:pre-wrap}.spChatCompose{display:flex;gap:8px;margin-top:10px}.spChatCompose input{flex:1;min-width:0;border:1px solid #dbe5f2;border-radius:12px;padding:9px 10px;font-size:12px;font-weight:800;outline:0}.spChatCompose button{border:1px solid #145cff;background:#145cff;color:#fff;border-radius:12px;padding:0 11px;font-size:12px;font-weight:950;cursor:pointer}
.spShellToast{position:fixed;right:18px;bottom:18px;z-index:999999;display:none;min-width:260px;max-width:min(420px,calc(100vw - 36px));border-radius:16px;background:#0f172a;color:#fff;box-shadow:0 20px 50px rgba(15,23,42,.22);padding:12px 14px;font-size:13px;font-weight:850}.spShellToast.show{display:block}.spShellToast.bad{background:#991b1b}
@media(max-width:1040px){.spCardModalGrid{grid-template-columns:1fr}.spCardForm{grid-template-columns:1fr 1fr}.spModalLayer{padding:10px}.spModalCard{max-height:calc(100vh - 20px);border-radius:20px}.spModalFoot{align-items:stretch;flex-direction:column}.spModalActions{justify-content:flex-end}}
@media(max-width:680px){.spCardForm,.spCustomerSelectors{grid-template-columns:1fr}.spModalBody{padding:14px}.spModalHead,.spModalFoot{padding-left:14px;padding-right:14px}}

/* === Paket 1/2 Fix: altes Card-Modal-Gefühl, RTE, DB-Arten, saubere Planungstrennung === */
.spLegacyCardModal{width:min(1240px,calc(100vw - 32px));border-radius:18px;color:#0f172a;background:#fff}
.spLegacyModalHead{display:flex;justify-content:space-between;gap:14px;padding:14px 16px 12px;border-bottom:1px solid #e5e7eb;background:linear-gradient(180deg,#fff,#fbfcff)}
.spLegacyModalHeadLeft{min-width:0;flex:1}.spLegacyModalHeadRight{display:flex;align-items:center;gap:10px;min-width:180px;justify-content:flex-end}.spLegacyTitleWrap{display:flex;align-items:center;gap:10px}.spLegacyTitleInput{width:100%;font-size:18px;font-weight:950;border:1px solid #e5e7eb;border-radius:14px;padding:11px 13px;outline:0;background:#fff;color:#0f172a}.spLegacyTitleInput:focus{border-color:rgba(99,102,241,.55);box-shadow:0 0 0 4px rgba(99,102,241,.12)}.spLegacyIconBtn{width:36px;height:36px;border-radius:12px;border:1px solid #e5e7eb;background:#fff;cursor:pointer}.spLegacyLastInfo{font-size:12px;color:#64748b;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800}.spLegacyModalBody{padding:14px 16px 10px}.spLegacyGrid{grid-template-columns:minmax(0,1.55fr) minmax(330px,.95fr)}.spLegacyForm{display:block}.spLegacyMetaRow{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:16px;align-items:end;margin-bottom:10px}.spLegacyExpiry{margin-bottom:12px;max-width:320px}.spLegacyTimeField input{height:44px}.spLegacyRteToolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px;border:1px solid #e5e7eb;border-radius:14px 14px 0 0;background:#fbfcff}.spLegacyRteToolbar button,.spLegacyRteToolbar select{height:32px;border-radius:10px;border:1px solid #dbe5f2;background:#fff;color:#0f172a;padding:0 10px;font-weight:950;cursor:pointer}.spLegacyRteToolbar button:hover,.spLegacyRteToolbar select:hover{background:#f3f6fb}.spLegacyRteToolbar .sep{width:1px;height:22px;background:#e5e7eb;margin:0 4px}.spLegacyAiBtn{min-width:132px!important;color:#fff!important;background:linear-gradient(135deg,#4f46e5,#0ea5e9)!important;border-color:rgba(79,70,229,.45)!important}.spLegacyTeleBtn{min-width:132px!important;color:#0b2a4a!important;background:linear-gradient(135deg,#fff,#e0f2fe)!important;border-color:rgba(14,165,233,.45)!important}.spLegacyRteArea{min-height:300px;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 14px 14px;padding:13px;outline:0;background:#fff;color:#0f172a;line-height:1.5;font-weight:650;overflow:auto}.spLegacyRteArea:empty:before{content:attr(data-placeholder);color:#94a3b8;font-weight:700}.spLegacyRteArea:focus{box-shadow:0 0 0 4px rgba(99,102,241,.10)}.spLegacyDrop{border:1px dashed #94a3b8;border-radius:14px;padding:16px 12px;text-align:center;cursor:pointer;background:linear-gradient(180deg,#fff,#f8fafc);display:grid;gap:5px}.spLegacyDrop:hover{border-color:#145cff;background:#f8fbff}.spLegacyDrop strong{font-size:13px}.spLegacyDrop small{color:#64748b;font-size:12px;font-weight:800}.spRecordBtn{width:100%;margin-top:10px}.spLegacyChatCard{margin-top:14px}.spShellHidden{display:none!important}.spAttachmentRow .att-actions{display:flex;gap:8px;align-items:center}.spAttachmentRow button,.spAttachmentRow a{border:1px solid #dbe5f2;background:#fff;color:#145cff;border-radius:10px;padding:6px 8px;text-decoration:none;font-weight:950;cursor:pointer}.spAttachmentRow button.danger{color:#dc2626;border-color:#fecaca;background:#fff7f7}.spAttachmentRow{display:block}.spAttachmentRow .att-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.spAttachmentRow .att-name{font-size:13px;font-weight:850;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spAttachmentRow audio{width:100%;margin-top:8px;display:block}
@media(max-width:1040px){.spLegacyGrid{grid-template-columns:1fr}.spLegacyMetaRow{grid-template-columns:1fr 180px}}@media(max-width:680px){.spLegacyModalHead{flex-direction:column}.spLegacyModalHeadRight{width:100%;justify-content:space-between}.spLegacyMetaRow{grid-template-columns:1fr}.spLegacyRteToolbar{gap:6px}.spLegacyAiBtn,.spLegacyTeleBtn{min-width:0!important;flex:1 1 140px}}


/* === Paket 1/2 UI-Polish: SaaS-Schrift, kompakte alte Modal-Anmutung, Projekt-Fix === */
.spLegacyCardModal,
.spLegacyCardModal *{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif!important;
  letter-spacing:0!important;
  text-rendering:geometricPrecision;
}
.spLegacyCardModal{
  width:min(1180px, calc(100vw - 34px))!important;
  border-radius:18px!important;
  box-shadow:0 28px 80px rgba(15,23,42,.22)!important;
}
.spLegacyModalHead{
  padding:12px 14px 10px!important;
  border-bottom:1px solid #e6edf7!important;
  background:#fff!important;
}
.spModalKicker{
  font-size:10px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.075em!important;
  color:#667085!important;
  margin-bottom:7px!important;
}
.spLegacyTitleInput{
  height:44px!important;
  font-size:15.5px!important;
  line-height:1.25!important;
  font-weight:760!important;
  color:#0f172a!important;
  border-radius:12px!important;
  border:1px solid #dbe4f0!important;
  padding:0 12px!important;
  box-shadow:none!important;
}
.spLegacyTitleInput:focus{
  border-color:#c7d2fe!important;
  box-shadow:0 0 0 3px rgba(99,102,241,.13)!important;
}
.spLegacyLastInfo{
  font-size:11px!important;
  font-weight:700!important;
  color:#667085!important;
  max-width:230px!important;
}
.spModalClose{
  width:34px!important;
  height:34px!important;
  border-radius:12px!important;
  font-size:18px!important;
  font-weight:500!important;
}
.spLegacyModalBody{padding:12px 14px 10px!important;}
.spLegacyGrid{
  grid-template-columns:minmax(0,1fr) minmax(320px,405px)!important;
  gap:14px!important;
}
.spLegacyMetaRow{
  grid-template-columns:minmax(0,1fr) 162px!important;
  gap:14px!important;
  margin-bottom:10px!important;
}
.spLegacyCardModal .spField label,
.spLegacyCardModal .spCustomerSelectors label,
.spLegacyCardModal .spApprovalSelectLabel{
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:820!important;
  color:#667085!important;
  text-transform:uppercase!important;
  letter-spacing:.055em!important;
  margin-bottom:6px!important;
}
.spLegacyCardModal .spField input,
.spLegacyCardModal .spField select,
.spLegacyCardModal .spCustomerSelectors select,
.spLegacyCardModal .spApprovalSelectLabel select{
  height:40px!important;
  border-radius:12px!important;
  border:1px solid #dbe4f0!important;
  background:#fff!important;
  color:#101828!important;
  font-size:13px!important;
  font-weight:640!important;
  padding:0 10px!important;
  box-shadow:none!important;
}
.spLegacyTimeField input{
  height:40px!important;
  font-variant-numeric:tabular-nums!important;
  font-weight:740!important;
}
.spLegacyExpiry{max-width:290px!important;margin-bottom:10px!important;}
#spShellProjectField[hidden],
#spShellProjectField.spShellHidden{
  display:none!important;
}
.spCustomerSelectors:has(#spShellProjectField[hidden]),
.spCustomerSelectors:has(#spShellProjectField.spShellHidden){
  grid-template-columns:1fr!important;
}
.spSideCard{
  border:1px solid #dbe4f0!important;
  border-radius:17px!important;
  padding:12px!important;
  box-shadow:none!important;
}
.spSideHead{
  margin-bottom:10px!important;
  font-size:13px!important;
  font-weight:780!important;
  color:#0f172a!important;
}
.spSideEmpty,.spSideHint{
  font-size:12px!important;
  line-height:1.4!important;
  font-weight:640!important;
  color:#667085!important;
}
.spLegacyRteToolbar{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  padding:7px 8px!important;
  min-height:50px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  border-color:#dbe4f0!important;
  border-radius:13px 13px 0 0!important;
  background:#fbfcff!important;
  scrollbar-width:thin;
}
.spLegacyRteToolbar button,
.spLegacyRteToolbar select{
  flex:0 0 auto!important;
  height:32px!important;
  min-width:32px!important;
  border-radius:10px!important;
  border:1px solid #d6e0ee!important;
  background:#fff!important;
  color:#0f172a!important;
  padding:0 10px!important;
  font-size:13px!important;
  font-weight:760!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.spLegacyRteToolbar select{
  width:58px!important;
  padding:0 8px!important;
  font-weight:760!important;
}
.spLegacyRteToolbar .sep{
  flex:0 0 1px!important;
  width:1px!important;
  height:22px!important;
  margin:0 4px!important;
  background:#e3e8f1!important;
}
.spLegacyAiBtn,
.spLegacyTeleBtn{
  height:34px!important;
  min-width:auto!important;
  padding:0 12px!important;
  border-radius:10px!important;
  font-size:13px!important;
  font-weight:780!important;
}
.spLegacyRteArea{
  min-height:300px!important;
  border-color:#dbe4f0!important;
  border-radius:0 0 13px 13px!important;
  padding:14px!important;
  background:#fff!important;
  color:#101828!important;
  font-size:14px!important;
  line-height:1.55!important;
  font-weight:450!important;
}
.spLegacyRteArea:empty:before{
  color:#98a2b3!important;
  font-size:13px!important;
  font-weight:600!important;
}
.spLegacyDrop{
  border-color:#b8c4d7!important;
  border-radius:14px!important;
  padding:14px 10px!important;
  background:#fff!important;
}
.spLegacyDrop strong{font-size:13px!important;font-weight:760!important;color:#101828!important;}
.spLegacyDrop small{font-size:11.5px!important;font-weight:650!important;color:#667085!important;}
.spRecordBtn{height:34px!important;font-size:12px!important;font-weight:720!important;color:#0f172a!important;background:#fff!important;}
.spChatList{max-height:185px!important;}
.spChatCompose{align-items:stretch!important;}
.spChatCompose input{
  min-height:38px!important;
  border-radius:12px!important;
  font-size:12.5px!important;
  font-weight:500!important;
}
.spChatCompose button{
  min-width:74px!important;
  border-radius:12px!important;
  font-size:12.5px!important;
  font-weight:740!important;
  background:#0b2a4a!important;
  border-color:#0b2a4a!important;
}
.spApprovalStatus{font-size:10.5px!important;font-weight:760!important;}
.spApprovalStep{font-size:10px!important;font-weight:760!important;}
.spHistoryItem b{font-weight:760!important;}
.spHistoryItem small{font-weight:600!important;}
.spModalFoot{
  padding:12px 16px!important;
  background:#fbfcff!important;
  border-top:1px solid #e6edf7!important;
}
.spModalStatus{font-size:11.5px!important;font-weight:650!important;color:#667085!important;}
.spModalBtn{
  min-height:38px!important;
  border-radius:12px!important;
  font-size:12.5px!important;
  font-weight:760!important;
  padding:0 14px!important;
}
@media(max-width:1040px){
  .spLegacyGrid{grid-template-columns:1fr!important;}
  .spLegacyMetaRow{grid-template-columns:minmax(0,1fr) 160px!important;}
}
@media(max-width:680px){
  .spLegacyMetaRow{grid-template-columns:1fr!important;}
  .spLegacyRteToolbar{flex-wrap:nowrap!important;}
}


/* === Fix 3: Chat wieder unter dem Beitrag, Autor oben, Ablaufdatum nur Pool === */
.spLegacyModalHeadRight{
  min-width:300px!important;
  gap:12px!important;
  align-items:center!important;
}
.spLegacyAuthorBox{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  min-width:0!important;
  max-width:360px!important;
}
.spAuthorAvatar{
  width:30px!important;
  height:30px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 30px!important;
  background:linear-gradient(135deg,#2563eb,#7c3aed)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:820!important;
  overflow:hidden!important;
  box-shadow:0 8px 18px rgba(15,23,42,.12)!important;
}
.spAuthorAvatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;border-radius:inherit!important;}
.spAuthorText{min-width:0!important;text-align:left!important;display:grid!important;gap:2px!important;}
.spAuthorName{font-size:12px!important;font-weight:760!important;color:#101828!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:230px!important;}
.spAuthorLast{font-size:11px!important;font-weight:560!important;color:#667085!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:230px!important;}
.spChatUnderContribution{
  margin-top:12px!important;
  margin-bottom:0!important;
  border-color:#dbe4f0!important;
  box-shadow:none!important;
}
.spChatUnderContribution .spSideHead{margin-bottom:8px!important;}
.spChatUnderContribution .spChatList{
  max-height:180px!important;
  min-height:64px!important;
  overflow:auto!important;
  padding:4px 0!important;
}
.spChatUnderContribution .spChatCompose{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 82px!important;
  gap:8px!important;
  align-items:stretch!important;
  margin-top:10px!important;
}
.spChatUnderContribution textarea#spShellChatInput{
  width:100%!important;
  min-height:42px!important;
  max-height:96px!important;
  resize:vertical!important;
  border:1px solid #dbe4f0!important;
  border-radius:12px!important;
  padding:10px 11px!important;
  font-size:13px!important;
  font-weight:450!important;
  line-height:1.35!important;
  color:#101828!important;
  background:#fff!important;
  outline:none!important;
}
.spChatUnderContribution textarea#spShellChatInput:focus{border-color:#c7d2fe!important;box-shadow:0 0 0 3px rgba(99,102,241,.12)!important;}
.spChatUnderContribution #spShellChatSend{height:auto!important;min-height:42px!important;}
.spChatMsg{display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;gap:9px!important;align-items:start!important;margin:8px 0!important;}
.spChatMsg:before{content:attr(data-initials);width:30px;height:30px;border-radius:999px;background:linear-gradient(135deg,#145cff,#7c3aed);color:#fff;display:grid;place-items:center;font-size:11px;font-weight:800;grid-column:1;grid-row:1 / span 3;}
.spChatMsg b{font-size:12px!important;font-weight:760!important;color:#101828!important;line-height:1.15!important;}
.spChatMsg small{font-size:10.5px!important;color:#667085!important;font-weight:560!important;}
.spChatMsg p{margin:3px 0 0!important;font-size:13px!important;font-weight:430!important;line-height:1.4!important;color:#344054!important;white-space:pre-wrap!important;}
@media(max-width:900px){.spLegacyModalHeadRight{min-width:0!important;width:100%!important;justify-content:space-between!important}.spLegacyAuthorBox{max-width:calc(100% - 48px)!important}.spAuthorName,.spAuthorLast{max-width:260px!important}}

/* Fix4: Hidden-Felder wirklich ausblenden, damit „Gültig bis“ nie bei geplanten Beiträgen stehen bleibt. */
#spShellExpiryRow[hidden],
#spShellExpiryRow.spShellHidden,
.spLegacyExpiry[hidden],
.spLegacyExpiry.spShellHidden{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Fix4: Chat mit echtem Avatar/Bubble-Aufbau wie SaaS-Kommentarbereich. */
.spChatMsg{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  margin:0 0 10px!important;
}
.spChatAvatar{
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:850!important;
  background:linear-gradient(135deg,#2563eb,#7c3aed)!important;
  box-shadow:0 6px 16px rgba(15,23,42,.10)!important;
}
.spChatAvatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.spChatBubble{
  min-width:0!important;
  border:1px solid #e1e9f5!important;
  background:#f8fbff!important;
  border-radius:16px!important;
  padding:10px 12px!important;
}
.spChatBubble b{
  display:inline-block!important;
  font-size:13px!important;
  font-weight:760!important;
  color:#101828!important;
  margin-right:8px!important;
}
.spChatBubble small{
  display:inline-block!important;
  font-size:11px!important;
  font-weight:520!important;
  color:#667085!important;
}
.spChatBubble p{
  margin:7px 0 0!important;
  font-size:13px!important;
  line-height:1.45!important;
  font-weight:440!important;
  color:#101828!important;
  white-space:pre-wrap!important;
}
.spAuthorAvatar.hasImage img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:999px!important;
}

/* === Fix5: Chat modernisieren + Mention-Autocomplete === */
.spChatMsg:before{display:none!important;content:none!important;}
.spChatUnderContribution{
  margin-top:14px!important;
  border-radius:18px!important;
  border:1px solid #dbe6f3!important;
  background:#fff!important;
  padding:14px!important;
}
.spChatUnderContribution .spSideHead{
  margin:0 0 12px!important;
  padding:0!important;
  font-size:14px!important;
  font-weight:760!important;
  color:#0f172a!important;
}
.spChatUnderContribution .spMiniBtn{
  width:32px!important;
  height:32px!important;
  padding:0!important;
  border-radius:11px!important;
  background:#fff!important;
}
.spChatUnderContribution .spChatList{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  max-height:245px!important;
  min-height:76px!important;
  overflow:auto!important;
  padding:2px 2px 4px!important;
}
.spChatUnderContribution .spSideEmpty{
  border:1px dashed #dbe6f3!important;
  border-radius:14px!important;
  background:#f8fbff!important;
  padding:14px!important;
  color:#667085!important;
}
.spChatMsg{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.spChatAvatar{
  width:38px!important;
  height:38px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:850!important;
  background:linear-gradient(135deg,#145cff,#7c3aed)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.10)!important;
}
.spChatAvatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;border-radius:inherit!important;}
.spChatBubble{
  min-width:0!important;
  border:1px solid #e2eaf6!important;
  background:#f8fbff!important;
  border-radius:16px!important;
  padding:10px 12px!important;
  box-shadow:0 8px 18px rgba(15,23,42,.035)!important;
}
.spChatMeta{display:flex!important;align-items:baseline!important;gap:8px!important;min-width:0!important;}
.spChatBubble b{font-size:13px!important;font-weight:760!important;color:#101828!important;margin:0!important;}
.spChatBubble small{font-size:11px!important;font-weight:520!important;color:#667085!important;margin:0!important;}
.spChatBubble p{margin:7px 0 0!important;font-size:13px!important;line-height:1.45!important;font-weight:440!important;color:#101828!important;white-space:pre-wrap!important;}
.spMentionInline{font-weight:760!important;color:#145cff!important;background:#eef5ff!important;border-radius:999px!important;padding:1px 6px!important;}
.spChatCompose{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 88px!important;
  gap:10px!important;
  align-items:stretch!important;
  margin-top:12px!important;
}
.spChatCompose textarea#spShellChatInput{
  width:100%!important;
  min-height:48px!important;
  max-height:116px!important;
  resize:vertical!important;
  border:1px solid #dbe4f0!important;
  border-radius:14px!important;
  padding:12px 13px!important;
  font-size:13px!important;
  line-height:1.35!important;
  font-weight:430!important;
  color:#101828!important;
  background:#fff!important;
  outline:none!important;
}
.spChatCompose textarea#spShellChatInput:focus{border-color:#b8c4ff!important;box-shadow:0 0 0 4px rgba(99,102,241,.12)!important;}
.spChatCompose #spShellChatSend{
  min-height:48px!important;
  border-radius:14px!important;
  background:#0b2a4a!important;
  border-color:#0b2a4a!important;
  color:#fff!important;
  font-size:13px!important;
  font-weight:760!important;
}
.spMentionBox{
  position:absolute!important;
  left:0!important;
  bottom:calc(100% + 8px)!important;
  width:min(430px,100%)!important;
  max-height:250px!important;
  overflow:auto!important;
  display:none!important;
  padding:7px!important;
  border:1px solid #dbe6f3!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 22px 58px rgba(15,23,42,.16)!important;
  z-index:20!important;
}
.spMentionBox.open{display:block!important;}
.spMentionItem{
  width:100%!important;
  border:0!important;
  background:transparent!important;
  border-radius:13px!important;
  padding:9px 10px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  text-align:left!important;
  cursor:pointer!important;
  color:#0f172a!important;
}
.spMentionItem:hover,.spMentionItem.is-active{background:#eef5ff!important;}
.spMentionAvatar{width:32px!important;height:32px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#145cff,#7c3aed)!important;color:#fff!important;font-size:11px!important;font-weight:850!important;overflow:hidden!important;flex:0 0 32px!important;}
.spMentionAvatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
.spMentionMain{min-width:0!important;display:grid!important;gap:2px!important;}
.spMentionMain b{font-size:13px!important;font-weight:760!important;color:#101828!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.spMentionMain small{font-size:11px!important;color:#667085!important;font-weight:520!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}


/* === Fix6: Mention-Auswahl im Beitragschat sauber + Tenant-User statt Online-Look === */
.spChatCompose .spMentionBox{
  width:min(460px,100%)!important;
  padding:8px!important;
  border-radius:18px!important;
  background:#ffffff!important;
  border:1px solid #dbe6f3!important;
  box-shadow:0 22px 58px rgba(15,23,42,.14)!important;
}
.spChatCompose .spMentionBox .spMentionItem{
  min-height:50px!important;
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:11px!important;
  padding:9px 10px!important;
  border:1px solid transparent!important;
  border-radius:14px!important;
  background:#ffffff!important;
  color:#0f172a!important;
  box-shadow:none!important;
  text-align:left!important;
}
.spChatCompose .spMentionBox .spMentionItem:hover,
.spChatCompose .spMentionBox .spMentionItem.is-active{
  background:#f2f7ff!important;
  border-color:#dbeafe!important;
  color:#0f172a!important;
}
.spChatCompose .spMentionBox .spMentionAvatar{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  border-radius:999px!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  color:#fff!important;
  background:linear-gradient(135deg,#145cff,#7c3aed)!important;
  font-size:12px!important;
  font-weight:850!important;
}
.spChatCompose .spMentionBox .spMentionAvatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.spChatCompose .spMentionBox .spMentionMain{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}
.spChatCompose .spMentionBox .spMentionMain b{
  margin:0!important;
  color:#101828!important;
  font-size:13px!important;
  line-height:1.18!important;
  font-weight:760!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.spChatCompose .spMentionBox .spMentionMain small{
  margin:0!important;
  color:#667085!important;
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:520!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
