/* Main navigation: shared by the expanded menu, compact rail and mobile drawer. */
.erp-sidebar {
    --nav-surface: #0a2520;
    --nav-ink: #d9eae4;
    --nav-muted: #a6c2b8;
    --nav-divider: #c9f2df20;
    --nav-focus: #74f0bb;
    background: radial-gradient(ellipse at top left, #13483a 0%, transparent 58%),
        linear-gradient(168deg, #0b2e27, var(--nav-surface) 72%);
    color: var(--nav-ink);
    border-right: 1px solid #0e392e;
    box-shadow: 4px 0 20px #102d2214;
}
.erp-brand {
    min-height: 84px;
    padding: 17px 18px;
    flex: none;
    border-bottom: 1px solid var(--nav-divider);
}
.erp-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: white;
    text-decoration: none;
    border-radius: 11px;
}
.erp-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background: #c3f7df0c;
    box-shadow: inset 0 0 0 1px #d5fae51a;
    border-radius: 11px;
}
.erp-brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.erp-brand-copy strong { font-size: 20px; font-weight: 760; letter-spacing: -.045em; line-height: 1.1; }
.erp-brand-copy span { margin-top: 4px; color: var(--nav-muted); font-size: 11px; letter-spacing: .005em; }
.erp-sidebar .erp-nav {
    min-height: 0;
    padding: 13px 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: #527668 transparent;
    overscroll-behavior: contain;
}
.erp-nav-group {
    --nav-group-accent: #82e5bd;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--nav-divider);
}
.erp-nav-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.erp-nav-group[data-menu-group="commercial"] { --nav-group-accent: #98c4ff; }
.erp-nav-group[data-menu-group="engineering"] { --nav-group-accent: #ffc981; }
.erp-nav-group[data-menu-group="collaboration"] { --nav-group-accent: #c6b6ff; }
.erp-nav-group[data-menu-group="people-hr"] { --nav-group-accent: #ffb8ce; }
.erp-nav-group[data-menu-group="administration"] { --nav-group-accent: #a7d4df; }
.erp-nav-title {
    padding: 0 11px 7px;
    color: var(--nav-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .10em;
    line-height: 1.4;
}
.erp-sidebar .erp-nav-link {
    position: relative;
    min-height: 43px;
    gap: 10px;
    margin: 2px 0;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--nav-ink);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.25;
    transition: background-color .15s, border-color .15s, color .15s;
}
.erp-sidebar .erp-nav-link:hover { background: #daf6e914; color: #fff; }
.erp-sidebar .erp-nav-link.active {
    background: linear-gradient(105deg, #3cbe891f, #ddfaed12);
    border-color: #91eec645;
    color: #fff;
    box-shadow: none;
    font-weight: 700;
}
.erp-nav-link.active::before {
    content: '';
    position: absolute;
    inset: 9px auto 9px -1px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--nav-focus);
}
.erp-nav-link .erp-nav-icon-tile {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--nav-group-accent) 13%, transparent);
    color: var(--nav-group-accent);
}
.erp-nav-link.active .erp-nav-icon-tile { background: #60e7b028; color: var(--nav-focus); }
.erp-nav-link .erp-nav-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erp-nav-icon { display: block; flex: 0 0 17px; width: 17px; height: 17px; color: currentColor; }
.erp-sidebar :is(a, button):focus-visible { outline: 2px solid var(--nav-focus); outline-offset: 2px; }
.erp-nav-footer { padding: 10px 12px; border-top: 1px solid var(--nav-divider); flex: none; }
.erp-nav-footer button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    min-height: 40px;
    border: 1px solid var(--nav-divider);
    border-radius: 10px;
    background: #e6fff409;
    color: var(--nav-ink);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}
.erp-nav-footer button:hover, .erp-sidebar .erp-icon-button:hover { background: #daf6e91c; color: #fff; }
.erp-sidebar .erp-icon-button { background: #daf6e913; color: var(--nav-ink); border: 1px solid var(--nav-divider); }

@media (min-width: 1200px) {
    html.erp-nav-collapsed { --erp-sidebar: 84px; }
    .erp-nav-collapsed .erp-brand { padding-inline: 13px; justify-content: center; }
    .erp-nav-collapsed .erp-brand-copy,
    .erp-nav-collapsed .erp-nav-link .erp-nav-label,
    .erp-nav-collapsed .erp-nav-footer button > span { display: none; }
    .erp-nav-collapsed .erp-nav-title {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .erp-nav-collapsed .erp-nav-group { margin-top: 9px; padding-top: 9px; }
    .erp-nav-collapsed .erp-nav-group:first-child { margin-top: 0; padding-top: 0; }
    .erp-nav-collapsed .erp-nav-link { justify-content: center; padding-inline: 0; }
    .erp-nav-collapsed .erp-nav-footer button { justify-content: center; padding-inline: 0; }
    .erp-nav-collapsed .erp-nav-footer .erp-nav-icon { transform: rotate(180deg); }
}
@media (max-width: 1199px) {
    .erp-nav-footer { display: none; }
    .erp-sidebar { width: min(284px, calc(100vw - 30px)); }
    .erp-brand { min-height: 76px; padding: 12px 16px; }
    .erp-sidebar .erp-nav-link { min-height: 45px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .erp-sidebar .erp-nav-link, .erp-sidebar { transition: none !important; }
}
