/* APPLICATION SIDEBAR */

.app-sidebar {
    border-right: 1px solid #e6e8ec !important;
    background: #ffffff !important;
}

/* Drawer content */

.app-sidebar .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-x: hidden;
}

/* LOGO */

.sidebar-logo {
    height: 68px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
}

.logo-expanded {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-parama {
    /* Geometric sans (the "PARAMA" half of the wordmark). */
    font-family: 'Montserrat', 'Century Gothic', 'Franklin Gothic Medium', Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #101828;
}

.logo-energi {
    /* Rounded-square tech sans (the "ENERGI" half) - wide tracking to match the logo. */
    margin-top: 4px;
    font-family: 'Exo 2', 'Century Gothic', 'Segoe UI', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #101828;
}

.logo-mini {
    display: none;
    font-family: 'Montserrat', 'Century Gothic', Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #2563eb;
}

/* NAVIGATION */

.sidebar-menu {
    padding: 6px;
}

.sidebar-menu .mud-nav-link {
    min-height: 42px;
    margin: 3px 0;
    padding: 0 12px;

    border-radius: 9px;

    color: #667085 !important;
    font-size: 13px;
    font-weight: 500;

    text-decoration: none !important;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.sidebar-menu .mud-nav-link:hover {
    background: #f5f8ff;
    color: #2563eb !important;
    text-decoration: none !important;
}

.sidebar-menu .mud-nav-link.active {
    background: #edf3ff;
    color: #2563eb !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.sidebar-menu .mud-nav-link-icon {
    color: inherit !important;
    font-size: 19px !important;
}

/* Keep the nav labels mounted inside the mini rail so they fade together with the drawer's own
   width transition. MudBlazor's mini rule removes them with an instant display:none, which made a
   collapse look like the rail snapped empty while it was still 240px wide. The selector below is
   heavier than MudBlazor's own .mud-drawer--closed.mud-drawer-mini ... .mud-icon-root:first-child
   + .mud-nav-link-text rule, so it wins. */
.sidebar-menu .mud-nav-link .mud-nav-link-text {
    transition: opacity 0.16s ease 0.08s, visibility 0s;
}

.app-sidebar.mud-drawer-mini.mud-drawer--closed .mud-drawer-content .mud-navmenu .mud-nav-link .mud-icon-root:first-child + .mud-nav-link-text {
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease, visibility 0s linear 0.1s;
}

/* MudBlazor animates the mini drawer width at 225ms with cubic-bezier(0, 0, 0.2, 1) - a curve that
   moves almost all the way in the first ~60ms. The longer, gentler curve below turns it into a
   gradual reveal in step with the brand/logo/labels above. !important is needed because MudBlazor's
   own rule is equally specific. */
.app-sidebar.mud-drawer.mud-drawer-mini.mud-drawer-pos-left {
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Overlay mode: pin the content at the mini width so opening the drawer never changes the content's
   width. MudBlazor's own sibling rules would animate margin-left 56px <-> 240px, and that per-frame
   width change made ApexCharts redraw (svg bbox measurement) and shifted layout (CLS ~0.09). With the
   width constant the drawer simply expands over the content while hovered - no reflow, no chart
   redraw. */
.app-sidebar.mud-drawer.mud-drawer-mini.mud-drawer-pos-left ~ .main-wrapper {
    margin-left: var(--mud-drawer-width-mini-left, 56px) !important;
    transition: none !important;
}

/* Make the temporary overlay read as "on top" while it is expanded. */
.app-sidebar.mud-drawer--open {
    box-shadow: 8px 0 24px rgba(16, 24, 40, 0.14) !important;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-menu .mud-nav-link .mud-nav-link-text {
        transition: none;
    }

    .app-sidebar.mud-drawer.mud-drawer-mini.mud-drawer-pos-left,
    .app-sidebar.mud-drawer.mud-drawer-mini.mud-drawer-pos-left ~ .main-wrapper {
        transition: none !important;
    }
}

/* FOOTER */

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px 20px;
    color: #98a2b3;
}

.footer-brand {
    color: #16a34a !important;
    font-weight: 700 !important;
}

.sidebar-footer .mud-typography-caption {
    display: block;
    line-height: 1.4;
}

.footer-version {
    margin-top: 12px;
    color: #98a2b3 !important;
}