/**
 * ERP sidebar — Nipun India franchise shell (navy #041c34 · gold active #f2b244)
 * Visual match for https://nipunindia.com franchise sidebar.
 * Menu data stays schools registry (unchanged).
 */

:root {
    /* India w-72 */
    --erp-sidebar-w: 18rem;
    --erp-violet-brand: #022248;
    --erp-violet-deep: #041c34;
    --erp-violet-mid: #052140;
    --erp-violet-rich: #08294d;
    --erp-sidebar-bg: linear-gradient(180deg, #08294d 0%, #052140 42%, #041c34 100%);
    --erp-sidebar-bg-solid: #041c34;
    --erp-sidebar-border: rgba(255, 255, 255, 0.1);
    --erp-sidebar-text: rgba(255, 255, 255, 0.95);
    --erp-sidebar-text-muted: rgba(255, 255, 255, 0.6);
    --erp-sidebar-hover: rgba(255, 255, 255, 0.1);
    /* Active = solid gold (India) — not blue gradient */
    --erp-sidebar-active-blue: #f2b244;
    --erp-sidebar-active-text: #022248;
    --erp-sidebar-gold: #f2b244;
    --erp-sidebar-gold-soft: rgba(242, 178, 68, 0.35);
    --erp-sidebar-blue-glow: transparent;
    --erp-sidebar-accent: #fff;
    --erp-sidebar-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Keep India width on laptops; avoid ultra-narrow 14.5rem split */
@media (min-width: 1440px) {
    :root {
        --erp-sidebar-w: 18rem;
    }
}

@media (min-width: 1024px) and (max-width: 1399px) {
    :root {
        --erp-sidebar-w: 18rem;
    }

    .erp-sidebar .fr-sidebar-head {
        padding: 0.7rem 1rem 0.65rem;
    }

    .erp-sidebar .fr-sidebar-brand-logo {
        width: 3rem;
        height: 3rem;
    }

    .erp-sidebar .fr-sidebar-school-name {
        font-size: 1.05rem;
        line-height: 1.3;
    }
}

.erp-sidebar .custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.erp-sidebar .custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.erp-sidebar .custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(242, 178, 68, 0.45) 0%, rgba(255, 255, 255, 0.22) 100%);
    border-radius: 999px;
}
.erp-sidebar .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(242, 178, 68, 0.65) 0%, rgba(255, 255, 255, 0.35) 100%);
}

.erp-sidebar.fr-sidebar {
    width: var(--erp-sidebar-w);
    max-width: min(var(--erp-sidebar-w), 92vw);
    background: var(--erp-sidebar-bg-solid) !important;
    background-image: none !important;
    color: var(--erp-sidebar-text);
    font-family: var(--erp-sidebar-font);
    border-right: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.fr-portal .erp-sidebar.fr-sidebar,
body.fr-portal .erp-sidebar.fr-sidebar#sidebar {
    background: var(--erp-sidebar-bg-solid, #041c34) !important;
    background-image: none !important;
}
.erp-sidebar.fr-sidebar--enterprise::after {
    display: none;
}

.erp-sidebar.fr-sidebar::before {
    display: none;
}

.erp-sidebar .fr-sidebar-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    max-height: 100dvh;
}

/* Sidebar colour is independent of ribbon (--fr-primary). Default: Classic Navy #041c34. */

@media (min-width: 1024px) {
    .erp-sidebar.fr-sidebar {
        border-right-color: rgba(1, 26, 51, 0.45);
        overflow: visible !important;
        /* Keep navy column as tall as full menu on long pages */
        min-height: max(100dvh, max-content);
        max-height: none;
    }

    .erp-sidebar.fr-sidebar .fr-sidebar-inner,
    .erp-sidebar.fr-sidebar--enterprise .fr-sidebar-inner {
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
    }

    .erp-sidebar .fr-sidebar-menu-scroll {
        overflow: visible !important;
        max-height: none !important;
        flex: 1 1 auto;
        mask-image: none;
        -webkit-mask-image: none;
    }
}

@media (max-width: 1023px) {
    .erp-sidebar.fr-sidebar {
        overflow: hidden;
        box-shadow: 12px 0 40px rgba(1, 15, 31, 0.42);
        transform: translateX(-100%);
    }
    .erp-sidebar.fr-sidebar.is-open,
    body.erp-sidebar-open .erp-sidebar.fr-sidebar {
        transform: translateX(0) !important;
    }
    .erp-sidebar .fr-sidebar-inner {
        height: 100%;
        max-height: 100dvh;
        min-height: 0;
    }
}

.erp-sidebar .fr-sidebar-head {
    padding: 1.35rem 1.35rem 1.15rem;
    border-bottom: 1px solid var(--erp-sidebar-border);
    background: linear-gradient(180deg, #08294d 0%, #052140 55%, #041c34 100%);
}
body.fr-portal .erp-sidebar .fr-sidebar-head {
    background: var(--erp-sidebar-bg-solid, #041c34) !important;
    border-bottom: none !important;
}
.erp-sidebar .fr-sidebar-head--compact {
    padding: 0.7rem 1rem 0.65rem;
}
@media (min-width: 1024px) {
    .erp-sidebar .fr-sidebar-head--mobile-only {
        display: none;
    }
}

.erp-sidebar .fr-sidebar-lang-wrap {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
}
.erp-sidebar .fr-sidebar-head--compact .fr-sidebar-role-badge {
    margin-top: 0.45rem;
}

.erp-sidebar .nipun-lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--erp-sidebar-border);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.erp-sidebar .nipun-lang-switch a {
    color: var(--erp-sidebar-text-muted) !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 600;
    padding: 0.26rem 0.52rem !important;
    border-radius: 999px !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.erp-sidebar .nipun-lang-switch a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-1px);
}

.erp-sidebar .nipun-lang-switch a:active {
    transform: scale(0.96);
}

.erp-sidebar .nipun-lang-switch a.is-active {
    color: var(--erp-violet-deep) !important;
    font-weight: 700;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14), inset 0 0 0 1px rgba(242, 178, 68, 0.35) !important;
}

.erp-sidebar .nipun-lang-sep {
    color: rgba(255, 255, 255, 0.25);
    font-size: 10px;
    padding: 0 0.08rem;
}

.erp-sidebar .fr-sidebar-close-btn {
    color: var(--erp-sidebar-text-muted);
    border-color: var(--erp-sidebar-border);
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}

.erp-sidebar .fr-sidebar-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    transform: scale(1.04);
}

.erp-sidebar .fr-sidebar-close-btn:active {
    transform: scale(0.94);
}

.erp-sidebar .fr-sidebar-brand-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.erp-sidebar .fr-sidebar-brand-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.erp-sidebar .fr-sidebar-brand-logo {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 999px;
    object-fit: contain;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.35rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.erp-sidebar .fr-sidebar-brand-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    color: #022248;
    font-size: 1.15rem;
    border-radius: 999px;
}

.erp-sidebar .fr-sidebar-brand-avatar {
    background: #f2b244 !important;
    color: #022248 !important;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0;
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

.erp-sidebar .fr-sidebar-brand-card--name-only {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1rem;
    overflow: visible;
    min-height: 0;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.erp-sidebar .fr-sidebar-brand-card--name-only::before {
    display: none;
}

.erp-sidebar .fr-sidebar-brand-card--name-only:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.erp-sidebar .fr-sidebar-brand-card--name-only .fr-sidebar-brand-copy {
    min-width: 0;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.erp-sidebar .fr-sidebar-brand-platform {
    display: block;
    margin: 0 0 0.15rem;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    border-radius: 0;
    width: auto;
    max-width: 100%;
}

.erp-sidebar .fr-sidebar-brand-platform__mark {
    display: none;
}

.erp-sidebar .fr-sidebar-brand-platform--year {
    letter-spacing: 0.02em;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

.erp-sidebar .fr-sidebar-school-name {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: none;
    text-wrap: balance;
}

.erp-sidebar .fr-sidebar-school-name--short {
    font-size: 1.12rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.erp-sidebar .fr-sidebar-school-name--long {
    font-size: 0.92rem;
    line-height: 1.28;
    -webkit-line-clamp: 3;
}

.erp-sidebar .fr-sidebar-school-name--compact {
    font-size: 0.84rem;
    line-height: 1.24;
    -webkit-line-clamp: 3;
    letter-spacing: -0.01em;
}

.erp-sidebar .fr-sidebar-brand-card--name-only .fr-sidebar-role-badge {
    margin-top: 0.42rem;
    align-self: flex-start;
}

.erp-sidebar .fr-sidebar-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    margin-top: 0.3rem;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.3rem;
    padding: 0.1rem 0.38rem;
}

.erp-sidebar .fr-sidebar-menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: 0.2rem;
    padding-bottom: 0.25rem;
    position: relative;
}

@media (max-width: 1023px) {
    .erp-sidebar .fr-sidebar-menu-scroll {
        mask-image: none;
        -webkit-mask-image: none;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto !important;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .erp-sidebar.fr-sidebar.is-open .fr-sidebar-inner,
    body.erp-sidebar-open .erp-sidebar.fr-sidebar .fr-sidebar-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        max-height: 100dvh;
        min-height: 0;
    }
}

.erp-sidebar .fr-sidebar-nav {
    padding: 0.28rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.erp-sidebar .fr-sidebar-group + .fr-sidebar-group {
    margin-top: 0.35rem;
}

.erp-sidebar .fr-sidebar-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.65rem 0.35rem 0.35rem;
    padding: 0 0.12rem;
    font-family: Poppins, Inter, system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.erp-sidebar .fr-sidebar-group:first-child .fr-sidebar-group-label {
    margin-top: 0;
    margin-bottom: 0.2rem;
}

.erp-sidebar .fr-sidebar-group:first-child .fr-sidebar-group-label::after {
    display: none;
}

.erp-sidebar .fr-sidebar-group-label span {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.erp-sidebar .fr-sidebar-group-label span::before {
    display: none;
}

.erp-sidebar .fr-sidebar-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.erp-sidebar .fr-sidebar-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.erp-sidebar .fr-sidebar-nav-eyebrow {
    display: none;
}

.erp-sidebar .fr-nav-phase {
    margin: 0.55rem 0.38rem 0.25rem;
    padding: 0.2rem 0.45rem;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 2px solid rgba(242, 178, 68, 0.45);
}

.erp-sidebar .fr-nav-phase:first-of-type {
    margin-top: 0.2rem;
}

.erp-sidebar .fr-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.75rem 1rem;
    font-family: Poppins, Inter, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 1rem;
    border: none;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    touch-action: manipulation;
    background: transparent;
    box-shadow: none;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.erp-sidebar .fr-nav-item::before {
    display: none;
}

.erp-sidebar .fr-nav-item::after {
    display: none;
}

.erp-sidebar .fr-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: transparent;
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.erp-sidebar .fr-nav-item:hover::before,
.erp-sidebar .fr-nav-item:hover::after {
    display: none;
}

.erp-sidebar .fr-nav-item:active {
    transform: none;
    transition-duration: 0.08s;
    box-shadow: none;
}

.erp-sidebar .fr-nav-item:focus-visible {
    outline: 2px solid rgba(242, 178, 68, 0.85);
    outline-offset: 2px;
}

.erp-sidebar .fr-nav-item.is-active-link {
    background: #f2b244;
    color: #022248;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transform: none;
    padding-left: 1rem;
}

.erp-sidebar .fr-nav-item.is-active-link::before,
.erp-sidebar .fr-nav-item.is-active-link::after {
    display: none;
}

.erp-sidebar .fr-nav-ripple-wave {
    display: none;
}

@keyframes erp-sidebar-nav-ripple {
    to {
        transform: scale(2.8);
        opacity: 0;
    }
}

.erp-sidebar .fr-nav-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    border: none;
    position: relative;
    z-index: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.erp-sidebar .fr-nav-item:hover .fr-nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.erp-sidebar .fr-nav-item:active .fr-nav-icon {
    transform: none;
}

.erp-sidebar .fr-nav-item.is-active-link .fr-nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #022248;
    border-color: transparent;
    box-shadow: none;
}

.erp-sidebar .fr-nav-label {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    font-family: Poppins, Inter, system-ui, sans-serif;
    line-height: 1.35;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
    transition: none;
}

.erp-sidebar .fr-nav-item:hover .fr-nav-label {
    transform: none;
}

.erp-sidebar .fr-nav-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    opacity: 0.45;
    color: rgba(255, 255, 255, 0.45);
    transform: none;
    position: relative;
    z-index: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.erp-sidebar .fr-nav-item:hover .fr-nav-chevron {
    opacity: 0.75;
    transform: none;
    color: rgba(255, 255, 255, 0.75);
}

.erp-sidebar .fr-nav-item.is-active-link .fr-nav-chevron {
    opacity: 0.9;
    transform: none;
    color: #022248;
}

.erp-sidebar .fr-nav-active-dot {
    display: none;
}

/* Pending badge on navy sidebar */
.erp-sidebar .fr-nav-item .ml-auto,
.erp-sidebar .fr-nav-item [class*="rounded-full"] {
    position: relative;
    z-index: 2;
}

.erp-sidebar .fr-nav-item .bg-amber-400 {
    background: #fde68a !important;
    color: #78350f !important;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.erp-sidebar .fr-nav-item.is-active-link .fr-nav-badge,
.erp-sidebar .fr-nav-item.is-active-link .bg-amber-400 {
    background: #022248 !important;
    color: #f2b244 !important;
}

.erp-sidebar .fr-nav-item.is-active-link .fr-nav-chevron {
    opacity: 0.9;
    transform: none;
    color: #022248;
}

/* Lead row: icon + label (India layout) */
.erp-sidebar .fr-nav-item-lead {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

/* Manual-only mode — Gate menu visible but locked */
.erp-sidebar .fr-sidebar-gate-disabled {
    display: block;
    margin: 0.18rem 0.45rem 0.35rem;
    padding: 0.55rem 0.65rem 0.62rem;
    border-radius: 0.72rem;
    border: 1px dashed rgba(251, 191, 36, 0.45);
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.22) 0%, rgba(15, 23, 42, 0.35) 100%);
    opacity: 0.92;
}

.erp-sidebar .fr-sidebar-gate-disabled__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.erp-sidebar .fr-nav-icon--locked {
    opacity: 0.72;
    filter: grayscale(0.35);
}

.erp-sidebar .fr-sidebar-gate-lock {
    margin-left: 0.28rem;
    font-size: 0.62rem;
    color: rgba(251, 191, 36, 0.95);
    vertical-align: middle;
}

.erp-sidebar .fr-sidebar-gate-disabled__hint {
    margin: 0.38rem 0 0 2.45rem;
    font-size: 0.62rem;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 500;
}

.erp-sidebar .fr-sidebar-gate-disabled__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.42rem 0 0 2.45rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1e293b;
    background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
    border: 1px solid rgba(251, 191, 36, 0.65);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.erp-sidebar .fr-sidebar-gate-disabled__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    color: #0f172a;
}

.erp-sidebar .fr-sidebar-nav-actions {
    flex-shrink: 0;
    margin: 0;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--erp-sidebar-border);
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.erp-sidebar .fr-sidebar-secondary-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.52rem 0.9rem;
    margin-bottom: 0.38rem;
    border-radius: 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease;
}

.erp-sidebar .fr-sidebar-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(242, 178, 68, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 8, 20, 0.22);
}

.erp-sidebar .fr-sidebar-secondary-btn:active {
    transform: translateY(0) scale(0.98);
}

.erp-sidebar .fr-sidebar-foot-plan {
    margin-bottom: 0.45rem;
}

.erp-sidebar .fr-sidebar-foot-plan a,
.erp-sidebar .fr-sidebar-foot-plan p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.45rem;
    border: 1px solid var(--erp-sidebar-border);
    background: rgba(0, 0, 0, 0.1);
    font-size: 10px;
    font-weight: 600;
    color: var(--erp-sidebar-text-muted) !important;
    text-decoration: none;
    transition: background 0.14s ease, border-color 0.14s ease;
}

.erp-sidebar .fr-sidebar-foot-plan a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff !important;
}

.erp-sidebar .fr-sidebar-foot-plan strong {
    color: #fff;
}

.erp-sidebar .fr-signout {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(254, 202, 202, 0.4) !important;
    background: rgba(254, 242, 242, 0.96) !important;
    color: #b91c1c !important;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.2s ease !important;
}

.erp-sidebar .fr-signout:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.15) !important;
    filter: none !important;
}

.erp-sidebar .fr-signout:active {
    transform: scale(0.98) !important;
}

.erp-sidebar .fr-signout::after {
    display: none;
}

.erp-sidebar .fr-sidebar-role-badge {
    margin-top: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.12rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-sidebar .fr-sidebar-role-badge--accounts {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(253, 230, 138, 0.4);
    color: #fef3c7;
}

.erp-sidebar .fr-sidebar-role-badge--teacher {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(186, 230, 253, 0.35);
    color: #e0f2fe;
}

#fr-sidebar-mobile-fab.erp-sidebar-fab {
    background: var(--erp-sidebar-bg-solid, #041c34) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--erp-violet-deep, #022248) 38%, transparent) !important;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.2s ease !important;
}

#fr-sidebar-mobile-fab.erp-sidebar-fab:hover {
    box-shadow: 0 6px 22px rgba(2, 34, 72, 0.45), 0 0 0 3px rgba(242, 178, 68, 0.28) !important;
    border-color: rgba(242, 178, 68, 0.45) !important;
    transform: translateY(-2px) scale(1.03);
}

#fr-sidebar-mobile-fab.erp-sidebar-fab .fr-fab-ring {
    display: none;
}

#fr-sidebar-mobile-fab.erp-sidebar-fab:active {
    transform: scale(0.96);
}

/* Mobile top bar — matches navy sidebar */
body.fr-portal .fr-panel-global-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 246, 251, 0.97) 100%);
    border-bottom-color: rgba(2, 34, 72, 0.12);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 18px rgba(2, 34, 72, 0.06);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

body.fr-portal .fr-panel-global-bar p {
    color: var(--fr-primary, #022248);
}

body.fr-portal .fr-panel-global-bar [data-fr-sidebar-toggle] {
    border-color: rgba(2, 34, 72, 0.2);
    background: linear-gradient(180deg, rgba(2, 34, 72, 0.08) 0%, rgba(2, 34, 72, 0.04) 100%);
    color: var(--fr-primary, #022248);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

body.fr-portal .fr-panel-global-bar [data-fr-sidebar-toggle]:hover {
    background: rgba(2, 34, 72, 0.12);
    border-color: rgba(2, 34, 72, 0.28);
    color: var(--fr-primary-deep, #011a33);
    box-shadow: 0 2px 10px rgba(2, 34, 72, 0.1);
}

body.fr-portal .fr-panel-global-bar [data-fr-sidebar-toggle]:active {
    transform: scale(0.94);
}

.erp-sidebar-backdrop.fr-sidebar-backdrop {
    background: rgba(1, 15, 31, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.erp-sidebar .fr-ay-chip--sidebar {
    margin-top: 0.3rem;
    padding: 0.26rem 0.45rem;
    border: 1px solid rgba(167, 243, 208, 0.4);
    background: rgba(6, 95, 70, 0.32);
    color: #ecfdf5;
    border-radius: 0.35rem;
}

.erp-sidebar .fr-ay-chip--sidebar:hover {
    background: rgba(6, 95, 70, 0.48);
    border-color: rgba(167, 243, 208, 0.65);
    transform: translateY(-1px);
}

.erp-sidebar .fr-ay-chip--sidebar.fr-ay-chip--setup,
.erp-sidebar .fr-ay-chip--sidebar.fr-ay-chip--historical {
    border-color: rgba(253, 230, 138, 0.5);
    background: rgba(146, 64, 14, 0.38);
    color: #fffbeb;
}

@media (prefers-reduced-motion: reduce) {
    .erp-sidebar .fr-nav-item,
    .erp-sidebar .fr-nav-item.is-active-link,
    .erp-sidebar .fr-nav-icon,
    .erp-sidebar .fr-nav-chevron,
    .erp-sidebar .fr-nav-label,
    .erp-sidebar .fr-sidebar-secondary-btn,
    .erp-sidebar .fr-signout {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }

    .erp-sidebar .fr-nav-ripple-wave {
        display: none !important;
    }
}

/* Dashboard welcome strip — same navy as sidebar */
.ncc-bridge-banner--violet {
    background: var(--erp-sidebar-bg-solid);
    background-image: var(--erp-sidebar-bg);
    border-color: var(--erp-sidebar-border) !important;
    color: var(--erp-sidebar-text);
    box-shadow: 0 8px 24px rgba(2, 34, 72, 0.22);
}
.ncc-bridge-banner--violet h2 {
    color: #fff;
}
.ncc-bridge-banner--violet .text-gray-600 {
    color: var(--erp-sidebar-text-muted) !important;
}

/* Device matrix — compact laptop sidebar; phone off-canvas already handled */
@media (min-width: 1025px) and (max-width: 1440px) {
    :root {
        --erp-sidebar-w: 16.5rem;
    }

    .erp-sidebar.fr-sidebar {
        width: var(--erp-sidebar-w);
    }

    .erp-sidebar .fr-sidebar-link,
    .erp-sidebar .fr-sidebar-school-name {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 767px) {
    .erp-sidebar.fr-sidebar {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .erp-sidebar .fr-sidebar-link {
        min-height: 44px;
        touch-action: manipulation;
    }
}
