.site-layout--portal {
    align-items: stretch;
}

.portal-page {
    min-width: 0;
}

.portal-toolbar {
    margin-bottom: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.portal-toolbar h1 {
    margin: 0 0 3px;
    color: var(--brand-dark);
    font-size: 18px;
    line-height: 1.2;
}

.portal-toolbar p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.portal-open-external {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #ffffff;
    background: var(--brand);
    border: 1px solid var(--brand-dark);
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
}

.portal-open-external:hover,
.portal-open-external:focus-visible {
    color: #ffffff;
    background: var(--brand-dark);
    outline: none;
}

.portal-frame-wrap {
    min-height: calc(100vh - 150px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.portal-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 150px);
    min-height: 720px;
    border: 0;
    background: #ffffff;
}

@media (max-width: 899px) {
    .portal-toolbar {
        align-items: flex-start;
    }

    .portal-frame-wrap {
        min-height: calc(100vh - 120px);
    }

    .portal-frame {
        height: calc(100vh - 120px);
        min-height: 680px;
    }
}

@media (max-width: 580px) {
    .portal-toolbar {
        padding: 10px;
        flex-direction: column;
    }

    .portal-open-external {
        width: 100%;
        text-align: center;
    }

    .portal-frame {
        min-height: 620px;
    }
}
