﻿@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

/* Sidebar container */
.sidebar {
    /* width: 300px; - controlled by .expanded/.collapsed */
    background: #FFFFFF;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    box-sizing: border-box;
    height: 100%;
    overflow: visible; /* Allow pin toggle to show outside */
    position: relative;
    z-index: 100; /* Base z-index - below modal overlays (4000) */
}

/* Inner scrollable content - add this class to a wrapper div if needed */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar-home {
    font-size: 16px;
    color: #475569;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

    .sidebar-home:hover {
        background-color: #F3F4F6; /* subtle grey hover */
    }

    .sidebar-home.active {
        background-color: #083050;
        color: white;
    }

        .sidebar-home.active .menu-icon {
            filter: brightness(0) invert(1);
        }

.menu-category {
    margin-bottom: 0;
}

    .menu-category:not(:last-child)::after {
        content: "";
        height: 1px;
        background-color: #e5e7eb;
        margin: 1rem 1rem 0 1rem;
    }

.category-title {
    font-size: 18px;
    font-weight: 500;
    color: #6B7280;
    padding: 0.25rem 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.25px;
}

.sidebar-divider {
    width: 100%;
    height: 0;
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 12px 0;
}

/* Thin divider for collapsed sidebar */
.sidebar.collapsed .sidebar-divider {
    display: block !important;
    visibility: visible !important;
    width: 40px;
    height: 0;
    border: none;
    border-top: 1px solid #CBD5E1;
    margin: 12px auto;
}

.sidebar-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #45556C;
    padding: 0.5rem 1.5rem 0.5rem 12px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ensures left alignment */
    gap: 15px; /* spacing between icon and text */
    cursor: pointer;
}

    .sidebar-title .menu-icon {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

.group-items {
    position: relative;
    margin-left: 2.5rem;
    padding-left: 0.5rem;
}

.group-items .sidebar-item {
    margin-bottom: 12px;
}

.group-items .sidebar-item:last-child {
    margin-bottom: 0;
}

.vertical-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #94A3B8;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #45556C;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    width: auto;
    margin-left: 0.5rem;
}

    .sidebar-item:hover {
        background-color: #083050;
        color: white;
    }

        .sidebar-item:hover .menu-icon {
            filter: brightness(0) invert(1);
        }

    .sidebar-item.active {
        background-color: #083050;
        color: white;
    }

        .sidebar-item.active .menu-icon {
            filter: brightness(0) invert(1);
        }

/* Disabled sidebar items */
.sidebar-item.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

    .sidebar-item.disabled:hover {
        background-color: transparent;
        color: #45556C;
    }

        .sidebar-item.disabled:hover .menu-icon {
            filter: none;
        }

/* New tag for menu items */
.new-tag {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #008236;
    background-color: #DCFCE7;
    border-radius: 4px;
}

.menu-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.sidebar-title .menu-icon,
.sidebar-item.top-level .menu-icon,
.sidebar-home .menu-icon {
    width: 20px;
    height: 20px;
}

.expand-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    margin-left: auto;
    /* #94A3B8 color filter */
    filter: brightness(0) saturate(100%) invert(73%) sepia(6%) saturate(1046%) hue-rotate(176deg) brightness(90%) contrast(89%);
}

    .expand-icon.expanded {
        transform: rotate(180deg);
    }

/* Sidebar group wrapper for expandable sections */
.sidebar-group {
    margin-bottom: 15px;
}

/* App branding */
.app-icon {
    width: 31px;
    height: 32px;
    margin-right: 6px;
}

.app-name {
    flex-grow: 1;
    font-weight: bold;
    font-size:13.6px;
    color: #4B5563;
}

.app-arrow {
    margin-left: auto;
    color: #888;
    font-size: 14px;
    width: 9px;
}

/* Menu list */
.menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    /*gap: 0.5rem;*/
}

/* Menu item base */
.sidebarmenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 16px;
    font-weight: 400;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    min-height: 40px;
    line-height: 1.5;
    background-color: transparent;
}

    /* Hover effect for non-active items */
    .sidebarmenu-item:not(.active):hover {
        background-color: #083050;
        color: white;
        /*transform: scale(1.03);
        transform-origin: center left;*/
    }

        .sidebarmenu-item:not(.active):hover .menu-icon {
            filter: brightness(0) invert(1);
        }

    /* Active item styling */
    .sidebarmenu-item.active {
        background-color: #083050;
        color: white;
        font-weight: 400;
        border-radius: 25px;
        /*font-weight: bold;*/
    }

        /* Hovering over active item */
        .sidebarmenu-item.active:hover {
            background-color: white;
            color: #4B5563;
            transform: none;
        }

            .sidebarmenu-item.active:hover .menu-icon {
                filter: none;
                opacity: 1;
            }

/* Menu icon */
.menu-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Overlay and drawer */
.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.app-drawer {
    position: fixed;
    top: 105px;
    left: 352px;
    width: 220px;
    height: calc(100vh - 105px);
    background-color: white;
    box-shadow: 0 0 0 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    padding: 1rem;
    overflow-y: auto;
    border-radius: 11px;
}

/* Drawer content */
.drawer-header {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #083050;
}

.back-button {
    cursor: pointer;
    color: #083050;
    margin-left:7px;
}

.apps-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.apps-section {
    padding-left: 0;
    margin-left: 0;
}

/* App card */
.app-card-link {
    text-decoration: none;
    color: inherit;
}

.app-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.08);
    transition: border 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    height: 49px;
    box-sizing: border-box;
    width: 179px;
}

    .app-card:hover {
        border-top: 2px solid #ccc;
        border-bottom: 3px solid #333;
        border-left: 1px solid #bbb;
        /*border-right: 1px solid #bbb;*/
        background-color: #f9f9f9;
    }

    .app-card img {
        width: 25px;
        height: 40px;
        object-fit: contain;
        margin-right: 10px;
    }

    .app-card span {
        font-size: 11px;
        font-weight: 500;
        color: #333;
        font-family: 'Inter', sans-serif;
    }

/* Sidebar Collapse/Expand Styles */
.sidebar {
    transition: width 0.2s ease-in-out;
    position: relative;
}

.sidebar.expanded {
    width: 280px !important;
}

.sidebar.collapsed {
    width: 72px !important;
    border-right: 2px solid #E2E8F0;
}

.sidebar.collapsed .sidebar-home span,
.sidebar.collapsed .sidebar-title span,
.sidebar.collapsed .sidebar-item span,
.sidebar.collapsed .expand-icon,
.sidebar.collapsed .vertical-line {
    display: none;
}

/* Show group items in collapsed mode but hide the group title */
.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar.collapsed .group-items {
    display: none;
}

/* Collapsed group icons - only visible in collapsed mode */
.collapsed-group-icons {
    display: none;
}

.sidebar.collapsed .collapsed-group-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sidebar.collapsed .collapsed-group-icons .sidebar-item {
    width: auto;
    margin-left: 0;
}

.sidebar.collapsed .sidebar-home,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 10px 12px;
    gap: 4px;
    position: relative;
}

.sidebar.collapsed .menu-icon {
    margin: 0;
    width: 20px;
    height: 20px;
}

.sidebar.collapsed .menu {
    gap: 4px;
}

/* Toggle button */
.sidebar-toggle {
    position: absolute;
    top: 12px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

/* Pin Toggle Button */
.sidebar-pin-toggle {
    position: absolute;
    top: 28px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, opacity 0.2s ease, z-index 0s;
}

.sidebar-pin-toggle:hover {
    background-color: #F3F4F6;
}

.pin-arrow {
    font-size: 12px;
    color: #6B7280;
    font-weight: bold;
    line-height: 1;
}

/* Tooltip for collapsed icons */
.sidebar.collapsed .sidebar-home:hover::after,
.sidebar.collapsed .sidebar-title:hover::after,
.sidebar.collapsed .sidebar-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 77px;
    background: #1F2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
}

/* ==================== MEDIA QUERIES ==================== */

/* Extra Large screens (1920px and above) */
@media screen and (min-width: 1920px) {
    .sidebar.expanded {
        width: 320px !important;
    }
    
    .sidebar-home {
        font-size: 20px;
        padding: 0.6rem 1.75rem;
    }
    
    .sidebar-title {
        font-size: 16px;
        padding: 0.6rem 1.5rem;
    }
    
    .sidebar-item {
        font-size: 15px;
        padding: 0.5rem 0.85rem;
    }
    
    .menu-icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-title .menu-icon,
    .sidebar-item.top-level .menu-icon,
    .sidebar-home .menu-icon {
        width: 20px;
        height: 20px;
    }
}

/* 1366px and below */
@media screen and (max-width: 1366px) {
    .sidebar.expanded {
        width: 280px !important;
    }
    
    .sidebar-home {
        padding: 0.5rem 1.5rem;
    }
    
    .sidebar-title {
        padding: 0.5rem 1.5rem;
    }
    
    .sidebar-item {
        padding: 0.4rem 0.75rem;
    }
}

/* 1200px and below */
@media screen and (max-width: 1200px) {
    .sidebar.expanded {
        width: 240px !important;
    }
    
    .sidebar-home {
        font-size: 16px;
        padding: 0.4rem 1rem;
    }
    
    .sidebar-title {
        font-size: 13px;
        padding: 0.4rem 1rem;
    }
    
    .sidebar-item {
        font-size: 13px;
        padding: 0.35rem 0.6rem;
    }
}

/* 1024px and below - Tablets */
@media screen and (max-width: 1024px) {
    .sidebar.expanded {
        width: 220px !important;
    }
    
    .sidebar-home {
        font-size: 15px;
        padding: 0.35rem 0.85rem;
    }
    
    .sidebar-title {
        font-size: 12px;
        padding: 0.35rem 0.85rem;
    }
    
    .sidebar-item {
        font-size: 12px;
        padding: 0.3rem 0.5rem;
    }
    
    .menu-icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-title .menu-icon,
    .sidebar-item.top-level .menu-icon,
    .sidebar-home .menu-icon {
        width: 20px;
        height: 20px;
    }
    
    .new-tag {
        font-size: 10px;
        padding: 2px 5px;
    }
}

/* 768px and below - Small tablets */
@media screen and (max-width: 768px) {
    .sidebar.expanded {
        width: 200px !important;
    }
    
    .sidebar.collapsed {
        width: 60px !important;
    }
    
    .sidebar-home {
        font-size: 14px;
        padding: 0.3rem 0.75rem;
    }
    
    .sidebar-title {
        font-size: 11px;
        padding: 0.3rem 0.75rem;
    }
    
    .sidebar-item {
        font-size: 11px;
        padding: 0.25rem 0.4rem;
    }
    
    .menu-icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-title .menu-icon,
    .sidebar-item.top-level .menu-icon,
    .sidebar-home .menu-icon {
        width: 20px;
        height: 20px;
    }
}

/* 600px and below - Mobile */
@media screen and (max-width: 600px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 500;
        overflow: visible; /* Ensure pin toggle is visible on mobile */
    }
    
    .sidebar.expanded {
        width: 240px !important;
    }
    
    .sidebar.collapsed {
        width: 60px !important;
    }
    
    .sidebar-pin-toggle {
        z-index: 501;
    }
}
/* Work in Progress container for BI Dashboard and Mobile tabs */
.sidebar-wip-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    flex: 1;
}

.sidebar-wip-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* Hide WIP image when sidebar is collapsed */
.sidebar.collapsed .sidebar-wip-container {
    display: none;
}

/* Beta tag for menu items */
.beta-tag {
    margin-left: auto;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #DC2626;
    background-color: #FEE2E2;
    border-radius: 4px;
    line-height: 1;
    display: none !important; /* Temporarily hide beta pill */
}

/* Top-level sidebar items (not inside groups) - same style as parent titles */
.sidebar-item.top-level {
    padding: 0.5rem 1.5rem;
    margin-left: 0;
    width: auto;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 24px;
}

.sidebar.collapsed .sidebar-item.top-level {
    padding: 10px 12px;
    justify-content: center;
}

/* Smooth transitions for tab switching */
.sidebar-content {
    transition: opacity 0.15s ease-in-out;
}

.sidebar-group {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== VERSION INFO ==================== */
.sidebar-version-info {
    width: 100%;
    min-height: 64px;
    padding: 16px 24px;
    border-top: 1px solid #6B8396;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-shrink: 0;
    margin: 0;
}

.sidebar-version-info .version-build {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 16.5px;
    letter-spacing: 0.28px;
    text-align: center;
    color: rgba(8, 48, 80, 0.6); /* #08305099 */
    width: 100%;
}

.sidebar-version-info .version-released {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 15px;
    letter-spacing: 0;
    text-align: center;
    color: #6B8396;
    width: 100%;
}

/* Hide version info when sidebar is collapsed */
.sidebar.collapsed .sidebar-version-info {
    display: none;
}

/* Version info responsive styles */
@media screen and (max-width: 1200px) {
    .sidebar-version-info .version-build {
        font-size: 12px;
        line-height: 14px;
    }
    
    .sidebar-version-info .version-released {
        font-size: 10px;
        line-height: 12px;
    }
}

@media screen and (max-width: 768px) {
    .sidebar-version-info {
        padding: 12px 0;
        gap: 6px;
    }
    
    .sidebar-version-info .version-build {
        font-size: 11px;
        line-height: 13px;
    }
    
    .sidebar-version-info .version-released {
        font-size: 9px;
        line-height: 11px;
    }
}
