:root {
    --portal-accent: #f76707;
    --portal-accent-rgb: 247, 103, 7;
    --portal-sidebar-width: 15rem;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--tblr-bg-surface-secondary, #f6f8fb);
}

/* ---------- Algemene portalschil ---------- */
.portal-shell .page-wrapper {
    min-height: 100vh;
}

.portal-page-container,
.portal-topbar .container-fluid,
.portal-footer .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.portal-topbar {
    min-height: 4rem;
    background: var(--tblr-bg-surface, #fff);
    border-bottom: 1px solid var(--tblr-border-color, #dce1e7);
}

.portal-footer {
    border-top: 1px solid var(--tblr-border-color, #dce1e7);
}

.portal-sidebar {
    --tblr-navbar-vertical-width: var(--portal-sidebar-width);
}

.portal-sidebar .navbar-collapse {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 5rem);
}

.portal-brand,
.portal-mobile-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.portal-mobile-brand {
    color: var(--tblr-body-color);
}

.portal-brand-mark {
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .55rem;
    background: var(--portal-accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: -.02em;
    box-shadow: 0 .25rem .75rem rgba(var(--portal-accent-rgb), .24);
}

.portal-brand-mark-sm {
    width: 1.9rem;
    height: 1.9rem;
    flex-basis: 1.9rem;
    border-radius: .45rem;
    font-size: .72rem;
}

.portal-brand-mark-lg {
    width: 3.25rem;
    height: 3.25rem;
    flex-basis: 3.25rem;
    border-radius: .8rem;
    font-size: 1rem;
}

.portal-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: .75rem;
    line-height: 1.05;
}

.portal-brand-name {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-brand-copy small {
    margin-top: .3rem;
    color: rgba(255, 255, 255, .62);
    font-size: .72rem;
    font-weight: 400;
}

.portal-sidebar .nav-link button,
.portal-sidebar button.nav-link {
    color: inherit;
}

.portal-sidebar-context {
    padding: .9rem 1rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .05);
}

.portal-sidebar-context-label {
    color: rgba(255, 255, 255, .52);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.portal-sidebar-context-name {
    margin-top: .35rem;
    color: #fff;
    font-weight: 600;
}

.portal-sidebar-context-tenant {
    margin-top: .2rem;
    color: rgba(255, 255, 255, .62);
    font-size: .78rem;
}

.portal-user-name,
.portal-user-context {
    max-width: 13rem;
}

.portal-user-menu {
    min-width: 15rem;
}

.portal-theme-icon-light {
    display: none;
}

html[data-bs-theme="dark"] .portal-theme-icon-dark {
    display: none;
}

html[data-bs-theme="dark"] .portal-theme-icon-light {
    display: inline-block;
}

.portal-stat-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.85rem;
    min-height: 2.85rem;
    padding: .55rem .7rem;
    border-radius: .55rem;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.portal-job-subject {
    max-width: 28rem;
}

.portal-detail-label {
    color: var(--tblr-secondary-color, #667382);
    font-size: .82rem;
}

.portal-richtext img {
    max-width: 100%;
    height: auto;
}

.portal-richtext table {
    width: 100%;
}

.portal-richtext > :last-child {
    margin-bottom: 0;
}

.portal-membership-card button {
    color: inherit;
}

.portal-membership-card button:hover {
    text-decoration: none;
}

/* ---------- Meldingen ---------- */
.portal-notification-dropdown {
    width: min(26rem, calc(100vw - 2rem));
}

.portal-notification-list {
    max-height: 27rem;
    overflow-y: auto;
}

.portal-notification-item.is-unread,
.portal-notification-page-item.is-unread {
    background: var(--tblr-blue-lt, #e9f2ff);
}

.portal-notification-item:hover,
.portal-notification-page-item:hover {
    text-decoration: none;
}

.portal-notification-message {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-toast-container {
    z-index: 1090;
    width: min(24rem, calc(100vw - 1rem));
}

.portal-notification-toast {
    cursor: pointer;
    box-shadow: var(--tblr-shadow-card, 0 .125rem .25rem rgba(0, 0, 0, .075));
}

.portal-notification-toast .toast-header .avatar {
    width: 2rem;
    height: 2rem;
}

/* ---------- Login en activatie ---------- */
.portal-auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--tblr-bg-surface-secondary, #f6f8fb);
}

.portal-auth-shell {
    display: grid;
    grid-template-columns: minmax(25rem, 42%) minmax(0, 1fr);
    min-height: 100vh;
}

.portal-auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .14), transparent 34%),
        radial-gradient(circle at 90% 85%, rgba(var(--portal-accent-rgb), .48), transparent 38%),
        linear-gradient(145deg, #182433 0%, #1f2f46 58%, #263a54 100%);
}

.portal-auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -10rem;
    bottom: -12rem;
    width: 30rem;
    height: 30rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 4rem rgba(255, 255, 255, .025), 0 0 0 8rem rgba(255, 255, 255, .015);
}

.portal-auth-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - 6rem);
}

.portal-auth-brand-heading {
    display: flex;
    align-items: center;
}

.portal-auth-brand-name {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
}

.portal-auth-brand-subtitle {
    margin-top: .2rem;
    color: rgba(255, 255, 255, .64);
}

.portal-auth-message {
    max-width: 32rem;
    margin: auto 0;
}

.portal-auth-message h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.portal-auth-message p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 1.05rem;
    line-height: 1.7;
}

.portal-auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    max-width: 34rem;
    color: rgba(255, 255, 255, .62);
    font-size: .82rem;
    line-height: 1.55;
}

.portal-auth-security-note i {
    margin-top: .15rem;
    color: #fff;
    font-size: 1.1rem;
}

.portal-auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 3rem 1.5rem;
}

.portal-auth-content-inner {
    width: 100%;
    max-width: 34rem;
}

.portal-auth-card-wrap-wide,
.portal-auth-content-inner:has(.portal-auth-card-wrap-wide) {
    max-width: 42rem;
}

.portal-auth-card {
    border: 0;
    box-shadow: var(--tblr-shadow-card, 0 .125rem .25rem rgba(0, 0, 0, .075));
}

.portal-auth-card .card-body {
    padding: 2rem;
}

.portal-auth-submit {
    min-height: 2.75rem;
}

.portal-password-toggle {
    cursor: pointer;
    border: 0;
    background: transparent;
}

.portal-auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: var(--tblr-bg-surface, #fff);
    box-shadow: var(--tblr-shadow-card, 0 .125rem .25rem rgba(0, 0, 0, .075));
}

.portal-auth-footer {
    line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .portal-page-container,
    .portal-topbar .container-fluid,
    .portal-footer .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .portal-auth-shell {
        display: block;
    }

    .portal-auth-content {
        min-height: 100vh;
        padding-top: 4rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .page-body {
        padding-top: 1rem;
    }

    .portal-notification-dropdown {
        position: fixed !important;
        inset: 4rem 1rem auto 1rem !important;
        width: auto;
        transform: none !important;
    }

    .portal-auth-card .card-body {
        padding: 1.35rem;
    }

    .portal-job-subject {
        max-width: 14rem;
    }
}

@media print {
    .portal-sidebar,
    .portal-topbar,
    .portal-footer {
        display: none !important;
    }
}

/* ---------- Klantreacties en portalcommunicatie (V2.9) ---------- */
.portal-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
