/* ═════════════════════════════════════════════════════════════════════════
   Sidebar / NavMenu — the Fildi rail.
   Near-neutral palette. Active nav = ink + weight only, no bars, no fills.
   The New-report menu is a <details> element: it must work in static SSR,
   where the nav has no event handlers, so it cannot rely on Blazor clicks.
   ═════════════════════════════════════════════════════════════════════════ */
.nav {
    --ink:#1A1A18; --ink-2:#6E6C66; --ink-3:#A5A29A;
    --line:#EFEFEC; --line-2:#E5E5E1;
    --accent:#E8590C; --ok:#1E7F4F;
    --surface:#FBFBF9;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 26px 0 20px;
    background: var(--surface);
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

/* Wordmark — option 11: Fil 600 / di 300, all ink, no mark. */
.nav-brand {
    display: flex;
    align-items: baseline;
    padding: 0 24px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.nav-brand .wm-lt { font-weight: 300; }

/* ── New report: borderless label with the orange plus, opens a menu ────
   <details>/<summary> so it opens and closes with zero script and zero
   interactivity — the one dropdown pattern that survives static SSR.     */
.nav-new {
    position: relative;
    margin: 0 24px 16px;
}
.nav-new > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;              /* no disclosure triangle */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    padding: 2px 0;
}
.nav-new > summary::-webkit-details-marker { display: none; }
.nav-new > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.nav-new .plus {
    width: 15px; height: 15px; flex: none;
    stroke: var(--accent); fill: none;
    stroke-width: 2; stroke-linecap: round;
}
.nav-new-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    width: 266px;
    background: #ffffff;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    box-shadow: 0 10px 30px -8px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.05);
    padding: 6px;
}
.nav-new-mi {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 7px;
    text-decoration: none;
    transition: background 0.12s;
}
.nav-new-mi:hover { background: #F6F6F4; }
.nav-new-mi:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.nav-new-mi svg {
    width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px;
    stroke: var(--ink-3); fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.nav-new-mi:hover svg { stroke: var(--accent); }
.nav-new-mi .mi-t { display: block; font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.nav-new-mi .mi-d { display: block; font-size: 0.75rem; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.nav-new-sep  { height: 1px; background: var(--line); margin: 5px 9px; }
.nav-new-hint {
    display: block;
    font-size: 0.68rem;
    color: var(--ink-3);
    padding: 4px 11px 7px;
    text-decoration: none;
}
.nav-new-hint:hover { color: var(--ink-2); }
/* Click-away: an invisible full-screen summary layer behind the menu while
   open. Same trick native <dialog> uses; keeps the no-JS guarantee. */
.nav-new[open] > summary::before {
    content: "";
    position: fixed; inset: 0; z-index: 50;
    cursor: default;
}


/* ── Hands-free toggle (option C) ──────────────────────────────────────
   Two pairs of links live in the menu; the checkbox decides which pair is
   visible. Pure CSS, because this nav renders in static SSR where no Blazor
   event handlers exist. The checkbox is offscreen rather than display:none
   so it stays keyboard-focusable and screen readers still announce it.   */
.nav-voice-cb {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    margin: 0;
    pointer-events: none;
}
.nav-new-menu .mi-voice { display: none; }
.nav-voice-cb:checked ~ .mi-typed { display: none; }
.nav-voice-cb:checked ~ .mi-voice { display: flex; }

.nav-voice-tgl {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s;
    user-select: none;
}
.nav-voice-tgl:hover { background: #F6F6F4; }
.nav-voice-tgl .mic {
    width: 15px; height: 15px; flex: none;
    stroke: var(--ink-2); fill: none;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    transition: stroke 0.12s;
}
.nav-voice-tgl .tgl-t { font-size: 0.8rem; color: var(--ink); }
.nav-voice-tgl .tgl-sw {
    margin-left: auto;
    width: 32px; height: 18px; flex: none;
    border-radius: 99px;
    background: var(--line-2);
    position: relative;
    transition: background 0.15s;
}
.nav-voice-tgl .tgl-sw::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    transition: transform 0.15s;
}
/* on state — the switch is the ONE place the accent appears in this menu */
.nav-voice-cb:checked ~ .nav-voice-tgl .tgl-sw { background: var(--accent); }
.nav-voice-cb:checked ~ .nav-voice-tgl .tgl-sw::after { transform: translateX(14px); }
.nav-voice-cb:checked ~ .nav-voice-tgl .tgl-t { font-weight: 500; }
.nav-voice-cb:checked ~ .nav-voice-tgl .mic { stroke: var(--accent); }
/* focus ring lands on the label, since the input itself is offscreen */
.nav-voice-cb:focus-visible ~ .nav-voice-tgl { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
    .nav-voice-tgl, .nav-voice-tgl .tgl-sw, .nav-voice-tgl .tgl-sw::after { transition: none; }
}

/* ── Nav rows: icon + label, active = ink + weight, icons brighten only ── */
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 24px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.12s;
}
.nav-link:hover  { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-ic {
    width: 15px; height: 15px; flex: 0 0 15px;
    stroke: currentColor; fill: none;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    opacity: 0.55;
    transition: opacity 0.12s;
}
.nav-link:hover  .nav-ic { opacity: 0.8; }
.nav-link.active .nav-ic { opacity: 1; }


/* Admin / Support sit directly under PM panel, in reading order with the rest.
   NO margin-top:auto here — .nv-acct already carries one, and two auto margins
   in the same flex column split the free space between them (which is what
   stranded these two mid-rail). The account corner alone pins to the bottom. */
.nav-low { }

/* account — unchanged structurally; colors come from the scoped css */
.nav-user {
    padding: 16px 24px 0;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-user-id {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; min-width: 0; flex: 1;
    border-radius: 10px;
}
.nav-user-id:hover .nav-user-name { color: var(--accent); }
.nav-avatar {
    width: 35px; height: 35px; border-radius: 50%;
    background: #ffffff; border: 1.5px solid var(--ink); color: var(--ink);
    font-weight: 700; font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-user-meta { min-width: 0; }
.nav-user-name { font-size: 0.85rem; font-weight: 600; color: var(--ink); line-height: 1.2; transition: color .12s; }
.nav-user-email { font-size: 0.72rem; color: var(--ink-3); word-break: break-all; line-height: 1.3; }

/* Signed-out state — restored from the original app.css. NavMenu's NotAuthorized
   branch still renders .nav-login-link, so this rule must survive the rewrite. */
.nav-login-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 600; }

/* Approved desktop sidebar. Mobile drawer styling remains independent. */
@media (min-width: 1025px) {
    .sidebar-desktop .nav {
        --ink: #272d29;
        --ink-2: #6c746e;
        --ink-3: #707871;
        --line: #e8ece9;
        --accent: #e8590c;
        --surface: #fff;
        padding: 0 12px 16px;
        box-sizing: border-box;
        overflow-y: auto;
    }
    .sidebar-desktop .nav-brand {
        height: 91px;
        padding: 0 9px;
        align-items: center;
        flex-shrink: 0;
        font-size: 25px;
        font-weight: 500;
        letter-spacing: 0;
    }
    .sidebar-desktop .nav-new { margin: 0 9px 24px; flex-shrink: 0; }
    .sidebar-desktop .nav-new > summary { min-height: 44px; font-size: 13px; font-weight: 500; padding: 0; }
    .sidebar-desktop .nav-new .plus { width: 17px; height: 17px; stroke: #e8590c; }
    .sidebar-desktop .nav-new-menu { width: 100%; border-radius: 5px; }
    .sidebar-desktop .nav-link {
        box-sizing: border-box;
        min-height: 44px;
        padding: 10px 9px;
        margin-bottom: 7px;
        gap: 10px;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.5;
        letter-spacing: 0;
        background: transparent;
        border: 0;
        text-decoration: none;
        flex-shrink: 0;
    }
    .sidebar-desktop .nav-ic { width: 17px; height: 17px; flex-basis: 17px; opacity: .72; }
    .sidebar-desktop .nav-link:hover,
    .sidebar-desktop .nav-link.active {
        background: transparent;
        color: var(--ink);
        font-weight: 600;
        text-decoration: none;
    }
    .sidebar-desktop .nav-link:hover .nav-ic,
    .sidebar-desktop .nav-link.active .nav-ic { opacity: 1; }
    .sidebar-desktop .nav-new > summary:hover { background: transparent; font-weight: 600; }
    .sidebar-desktop .nav-new-mi:hover,
    .sidebar-desktop .nav-voice-tgl:hover { background: transparent; }
    .sidebar-desktop .nav-new-mi:hover .mi-t,
    .sidebar-desktop .nav-voice-tgl:hover .tgl-t { font-weight: 600; }
    .sidebar-desktop .nav-new-mi:hover svg { stroke: var(--ink-3); }
    .sidebar-desktop .nav-low { margin-top: 22px; flex-shrink: 0; }
}
