/* Main menu (views/partials/nav.ejs, public/js/menu.js) */
.app-nav {
    background: linear-gradient(90deg, #f8eedc 60%, #e7d7b6 100%);
    border-bottom: 1px solid #e0cfa8;
    font-family: "Raleway", sans-serif;
}

.app-nav__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px;
}

.app-nav__brand {
    font-weight: 700;
    color: #7e6227;
    margin-right: 8px;
    white-space: nowrap;
}
.app-nav__brand:hover { color: #ad8413; text-decoration: none; }

.app-nav__groups {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.app-nav__group { position: relative; }

.app-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5c4718;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.app-nav__link:hover,
.app-nav__link:focus-visible,
.app-nav__link[aria-expanded="true"] {
    background: #fff;
    color: #ad8413;
    text-decoration: none;
    outline: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.app-nav__link.is-active {
    background: #ad8413;
    color: #fff;
}
.app-nav button:not(#report) { margin: 0; }
.app-nav .app-nav__toggle:not(#report) { margin-left: auto; }
.app-nav__caret { font-size: 0.7em; transition: transform 0.15s; }
.app-nav__link[aria-expanded="true"] .app-nav__caret { transform: rotate(180deg); }

.app-nav__badge {
    display: inline-block;
    min-width: 1.4em;
    padding: 1px 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.app-nav__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1050;
    display: grid;
    grid-template-columns: repeat(var(--cols, 1), minmax(200px, 1fr));
    gap: 4px 16px;
    min-width: 220px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(71, 56, 22, 0.18);
}
.app-nav__panel[hidden] { display: none; }
.app-nav__panel.is-right { left: auto; right: 0; }

.app-nav__heading {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a08d63;
}

.app-nav__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    color: #3d3013;
    white-space: nowrap;
}
.app-nav__item i { color: #ad8413; }
.app-nav__item:hover,
.app-nav__item:focus-visible {
    background: #f8eedc;
    color: #3d3013;
    text-decoration: none;
    outline: none;
}
.app-nav__item.is-active { background: #ad8413; color: #fff; }
.app-nav__item.is-active i { color: #fff; }
.app-nav__item .app-nav__badge { margin-left: auto; }

.app-nav__user {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.app-nav__logout { color: #ad8413; }

.app-nav__toggle {
    display: none;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 auto;
    padding: 7px 12px;
    border: 1px solid #d9c493;
    border-radius: 10px;
    background: #fff;
    color: #5c4718;
    font-weight: 600;
}

/* Phones and small tablets: collapsible list, panels open inline */
@media (max-width: 991.98px) {
    .app-nav__toggle { display: inline-flex; }
    .app-nav__groups {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 6px;
    }
    .app-nav__groups.is-open { display: flex; }
    .app-nav__groups .app-nav__link { width: 100%; justify-content: flex-start; padding: 10px 12px; }
    .app-nav__caret { margin-left: auto; }
    .app-nav__panel,
    .app-nav__panel.is-right {
        position: static;
        grid-template-columns: 1fr;
        margin: 4px 0 8px 12px;
        box-shadow: none;
        border: 1px solid #eadfc6;
    }
    .app-nav__user { margin-left: 0; order: 2; }
    .app-nav__name { display: none; }
}
