/* ============================================================
   SIDEBAR NAVIGATION
   Light text on the dark navy shell, amber active accent.
   Sectioned IA · mask icons inherit currentColor.
   ============================================================ */

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.65%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.08);
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.2);
}

/* brand strip at the top of the sidebar (own class — no longer collides
   with the page top-row in mainlayout.css) */
.sidebar-brand {
    display: flex;
    align-items: center;
    height: 3.5rem;
    background-color: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.navbar-brand__logo {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---------- Nav body ---------- */
.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0 1rem;
    flex: 1 1 auto;
}

.nav-section {
    padding: 0 0.6rem;
}
.nav-section + .nav-section {
    margin-top: 0.35rem;
    padding-top: 0.6rem;
}

.nav-section-title {
    padding: 0.35rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.42);
}

/* ---------- Nav links ---------- */
.nav-link {
    display: flex;
    align-items: center;
    height: 2.6rem;
    width: 100%;
    padding: 0 0.85rem;
    color: #fff !important;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.78;
    transition: background-color var(--transition), opacity var(--transition), box-shadow var(--transition);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    opacity: 1;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.10);
    color: #fff !important;
    opacity: 1;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--amber-500);
}

/* ---------- Mask icons (inherit currentColor) ---------- */
.nav-icon {
    width: 1.05rem;
    height: 1.05rem;
    margin-right: 0.7rem;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: var(--nav-ic) no-repeat center / contain;
            mask: var(--nav-ic) no-repeat center / contain;
}
.nav-icon--dashboard { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 1a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm0 7a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm10-1a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1z'/%3E%3C/svg%3E"); }
.nav-icon--events { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E"); }
.nav-icon--upcoming { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8m15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707z'/%3E%3C/svg%3E"); }
.nav-icon--past { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71zM8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0'/%3E%3C/svg%3E"); }
.nav-icon--tickets { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 3.5a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1zm2-2a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1zM0 13a1.5 1.5 0 0 0 1.5 1.5h13A1.5 1.5 0 0 0 16 13V6a1.5 1.5 0 0 0-1.5-1.5h-13A1.5 1.5 0 0 0 0 6zm1.5.5A.5.5 0 0 1 1 13V6a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5z'/%3E%3C/svg%3E"); }
.nav-icon--users { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5'/%3E%3C/svg%3E"); }
.nav-icon--account { --nav-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E"); }

/* ---------- Sidebar footer (version + environment) ---------- */
.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer__brand {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}
.sidebar-footer__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    line-height: 1.2;
    text-align: right;
}
.sidebar-footer__version {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.40);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}
.sidebar-footer__env {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
/* Flag an uncommitted (dirty) dev build at a glance. */
.sidebar-footer__dirty {
    color: var(--amber-400);
}

/* ---------- Mobile collapse behaviour ---------- */
.nav-scrollable {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: flex;
    flex-direction: column;
}

@media (min-width: 641px) {
    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        /* never collapse the sidebar on wide screens */
        display: flex;
        flex-direction: column;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
