/* FBM Premium Profile */

.fbmp-profile-text-scale-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

/*
 * A−/A+: Viele Profil-Styles nutzen feste px — reine font-size auf der Surface greift kaum.
 * zoom skaliert Tabs, Leerstände, Cards und Buttons proportional (wie Abo-/2FA-Tabs).
 */
#fbmp-profile-page-scale-surface.fbm-profile-text-scale-surface {
    zoom: var(--fbm-profile-text-scale, 1);
}

@supports not (zoom: 1) {
    #fbmp-profile-page-scale-surface.fbm-profile-text-scale-surface {
        font-size: calc(1rem * var(--fbm-profile-text-scale, 1));
    }

    #fbmp-profile-page-scale-surface .fbmp-profile-view-tab,
    #fbmp-profile-page-scale-surface .fbmp-profile-button,
    #fbmp-profile-page-scale-surface .fbmp-profile-name,
    #fbmp-profile-page-scale-surface .fbm-empty-content h3,
    #fbmp-profile-page-scale-surface .fbm-empty-content p,
    #fbmp-profile-page-scale-surface .fbmp-profile-groups-intro,
    #fbmp-profile-page-scale-surface .fbmp-profile-card h2,
    #fbmp-profile-page-scale-surface .fbmp-profile-eyebrow {
        font-size: calc(1em * var(--fbm-profile-text-scale, 1));
    }
}

.fbmp-profile-legacy-counter__hint {
    margin: 0 0 14px;
    color: #6b7280;
}

.fbmp-profile-legacy-counter__subtitle {
    margin: 0 0 10px;
    font-size: 1rem;
}

.fbmp-profile-legacy-assignment-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f9fafb;
}

.fbmp-profile-legacy-assignment-card__name {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.fbmp-profile-legacy-assignment-card__scopes {
    margin: 0 0 10px 18px;
    padding: 0;
}

.fbmp-profile-legacy-counter__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fbm-legacy-action-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fbm-legacy-action-modal[hidden] {
    display: none !important;
}

.fbm-legacy-action-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.fbm-legacy-action-modal__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
}

.fbm-legacy-action-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.fbm-legacy-action-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

html[data-theme="dark-mode"] .fbm-legacy-action-modal__panel {
    background: #1f2937;
    color: #f3f4f6;
}

html[data-theme="dark-mode"] .fbmp-profile-card,
html[data-theme="dark-mode"] .fbmp-profile-section {
    background: #1f2937;
    color: #f3f4f6;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.fbmp-profile {
    color: #1f2937;
}

.fbmp-profile,
.fbmp-profile * {
    box-sizing: border-box;
}

.fbm-profile-grid,
.fbmp-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.fbm-profile-main,
.fbmp-profile-main {
    display: grid;
    gap: 24px;
}

.fbmp-profile-card,
.fbmp-profile-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 24px;
}

.fbmp-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-bottom: 20px;
}

.fbmp-profile-avatar-wrap {
    position: relative;
    width: 112px;
    margin: 0 auto;
    flex-shrink: 0;
}

.fbmp-profile-avatar-wrap .fbmp-profile-avatar {
    margin: 0;
}

.fbmp-avatar-controls {
    position: absolute;
    right: -2px;
    bottom: -2px;
    z-index: 2;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.fbmp-avatar-controls__form {
    display: flex;
    gap: 6px;
}

.fbmp-avatar-btn {
    width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.fbmp-avatar-btn i {
    font-size: 16px;
    line-height: 1;
}

.fbmp-profile-avatar {
    flex-shrink: 0;
    margin: 0 auto;
}

.fbmp-profile-avatar img,
.fbmp-profile-avatar .avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.fbmp-profile-name {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
    color: #111827;
    font-weight: 600;
    max-width: 100%;
}

.fbmp-profile-name-link {
    color: inherit;
    text-decoration: none;
}

.fbmp-profile-name-link:hover,
.fbmp-profile-name-link:focus {
    color: inherit;
    text-decoration: none;
}

.fbmp-profile-role {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.fbmp-profile-last-activity {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
}

.fbmp-profile-action {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.fbmp-profile-action .fbmp-profile-button {
    width: 100%;
    max-width: 280px;
}

/*
 * Ursache: Im Child-Theme färbt #primary a alle Links mit var(--ink-user-accent) ein – gleiche Farbe wie
 * der Primärbutton-Hintergrund → „unsichtbare“ Schrift. Im Child ist .fbmp-profile-button von dieser Regel
 * ausgenommen; hier zusätzlich On-Akzent für alle Profil-Primär-Links.
 */
#primary.page-content-area .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary),
#primary.content-area .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary),
.fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary) {
    color: var(--ink-user-on-accent, #ffffff) !important;
}

.fbmp-profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--fbm-ui-btn-radius, 8px);
    background: var(--ink-user-accent, #2563eb);
    color: var(--ink-user-on-accent, #ffffff);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    box-sizing: border-box;
}

.fbmp-profile-button:hover,
.fbmp-profile-button:focus {
    color: var(--ink-user-on-accent, #ffffff);
    background: var(--ink-user-accent-hover, #1d4ed8);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
}

.fbmp-profile-button-secondary {
    background: #f3f4f6;
    color: #111827;
}

.fbmp-profile-button-secondary:hover,
.fbmp-profile-button-secondary:focus {
    color: #111827;
    background: #e5e7eb;
    box-shadow: none;
}

.fbmp-profile-section h2,
.fbmp-profile-card h2 {
    margin: 0 0 18px;
    font-size: 1.125rem;
    color: #111827;
}

.fbmp-profile-card-identity > .fbmp-profile-header {
    margin-bottom: 0;
}

.fbmp-profile-card-identity .fbmp-profile-last-activity {
    margin-top: 12px;
    margin-bottom: 10px;
}

.fbmp-profile-card-identity .fbmp-profile-header + .fbmp-profile-action {
    margin-top: 20px;
}

.fbmp-profile-card-identity .fbmp-profile-last-activity + .fbmp-profile-action {
    margin-top: 14px;
}

.fbmp-profile-list {
    display: grid;
    gap: 16px;
}

.fbmp-profile-list-item {
    display: grid;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.fbmp-profile-list-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.fbmp-profile-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fbmp-profile-value {
    color: #111827;
    line-height: 1.6;
    white-space: pre-line;
}

.fbmp-profile-groups-list {
    display: grid;
    gap: 12px;
}

.fbmp-profile-group-item {
    padding: 16px 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.fbmp-profile-group-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #111827;
}

.fbmp-profile-group-item p {
    margin: 0;
    color: #6b7280;
}

.fbmp-profile-message {
    max-width: 720px;
}

.fbmp-profile-message .fbmp-profile-card {
    margin: 0 auto;
}

.fbmp-profile-banner {
    position: relative;
    z-index: 0;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 851 / 315;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(120deg, var(--ink-user-accent-hover, #1d4ed8) 0%, var(--ink-user-accent, #2563eb) 100%);
    background-size: cover;
    background-position: center;
}

.fbmp-profile-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 100%);
}

.fbmp-profile-banner__content {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 2;
}

.fbmp-profile-banner__form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fbmp-profile-banner__form .fbmp-profile-button {
    min-height: 38px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}

.fbmp-profile-banner__form .fbmp-profile-button:hover,
.fbmp-profile-banner__form .fbmp-profile-button:focus {
    background: #ffffff;
    color: #0f172a;
}

.fbmp-title-image-controls {
    position: absolute;
    right: 18px;
    bottom: 18px;
    top: auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: min(620px, calc(100% - 36px));
}

.fbmp-title-image-controls__form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fbmp-title-image-controls .fbmp-profile-button {
    min-height: 40px;
    width: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}

.fbmp-title-image-controls .fbmp-profile-button:hover,
.fbmp-title-image-controls .fbmp-profile-button:focus {
    background: #ffffff;
    color: #0f172a;
}

.fbmp-title-image-btn i {
    font-size: 18px;
    line-height: 1;
}

/* Kontakt teilen: Button + Modal */
.fbmp-profile-share-contact {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fbmp-profile-share-teaser {
    margin: 0 0 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7280;
    max-width: 280px;
}

.fbmp-profile-share-contact #fbmp-share-qr-open {
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

/* Modal — über Mobile-Footer-Nav (.fbm-mfn-host: 99990) */
.fbmp-share-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 100085;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.2s ease;
}

.fbmp-share-qr-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.fbmp-share-qr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.fbmp-share-qr-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    max-height: min(90vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.fbmp-share-qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

.fbmp-share-qr-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
}

/* Schließen-X: Layout über .fbm-ui-modal-close (fbm-ui-modal.css) */
.fbmp-share-qr-modal-header .fbmp-share-qr-modal-close-icon {
    flex-shrink: 0;
}

.fbmp-share-qr-modal-footer .fbmp-share-qr-modal-close,
.fbmp-share-qr-modal-footer .fbm-ui-modal-close-btn {
    width: 100%;
    max-width: 280px;
}

.fbmp-share-qr-modal-body {
    padding: 20px 18px 16px;
    text-align: center;
}

.fbmp-share-qr-frame {
    position: relative;
    display: inline-block;
    margin: 0 auto 16px;
    line-height: 0;
}

.fbmp-share-qr-target {
    display: inline-block;
}

.fbmp-share-qr-target img,
.fbmp-share-qr-target table {
    display: block;
    margin: 0 auto;
}

.fbmp-share-qr-logo-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 4px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08);
    line-height: 0;
}

.fbmp-share-qr-logo {
    display: block;
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.fbmp-share-qr-modal-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4b5563;
    text-align: left;
}

.fbmp-share-qr-modal-footer {
    padding: 12px 18px 18px;
    display: flex;
    justify-content: center;
}

body.fbmp-share-qr-modal-open {
    overflow: hidden;
}

/* Titelbild / Profilbild: Zuschnitt-Dialoge */
.fbmp-banner-crop-modal,
.fbmp-avatar-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fbmp-banner-crop-modal[hidden],
.fbmp-avatar-crop-modal[hidden] {
    display: none !important;
}

.fbmp-banner-crop-modal.is-open,
.fbmp-avatar-crop-modal.is-open {
    display: flex !important;
    visibility: visible;
    opacity: 1;
}

.fbmp-banner-crop-modal__backdrop,
.fbmp-avatar-crop-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
}

.fbmp-banner-crop-modal__panel,
.fbmp-avatar-crop-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(960px, 100%);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.fbmp-avatar-crop-modal__panel {
    max-width: min(440px, 100%);
}

.fbmp-banner-crop-modal__header,
.fbmp-avatar-crop-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
}

.fbmp-banner-crop-modal__header h3,
.fbmp-avatar-crop-modal__header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
}

.fbmp-banner-crop-modal__close,
.fbmp-avatar-crop-modal__close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 8px;
}

.fbmp-banner-crop-modal__close:hover,
.fbmp-banner-crop-modal__close:focus,
.fbmp-avatar-crop-modal__close:hover,
.fbmp-avatar-crop-modal__close:focus {
    color: #0f172a;
    background: #f1f5f9;
}

.fbmp-banner-crop-modal__hint,
.fbmp-avatar-crop-modal__hint {
    margin: 0;
    padding: 10px 18px 0;
    font-size: 0.9rem;
    color: #64748b;
    flex-shrink: 0;
}

.fbmp-banner-crop-modal__stage,
.fbmp-avatar-crop-modal__stage {
    flex: 1;
    min-height: 200px;
    max-height: min(58vh, 520px);
    margin: 12px 18px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
}

.fbmp-avatar-crop-modal__stage {
    max-height: min(48vh, 340px);
}

.fbmp-banner-crop-modal__stage img,
.fbmp-avatar-crop-modal__stage img {
    display: block;
    max-width: 100%;
}

.fbmp-banner-crop-modal__stage .cropper-container,
.fbmp-banner-crop-modal__stage .cropper-wrap-box,
.fbmp-avatar-crop-modal__stage .cropper-container,
.fbmp-avatar-crop-modal__stage .cropper-wrap-box {
    max-height: min(58vh, 520px);
}

.fbmp-avatar-crop-modal__stage .cropper-container,
.fbmp-avatar-crop-modal__stage .cropper-wrap-box {
    max-height: min(48vh, 340px);
}

.fbmp-banner-crop-modal__footer,
.fbmp-avatar-crop-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid #eef2f7;
    flex-shrink: 0;
}

body.fbmp-banner-crop-modal-open,
body.fbmp-avatar-crop-modal-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .fbmp-title-image-controls {
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-width: none;
        align-items: stretch;
    }

    .fbmp-title-image-controls__form {
        justify-content: stretch;
    }

    .fbmp-title-image-controls .fbmp-profile-button {
        width: 40px;
    }

    .fbm-profile-grid,
    .fbmp-profile-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * Dark Mode – an Cirkle _dark_mode.scss angeglichen:
 * Flächen #242526, Ränder #3e3e3e, Fließtext #b0b3b8, Titel #e4e6eb, Primär #2962ff.
 * Theme setzt [data-theme="dark-mode"] button { background #2c2c2c } → echte <button>
 * wichen von <a class="fbmp-profile-button"> ab; deshalb Primär/ Sekundär explizit mit !important.
 */
[data-theme="dark-mode"] .fbmp-profile,
[data-theme=dark-mode] .fbmp-profile {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-card,
[data-theme="dark-mode"] .fbmp-profile-section,
[data-theme=dark-mode] .fbmp-profile-card,
[data-theme=dark-mode] .fbmp-profile-section {
    background: #242526 !important;
    box-shadow: none;
    border: 1px solid #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-name,
[data-theme="dark-mode"] .fbmp-profile-section h2,
[data-theme="dark-mode"] .fbmp-profile-card h2,
[data-theme="dark-mode"] .fbmp-profile-value,
[data-theme="dark-mode"] .fbmp-profile-group-item h3,
[data-theme=dark-mode] .fbmp-profile-name,
[data-theme=dark-mode] .fbmp-profile-section h2,
[data-theme=dark-mode] .fbmp-profile-card h2,
[data-theme=dark-mode] .fbmp-profile-value,
[data-theme=dark-mode] .fbmp-profile-group-item h3 {
    color: #e4e6eb !important;
}

[data-theme="dark-mode"] .fbmp-profile-role,
[data-theme="dark-mode"] .fbmp-profile-label,
[data-theme="dark-mode"] .fbmp-profile-group-item p,
[data-theme="dark-mode"] .fbmp-profile-share-teaser,
[data-theme=dark-mode] .fbmp-profile-role,
[data-theme=dark-mode] .fbmp-profile-label,
[data-theme=dark-mode] .fbmp-profile-group-item p,
[data-theme=dark-mode] .fbmp-profile-share-teaser {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-last-activity,
[data-theme=dark-mode] .fbmp-profile-last-activity {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-list-item,
[data-theme=dark-mode] .fbmp-profile-list-item {
    border-top-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-group-item,
[data-theme=dark-mode] .fbmp-profile-group-item {
    background: #242526 !important;
    border-color: #3e3e3e;
}

/* Primär: Link und Button gleich (Theme überschreibt native button); semantische fbm-btn--* ausnehmen */
[data-theme="dark-mode"] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel),
[data-theme="dark-mode"] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close),
[data-theme=dark-mode] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel),
[data-theme=dark-mode] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close) {
    background-color: var(--ink-user-accent, #2962ff) !important;
    color: var(--ink-user-on-accent, #fff) !important;
    border: none !important;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

[data-theme="dark-mode"] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):hover,
[data-theme="dark-mode"] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):focus,
[data-theme="dark-mode"] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close):hover,
[data-theme="dark-mode"] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close):focus,
[data-theme=dark-mode] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):hover,
[data-theme=dark-mode] .fbmp-profile a.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):focus,
[data-theme=dark-mode] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close):hover,
[data-theme=dark-mode] .fbmp-profile button.fbmp-profile-button:not(.fbmp-profile-button-secondary):not(.fbmp-share-qr-modal-close-icon):not(.fbm-btn--back):not(.fbm-btn--success):not(.fbm-btn--cancel):not(.fbmp-share-qr-modal-close):focus {
    background-color: var(--ink-user-accent-hover, #1e53e5) !important;
    color: var(--ink-user-on-accent, #fff) !important;
}

/* Sekundär wie Theme-Buttons #2c2c2c */
[data-theme="dark-mode"] .fbmp-profile .fbmp-profile-button-secondary,
[data-theme=dark-mode] .fbmp-profile .fbmp-profile-button-secondary {
    background-color: #2c2c2c !important;
    color: #e4e6eb !important;
    border: 1px solid #3e3e3e !important;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

[data-theme="dark-mode"] .fbmp-profile .fbmp-profile-button-secondary:hover,
[data-theme="dark-mode"] .fbmp-profile .fbmp-profile-button-secondary:focus,
[data-theme=dark-mode] .fbmp-profile .fbmp-profile-button-secondary:hover,
[data-theme=dark-mode] .fbmp-profile .fbmp-profile-button-secondary:focus {
    background-color: #3a3a3a !important;
    color: #fff !important;
}

[data-theme="dark-mode"] .fbmp-title-image-controls .fbmp-profile-button,
[data-theme="dark-mode"] .fbmp-avatar-btn.fbmp-profile-button-secondary,
[data-theme=dark-mode] .fbmp-title-image-controls .fbmp-profile-button,
[data-theme=dark-mode] .fbmp-avatar-btn.fbmp-profile-button-secondary {
    background-color: #2c2c2c !important;
    color: #e4e6eb !important;
    border: 1px solid #3e3e3e !important;
}

[data-theme="dark-mode"] .fbmp-title-image-controls .fbmp-profile-button:hover,
[data-theme="dark-mode"] .fbmp-title-image-controls .fbmp-profile-button:focus,
[data-theme="dark-mode"] .fbmp-avatar-btn.fbmp-profile-button-secondary:hover,
[data-theme="dark-mode"] .fbmp-avatar-btn.fbmp-profile-button-secondary:focus,
[data-theme=dark-mode] .fbmp-title-image-controls .fbmp-profile-button:hover,
[data-theme=dark-mode] .fbmp-title-image-controls .fbmp-profile-button:focus,
[data-theme=dark-mode] .fbmp-avatar-btn.fbmp-profile-button-secondary:hover,
[data-theme=dark-mode] .fbmp-avatar-btn.fbmp-profile-button-secondary:focus {
    background-color: #3a3a3a !important;
    color: #fff !important;
}

/* QR-Modal: Schließen-Icon — Layout/Farbe über .fbm-ui-modal-close */
[data-theme="dark-mode"] .fbmp-share-qr-modal-panel,
[data-theme=dark-mode] .fbmp-share-qr-modal-panel {
    background: #242526 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    border: 1px solid #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-share-qr-modal-header,
[data-theme=dark-mode] .fbmp-share-qr-modal-header {
    border-bottom-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-share-qr-modal-header h3,
[data-theme=dark-mode] .fbmp-share-qr-modal-header h3 {
    color: #e4e6eb !important;
}

[data-theme="dark-mode"] .fbmp-share-qr-modal-text,
[data-theme=dark-mode] .fbmp-share-qr-modal-text {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-share-qr-logo-wrap,
[data-theme=dark-mode] .fbmp-share-qr-logo-wrap {
    background: #161717;
    box-shadow: 0 0 0 1px #3e3e3e, 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* QR im dunklen Modal: weißer „Rahmen“ (Quiet Zone) mit abgerundeten Ecken – bessere Lesbarkeit */
[data-theme="dark-mode"] .fbmp-share-qr-frame,
[data-theme=dark-mode] .fbmp-share-qr-frame {
    background: #ffffff;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 4px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark-mode"] .fbmp-share-qr-target,
[data-theme=dark-mode] .fbmp-share-qr-target {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

[data-theme="dark-mode"] .fbmp-share-qr-target table,
[data-theme=dark-mode] .fbmp-share-qr-target table {
    background: #ffffff !important;
}

[data-theme="dark-mode"] .fbmp-share-qr-target canvas,
[data-theme=dark-mode] .fbmp-share-qr-target canvas,
[data-theme="dark-mode"] .fbmp-share-qr-target img,
[data-theme=dark-mode] .fbmp-share-qr-target img {
    display: block;
    background: #ffffff;
    border-radius: 6px;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__panel,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__panel,
[data-theme=dark-mode] .fbmp-banner-crop-modal__panel,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__panel {
    background: #242526 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    border: 1px solid #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__header,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__header,
[data-theme="dark-mode"] .fbmp-banner-crop-modal__footer,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__footer,
[data-theme=dark-mode] .fbmp-banner-crop-modal__header,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__header,
[data-theme=dark-mode] .fbmp-banner-crop-modal__footer,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__footer {
    border-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__header h3,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__header h3,
[data-theme=dark-mode] .fbmp-banner-crop-modal__header h3,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__header h3 {
    color: #e4e6eb !important;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__hint,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__hint,
[data-theme=dark-mode] .fbmp-banner-crop-modal__hint,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__hint {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__close,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__close,
[data-theme=dark-mode] .fbmp-banner-crop-modal__close,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__close {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-banner-crop-modal__close:hover,
[data-theme="dark-mode"] .fbmp-banner-crop-modal__close:focus,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__close:hover,
[data-theme="dark-mode"] .fbmp-avatar-crop-modal__close:focus,
[data-theme=dark-mode] .fbmp-banner-crop-modal__close:hover,
[data-theme=dark-mode] .fbmp-banner-crop-modal__close:focus,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__close:hover,
[data-theme=dark-mode] .fbmp-avatar-crop-modal__close:focus {
    color: #e4e6eb;
    background: #2c2c2c;
}

.fbmp-profile-wizard {
    display: grid;
    gap: 14px;
}

.fbmp-profile-progress {
    background: #ffffff;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    padding: 16px;
}

.fbmp-profile-progress__meta {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.fbmp-profile-progress__meta strong {
    color: var(--ink-user-accent, #7c3aed);
}

.fbmp-profile-progress__bar {
    background: #eef2f7;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.fbmp-profile-progress__bar span {
    background: var(--ink-user-accent, #7c3aed);
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width .2s ease;
}

.fbmp-profile-step-picker {
    display: none;
    margin: 0 0 16px;
}

.fbmp-profile-step-picker__label {
    color: #334155;
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.fbmp-profile-step-select {
    max-width: 100%;
    min-height: 44px;
    width: 100%;
}

.fbmp-profile-step-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.fbmp-profile-step-tab {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dce3ed;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.fbmp-profile-step-tab:hover,
.fbmp-profile-step-tab:focus {
    border-color: var(--ink-user-accent, #7c3aed);
    outline: none;
    transform: translateY(-1px);
}

.fbmp-profile-step-tab span {
    align-items: center;
    background: #edf2f7;
    border-radius: 999px;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.fbmp-profile-step-tab.is-active {
    background: var(--ink-user-accent, #7c3aed);
    border-color: var(--ink-user-accent, #7c3aed);
    color: #ffffff;
}

.fbmp-profile-step-tab.is-active span {
    background: rgba(255,255,255,.2);
    color: #ffffff;
}

.fbmp-profile-step {
    background: #ffffff;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .05);
    display: none;
    padding: 22px;
}

.fbmp-profile-step.is-active {
    display: block;
}

.fbmp-profile-step__header {
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.fbmp-profile-step__eyebrow {
    color: var(--ink-user-accent, #7c3aed);
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.fbmp-profile-step__header h3 {
    font-size: 20px;
    line-height: 1.25;
    margin: 0;
}

.fbmp-profile-question {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px;
}

.fbmp-profile-question .fbm-settings-field-label {
    color: #1f2937;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

.fbmp-profile-question textarea.fbm-settings-field-input {
    min-height: 120px;
}

.fbmp-profile-wizard-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 4px;
}

.fbmp-profile-wizard-actions .fbm-btn,
.fbmp-profile-save-actions .fbm-btn {
    min-width: 160px;
    width: auto;
}

.fbmp-profile-save-actions {
    align-items: center;
    border-top: 1px solid #e5e7eb;
    display: flex !important;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 18px;
}

@media (max-width: 768px) {
    .fbmp-profile-step-tabs {
        display: none;
    }

    .fbmp-profile-step-picker {
        display: block;
    }

    .fbmp-profile-step {
        padding: 14px;
    }

    .fbmp-profile-wizard-actions,
    .fbmp-profile-save-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .fbmp-profile-wizard-actions .fbm-btn,
    .fbmp-profile-save-actions .fbm-btn {
        min-width: 0;
        width: 100%;
    }
}

.fbmp-assist-checkbox-group,
.fbmp-assist-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 8px;
}

.fbmp-assist-check,
.fbmp-assist-radio {
    align-items: center;
    display: inline-flex;
    font-family: var(--ink-font, inherit) !important;
    gap: 8px;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.fbmp-assist-field--checkbox_group .fbm-settings-field-label,
.fbmp-assist-field--weekdays .fbm-settings-field-label,
.fbmp-assist-field--radio .fbm-settings-field-label {
    display: block;
    margin-bottom: 4px;
}

.fbmp-assist-field--directory-publish.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Profil-Wizard (Profildaten-Tab) — Dark Mode */
[data-theme="dark-mode"] .fbmp-profile-progress,
[data-theme=dark-mode] .fbmp-profile-progress {
    background: #242526;
    border-color: #3e3e3e;
    box-shadow: none;
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-progress__meta span,
[data-theme=dark-mode] .fbmp-profile-progress__meta span {
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-progress__bar,
[data-theme=dark-mode] .fbmp-profile-progress__bar {
    background: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-step-picker__label,
[data-theme=dark-mode] .fbmp-profile-step-picker__label {
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-step-tab,
[data-theme=dark-mode] .fbmp-profile-step-tab {
    background: #242526;
    border-color: #3e3e3e;
    color: #b0b3b8;
}

[data-theme="dark-mode"] .fbmp-profile-step-tab span,
[data-theme=dark-mode] .fbmp-profile-step-tab span {
    background: #3e3e3e;
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-step-tab:hover,
[data-theme="dark-mode"] .fbmp-profile-step-tab:focus,
[data-theme=dark-mode] .fbmp-profile-step-tab:hover,
[data-theme=dark-mode] .fbmp-profile-step-tab:focus {
    background: #2c2c2c;
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-step-tab.is-active,
[data-theme=dark-mode] .fbmp-profile-step-tab.is-active {
    background: var(--ink-user-accent, #7c3aed);
    border-color: var(--ink-user-accent, #7c3aed);
    color: #ffffff;
}

[data-theme="dark-mode"] .fbmp-profile-step,
[data-theme=dark-mode] .fbmp-profile-step {
    background: #242526;
    border-color: #3e3e3e;
    box-shadow: none;
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-step__header,
[data-theme=dark-mode] .fbmp-profile-step__header {
    border-bottom-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-step__header h3,
[data-theme=dark-mode] .fbmp-profile-step__header h3 {
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-question,
[data-theme=dark-mode] .fbmp-profile-question {
    background: #1c1e21;
    border-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-question .fbm-settings-field-label,
[data-theme=dark-mode] .fbmp-profile-question .fbm-settings-field-label {
    color: #e4e6eb;
}

[data-theme="dark-mode"] .fbmp-profile-save-actions,
[data-theme=dark-mode] .fbmp-profile-save-actions {
    border-top-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-assist-check span,
[data-theme="dark-mode"] .fbmp-assist-radio span,
[data-theme=dark-mode] .fbmp-assist-check span,
[data-theme=dark-mode] .fbmp-assist-radio span {
    color: #e4e6eb;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light-mode"]) .fbmp-profile-progress {
        background: #242526;
        border-color: #3e3e3e;
        box-shadow: none;
        color: #b0b3b8;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-progress__bar {
        background: #3e3e3e;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step-picker__label {
        color: #e4e6eb;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step-tab {
        background: #242526;
        border-color: #3e3e3e;
        color: #b0b3b8;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step-tab span {
        background: #3e3e3e;
        color: #e4e6eb;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step {
        background: #242526;
        border-color: #3e3e3e;
        box-shadow: none;
        color: #e4e6eb;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step__header {
        border-bottom-color: #3e3e3e;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-step__header h3 {
        color: #e4e6eb;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-question {
        background: #1c1e21;
        border-color: #3e3e3e;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-question .fbm-settings-field-label {
        color: #e4e6eb;
    }

    html:not([data-theme="light-mode"]) .fbmp-profile-save-actions {
        border-top-color: #3e3e3e;
    }

    html:not([data-theme="light-mode"]) .fbmp-assist-check span,
    html:not([data-theme="light-mode"]) .fbmp-assist-radio span {
        color: #e4e6eb;
    }
}

/* Universal profile redesign: compact identity, dual modes and matching. */
.fbmp-profile-banner {
    aspect-ratio: 851 / 315;
    height: auto;
    min-height: 0;
    margin-bottom: 0;
}

.fbmp-profile-grid {
    position: relative;
    z-index: 3;
    margin-top: 24px;
}

.fbmp-profile-sidebar {
    position: sticky;
    top: 88px;
}

.fbmp-profile-card-identity {
    border: 1px solid #e7ebf0;
}

.fbmp-profile-mode-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.fbmp-profile-mode-chip,
.fbmp-profile-publish-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.fbmp-profile-mode-chip--offer {
    color: #075f45;
    background: #dff7ec;
}

.fbmp-profile-mode-chip--seek {
    color: #6b287c;
    background: #f4e5f7;
}

.fbmp-profile-completion {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.fbmp-profile-completion__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 0.86rem;
}

.fbmp-profile-completion__head strong {
    color: #111827;
}

.fbmp-profile-completion__track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf3;
}

.fbmp-profile-completion__track span {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ink-user-accent, #e8174f), var(--ink-user-accent-hover, #b80f3c));
}

.fbmp-profile-main {
    gap: 20px;
}

.fbmp-profile-eyebrow {
    margin: 0 0 6px;
    color: var(--ink-user-accent, #d9164d);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fbmp-profile-about h2,
.fbmp-profile-section-head h2,
.fbmp-profile-match h2 {
    margin-bottom: 0;
}

.fbmp-profile-about__text > :first-child,
.fbmp-profile-empty > :first-child {
    margin-top: 0;
}

.fbmp-profile-about__text > :last-child,
.fbmp-profile-empty > :last-child {
    margin-bottom: 0;
}

.fbmp-profile-mode-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.fbmp-profile-mode-grid.has-two-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fbmp-profile-assistenz--offer,
.fbmp-profile-assistenz--seek {
    /* Einheitliche Cards wie Persönlich/Gruppen — keine abweichenden Akzent-Ränder */
    border-top: 0;
}

.fbmp-profile-view-tabs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 0 0 16px;
    width: 100%;
    max-width: 100%;
}

.fbmp-profile-view-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fbmp-profile-view-tab i {
    font-size: 16px;
    line-height: 1;
}

.fbmp-profile-view-tab:hover,
.fbmp-profile-view-tab:focus {
    border-color: var(--ink-user-accent, #2563eb);
    color: var(--ink-user-accent, #2563eb);
    text-decoration: none;
}

.fbmp-profile-view-tab.is-active {
    background: var(--ink-user-accent, #2563eb);
    border-color: var(--ink-user-accent, #2563eb);
    color: var(--ink-user-on-accent, #fff);
}

/*
 * Theme färbt #primary a mit Akzentfarbe → aktiver Tab sonst unsichtbar (blau auf blau).
 */
#primary.page-content-area .fbmp-profile a.fbmp-profile-view-tab.is-active,
#primary.content-area .fbmp-profile a.fbmp-profile-view-tab.is-active,
.fbmp-profile a.fbmp-profile-view-tab.is-active,
.fbmp-profile a.fbmp-profile-view-tab.is-active:visited,
.fbmp-profile a.fbmp-profile-view-tab.is-active:hover,
.fbmp-profile a.fbmp-profile-view-tab.is-active:focus {
    color: var(--ink-user-on-accent, #fff) !important;
    -webkit-text-fill-color: var(--ink-user-on-accent, #fff) !important;
    background: var(--ink-user-accent, #2563eb) !important;
    border-color: var(--ink-user-accent, #2563eb) !important;
    text-decoration: none;
}

#primary.page-content-area .fbmp-profile a.fbmp-profile-view-tab:not(.is-active),
#primary.content-area .fbmp-profile a.fbmp-profile-view-tab:not(.is-active),
.fbmp-profile a.fbmp-profile-view-tab:not(.is-active) {
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
}

#primary.page-content-area .fbmp-profile a.fbmp-profile-view-tab:not(.is-active):hover,
#primary.content-area .fbmp-profile a.fbmp-profile-view-tab:not(.is-active):hover,
.fbmp-profile a.fbmp-profile-view-tab:not(.is-active):hover {
    color: var(--ink-user-accent, #2563eb) !important;
    -webkit-text-fill-color: var(--ink-user-accent, #2563eb) !important;
}

html[data-theme="dark-mode"] .fbmp-profile-view-tab {
    background: #242526;
    border-color: #3e3e3e;
    color: #e4e6eb;
}

html[data-theme="dark-mode"] .fbmp-profile a.fbmp-profile-view-tab:not(.is-active) {
    color: #e4e6eb !important;
    -webkit-text-fill-color: #e4e6eb !important;
}

html[data-theme="dark-mode"] .fbmp-profile-view-tab.is-active,
html[data-theme="dark-mode"] .fbmp-profile a.fbmp-profile-view-tab.is-active {
    background: var(--ink-user-accent, #3b82f6) !important;
    border-color: var(--ink-user-accent, #3b82f6) !important;
    color: var(--ink-user-on-accent, #fff) !important;
    -webkit-text-fill-color: var(--ink-user-on-accent, #fff) !important;
}

@media (min-width: 900px) {
    .fbmp-profile-view-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .fbmp-profile-view-tab {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }
}

.fbmp-profile-hub-panel {
    width: 100%;
    min-width: 0;
}

.fbmp-profile-hub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.fbmp-profile-hub-actions .fbmp-profile-button {
    gap: 8px;
}

.fbmp-profile-hub-panel .fbm-contacts-list-container {
    margin-top: 0;
}

/* Profil-Hub: Org-/Gruppen-Cards volle Breite (kein 2–3-Spalten-Raster / Skeleton) */
.fbmp-profile-hub-panel .fbm-groups-grid,
.fbmp-profile-hub-panel .fbm-contacts-grid,
.fbmp-profile-hub-panel .fbm-contacts-skeleton {
    grid-template-columns: 1fr !important;
}

.fbmp-profile-hub-panel .fbm-groups-grid .fbm-group-card,
.fbmp-profile-hub-panel .fbm-contacts-grid .fbm-group-card,
.fbmp-profile-hub-panel .fbm-contacts-skeleton-card {
    width: 100%;
    max-width: 100%;
}

/* Create-Cards in der Liste bleiben sichtbar (zusätzlich zu Hub-Aktionen oben) */
.fbmp-profile-hub-panel .fbm-group-card-new {
    display: block;
}

.fbmp-profile-hub-actions-hint {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.fbmp-profile-hub-panel .fbm-group-card-title-link {
    color: inherit;
    text-decoration: none;
}

.fbmp-profile-hub-panel .fbm-group-card-title-link:hover,
.fbmp-profile-hub-panel .fbm-group-card-title-link:focus {
    color: var(--ink-user-accent, #2563eb);
    text-decoration: underline;
}

.fbmp-profile-groups-intro {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.fbmp-profile-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.fbmp-profile-publish-state.is-public {
    color: #075f45;
    background: #dff7ec;
}

.fbmp-profile-publish-state.is-hidden {
    color: #6b7280;
    background: #eef1f5;
}

.fbmp-profile-list--details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fbmp-profile-list--details .fbmp-profile-list-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid #edf0f4;
    border-radius: 12px;
    background: #fafbfd;
}

.fbmp-profile-list--details .fbmp-profile-list-item.is-multiline {
    grid-column: 1 / -1;
}

.fbmp-profile-list--details .fbmp-profile-value {
    overflow-wrap: anywhere;
}

.fbmp-profile-section-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.fbmp-profile-inline-link {
    color: var(--ink-user-accent, #d9164d);
    font-weight: 700;
    text-decoration: none;
}

.fbmp-profile-inline-link:hover,
.fbmp-profile-inline-link:focus {
    text-decoration: underline;
}

.fbmp-profile-empty {
    padding: 18px;
    border: 1px dashed #cfd6df;
    border-radius: 12px;
    color: #5b6472;
    background: #fafbfd;
}

/* Leerstand — Kontakt-Stil (.fbm-empty-tab / .fbm-empty-content) */
.fbmp-profile .fbm-empty-tab.show,
.fbmp-profile .fbmp-profile-empty-panel {
    display: block;
    text-align: center;
    padding: 60px 18px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 0 0 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.fbmp-profile .fbm-empty-content {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.fbmp-profile .fbm-empty-content i {
    font-size: 48px;
    color: #6c757d;
    margin: 0 auto 20px auto;
    display: block;
    text-align: center;
    width: 48px;
    height: 48px;
    line-height: 48px;
}

.fbmp-profile .fbm-empty-content h3 {
    color: #495057;
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
}

.fbmp-profile .fbm-empty-content p {
    color: #6c757d;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
}

.fbmp-profile .fbm-empty-content .fbmp-profile-empty-cta,
.fbmp-profile .fbm-empty-content .fbmp-profile-button {
    margin-left: auto;
    margin-right: auto;
    min-width: 200px;
    max-width: 100%;
}

html[data-theme="dark-mode"] .fbmp-profile .fbm-empty-tab.show,
html[data-theme="dark-mode"] .fbmp-profile .fbmp-profile-empty-panel {
    background: #242526;
    border-color: #3e3e3e;
    box-shadow: none;
}

html[data-theme="dark-mode"] .fbmp-profile .fbm-empty-content h3 {
    color: #e4e6eb;
}

html[data-theme="dark-mode"] .fbmp-profile .fbm-empty-content p,
html[data-theme="dark-mode"] .fbmp-profile .fbm-empty-content i {
    color: #b0b3b8;
}

.fbmp-profile-match {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    border: 1px solid #dfe7ef;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.fbmp-profile-match__score {
    position: relative;
    display: grid;
    width: 104px;
    height: 104px;
    place-content: center;
    border-radius: 50%;
    text-align: center;
    background: conic-gradient(var(--ink-user-accent, #d9164d) calc(var(--fbmp-match-score) * 1%), #e7ecf2 0);
}

.fbmp-profile-match__score::before {
    position: absolute;
    inset: 8px;
    content: '';
    border-radius: inherit;
    background: #ffffff;
}

.fbmp-profile-match__score strong,
.fbmp-profile-match__score span {
    position: relative;
    z-index: 1;
}

.fbmp-profile-match__score strong {
    color: #111827;
    font-size: 1.45rem;
}

.fbmp-profile-match__score span {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fbmp-profile-match__reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.fbmp-profile-match__reasons li {
    color: #176b52;
    font-size: 0.9rem;
    font-weight: 600;
}

.fbmp-profile-match__privacy {
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 0.78rem;
}

.fbmp-profile-groups-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .fbmp-profile-mode-grid.has-two-modes {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 991px) {
    .fbmp-profile-grid {
        margin-top: 20px;
    }

    .fbmp-profile-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .fbmp-profile-banner {
        aspect-ratio: 851 / 315;
        height: auto;
        min-height: 0;
        border-radius: 12px;
    }

    .fbmp-profile-grid {
        margin-top: 16px;
        gap: 16px;
    }

    .fbmp-profile-card,
    .fbmp-profile-section {
        padding: 18px;
        border-radius: 13px;
    }

    .fbmp-profile-list--details,
    .fbmp-profile-groups-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .fbmp-profile-match {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .fbmp-profile-match__reasons {
        justify-content: center;
    }

    .fbmp-profile-section-head {
        flex-direction: column;
    }
}

[data-theme="dark-mode"] .fbmp-profile-card-identity,
[data-theme=dark-mode] .fbmp-profile-card-identity,
[data-theme="dark-mode"] .fbmp-profile-match,
[data-theme=dark-mode] .fbmp-profile-match {
    border-color: #3e3e3e;
}

[data-theme="dark-mode"] .fbmp-profile-empty,
[data-theme=dark-mode] .fbmp-profile-empty,
[data-theme="dark-mode"] .fbmp-profile-list--details .fbmp-profile-list-item,
[data-theme=dark-mode] .fbmp-profile-list--details .fbmp-profile-list-item {
    color: #b0b3b8;
    border-color: #3e3e3e;
    background: #202122;
}

[data-theme="dark-mode"] .fbmp-profile-match,
[data-theme=dark-mode] .fbmp-profile-match {
    background: #242526 !important;
}

[data-theme="dark-mode"] .fbmp-profile-match__score::before,
[data-theme=dark-mode] .fbmp-profile-match__score::before {
    background: #242526;
}

[data-theme="dark-mode"] .fbmp-profile-match__score strong,
[data-theme=dark-mode] .fbmp-profile-match__score strong,
[data-theme="dark-mode"] .fbmp-profile-completion__head strong,
[data-theme=dark-mode] .fbmp-profile-completion__head strong {
    color: #e4e6eb;
}

