/* Flat dark slim sidebar shell for the matching gifts admin tool. */
:root {
    --mgs-sidebar-bg: #1f2633;
    --mgs-sidebar-fg: #aeb6c2;
    --mgs-accent: #3d7bd1;
    --mgs-sidebar-width: 208px;
}

.mgshell {
    display: flex;
    min-height: 100vh;
    background: #f6f7f9;
}

.mgs-sidebar {
    width: var(--mgs-sidebar-width);
    flex-shrink: 0;
    background: var(--mgs-sidebar-bg);
    color: var(--mgs-sidebar-fg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.mgs-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 16px 14px;
}

    .mgs-brand img {
        max-height: 30px;
        width: auto;
    }

.mgs-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    flex: 1;
    overflow-y: auto;
}

    .mgs-nav a {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 9px 11px;
        border-radius: 8px;
        border-left: 3px solid transparent;
        color: var(--mgs-sidebar-fg);
        text-decoration: none;
        font-size: 14px;
        line-height: 1;
    }

        .mgs-nav a:hover {
            background: rgba(255,255,255,.06);
            color: #fff;
            text-decoration: none;
        }

        .mgs-nav a.active {
            background: rgba(255,255,255,.10);
            color: #fff;
            border-left-color: var(--mgs-accent);
        }

        .mgs-nav a i {
            width: 18px;
            text-align: center;
            font-size: 15px;
        }

.mgs-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.mgs-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--mgs-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

    .mgs-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mgs-user-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #e6e9ee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mgs-logout {
    color: var(--mgs-sidebar-fg);
}

    .mgs-logout:hover {
        color: #fff;
    }

.mgs-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mgs-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: #fff;
    border-bottom: 1px solid #e6e8ec;
    position: sticky;
    top: 0;
    z-index: 20;
}

.mgs-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #444;
    cursor: pointer;
}

.mgs-search {
    flex: 1;
    max-width: 360px;
    margin-bottom: 0;
}

.mgs-spacer {
    margin-left: auto;
}

.mgs-content {
    padding: 20px 22px;
    flex: 1;
}

.mgs-footer {
    padding: 14px;
    text-align: center;
    color: #9aa0a6;
    font-size: 12px;
}

.mgs-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .mgs-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .mgshell.mgshell--open .mgs-sidebar {
        transform: translateX(0);
    }

    .mgs-toggle {
        display: inline-flex;
    }

    .mgshell.mgshell--open .mgs-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 1040;
    }
}
