.erp-navbar { background-color: #0b3d6e; }
.erp-navbar > .container-fluid { flex-wrap: nowrap; gap: 1rem; }
.erp-brand { display: flex; align-items: center; gap: .8rem; min-width: 0; white-space: normal; }
.erp-brand-app { display: block; font-size: .8rem; opacity: .8; }
.erp-logo { object-fit: contain; background: white; border-radius: .25rem; padding: .15rem; flex-shrink: 0; }
.erp-menu-trigger { flex-shrink: 0; display: flex; align-items: center; gap: .8rem; }
.erp-auth-card { max-width: 420px; margin: 3rem auto; }
.erp-qr { width: 200px; height: 200px; image-rendering: pixelated; }
html { font-size: 15px; }

/* Native dialog keeps keyboard focus inside the menu and supports Escape. */
.erp-menu {
    width: 100%; max-width: 100%; height: 100%; height: 100dvh; max-height: 100dvh;
    margin: 0; padding: 0; border: 0; color: #172b43; background: #f4f7fb;
}
.erp-menu[open] { display: flex; flex-direction: column; }
.erp-menu [hidden] { display: none !important; }
html:has(.erp-menu[open]) { overflow: hidden; }
.erp-menu-header { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 2rem; background: white; border-bottom: 1px solid #dce5ef; }
.erp-menu-logo { object-fit: contain; flex-shrink: 0; }
.erp-menu-eyebrow { margin: 0 0 .2rem; font-size: .75rem; color: #536780; }
.erp-menu h1 { margin: 0; font-size: 1.5rem; font-weight: 700; color: #0b3d6e; }
.erp-menu-user { margin: .25rem 0 0; font-size: .85rem; color: #536780; overflow-wrap: anywhere; }
.erp-menu-searchbar { padding: 1rem 2rem .5rem; }
.erp-menu-searchbar .form-label { font-weight: 600; font-size: .85rem; }
.erp-menu-searchbar .form-control { min-height: 44px; }
.erp-menu-status { margin: .5rem 0 0; font-size: .8rem; color: #536780; }
.erp-menu-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .5rem 2rem 2rem; }
.erp-menu-list, .erp-menu-groups, :is(.erp-menu, .erp-module-panel) .dropdown-menu { list-style: none; margin: 0; padding: 0; }
.erp-menu-list > .nav-item { margin: .5rem 0 1rem; }
.erp-menu-list > .nav-item > a { display: inline-block; font-weight: 600; color: #0b3d6e; }
.erp-menu-module { margin-bottom: 1.5rem; }
.erp-menu-module h2 { margin: .5rem 0 .75rem; font-size: 1rem; font-weight: 700; color: #0b3d6e; }
.erp-menu-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); align-items: start; gap: 1rem; }
.erp-menu-groups > li { min-width: 0; border: 1px solid #dce5ef; border-radius: .6rem; background: white; overflow: hidden; }
.erp-menu-group-title { margin: 0; padding: .8rem 1rem; border-bottom: 1px solid #e5ebf2; font-size: .95rem; font-weight: 700; background: #edf3f9; color: #183e66; }
:is(.erp-menu, .erp-module-panel) .dropdown-menu { display: block; position: static; min-width: 0; border: 0; border-radius: 0; padding: .4rem; background: transparent; }
:is(.erp-menu, .erp-module-panel) .dropdown-item, :is(.erp-menu, .erp-module-panel) .nav-link { white-space: normal; overflow-wrap: anywhere; border-radius: .3rem; padding: .55rem .65rem; color: #23486c; font-size: .9rem; text-decoration: none; }
:is(.erp-menu, .erp-module-panel) .dropdown-item:hover, :is(.erp-menu, .erp-module-panel) .nav-link:hover { background: #edf4fc; color: #0b3d6e; }
:is(.erp-menu, .erp-module-panel) a:focus-visible, .erp-menu button:focus-visible { outline: 3px solid #277ac4; outline-offset: -3px; }
:is(.erp-menu, .erp-module-panel) a[aria-current="page"] { background: #e2eefb; color: #0b3d6e; font-weight: 700; }
:is(.erp-menu, .erp-module-panel) .dropdown-header { white-space: normal; font-size: .75rem; font-weight: 700; color: #5b7088; padding: .6rem .65rem .25rem; }
.erp-menu-empty { text-align: center; padding: 3rem 1rem; color: #536780; }
.erp-menu-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 2rem; border-top: 1px solid #dce5ef; background: white; font-size: .8rem; color: #536780; }
.erp-menu-footer form { flex-shrink: 0; }
/* Module menus in the navbar (one per legacy app: Academic, Fee, Grievance ...). Built by erp-menu.js. */
.erp-navbar { position: relative; }
.erp-module-bar { display: flex; flex: 1; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
.erp-module-bar:empty { display: none; }
.erp-module-toggle { color: white; border: 1px solid rgba(255,255,255,.45); background: transparent; font-weight: 600; }
.erp-module-toggle:hover, .erp-module-toggle[aria-expanded="true"] { background: white; color: #0b3d6e; }
.erp-module-toggle.active { box-shadow: inset 0 -3px 0 #f3c14b; }
.erp-module-toggle::after { content: ""; display: inline-block; margin-left: .45rem; vertical-align: .15em;
    border-top: .35em solid; border-right: .3em solid transparent; border-left: .3em solid transparent; }
.erp-module-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 1040; max-height: min(78vh, 760px); overflow-y: auto;
    padding: 1rem 1.5rem 1.25rem; background: #f6f9fc; border-bottom: 3px solid #0b3d6e; box-shadow: 0 .75rem 1.5rem rgba(11,61,110,.18); }
.erp-module-panel[hidden] { display: none; }
.erp-module-panel h2 { margin: 0 0 .75rem; font-size: 1rem; font-weight: 700; color: #0b3d6e; }
.erp-module-panel .erp-menu-groups { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
@media (max-width: 991.98px) { .erp-module-bar, .erp-module-panel { display: none !important; } }
@media (max-width: 575.98px) {
    .erp-brand { font-size: 1rem; gap: .5rem; }
    .erp-menu-header { padding: .8rem 1rem; gap: .7rem; }
    .erp-menu h1 { font-size: 1.15rem; }
    .erp-menu-eyebrow { font-size: .65rem; }
    .erp-menu-logo { width: 40px; height: 55px; }
    .erp-menu-searchbar { padding: .8rem 1rem .5rem; }
    .erp-menu-content { padding: .5rem 1rem 1rem; }
    .erp-menu-footer { padding: .7rem 1rem; }
}
