:root {
    --global-header-height: 72px;
    --portal-sidebar-width: 288px;
    --portal-sidebar-width-collapsed: 84px;
    --portal-surface: rgba(15, 23, 42, 0.92);
    --portal-border: rgba(148, 163, 184, 0.25);
    --portal-radius: 18px;
    --portal-text-primary: #0f172a;
    --portal-text-muted: #475569;
    --portal-accent: #2563eb;
    --portal-accent-strong: #1d4ed8;
    --portal-badge-bg: rgba(37, 99, 235, 0.12);
}

.icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    fill: currentColor;
}

.icon-md {
    width: 1.25em;
    height: 1.25em;
}

.global-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

section[id],
.hero-section {
    scroll-margin-top: calc(var(--global-header-height, 72px) + 16px);
}

.global-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--global-header-height);
    flex-wrap: wrap;
    row-gap: 0.75rem;
}

.global-header__start {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.nav-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
}

.nav-trigger:hover,
.nav-trigger:focus-visible {
    border-color: rgba(148, 163, 184, 0.6);
    outline: none;
}

.nav-trigger__icon,
.nav-trigger__icon::before,
.nav-trigger__icon::after {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 999px;
    transition: transform 0.2s ease;
}

.nav-trigger__icon::before,
.nav-trigger__icon::after {
    position: relative;
}

.nav-trigger__icon::before {
    top: -6px;
}

.nav-trigger__icon::after {
    top: 4px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand__name {
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.brand__tagline {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.65);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
}

.environment-badge--live {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);
}

.environment-badge--sandbox {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.35);
}

.global-header__nav {
    flex: 1;
}

.global-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    .global-nav {
        display: flex;
    }

    .global-header--marketing .nav-trigger {
        display: none;
    }
}

.global-nav__details {
    position: relative;
}

.global-nav__summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.portal-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .portal-hero {
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
    }
}

.portal-hero__primary {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-hero__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .portal-hero__header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.portal-hero__summary {
    max-width: 52ch;
}

.portal-hero__indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
    text-transform: uppercase;
}

.portal-status-badge--danger {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.portal-status-badge--warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.portal-status-badge--info {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.portal-status-badge--success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.portal-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    font-size: 0.75rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.portal-indicator:hover,
.portal-indicator:focus-visible {
    border-color: rgba(148, 163, 184, 0.6);
    text-decoration: none;
    outline: none;
}

.portal-indicator__value {
    font-weight: 700;
    font-size: 0.85rem;
}

.portal-indicator__label {
    white-space: nowrap;
}

.portal-indicator--danger {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.portal-indicator--warning {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.portal-indicator--info {
    border-color: rgba(14, 165, 233, 0.45);
    background: rgba(14, 165, 233, 0.12);
    color: #bae6fd;
}

.portal-indicator--neutral {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.portal-hero__actions {
    flex: 0 0 320px;
}

@media (max-width: 991.98px) {
    .portal-hero__actions {
        flex: 1 1 auto;
    }
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.quick-actions__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.quick-actions__title {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.75);
}

.quick-actions__sync {
    margin-left: auto;
}

.quick-actions__sync-btn {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .quick-actions__header {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-actions__sync {
        width: 100%;
    }

    .quick-actions__sync-btn {
        width: 100%;
    }
}

.quick-actions__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-actions__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.65);
    color: #e2e8f0;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.quick-actions__link:hover,
.quick-actions__link:focus-visible {
    border-color: rgba(148, 163, 184, 0.45);
    transform: translateY(-1px);
    text-decoration: none;
    outline: none;
}

.quick-actions__link.is-primary {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(37, 99, 235, 0.18);
}

.quick-actions__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #60a5fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-actions__content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.quick-actions__label {
    font-weight: 600;
}

.quick-actions__description {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.75);
}

.quick-actions__badge {
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.quick-actions__badge--danger {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.quick-actions__badge--warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.quick-actions__badge--info {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.quick-actions__external {
    margin-left: 0.5rem;
    color: rgba(148, 163, 184, 0.8);
    display: inline-flex;
    align-items: center;
}

.global-nav__summary::-webkit-details-marker {
    display: none;
}

.global-nav__summary::after {
    content: "";
    border: 4px solid transparent;
    border-top-color: currentColor;
    transform: translateY(2px);
}

.global-nav__details[open] > .mega-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translate(-50%, 12px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    min-width: 520px;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1050;
}

.mega-menu__column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu__heading {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.85);
}

.mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-menu__link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.95);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.mega-menu__link:hover,
.mega-menu__link:focus-visible {
    background: rgba(37, 99, 235, 0.14);
    color: #fff;
    outline: none;
}

.mega-menu__icon {
    font-size: 1.15rem;
    width: 1.5rem;
    display: inline-flex;
    justify-content: center;
}

.mega-menu__title {
    font-weight: 600;
    display: block;
}

.mega-menu__description {
    display: block;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.85);
}

.global-header__end {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.5rem;
}

.global-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.global-header__secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.global-header__secondary--inline {
    align-items: center;
}

.global-header__secondary--menu {
    position: relative;
    display: none;
}

.global-header__secondary-summary {
    list-style: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 0.45rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(226, 232, 240, 0.9);
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
}

.global-header__secondary-summary::-webkit-details-marker {
    display: none;
}

.global-header__secondary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.global-header__secondary-label {
    font-weight: 600;
}

.global-header__secondary-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 220px;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.4);
    padding: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
}

.global-header__secondary--menu[open] .global-header__secondary-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.global-header__secondary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.global-header__secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    color: rgba(226, 232, 240, 0.9);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid transparent;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.global-header__secondary-link:hover,
.global-header__secondary-link:focus-visible {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    outline: none;
}

.global-header__secondary-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.8);
}

.global-header__secondary-link-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.global-header__secondary-link-label {
    font-weight: 600;
}

.global-header__secondary-link-desc {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.85);
}

.global-header__secondary-link-external {
    color: rgba(148, 163, 184, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.global-header__utilities {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 991.98px) {
    .global-header__inner {
        gap: 1rem;
    }

    .global-header__start {
        width: 100%;
        justify-content: space-between;
    }

    .global-header__start .environment-badge {
        margin-left: auto;
    }

    .global-header__end {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .global-header__actions {
        width: 100%;
    }

    .global-header__actions > * {
        flex: 1 1 100%;
    }

    .global-header__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .global-header__actions .action-menu__summary,
    .global-header__actions .global-header__secondary-summary {
        width: 100%;
        justify-content: space-between;
    }

    .global-header__secondary--inline {
        width: 100%;
    }

    .global-header__secondary--inline .btn {
        width: 100%;
    }

    .global-header__utilities {
        width: 100%;
        justify-content: flex-end;
    }

    .global-header--marketing.global-header--condensed {
        --global-header-height: 56px;
    }

    .global-header--marketing.global-header--condensed .global-header__inner {
        min-height: var(--global-header-height);
        gap: 0.75rem;
        row-gap: 0;
    }

    .global-header--marketing.global-header--condensed .global-header__end,
    .global-header--marketing.global-header--condensed .environment-badge,
    .global-header--marketing.global-header--condensed .brand__tagline {
        display: none;
    }

    .global-header--marketing.global-header--condensed .global-header__start {
        justify-content: flex-start;
    }
}

@media (max-width: 479.98px) {
    .global-header__secondary--inline {
        display: none;
    }

    .global-header__secondary--menu {
        display: block;
        width: 100%;
    }

    .global-header__secondary-summary {
        width: 100%;
        justify-content: space-between;
    }

    .global-header__secondary-panel {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border-radius: 12px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
    }

    .global-header__secondary--menu[open] .global-header__secondary-panel {
        display: block;
    }
}

.support-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 232, 240, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
}

.support-link:hover,
.support-link:focus-visible {
    color: #fff;
    border-color: rgba(148, 163, 184, 0.6);
    outline: none;
}

.action-menu,
.account-menu {
    position: relative;
}

.action-menu__summary,
.account-menu__summary {
    list-style: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 0.45rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(226, 232, 240, 0.9);
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
}

.action-menu__summary::-webkit-details-marker,
.account-menu__summary::-webkit-details-marker {
    display: none;
}

.action-menu[open] .action-menu__panel,
.account-menu[open] .account-menu__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.action-menu__panel,
.account-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 280px;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.4);
    padding: 1rem;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
}

.action-menu__primary {
    display: block;
    text-decoration: none;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-strong));
    color: #fff;
    margin-bottom: 0.75rem;
}

.action-menu__primary-label {
    font-weight: 600;
    display: block;
}

.action-menu__primary-desc {
    font-size: 0.85rem;
    opacity: 0.85;
}

.action-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-menu__link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    color: rgba(226, 232, 240, 0.92);
    transition: background 0.15s ease, color 0.15s ease;
}

.action-menu__link:hover,
.action-menu__link:focus-visible {
    background: rgba(37, 99, 235, 0.12);
    color: #fff;
    outline: none;
}

.action-menu__link-desc {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.85);
}

.action-menu__progress {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.progress-indicator {
    width: 80px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.progress-indicator__bar {
    display: block;
    height: 100%;
    width: var(--progress-value, 0%);
    background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-strong));
    transition: width 0.3s ease;
}

.account-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
}

.account-menu__meta {
    margin-bottom: 1rem;
}

.account-menu__name {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.account-menu__email {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.85);
}

.account-menu__workspace {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.account-menu__logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.9);
}

.account-menu__logout:hover,
.account-menu__logout:focus-visible {
    color: #fff;
    outline: none;
}

.portal-layout {
    display: block;
}

@media (min-width: 992px) {
    .portal-sidebar {
        position: fixed;
        top: var(--global-header-height);
        bottom: 0;
        left: 0;
        width: var(--portal-sidebar-width);
        box-sizing: border-box;
        background: rgba(241, 245, 249, 0.98);
        border-right: 1px solid rgba(148, 163, 184, 0.25);
        overflow-y: auto;
        padding: 1.5rem;
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear;
        will-change: transform;
    }

    body.portal-nav-collapsed .portal-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
    }

    .portal-main {
        margin-left: var(--portal-sidebar-width);
    }

    body.portal-nav-collapsed .portal-main {
        margin-left: 0;
    }
}

.portal-sidebar__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.portal-sidebar__callout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: var(--portal-text-primary);
}

.portal-sidebar__callout-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-strong));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.portal-sidebar__callout-label {
    margin: 0;
    font-weight: 600;
}

.portal-sidebar__callout-desc {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.9rem;
    color: var(--portal-text-muted);
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portal-nav__heading {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--portal-text-muted);
}

.portal-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.portal-nav__link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--portal-text-muted);
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.portal-nav__link:hover,
.portal-nav__link:focus-visible {
    background: rgba(37, 99, 235, 0.12);
    color: var(--portal-accent-strong);
    border-color: rgba(37, 99, 235, 0.25);
    outline: none;
}

.portal-nav__link.is-active {
    background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-strong));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.portal-nav__icon {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
}

.portal-nav__content {
    display: flex;
    flex-direction: column;
}

.portal-nav__label {
    font-weight: 600;
}

.portal-nav__label-text {
    display: inline;
}

.portal-nav__description {
    font-size: 0.8rem;
    color: var(--portal-text-muted);
}

.portal-nav__link.is-active .portal-nav__description {
    color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 992px) {
    body.portal-nav-collapsed .portal-sidebar__callout,
    body.portal-nav-collapsed .portal-nav__content,
    body.portal-nav-collapsed .portal-nav__badge,
    body.portal-nav-collapsed .portal-nav__external {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    body.portal-nav-collapsed .portal-nav__link {
        justify-content: center;
        grid-template-columns: auto;
        padding: 0.75rem;
    }

    body.portal-nav-collapsed .portal-nav__icon {
        font-size: 1.4rem;
    }

    body.portal-nav-icons-only .portal-nav__link {
        position: relative;
        overflow: visible;
    }

    body.portal-nav-icons-only .portal-nav__link::after {
        content: attr(data-portal-label);
        position: absolute;
        left: calc(100% + 0.75rem);
        top: 50%;
        transform: translate3d(0, -50%, 0);
        background: rgba(15, 23, 42, 0.95);
        color: #f8fafc;
        padding: 0.4rem 0.6rem;
        border-radius: 0.5rem;
        box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
        font-size: 0.85rem;
        line-height: 1.2;
        opacity: 0;
        pointer-events: none;
        white-space: nowrap;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 10;
    }

    body.portal-nav-icons-only .portal-nav__link::before {
        content: "";
        position: absolute;
        left: calc(100% + 0.35rem);
        top: 50%;
        transform: translate3d(0, -50%, 0);
        width: 0;
        height: 0;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 6px solid rgba(15, 23, 42, 0.95);
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
        z-index: 10;
    }

    body.portal-nav-icons-only .portal-nav__link:focus-visible::after,
    body.portal-nav-icons-only .portal-nav__link:focus-visible::before,
    body.portal-nav-icons-only .portal-nav__link:hover::after,
    body.portal-nav-icons-only .portal-nav__link:hover::before {
        opacity: 1;
        transform: translate3d(0.25rem, -50%, 0);
    }

    body.portal-nav-icons-only .portal-nav__link::before,
    body.portal-nav-icons-only .portal-nav__link::after {
        will-change: opacity, transform;
    }
}

.portal-nav__badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--portal-badge-bg);
    color: var(--portal-accent-strong);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.portal-nav__badge-progress {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(37, 99, 235, 0.18);
    transform-origin: left;
    transform: scaleX(calc(var(--portal-progress, 0) / 100));
    z-index: -1;
}

.portal-nav__external {
    font-size: 0.9rem;
    opacity: 0.6;
}

.portal-drawer {
    position: fixed;
    inset: 0;
    display: none;
}

.portal-drawer.is-active {
    display: block;
}

.portal-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.marketing-drawer {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
}

.marketing-drawer.is-active {
    display: block;
}

.marketing-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

.marketing-drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(92vw, 360px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f172a, #111c2f);
    border-left: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: -24px 0 48px rgba(2, 6, 23, 0.55);
    transform: translateX(100%);
    transition: transform 0.32s ease;
}

.marketing-drawer.is-active .marketing-drawer__panel {
    transform: translateX(0);
}

.marketing-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.marketing-drawer__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
}

.marketing-drawer__close {
    border: none;
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.marketing-drawer__close:hover,
.marketing-drawer__close:focus-visible {
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
}

.marketing-drawer__body {
    padding: 1.5rem;
    overflow-y: auto;
    display: grid;
    gap: 2rem;
}

.marketing-drawer__nav {
    display: block;
}

.marketing-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.marketing-drawer__details {
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.marketing-drawer__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.15rem;
    font-weight: 600;
    color: #f1f5f9;
    cursor: pointer;
    list-style: none;
}

.marketing-drawer__summary::-webkit-details-marker {
    display: none;
}

.marketing-drawer__summary::after {
    content: "";
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.marketing-drawer__details[open] > .marketing-drawer__summary::after {
    transform: rotate(45deg);
}

.marketing-drawer__menu {
    padding: 0 1.15rem 1.25rem;
    display: grid;
    gap: 1.25rem;
}

.marketing-drawer__section {
    display: grid;
    gap: 0.85rem;
}

.marketing-drawer__heading {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.6);
}

.marketing-drawer__sublinks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.marketing-drawer__link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid transparent;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.marketing-drawer__link:hover,
.marketing-drawer__link:focus-visible {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(15, 23, 42, 0.85);
}

.marketing-drawer__link-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
}

.marketing-drawer__link-content {
    display: grid;
    gap: 0.25rem;
}

.marketing-drawer__link-label {
    font-weight: 600;
    color: #fff;
}

.marketing-drawer__link-desc {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

.marketing-drawer__link-external {
    color: rgba(148, 163, 184, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.marketing-drawer__summary--link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    text-decoration: none;
    color: #f8fafc;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.75);
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.marketing-drawer__summary--link::after {
    content: "";
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.marketing-drawer__summary--link:hover,
.marketing-drawer__summary--link:focus-visible {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(15, 23, 42, 0.9);
}

.marketing-drawer__actions {
    display: grid;
    gap: 1rem;
}

.marketing-drawer__primary-action,
.marketing-drawer__secondary-action {
    width: 100%;
}

.marketing-drawer__support {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    text-decoration: none;
    color: rgba(226, 232, 240, 0.85);
    background: rgba(15, 23, 42, 0.6);
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.marketing-drawer__support:hover,
.marketing-drawer__support:focus-visible {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
}

.marketing-drawer__support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
}

.marketing-drawer__support-label {
    font-weight: 600;
}

@media (min-width: 992px) {
    .marketing-drawer {
        display: none !important;
    }
}

.portal-drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(90vw, 340px);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.portal-drawer.is-active .portal-drawer__panel {
    transform: translateX(0);
}

.portal-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.portal-drawer__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.portal-drawer__close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--portal-text-muted);
}

.portal-drawer__body {
    padding: 1.25rem;
    overflow-y: auto;
}

.portal-sidebar__callout--drawer {
    background: rgba(37, 99, 235, 0.15);
}

.portal-main {
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    body.with-portal-nav {
        padding-top: var(--global-header-height);
    }

    .portal-main {
        margin: 0;
    }

    .global-header__nav {
        display: none;
    }

    .portal-sidebar {
        display: none;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}
