.portal-body {
min-height: 100vh;
}

.portal-layout {
display: flex;
    min-height: 100vh;
}

.sidebar {
position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: #ffffff;
    background: linear-gradient( 180deg, var(--sidebar-background-start) 0%, var(--sidebar-background-end) 100% );
    box-shadow: 8px 0 25px rgba(12, 34, 61, 0.08);
}

.sidebar-brand {
flex-shrink: 0;
    padding: 21px 20px 18px;
}

.brand-link {
display: flex;
    align-items: center;
    gap: 13px;
    color: #ffffff;
    text-decoration: none;
}

.brand-link:hover {
color: #ffffff;
}

.brand-logo {
position: relative;
    width: 51px;
    height: 48px;
    flex: 0 0 51px;
}

.brand-monitor {
position: relative;
    width: 44px;
    height: 33px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(111, 198, 255, 0.2), 0 0 12px rgba(62, 161, 231, 0.12);
}

.brand-monitor::after {
position: absolute;
        right: 5px;
        bottom: 4px;
        left: 5px;
        height: 1px;
        content: "";
        background: rgba(255, 255, 255, 0.25);
}

.brand-monitor-stand {
position: absolute;
    bottom: 3px;
    left: 17px;
    width: 14px;
    height: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
}

.brand-monitor-stand::before {
position: absolute;
        top: -5px;
        left: 6px;
        width: 2px;
        height: 7px;
        content: "";
        background: rgba(255, 255, 255, 0.9);
}

.chart-bar {
position: absolute;
    bottom: 6px;
    width: 5px;
    border-radius: 1px 1px 0 0;
    background: #59c3ff;
}

.chart-bar-one {
left: 7px;
    height: 9px;
}

.chart-bar-two {
left: 15px;
    height: 16px;
}

.chart-bar-three {
left: 23px;
    height: 12px;
}

.chart-bar-four {
left: 31px;
    height: 20px;
}

.brand-text {
min-width: 0;
}

.brand-title {
overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-subtitle {
margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #d0e0f0;
    white-space: nowrap;
}

.sidebar-nav {
flex: 1;
    padding: 10px 11px 18px;
}

.sidebar-link {
position: relative;
    display: flex;
    align-items: center;
    min-height: 45px;
    gap: 13px;
    padding: 10px 13px;
    margin-bottom: 1px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 7px;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.sidebar-link:hover {
color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
color: #ffffff;
        font-weight: 600;
        background: linear-gradient( 90deg, var(--sidebar-active-start) 0%, var(--sidebar-active-end) 100% );
        box-shadow: inset 3px 0 0 rgba(97, 187, 255, 0.95), 0 7px 18px rgba(0, 24, 56, 0.17);
}

.sidebar-link.active::after {
position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 30px;
            content: "";
            background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.035) );
}

.sidebar-icon {
width: 20px;
    height: 20px;
    flex: 0 0 20px;
    stroke: currentColor;
}

.nav-alert-count {
min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    color: #ffffff;
    text-align: center;
    background: var(--danger);
    border-radius: 10px;
}

.sidebar-footer {
display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 11px;
    padding: 16px 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-avatar {
display: flex;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #123762;
    background: #ffffff;
    border-radius: 50%;
}

.sidebar-user-details {
min-width: 0;
}

.sidebar-user-name {
overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
margin-top: 2px;
    overflow: hidden;
    font-size: 10px;
    color: var(--sidebar-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-area {
width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.topbar-left {
display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.page-heading {
margin: 0;
    overflow: hidden;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading);
    letter-spacing: -0.45px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-subtitle {
margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.topbar-actions {
display: flex;
    align-items: center;
    gap: 11px;
}

.mobile-menu-button,
.topbar-icon-button {
display: inline-flex;
    width: 39px;
    height: 39px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #516174;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.mobile-menu-button {
display: none;
}

.mobile-menu-button svg,
    .topbar-icon-button svg {
width: 19px;
        height: 19px;
}

.mobile-menu-button:hover,
    .topbar-icon-button:hover {
color: var(--primary);
        background: #f7faff;
        border-color: #d7e3f0;
}

.office-selector-wrapper {
position: relative;
}

.office-selector-icon {
position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    width: 17px;
    height: 17px;
    color: #667085;
    pointer-events: none;
    transform: translateY(-50%);
}

.tenant-selector {
width: 185px;
    min-height: 40px;
    padding-left: 38px;
    font-size: 13px;
    color: #344054;
    border-color: var(--border);
    border-radius: 9px;
    box-shadow: none;
}

.tenant-selector:focus {
border-color: #8bb8df;
        box-shadow: 0 0 0 3px rgba(28, 103, 178, 0.1);
}

.user-menu-button {
display: flex;
    align-items: center;
    gap: 9px;
    padding: 3px 5px 3px 3px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 9px;
}

.user-menu-button:hover {
background: #f5f8fc;
}

.topbar-avatar {
display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient( 135deg, #1e6db5 0%, #164d82 100% );
    border-radius: 50%;
}

.topbar-user-text {
display: flex;
    max-width: 150px;
    flex-direction: column;
    align-items: flex-start;
}

.topbar-user-name {
width: 100%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: #25364c;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-role {
margin-top: 1px;
    font-size: 10px;
    color: var(--muted);
}

.user-menu-chevron {
width: 15px;
    height: 15px;
    color: #76869a;
}

.dropdown-menu {
min-width: 190px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 16px 35px rgba(24, 39, 62, 0.14);
}

.dropdown-item {
display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    font-size: 13px;
    border-radius: 7px;
}

.dropdown-item svg {
width: 16px;
        height: 16px;
}

.content-area {
padding: 26px 28px 36px;
}

.sidebar-overlay {
display: none;
}

@media (max-width: 1100px) {
.topbar-user-text {
display: none;
}

.user-menu-chevron {
display: none;
}
}

@media (max-width: 900px) {
.sidebar {
transform: translateX(-100%);
        transition: transform 180ms ease;
}

.sidebar.mobile-open {
transform: translateX(0);
}

.main-area {
width: 100%;
        margin-left: 0;
}

.mobile-menu-button {
display: inline-flex;
}

.sidebar-overlay {
position: fixed;
        inset: 0;
        z-index: 1030;
        display: block;
        visibility: hidden;
        background: rgba(10, 24, 42, 0.45);
        opacity: 0;
        transition: opacity 180ms ease, visibility 180ms ease;
}

.sidebar-overlay.visible {
visibility: visible;
            opacity: 1;
}
}

@media (max-width: 650px) {
.topbar {
min-height: 68px;
        padding: 10px 15px;
}

.page-heading {
font-size: 19px;
}

.page-subtitle {
display: none;
}

.content-area {
padding: 18px 15px 28px;
}

.tenant-selector,
    .office-selector-icon {
display: none;
}

.topbar-actions {
gap: 6px;
}
}
.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}


.sidebar-brand-icon {
    display: block;
    width: 42px;
    height: 42px;
    min-width: 42px;
    max-width: 42px;
    object-fit: cover;
    border-radius: 9px;
    flex: 0 0 42px;
}

