.rtkp-brandmark {
    display: block;
    object-fit: contain;
    object-position: center;
    aspect-ratio: 1 / 1;
}

.brand .rtkp-brandmark {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    flex: 0 0 56px;
}

.auth-logo.rtkp-brandmark {
    width: 112px !important;
    height: 112px !important;
    max-width: 112px !important;
    margin-inline: auto;
}

.portal-head > .rtkp-brandmark,
.form-customer-head > .rtkp-brandmark {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    flex: 0 0 60px;
}

.impersonation-bar {
    position: sticky;
    top: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--bs-warning-border-subtle, #ffe69c);
    background: var(--bs-warning-bg-subtle, #fff3cd);
    color: var(--bs-warning-text-emphasis, #664d03);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.impersonation-bar > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.impersonation-bar span {
    font-size: .875rem;
}

.impersonation-bar form {
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .impersonation-bar {
        position: relative;
        align-items: stretch;
        flex-direction: column;
        padding: 12px 16px;
    }

    .impersonation-bar .btn {
        width: 100%;
    }

    .brand .rtkp-brandmark {
        width: 48px !important;
        height: 48px !important;
        max-width: 48px !important;
        flex-basis: 48px;
    }
}

.portal-shell .brand {
    align-items: flex-start;
    gap: 14px;
}

.portal-shell .brand span {
    min-width: 0;
}

.portal-shell .brand small {
    display: block;
}

.portal-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.overview-card .card-body,
.portal-announcement-card .card-body,
.portal-announcement-highlight,
.portal-thread-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.portal-announcement-highlight,
.portal-thread-card {
    padding: 1rem;
    border-radius: var(--bs-border-radius-lg, 1rem);
    background: var(--bs-light, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
}

.portal-project-list .list-group-item.active {
    border-color: var(--bs-primary, #0d6efd);
}

.portal-progress-card {
    min-width: 140px;
    padding: .75rem 1rem;
    border-radius: .9rem;
    background: var(--bs-light, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.task-progress-inline {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.task-progress-inline progress {
    width: 130px;
    max-width: 100%;
}

@media (max-width: 1199.98px) {
    .portal-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .portal-overview-grid {
        grid-template-columns: 1fr;
    }


    .task-progress-inline {
        flex-wrap: wrap;
    }
}


.form-customer-embedded {
    width: min(1100px, 100%);
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.form-customer-embedded > h1:first-of-type {
    margin-top: 0;
}

.portal-shell .frame-content {
    min-height: calc(100vh - 73px);
}

.portal-shell .app-content-frame {
    display: block;
    width: 100%;
    min-height: calc(100vh - 73px);
    border: 0;
    background: var(--bs-tertiary-bg, #f8f9fa);
}

@media (max-width: 767.98px) {
    .form-customer-embedded {
        padding: 1rem;
    }
}

.protected-report-page.embedded-page .protected-report-shell {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem;
}

.protected-report-page.embedded-page .protected-pdf-frame {
    min-height: calc(100vh - 150px);
}

@media (max-width: 767.98px) {
    .protected-report-page.embedded-page .protected-report-shell {
        padding: 1rem;
    }
}

.portal-guide-shell {
    overflow: hidden;
}

.portal-guide-layout {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    min-height: 560px;
}

.portal-guide-nav {
    padding: 1.5rem;
    border-right: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.portal-guide-progress {
    display: block;
    width: 100%;
    height: .65rem;
}

.portal-guide-nav .list-group-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .8rem .75rem;
    border-inline: 0;
    background: transparent;
}

.portal-guide-nav .list-group-item:first-child {
    border-top: 0;
}

.portal-guide-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
}

.portal-guide-content {
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.portal-guide-content .lead {
    max-width: 780px;
}

.portal-guide-points {
    display: grid;
    gap: 1rem;
    max-width: 820px;
    margin: 0;
    padding-left: 1.25rem;
}

.portal-guide-points li {
    padding-left: .35rem;
}

.portal-guide-hint {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    max-width: 820px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-left: .3rem solid var(--bs-primary, #0d6efd);
    border-radius: var(--bs-border-radius, .375rem);
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.portal-guide-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 820px;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

@media (max-width: 991.98px) {
    .portal-guide-layout {
        grid-template-columns: 1fr;
    }

    .portal-guide-nav {
        border-right: 0;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }

    .portal-guide-nav .list-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .portal-guide-nav,
    .portal-guide-content {
        padding: 1rem;
    }

    .portal-guide-nav .list-group {
        grid-template-columns: 1fr;
    }

    .portal-guide-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-guide-actions > div,
    .portal-guide-actions .btn,
    .portal-guide-actions form {
        width: 100%;
    }
}

/* Interaktive Seitenguides */
.portal-tour-start {
    white-space: nowrap;
}

.portal-guide-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-guide-card .card-body {
    display: flex;
    flex-direction: column;
}

.portal-guide-card.is-complete {
    border-color: var(--bs-success-border-subtle, #a3cfbb);
}

.portal-guide-card .btn,
.portal-guide-card small.mt-auto {
    align-self: flex-start;
}

.rtkp-tour-root[hidden] {
    display: none !important;
}

.rtkp-tour-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: auto;
}

.rtkp-tour-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rtkp-tour-spotlight {
    position: fixed;
    min-width: 2px;
    min-height: 2px;
    border: 3px solid var(--bs-primary, #0d6efd);
    border-radius: .8rem;
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .68), 0 0 0 6px rgba(13, 110, 253, .2);
    transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
    pointer-events: none;
}

.rtkp-tour-spotlight::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(13, 110, 253, .55);
    border-radius: 1rem;
    animation: rtkp-tour-pulse 1.65s ease-out infinite;
}

.rtkp-tour-tooltip {
    position: fixed;
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 1rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, .35);
    pointer-events: auto;
    animation: rtkp-tour-tooltip-in .28s ease both;
}

.rtkp-tour-close {
    position: absolute;
    top: .65rem;
    right: .75rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
}

.rtkp-tour-close:hover,
.rtkp-tour-close:focus-visible {
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.rtkp-tour-kicker {
    margin: 0 2rem .35rem 0;
    color: var(--bs-primary, #0d6efd);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rtkp-tour-title {
    margin: 0 2rem .65rem 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.rtkp-tour-text {
    margin: 0 0 1rem;
    line-height: 1.55;
}

.rtkp-tour-progress {
    height: .35rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bs-tertiary-bg, #e9ecef);
}

.rtkp-tour-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bs-primary, #0d6efd);
    transition: width .28s ease;
}

.rtkp-tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.rtkp-tour-actions > div {
    display: flex;
    gap: .5rem;
}

.rtkp-tour-target-active {
    scroll-margin: 120px;
}

@keyframes rtkp-tour-pulse {
    0% { opacity: .9; transform: scale(.985); }
    75%, 100% { opacity: 0; transform: scale(1.035); }
}

@keyframes rtkp-tour-tooltip-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .rtkp-tour-spotlight,
    .rtkp-tour-progress span {
        transition: none;
    }

    .rtkp-tour-spotlight::after,
    .rtkp-tour-tooltip {
        animation: none;
    }
}

@media (max-width: 1199.98px) {
    .portal-guide-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .portal-guide-card-grid {
        grid-template-columns: 1fr;
    }

    .rtkp-tour-tooltip {
        left: 12px !important;
        right: 12px;
        bottom: 12px;
        top: auto !important;
        width: auto;
        max-height: min(52vh, 460px);
    }

    .rtkp-tour-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .rtkp-tour-actions > div,
    .rtkp-tour-actions .btn {
        width: 100%;
    }
}

/* RT-Kundenportal 5.1.0-alpha.7 – barrierearme Seitenguides */
.rtkp-tour-tooltip{
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}
.rtkp-tour-close{
    width:2.75rem;
    height:2.75rem;
    min-height:2.75rem;
}
.rtkp-tour-actions .btn{
    min-height:2.75rem;
}
.rtkp-tour-target-active{
    scroll-margin-block:clamp(88px,14vh,150px);
}
.rtkp-tour-tooltip:focus-visible{
    outline:3px solid var(--bs-primary,#0d6efd);
    outline-offset:3px;
}

@media(max-width:767.98px){
    .rtkp-tour-tooltip{
        left:max(10px,env(safe-area-inset-left))!important;
        right:max(10px,env(safe-area-inset-right));
        bottom:max(10px,env(safe-area-inset-bottom));
        width:auto;
        max-height:min(56dvh,480px);
        padding:1.1rem;
        border-radius:1rem;
    }
    .rtkp-tour-actions>div{
        display:grid;
        grid-template-columns:1fr 1fr;
    }
    .rtkp-tour-actions .btn{
        min-height:46px;
    }
    .rtkp-tour-spotlight{
        border-width:2px;
        box-shadow:0 0 0 9999px rgba(15,23,42,.72),0 0 0 5px rgba(13,110,253,.18);
    }
}

@media(max-height:560px) and (orientation:landscape){
    .rtkp-tour-tooltip{
        max-height:calc(100dvh - 20px);
        width:min(440px,calc(100vw - 20px));
        padding:1rem;
    }
    .rtkp-tour-text{margin-bottom:.75rem}
}

@media(pointer:coarse){
    .rtkp-tour-close,
    .rtkp-tour-actions .btn{
        min-height:44px;
    }
}

@media(forced-colors:active){
    .rtkp-tour-spotlight{
        border:4px solid Highlight;
        box-shadow:0 0 0 9999px rgba(0,0,0,.72);
    }
    .rtkp-tour-spotlight::after{display:none}
    .rtkp-tour-tooltip{
        border:2px solid CanvasText;
        box-shadow:none;
    }
    .rtkp-tour-progress span{background:Highlight}
}
