/* ============================================================
   ePortal — Side-menu layout (used by Pages/Shared/_Layout.cshtml)
   Fixed left sidebar + sticky topbar + content area.
   Responsive: sidebar collapses to an off-canvas drawer < 992px.
   ============================================================ */
:root {
    /* ---- ASU corporate palette (ASU Corporate Identity Guidelines) --------
       Brand blue and orange are taken from the logo/colour-usage pages.
       The 700/800/900 blues are darkened shades of the brand blue, used for
       the large dark surfaces (sidebar, footer) the guidelines do not cover.
       Use --asu-orange-deep for orange text/icons on light surfaces; the
       brand orange only has enough contrast against the dark blues.        */
    --asu-blue: #3D54A3;
    --asu-blue-700: #2E3E7C;
    --asu-blue-800: #232F5E;
    --asu-blue-900: #1C2647;
    --asu-blue-tint-1: #6B80BA;
    --asu-blue-tint-2: #9EA8D1;
    --asu-blue-tint-3: #C4CCE3;
    --asu-blue-tint-4: #E3E6F2;
    --asu-orange: #F5A61C;
    --asu-orange-tint-1: #F7BD54;
    --asu-orange-tint-2: #FAD18C;
    --asu-orange-tint-3: #FCE3BA;
    --asu-orange-tint-4: #FFF2DE;
    --asu-orange-deep: #C7780A;
    --asu-dark: #241F21;
    /* ---- ePortal roles, mapped onto the palette above ------------------ */
    --ep-navy: var(--asu-blue-800);
    --ep-navy-mid: var(--asu-blue-700);
    --ep-navy-light: var(--asu-blue);
    --ep-gold: var(--asu-orange);
    --ep-gold-light: var(--asu-orange-tint-1);
    --ep-surface: #f5f6f8;
    --ep-white: #ffffff;
    --ep-text: #1a2332;
    --ep-muted: #6b7897;
    --ep-border: #e2e6f0;
    --ep-sidebar-w: 264px;
    --ep-topbar-h: 60px;
    --ep-side-z: 1050;
}

html, body {
    height: 100%;
}

/* ---- Shell ------------------------------------------------- */
.ep-shell {
    min-height: 100vh;
}

/* ---- Sidebar ----------------------------------------------- */
.ep-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--ep-sidebar-w);
    background: var(--ep-navy);
    display: flex;
    flex-direction: column;
    z-index: var(--ep-side-z);
    box-shadow: 2px 0 18px rgba(35, 47, 94, 0.12);
    transition: transform .28s ease;
}

.ep-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 18px;
    height: var(--ep-topbar-h);
    flex-shrink: 0;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ep-sidebar-brand .ep-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--ep-gold) 0%, var(--ep-gold-light) 100%);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ep-sidebar-brand .ep-brand-icon i {
        color: var(--ep-navy);
        font-size: 17px;
    }

.ep-sidebar-brand .ep-brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
}

    .ep-sidebar-brand .ep-brand-name span {
        color: var(--ep-gold-light);
    }

/* Scrollable nav region */
.ep-side-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px 18px;
    list-style: none;
    margin: 0;
}

    .ep-side-nav::-webkit-scrollbar {
        width: 7px;
    }

    .ep-side-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.14);
        border-radius: 4px;
    }

    .ep-side-nav > li {
        margin-bottom: 2px;
    }

/* Signed-in staff profile (above Home) */
.ep-side-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
}

    .ep-side-profile:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(247, 189, 84, 0.4);
    }

.ep-side-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--ep-navy);
    background: linear-gradient(135deg, var(--ep-gold) 0%, var(--ep-gold-light) 100%);
}

.ep-side-profile-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ep-side-profile-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-side-profile-role {
    font-size: 11px;
    color: var(--ep-gold-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Single (non-collapsing) link + group header share a look */
.ep-side-link,
.ep-side-toggle {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 8px 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .ep-side-link i.ep-side-ic,
    .ep-side-toggle i.ep-side-ic {
        width: 20px;
        font-size: 16px;
        text-align: center;
        color: var(--ep-gold-light);
        flex-shrink: 0;
    }

    .ep-side-link:hover,
    .ep-side-toggle:hover {
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
    }

    .ep-side-link.active {
        background: rgba(245, 166, 28, 0.16);
        color: #fff;
    }

.ep-side-toggle {
    justify-content: space-between;
}

    .ep-side-toggle .ep-side-label {
        display: flex;
        align-items: center;
        gap: 11px;
        flex: 1;
        min-width: 0;
    }

    .ep-side-toggle .ep-side-caret {
        font-size: 11px;
        opacity: .6;
        transition: transform .22s ease;
        flex-shrink: 0;
    }

    .ep-side-toggle[aria-expanded="true"] {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

        .ep-side-toggle[aria-expanded="true"] .ep-side-caret {
            transform: rotate(180deg);
        }

/* Submenu (collapsible) */
.ep-side-sub {
    list-style: none;
    margin: 2px 0 4px;
    padding: 4px 0 4px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
}

    .ep-side-sub.open {
        max-height: 1400px;
    }

    .ep-side-sub a {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 8px 12px 8px 42px;
        font-size: 13px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.62);
        border-radius: 7px;
        text-decoration: none !important;
        transition: background .12s, color .12s;
    }

        .ep-side-sub a i {
            font-size: 14px;
            width: 16px;
            text-align: center;
            flex-shrink: 0;
            opacity: .85;
        }

        .ep-side-sub a:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

    .ep-side-sub .ep-dd-label {
        padding: 9px 12px 4px 42px;
        font-size: 10.5px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .5px;
        color: rgba(247, 189, 84, 0.75);
    }

    .ep-side-sub hr {
        margin: 6px 20px 6px 42px;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

.ep-side-heading {
    padding: 14px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255, 255, 255, 0.35);
}

.ep-sidebar-foot {
    flex-shrink: 0;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 7px;
}

    .ep-sidebar-foot i {
        color: var(--ep-gold-light);
    }

/* ---- Main column ------------------------------------------- */
.ep-main {
    margin-left: var(--ep-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .28s ease;
}

/* Sticky top bar */
.ep-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    height: var(--ep-topbar-h);
    background: var(--ep-white);
    border-bottom: 1px solid var(--ep-border);
    box-shadow: 0 1px 4px rgba(35, 47, 94, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
}

.ep-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ep-topbar-text {
    font-size: 12px;
    color: var(--ep-muted);
    white-space: nowrap;
}

    .ep-topbar-text strong {
        color: var(--ep-navy);
        font-weight: 600;
    }

.ep-topbar-divider {
    width: 1px;
    height: 16px;
    background: var(--ep-border);
}

.ep-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ep-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--ep-border);
    background: var(--ep-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ep-muted);
    font-size: 15px;
    transition: all .15s;
    position: relative;
    text-decoration: none !important;
}

    .ep-icon-btn:hover {
        background: var(--ep-surface);
        color: var(--ep-navy);
        border-color: #c0c8e0;
    }

.ep-notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: #e03131;
    border-radius: 50%;
    border: 1.5px solid var(--ep-white);
}

/* Sidebar toggle (hamburger) — hidden on desktop */
.ep-sidebar-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    border: 1px solid var(--ep-border);
    background: var(--ep-white);
    color: var(--ep-navy);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Content */
.ep-content {
    flex: 1;
    min-height: 0;
}

/* Footer */
.ep-footer {
    background: var(--ep-navy);
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-footer-copy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

    .ep-footer-copy a {
        color: var(--ep-gold-light);
        text-decoration: none;
    }

.ep-footer-links {
    display: flex;
    gap: 20px;
}

    .ep-footer-links a {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.45);
        text-decoration: none;
        transition: color .15s;
    }

        .ep-footer-links a:hover {
            color: rgba(255, 255, 255, 0.75);
        }

/* Off-canvas overlay (mobile) */
.ep-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(35, 47, 94, 0.5);
    z-index: calc(var(--ep-side-z) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s, visibility .28s;
}

    .ep-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 991.98px) {
    .ep-sidebar {
        transform: translateX(-100%);
    }

    body.ep-sidebar-open .ep-sidebar {
        transform: translateX(0);
    }

    .ep-main {
        margin-left: 0;
    }

    .ep-sidebar-btn {
        display: flex;
    }
}

@media (max-width: 600px) {
    .ep-topbar-text.ep-hide-sm {
        display: none;
    }

    .ep-topbar-divider {
        display: none;
    }

    .ep-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media print {
    .ep-sidebar, .ep-topbar, .ep-footer, .ep-backdrop {
        display: none !important;
    }

    .ep-main {
        margin-left: 0 !important;
    }
}
