﻿/* Shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #0b2447;
    color: #fff;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 1rem;
    width: 100%;
}

/* Mobile drawer */
.app-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1040;
}

.app-sidebar-mobile {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    background: #0b2447;
    color: #fff;
    z-index: 1050;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Sidebar menu */
.bhb-nav {
    padding: 0.75rem;
}

.bhb-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bhb-nav-item + .bhb-nav-item {
    margin-top: 0.25rem;
}

.admin-nav {
    position: relative;
}


.bhb-nav-link {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: rgba(255,255,255,.85);
}

    .bhb-nav-link:hover {
        color: #fff;
        background: rgba(255,255,255,.10);
    }

    .bhb-nav-toggle {
        width: 100%;
        text-align: left;
        border: none;
        background: none;
        padding: 0.2rem 1.5rem 0.2rem 0;
        color: inherit;
        font: inherit;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: .1rem;
    }

        .bhb-nav-toggle-label {
            font-weight: 600;
            letter-spacing: .01em;
        }

        .bhb-nav-toggle-hint {
            font-size: .8rem;
            color: rgba(255,255,255,.65);
        }

    .bhb-nav-toggle::after {
        content: "▾";
        font-size: .75rem;
        opacity: .85;
        transition: transform .15s ease;
        position: absolute;
        top: 50%;
        right: 0.1rem;
        transform: translateY(-50%);
    }

    .bhb-nav-toggle[aria-expanded="true"]::after {
        transform: translateY(-50%) rotate(-180deg);
    }

    /* NavLink adds 'active' class automatically */
    .bhb-nav-link.active {
        color: #fff;
        background: rgba(255,255,255,.18);
        font-weight: 600;
    }

.admin-nav {
    position: relative;
}

.bhb-admin-panel {
    margin-top: 0.35rem;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.bhb-admin-panel__header {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    color: rgba(255,255,255,.82);
    padding-bottom: .4rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

    .bhb-admin-panel__title {
        font-weight: 700;
        letter-spacing: .01em;
    }

    .bhb-admin-panel__subtitle {
        font-size: .85rem;
        color: rgba(255,255,255,.65);
    }

.bhb-subnav-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bhb-subnav-panel {
    margin-top: 0.35rem;
    padding: 0.4rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 0.85rem;
    box-shadow: 0 10px 28px rgba(0,0,0,.2);
}

    .bhb-subnav-link {
        display: block;
        padding: 0.55rem 0.8rem;
        border-radius: 0.65rem;
        text-decoration: none;
        color: rgba(255,255,255,.9);
        font-size: 0.95rem;
        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.08);
        transition: all .12s ease;
    }

        .bhb-subnav-link:hover {
            color: #fff;
            background: rgba(255,255,255,.12);
            border-color: rgba(255,255,255,.18);
            box-shadow: 0 8px 18px rgba(0,0,0,.18);
        }

        .bhb-subnav-link.active {
            color: #fff;
            background: rgba(255,255,255,.16);
            border-color: rgba(255,255,255,.22);
            box-shadow: 0 10px 22px rgba(0,0,0,.22);
        }

            .bhb-subnav-link:hover {
                color: #fff;
                background: rgba(255,255,255,.14);
                transform: translateX(1px);
            }

/* Topbar - make sure it stays usable on small screens */
.bhb-topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bhb-topbar-left {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.bhb-topbar-logo {
    height: 28px;
}

.bhb-topbar-title {
    font-weight: 600;
}

.bhb-topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.bhb-topbar-search {
    width: 520px;
    max-width: 100%;
    border-radius: .75rem;
}

.bhb-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.bhb-user {
    color: rgba(0,0,0,.65);
    font-size: .9rem;
}

.content-narrow {
    max-width: 1200px;
    margin: 0 auto;
}

.loc-picker {
    position: relative;
    display: inline-block;
}

.loc-picker-btn {
    min-width: 220px;
}

.loc-picker-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1040;
}

.loc-picker-panel {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: .75rem;
    padding: .75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    z-index: 1050;
}

.loc-picker-list {
    max-height: 320px;
    overflow: auto;
    padding-right: .25rem;
}

.loc-picker-item + .loc-picker-item {
    margin-top: .35rem;
}

/* Responsive location picker for small screens */
@media (max-height: 700px) {
    .loc-picker-list {
        max-height: 200px;
    }
}

@media (max-height: 500px) {
    .loc-picker-list {
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    .loc-picker-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 2rem);
        max-width: 400px;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
    }

    .loc-picker-list {
        max-height: calc(80vh - 200px);
        flex: 1;
        overflow-y: auto;
        flex-shrink: 1;
    }

    /* Ensure state buttons and action buttons are above the list */
    .loc-picker-panel > hr,
    .loc-picker-panel > .small,
    .loc-picker-panel > .d-flex {
        position: relative;
        z-index: 10;
        background: #fff;
        flex-shrink: 0;
    }
}

.wiw-card-link:hover {
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.15);
}


