/*.page-shell {*/
/*    display: flex*/
/*}*/
.page-shell {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .page-shell {
        flex-direction: column;
    }
}

/* content fills remaining space */
.content1 {
    flex: 1;
    overflow-y: auto;
    height: 80vh
}

@media (min-width: 768px) {
    .content1 {
        padding-left: 24px;
    }
}

@media (max-width: 767px) {
    .content1 {
        padding-left: 0;
    }
}


/* container */
.sidebar-inner {
    position: relative;
}

/* sticky filter */
.sidebar-filter {
    position: sticky;
    top: 0;
    background: #fff; /* prevents overlap */
    z-index: 5;
}

/* spacing */
.sidebar-list {
    padding: 5px;
}


/* sticky sidebar */
/*.sidebar {*/
/*    position: sticky;*/
/*    top: 20px; !* adjust to match header + nav height *!*/
/*    height: calc(100vh - 220px);*/
/*    overflow-y: auto;*/
/*    width: 300px;*/
/*    flex-shrink: 0;*/
/*    background: #fff;*/
/*}*/

.sidebar {
    background: #fff;
    overflow-y: auto;
}

/* Desktop behavior */
@media (min-width: 768px) {
    .sidebar {
        position: sticky;
        top: 20px;
        max-height: 80vh;
        width: 300px;
        flex-shrink: 0;
    }
}

/* Mobile behavior */
@media (max-width: 767px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
}

/* main content scrolls with page */
.content {
    flex: 1;
    padding: 24px;
}

.layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1rem;
}

.menu {
    border: 1px solid #ddd;
    border-radius: .5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-header {
    padding: .75rem .9rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    font-weight: 600;
}

.menu-search {
    padding: .5rem .9rem;
    border-bottom: 1px solid #f0f0f0;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    max-height: calc(100vh - 220px);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    border-bottom: 1px solid #f6f6f6;
    cursor: pointer;
}

.menu-item:hover {
    background: #f6f9ff;
}

.menu-item.active {
    background: #e9f2ff;
}

.menu-item .code {
    font-size: .78rem;
    color: #666;
}

.detail {
    border: 1px solid #ddd;
    border-radius: .5rem;
    padding: 1rem;
    background: #fff;
    min-height: 60vh;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .menu-list {
        max-height: none;
    }
}

.modal.fade {
    opacity: 0;
    transition: opacity .15s linear;
}

.modal.show {
    opacity: 1;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

    .status-dot.active {
        background-color: #198754;
    }

    .status-dot.inactive {
        background-color: #dc3545;
    }

.status-item {
    position: relative;
    padding-left: 14px;
    cursor: pointer;
}

.status-bar {
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
}

    .status-bar.active {
        background-color: #198754; /* green */
    }

    .status-bar.inactive {
        background-color: #dc3545; /* red */
    }

    .status-bar.empty {
        background-color: #adb5bd; /* gray */
    }

.category-list {
    max-height: 250px;
    overflow-y: auto;
}

.category-option {
    padding: 6px 10px;
    cursor: pointer;
}

    .category-option:hover {
        background: #f1f1f1;
    }

    .category-option.active {
        background: #0d6efd;
        color: white;
    }

html, body {
    height: 100%;
    overflow: hidden;
}

@media (max-width: 767px) {

    html, body {
        overflow:auto;
    }
}