/* Layout Shell */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

#AppShell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#TopRow {
    display: flex;
    align-items: center;
    width: 100%;
    height: 4rem;
    flex-shrink: 0;
    background: #ffffff;
}

#TopLogoArea {
    display: flex;
    align-items: center;
    width: 16rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
    gap: 0.25rem;
    overflow: hidden;
}

.eazymap-sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    color: #475569;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.eazymap-sidebar-toggle-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

#TopLogoArea .eazymap-logo-link {
    display: block;
    text-decoration: none;
    width: 100%;
}

#TopLogoArea .eazymap-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    height: 4rem;
    padding: 0 0.5rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

#TopLogoArea .eazymap-logo-img-icon {
    height: 2.2rem;
    width: auto;
    object-fit: contain;
}

#TopLogoArea .eazymap-logo-img-text {
    height: 1.4rem;
    width: auto;
    object-fit: contain;
}

#TopHeaderArea {
    flex: 1;
    min-width: 0;
}

#MainContent {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Left sidebar drawer — Default OPEN on desktop */
#LeftContent_Maximal_Menu {
    flex-shrink: 0;
    width: 16rem;
    height: 100%;
    position: relative;
    background: #ffffff;
    margin-left: 0;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

/* Collapsed state on desktop — slides away off-screen */
.sidebar-collapsed #LeftContent_Maximal_Menu {
    margin-left: -16rem;
}

/* Right content column */
#RightContent {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Main body content area */
#PageBody {
    padding: 1.5rem 1.5rem 3.5rem;
    min-height: 100%;
    box-sizing: border-box;
}

/* Sidebar overlay (hidden on desktop) */
.eazymap-sidebar-overlay {
    display: none;
}

@keyframes overlayFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Loading overlay */
.eazymap-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.eazymap-loading-overlay.active {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    #TopLogoArea {
        width: auto !important;
        max-width: 12rem;
    }

    #TopLogoArea .eazymap-logo-text {
        display: none;
    }

    /* On mobile, sidebar is a fixed overlay drawer, closed by default */
    #LeftContent_Maximal_Menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 16rem;
        height: 100vh;
        height: 100dvh;
        margin-left: 0 !important;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 500;
        box-shadow: none;
    }

    .sidebar-open #LeftContent_Maximal_Menu {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    /* Overlay active only on mobile when drawer is open */
    .sidebar-open .eazymap-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 450;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        animation: overlayFade 0.2s ease;
    }
}

/* ==========================================================================
   EazyTopNavigation - Clean & Enterprise Breadcrumb Navigation
   ========================================================================== */
.eazy-top-nav {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    font-size: 0.875rem !important; /* 14px on mobile */
    line-height: 1.4rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 0.15rem 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
}

.eazy-top-nav::-webkit-scrollbar {
    display: none !important;
}

@media (min-width: 640px) {
    .eazy-top-nav {
        gap: 0.45rem !important;
        font-size: 1rem !important; /* 16px on tablet */
        padding: 0.25rem 0 !important;
    }
}

@media (min-width: 1024px) {
    .eazy-top-nav {
        gap: 0.5rem !important;
        font-size: 1.0625rem !important; /* 17px on desktop */
    }
}

/* Parent / Ancestor Links */
.eazy-top-nav .eazy-top-nav-link,
.eazy-top-nav-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    padding: 0.15rem 0.35rem !important;
    border-radius: 0.375rem !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.15s ease-in-out !important;
    flex-shrink: 0 !important;
    max-width: 100px !important;
}

@media (min-width: 640px) {
    .eazy-top-nav .eazy-top-nav-link,
    .eazy-top-nav-link {
        padding: 0.25rem 0.55rem !important;
        max-width: 200px !important;
        gap: 0.3rem !important;
    }
}

@media (min-width: 1024px) {
    .eazy-top-nav .eazy-top-nav-link,
    .eazy-top-nav-link {
        max-width: 280px !important;
    }
}

.eazy-top-nav .eazy-top-nav-link:hover,
.eazy-top-nav-link:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
    text-decoration: none !important;
}

/* Enterprise / Root Link */
.eazy-top-nav .eazy-top-nav-root,
.eazy-top-nav-root {
    color: #334155 !important;
    font-weight: 600 !important;
    max-width: 110px !important;
}

@media (min-width: 640px) {
    .eazy-top-nav .eazy-top-nav-root,
    .eazy-top-nav-root {
        max-width: 200px !important;
    }
}

.eazy-top-nav .eazy-top-nav-root:hover,
.eazy-top-nav-root:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
}

/* Current / Active Static Text */
.eazy-top-nav .eazy-top-nav-current,
.eazy-top-nav-current {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: inherit !important;
    white-space: nowrap !important;
    padding: 0.15rem 0.35rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    max-width: 140px !important;
}

@media (min-width: 640px) {
    .eazy-top-nav .eazy-top-nav-current,
    .eazy-top-nav-current {
        padding: 0.25rem 0.55rem !important;
        max-width: 300px !important;
        gap: 0.3rem !important;
    }
}

/* Entity Type Badges inside ancestor links */
.eazy-top-nav-tag {
    display: none !important;
    align-items: center !important;
    font-size: 0.75rem !important; /* 12px */
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0.08rem 0.45rem !important;
    border-radius: 0.3rem !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    line-height: 1rem !important;
    flex-shrink: 0 !important;
}

@media (min-width: 640px) {
    .eazy-top-nav-tag {
        display: inline-flex !important;
        font-size: 0.8125rem !important; /* 13px */
    }
}

/* Separator Chevron */
.eazy-top-nav .eazy-top-nav-separator,
.eazy-top-nav-separator {
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
    opacity: 0.75 !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (min-width: 640px) {
    .eazy-top-nav .eazy-top-nav-separator,
    .eazy-top-nav-separator {
        font-size: 1.2rem !important; /* ~19px */
    }
}

/* ==========================================================================
   Modern Integrated Dropdown Selector Pill
   ========================================================================== */
.eazy-top-nav-dropdown {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

.eazy-top-nav-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    position: relative !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0.375rem !important;
    padding: 0.15rem 0.35rem !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    box-shadow: none !important;
}

@media (min-width: 640px) {
    .eazy-top-nav-pill {
        padding: 0.25rem 0.55rem !important;
        gap: 0.5rem !important;
    }
}

.eazy-top-nav-pill:hover {
    background-color: #f1f5f9 !important;
}

.eazy-top-nav-dropdown:focus-within .eazy-top-nav-pill {
    background-color: #f1f5f9 !important;
    box-shadow: none !important;
}

.eazy-top-nav-label {
    font-size: 0.7rem !important; /* 11px on mobile */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #475569 !important;
    background-color: #f1f5f9 !important;
    padding: 0.08rem 0.35rem !important;
    border-radius: 0.3rem !important;
    line-height: 1rem !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    pointer-events: none !important;
}

@media (min-width: 640px) {
    .eazy-top-nav-label {
        font-size: 0.8125rem !important; /* 13px */
        padding: 0.1rem 0.45rem !important;
        line-height: 1.1rem !important;
    }
}

.eazy-top-nav-divider {
    font-size: 0.8125rem !important;
    color: #cbd5e1 !important;
    font-weight: 400 !important;
    user-select: none !important;
    pointer-events: none !important;
}

.eazy-top-nav-value {
    font-size: 0.875rem !important; /* 14px on mobile */
    font-weight: 600 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    pointer-events: none !important;
}

@media (min-width: 640px) {
    .eazy-top-nav-value {
        font-size: 1rem !important; /* 16px */
        max-width: 250px !important;
    }
}

@media (min-width: 1024px) {
    .eazy-top-nav-value {
        font-size: 1.0625rem !important; /* 17px */
        max-width: 360px !important;
    }
}

.eazy-top-nav-chevron {
    font-size: 1.15rem !important; /* 18px on mobile */
    color: #64748b !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    pointer-events: none !important;
    margin-left: -0.1rem !important;
    transition: transform 0.15s ease !important;
}

@media (min-width: 640px) {
    .eazy-top-nav-chevron {
        font-size: 1.375rem !important; /* 22px */
    }
}

.eazy-top-nav-native-select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
    font-size: 16px !important; /* Prevent iOS auto-zoom */
}

/* Extra small mobile screen optimization (< 480px) */
@media (max-width: 480px) {
    .eazy-top-nav-label,
    .eazy-top-nav-divider {
        display: none !important;
    }
    .eazy-top-nav-link {
        max-width: 75px !important;
    }
    .eazy-top-nav-root {
        max-width: 85px !important;
    }
    .eazy-top-nav-value {
        max-width: 100px !important;
    }
}

/* Portal top navigation horizontal scroll */
.portal-top-navigation {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
}

.portal-top-navigation::-webkit-scrollbar {
    display: none !important;
}


