/* Gemeinsame Oberfläche; Navigation und mandantenspezifische Logos bleiben unverändert. */
.service-ui {
  --ui-accent: #347c6e;
  --ui-text: #202936;
  --ui-muted: #5f6b79;
  --ui-line: #dce1e5;
  color: var(--ui-text);
  font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
article.service-ui.content { display: block !important; min-width: 0; padding: 2rem 1.5rem 3rem; overflow: visible !important; }
.gradient-theme article.service-ui.content { min-height: calc(100vh - 88px); background: #f4f7f6; }
.gradient-theme .service-ui :where(.form-section, .data:not(.contract-card), .text-container, .contract-card, .message-section, .notificationItem, .accordion-item, .status-panel) { border-color: #e1e7e4; border-radius: 18px; box-shadow: 0 12px 32px rgba(31, 51, 46, .06); }
.service-ui :where(div, section, p, span, label, small, strong, a, button, input, select, textarea, h1, h2, h3, h4, legend) { font-family: inherit; }
.service-ui :where(h1, h2, h3, h4, p, ul, fieldset) { padding: 0; }
.service-ui :where(h1, h2, h3) { margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: normal; background: transparent; }
.service-ui :where(h4, legend, .title, .bedarf-title) { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 600; line-height: 1.4; text-transform: none; }
.service-ui p { margin: 0 0 1rem; font-size: 1rem; }
.service-ui small { font-size: .875rem; color: var(--ui-muted); }
.service-ui a { color: var(--ui-accent); overflow-wrap: anywhere; }
.service-ui :where(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--ui-accent); outline-offset: 3px; }
.service-ui > .container, .service-ui .welcome-page, .service-ui .public-page { width: 100%; max-width: 780px; margin: 0 auto; padding: 0; }
.service-ui .container .container { width: 100%; max-width: none; margin: 0; padding: 0; }
.service-ui .page-intro { color: var(--ui-muted); }
.service-ui .form-section, .service-ui .data:not(.contract-card), .service-ui .text-container { display: block; min-width: 0; margin: 0 0 1.5rem; padding: 1.25rem; border: 1px solid var(--ui-line); border-radius: 8px; background: #fff; box-shadow: none; }
.service-ui fieldset.form-section { min-width: 0; }
.service-ui legend { float: none; width: auto; margin: 0; padding: 0 .25rem; }
.service-ui .datacol { width: 100%; min-width: 0; border: 0; }
.service-ui ul { list-style: none; margin: 0; }
.service-ui .item { display: block; margin: 0 0 1rem; padding: 0; min-width: 0; border: 0; }
.service-ui .item:last-child { margin-bottom: 0; }
.service-ui label { display: block; width: auto; margin: 0 0 .4rem; font-size: 1rem; font-weight: 400; text-align: left; text-transform: none; letter-spacing: normal; color: var(--ui-text); }
.service-ui :where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { display: block; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: .65rem .75rem; border: 1px solid #b9c2cc; border-radius: 6px; background: #fff; color: var(--ui-text); font-size: 1rem; line-height: 1.5; }
.service-ui .contract-select { box-sizing: border-box; inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-ui .contract-select option { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.service-ui textarea { min-height: 144px; resize: vertical; }
.service-ui input::placeholder, .service-ui textarea::placeholder { color: #687484; opacity: 1; }
.service-ui .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.service-ui input[type=checkbox], .service-ui input[type=radio] { appearance: auto; display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--ui-accent); }
.service-ui .choice-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.service-ui .choice-row label, .service-ui .form-check, .service-ui .item-checkbox { display: flex; align-items: center; gap: .75rem; min-height: 48px; margin: 0; padding: .5rem 0; }
.service-ui .full-width-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; width: 100%; }
.service-ui .full-width-choices label { justify-content: center; width: 100%; padding: .75rem 1rem; border: 1px solid var(--ui-line); border-radius: 8px; cursor: pointer; }
.service-ui .full-width-choices label:has(input:checked) { border-color: var(--ui-accent); background: #f1f8f6; }
.service-ui .amount-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
.service-ui .amount-field input { border-radius: 6px 0 0 6px !important; }
.service-ui .amount-field span { display: grid; place-items: center; min-width: 48px; border: 1px solid #b9c2cc; border-left: 0; border-radius: 0 6px 6px 0; background: #f3f5f6; color: var(--ui-muted); }
.service-ui .item-checkbox label, .service-ui .form-check label { flex: 1; margin: 0; }
.service-ui .item-checkbox + .item-checkbox, .service-ui .form-check + .form-check { border-top: 1px solid var(--ui-line); }
.service-ui .bankbox ul { border: 0 !important; border-radius: 0 !important; }
.service-ui .button-container { position: static; z-index: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; width: 100%; margin: 1.5rem 0 2rem; clear: both; }
/* Einige Mandanten-CSS setzen button global mit !important. Nur Inhaltsaktionen überschreiben. */
.service-ui button, .service-ui .btn, .service-ui .upload-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; height: auto; width: auto; max-width: 100%; padding: .65rem 1rem; border: 1px solid var(--ui-accent); border-radius: 8px; background: #fff !important; color: var(--ui-accent) !important; font-size: 1rem; font-weight: 500; line-height: 1.4; text-align: center; text-decoration: none; white-space: normal; box-shadow: none; cursor: pointer; }
.service-ui button.button:not(.deleteButton), .service-ui .btn-primary { background: var(--ui-accent) !important; color: #fff !important; }
.service-ui button:hover, .service-ui .btn:hover, .service-ui .upload-button:hover { box-shadow: inset 0 0 0 1px currentColor; }
.service-ui button:disabled, .service-ui .btn[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.service-ui .button-container > .button { min-width: 240px; }
.service-ui .actionbar { flex-direction: column; align-items: stretch; }
.service-ui .secondary-action { align-self: stretch; border-color: var(--ui-line); }
.service-ui .danger-action { color: #a12e35 !important; }
.service-ui .legacy-home { font-family: 'Poppins', sans-serif; }
.service-ui .legacy-home .container { max-width: 1140px; margin: 1.5rem auto 0; padding-right: .75rem; padding-left: .75rem; }
.service-ui .legacy-home .display-4 { margin-bottom: .5rem; font-size: clamp(2rem, 1.7rem + .8vw, 3rem); font-weight: 300; line-height: 1.2; }
.service-ui .legacy-home .lead { font-size: 1.25rem; font-weight: 300; }
.service-ui .legacy-home .prelogin-button { border-color: #55aeda; background: #55aeda !important; color: #fff !important; }
.service-ui .legacy-home .prelogin-button:hover { border-color: #3b7896; background: #3b7896 !important; color: #fff !important; }
.service-ui > .container.claim-form, .service-ui > .container.foreign-contract-form { max-width: 960px; }
.service-ui .textarea-wrapper { width: 100%; height: auto; margin: 0; overflow: visible; }
.service-ui .img-container { display: flex; justify-content: center; height: 250px; margin-bottom: 1.5rem; background: none; }
.service-ui .img-container img { width: auto; height: 100%; margin: 0; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 .5rem 1rem #0000001a; }
.service-ui .ansprechpartner { min-height: 0; margin-top: -40px; padding: 1.25rem !important; border: 1px solid var(--ui-line) !important; border-radius: 8px; background: #fff !important; box-shadow: none; }
.service-ui .ansprechpartner .datacol { padding: 0; border: 0; border-radius: 0; }
.service-ui .ansprechpartner .advisor-name { margin: 0 0 1rem; }
.service-ui .ansprechpartnerName { font-size: 2rem; font-weight: 300; overflow-wrap: anywhere; }
.service-ui .contact-list { border-top: 1px solid var(--ui-line); }
.service-ui .contact-row { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--ui-line); }
.service-ui .contact-row:last-child { padding-bottom: 0; border-bottom: 0; }
.service-ui .contact-row > span { color: var(--ui-muted); }
.service-ui .contact-row a { justify-self: start; text-align: left; }
.service-ui .contact-values { display: grid; gap: .35rem; }
.service-ui .contact-values a { justify-self: start; text-align: left; }
.service-ui .message-section { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid var(--ui-line); border-radius: 8px; background: #fff; }
.service-ui .message-section .attachment-title { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ui-line); }
.service-ui .message-section .button-container { margin-bottom: 0; }
.service-ui .attachment-section .anlagen-upload { align-items: stretch; }
.service-ui .profile-card { display: flex; align-items: center; gap: 1.25rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--ui-line); }
.service-ui .profile-card img { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.service-ui .profile-details { min-width: 0; }
.service-ui .profile-details p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.service-ui .profile-details strong { font-weight: 600; }
.service-ui .bedarf-section { margin-top: 2rem; }
.service-ui .bedarf-section.form-section { padding: 1.25rem; border: 1px solid var(--ui-line); }
.service-ui .bedarf-hinweis { margin-top: -.4rem; color: var(--ui-muted); }
.service-ui .bedarf-options { border-top: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); }
.service-ui .bedarf-section .button-container { margin: 1.5rem 0 0; }
.service-ui .data.data-folder { padding: 0; border: 0; background: transparent; }
.service-ui .anlagen-upload { padding: 0; align-items: stretch; }
.service-ui .upload-actions { justify-content: flex-start; }
.service-ui .upload-button { width: auto; margin: 0; }
.service-ui .file-count { margin: .75rem 0 0; font-size: .875rem; text-align: left; color: var(--ui-muted); }
.service-ui .attachment-overview { margin-top: 1rem; padding: 0; overflow: visible; }
.service-ui .attachment-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; width: 100%; min-width: 0; }
.service-ui .attachment { min-width: 0; padding-top: 2.5rem; }
.service-ui .attachment button { width: 36px; min-height: 36px; padding: 0; border-color: var(--ui-line); border-radius: 50%; }
.service-ui .contract-card { margin-bottom: 1rem; padding: 1.25rem; border: 1px solid var(--ui-line); border-radius: 8px; background: #fff; }
.service-ui .contract-heading { display: flex; align-items: center; justify-content: flex-start; width: 100%; gap: .75rem; padding: 0; border: 0; color: var(--ui-text) !important; text-align: left; }
.service-ui .contract-heading:hover { box-shadow: none; }
.service-ui .contract-heading img { width: 56px; height: 48px; object-fit: contain; }
.service-ui .contract-heading img.dummy { width: 36px; height: 36px; margin: 0 10px; }
.service-ui .contract-heading .contract-name { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: .2rem; overflow-wrap: anywhere; }
.service-ui .contract-name strong { font-weight: 600; }
.service-ui .contract-price { margin: 1rem 0 !important; font-size: 1.125rem; font-weight: 600; }
.service-ui .contract-details { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--ui-line); }
.service-ui .contract-details .caretBox { display: none; }
.service-ui .contract-details .item { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr); gap: .75rem; margin: 0; padding: .5rem 0; }
.service-ui .contract-details label { color: var(--ui-muted); margin: 0; }
.service-ui .contract-details span { text-align: left; overflow-wrap: anywhere; white-space: normal !important; }
.service-ui .contract-details .basisrente-hinweis { grid-template-columns:minmax(0,1fr); width:100%; margin-top:.5rem; padding:.75rem 1rem; border-radius:8px; background:rgba(66,145,127,.1); }
.service-ui .notificationItem { margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--ui-line); border-radius: 8px; }
.service-ui .notificationItem.unread { background:transparent; border-color:var(--ui-line); }
.service-ui .notificationHeaderRow { display: flex; align-items: flex-start; gap: .5rem; }
.service-ui .notificationTitleButton { flex: 1; justify-content: flex-start; min-width: 0; padding: 0; border: 0; text-align: left; background: transparent !important; color: var(--ui-text) !important; }
.service-ui .notificationTitle { overflow-wrap: anywhere; text-align: left; font-weight: 600; }
.service-ui .notificationDate { display: block; margin-top: .35rem; font-weight: 400; }
.service-ui .badgeNeu { padding: .1rem .5rem; border-radius: 12px; background: #dbeee8; font-size: .8rem; }
.service-ui .deleteButton { flex-shrink: 0; width: 44px; min-height: 44px; padding: 0; border-color: transparent; color: var(--ui-muted) !important; background: transparent !important; }
.service-ui .notificationDivider { margin: 1rem 0; border-top: 1px solid var(--ui-line); }
.service-ui .notificationMessage { white-space: pre-wrap; overflow-wrap: anywhere; }
.service-ui .pager { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 1rem 0; }
.service-ui .pagerBtn { border: 0; padding: .5rem; }
.service-ui .pagerInfo { font-size: .875rem; }
.service-ui .newMessageToast { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; margin-bottom: 1rem; background: #f1f8f6; border: 1px solid #bad8d1; border-radius: 8px; }
.service-ui .accordion-item { border: 1px solid var(--ui-line); border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.service-ui .accordion-button { width: 100%; min-width: 0; border: 0; border-radius: 0; padding: 1rem; background: #fff !important; color: var(--ui-text) !important; text-align: left; }
.service-ui .accordion-button .w-100 { gap: .75rem; }
.service-ui .accordion-button small { display: inline-block; font-weight: 400; }
.service-ui .text-muted-header { flex-shrink: 0; }
.service-ui .list-group-item { flex-direction: column; padding: 1rem; background: #fff; }
.service-ui .list-group-item .me-auto { max-width: 100%; overflow-wrap: anywhere; }
.service-ui .document-actions { display: flex; flex-wrap: wrap; gap: .5rem; width: 100%; }
.service-ui .document-action { flex: 1; }
.service-ui .anpassung-modal-backdrop { position: fixed; inset: 0; z-index: 4000; display: flex; justify-content: center; align-items: center; padding: 1rem; background: #15202b88; }
.service-ui .anpassung-modal { display: flex; flex-direction: column; width: min(680px, 100%); max-height: calc(100dvh - 2rem); border-radius: 8px; overflow: hidden; background: #fff; }
.service-ui .anpassung-modal-header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 1rem 1.25rem; }
.service-ui .anpassung-modal-header h3 { margin: 0; font-size: 1.25rem; }
.service-ui .anpassung-modal-schliessen { flex-shrink: 0; width: 44px; padding: 0; border: 0; font-size: 1.75rem; }
.service-ui .anpassung-modal-hinweis { margin: 0; padding: 0 1.25rem 1rem; }
.service-ui .anpassung-vertraege { flex: 1; min-height: 0; overflow: auto; padding: 0 1.25rem; }
.service-ui .anpassung-vertrag { display: flex; align-items: center; gap: .75rem; padding: 1rem 0; margin: 0; border-top: 1px solid var(--ui-line); cursor: pointer; }
.service-ui .anpassung-vertrag span { min-width: 0; overflow-wrap: anywhere; }
.service-ui .anpassung-vertrag small { display: block; margin-top: .25rem; }
.service-ui .anpassung-modal-footer { display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--ui-line); }
.service-ui .anpassung-modal-laden { padding: 2rem; }
.service-ui .modal { z-index: 4000; }
.service-ui .modal-dialog { width: min(1000px, calc(100vw - 2rem)); max-width: none; height: calc(100dvh - 2rem); margin: 1rem auto; }
.service-ui .modal-content { height: 100%; border: 0; border-radius: 8px; overflow: hidden; }
.service-ui .modal-header { padding: 1rem; }
.service-ui .modal-title { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.service-ui .modal-header button { flex-shrink: 0; width: 44px; padding: 0; border: 0; }
.service-ui .modal-body { flex: 1; min-height: 0; padding: 0; }
.service-ui iframe { width: 100%; height: 100%; }
.service-ui .image-viewer { display: grid; place-items: center; height: 100%; overflow: auto; background: #f3f5f6; }
.service-ui .image-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.service-ui .public-page .section { padding: 1.25rem 0; border-bottom: 1px solid var(--ui-line); }
.service-ui .public-page .row { align-items: center; }
.service-ui .public-page img { width: auto; max-width: 130px; max-height: 70px; object-fit: contain; }
.service-ui .welcome-features { margin: 1.5rem 0; }
.service-ui .welcome-features li { padding: .75rem 0; border-bottom: 1px solid var(--ui-line); }
.service-ui .status-panel { padding: 1.25rem; border: 1px solid var(--ui-line); border-radius: 8px; background: #f8fafb; }
.service-ui .loading-container { display: flex; align-items: center; justify-content: center; min-height: 160px; gap: .75rem; }
.service-ui .spinner { width: 24px; height: 24px; border: 3px solid var(--ui-line); border-top-color: var(--ui-accent); border-radius: 50%; animation: ui-spin .8s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  article.service-ui.content { padding: 3rem 1rem calc(6rem + env(safe-area-inset-bottom)) !important; }
  .gradient-theme article.service-ui.content { min-height: 100vh; padding-top: 1.5rem !important; }
  .service-ui .form-section, .service-ui .data:not(.contract-card), .service-ui .text-container { padding: 1rem; }
  .service-ui .data.data-folder { padding: 0; }
  .service-ui .field-grid { grid-template-columns: 1fr; }
  .service-ui .button-container > button, .service-ui .upload-button, .service-ui .btn-primary { width: 100%; min-width: 0; }
  .service-ui .profile-card { gap: .75rem; }
  .service-ui .profile-card img { width: 64px; height: 64px; }
  .service-ui .profile-details a { font-size: .875rem; }
  .service-ui .img-container { width: 100%; height: 12rem; margin-right: -200px; }
  .service-ui .img-container img { width: auto; height: 12rem; margin-right: 0; }
  .service-ui .ansprechpartner { margin-top: 0; padding-top: 0 !important; }
  .service-ui .ansprechpartner { padding: 1rem !important; }
  .service-ui .ansprechpartnerName { font-size: 1.5rem; }
  .service-ui .contact-row { grid-template-columns: 1fr; gap: .15rem; }
  .service-ui .legacy-home, .service-ui .legacy-home .container { text-align: center; }
  .service-ui .contract-card { padding: 1rem; }
  .service-ui .anpassungAnfragenButton { width: 100%; }
  .service-ui .anpassung-modal-backdrop { padding: .5rem; }
  .service-ui .anpassung-modal { max-height: calc(100dvh - 1rem); }
  .service-ui .anpassung-modal-footer { flex-direction: column-reverse; }
  .service-ui .anpassung-modal-footer button { width: 100%; }
  .service-ui .public-page .col-6 { width: 100%; margin-bottom: .75rem; }
  .service-ui .modal-dialog { width: calc(100vw - 1rem); height: calc(100dvh - 1rem); margin: .5rem auto; }
}
.service-ui .notificationItem.pushHighlighted { animation:push-highlight 4s ease-out; }
@keyframes push-highlight {
  0%, 35% { background:#b9e7dc; border-color:#42917f; box-shadow:0 0 0 3px rgba(66,145,127,.22); }
  100% { background:transparent; border-color:inherit; box-shadow:none; }
}
@media (prefers-reduced-motion: reduce) { .service-ui *, .service-ui *::before, .service-ui *::after { animation:none !important; transition:none !important; } }
