/* Mosahem portal — sidebar layout (added 2026-09-13) */

/* Swap the busy tiled pattern for a calm flat background on authenticated
   portal pages only — the pattern is still used as-is on the guest/login
   pages, where it isn't broken up by a sidebar + card layout. */
body.mosahem-dashboard {
    background-image: none;
    background-color: #eef1f0;
}

.mosahem-shell {
    padding: 10px 20px 40px;
}

.mosahem-sidebar-toggle {
    margin-bottom: 14px;
}

/* Fixed panel pinned to the true right edge of the viewport, spanning the
   FULL true height (top:0 to bottom:0) rather than guessing the navbar's
   exact pixel height. Its z-index sits below the navbar's (bootstrap's
   .fixed-top is 1030), so the top ~110px of this box renders harmlessly
   underneath the opaque navbar instead of leaving an exposed background
   gap if that guess is ever off. padding-top pushes the visible content
   (avatar/name/nav) below the navbar. */
.mosahem-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 270px;
    height: 100vh;
    overflow-y: auto;
    z-index: 20;
    background: #fff;
    border-radius: 14px 0 0 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
    padding: 110px 0 20px;
}

.mosahem-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mosahem-sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #888340;
    flex-shrink: 0;
}

.mosahem-sidebar-user {
    min-width: 0;
}

.mosahem-sidebar-name {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mosahem-sidebar-no {
    display: block;
    font-size: .75rem;
    color: #999;
}

.mosahem-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.mosahem-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #555;
    font-size: .92rem;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.mosahem-nav-link i {
    width: 20px;
    text-align: center;
    color: #888340;
    font-size: 1rem;
}

.mosahem-nav-link:hover {
    background: #f8f7f2;
    color: #333;
    text-decoration: none;
}

.mosahem-nav-link.active {
    background: #f4f2e6;
    color: #6b6730;
    border-left-color: #888340;
    font-weight: 600;
}

.mosahem-sidebar-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.mosahem-nav-logout {
    color: #c0392b;
}

.mosahem-nav-logout i {
    color: #c0392b;
}

.mosahem-main {
    margin-right: 300px;
    min-height: calc(100vh - 150px);
}

.mosahem-welcome-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
    padding: 26px 28px;
    margin-bottom: 20px;
    text-align: right;
}

.mosahem-welcome-card h3 {
    margin-bottom: 4px;
}

.mosahem-welcome-card .text-muted {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .mosahem-shell {
        padding: 0 12px 30px;
    }

    .mosahem-sidebar {
        position: static;
        top: auto;
        right: auto;
        width: 100%;
        height: auto;
        overflow-y: visible;
        border-radius: 14px;
        padding: 20px 0;
        margin-bottom: 16px;
    }

    .mosahem-main {
        margin-right: 0;
        min-height: 0;
    }
}
