html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300&family=Tinos&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tinos', serif;
}

body, html {
    height: 100%;
    margin: 0;
    overflow: hidden; /* Prevent scrolling on body */
    
}



.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    background: #000428;
    background: -webkit-linear-gradient(to right, #348F50, #56AB2F);
    background: linear-gradient(to right, #348F50, #56AB2F);
    z-index: 100;
    transition: all 0.5s ease;
}

    .sidebar.close {
        width: 78px;
    }

    .sidebar .logo-details {
        height: 60px;
        width: 100%;
        display: flex;
        align-items: center;
    }

        .sidebar .logo-details .menu-icon {
            width: 30px;
            height: 30px;
           /* filter: invert(1);*/ /* Makes the icon white */
            margin-left: 24px;
            cursor: pointer;
        }



        .sidebar .logo-details .logo_name {
            font-size: 22px;
            color: #fff;
            font-weight: 600;
            transition: 0.3s ease;
            transition-delay: 0.1s;
        }


    .sidebar.close .logo-details .logo_name {
        transition-delay: 0s;
        opacity: 0;
        pointer-events: none;
    }

    .sidebar .nav-links {
        height: 100%;
        padding: 0 0 150px 0;
        overflow: auto;
    }

    .sidebar.close .nav-links {
        overflow: visible;
    }

    .sidebar .nav-links::-webkit-scrollbar {
        display: none;
    }

    .sidebar .nav-links li {
        position: relative;
        list-style: none;
        transition: all 0.4s ease;
    }

        .sidebar .nav-links li:hover {
            background: #1d1b31;
        }

        .sidebar .nav-links li .icon-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

    .sidebar.close .nav-links li .icon-link {
        display: block;
    }
.nav-icon {
    width: 24px;
    height: 24px;
    /* filter: invert(1);*/ /* Makes the icon white */
    margin:0 24px;
    line-height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px;
}

    .sidebar .nav-links li i {
        height: 50px;
        min-width: 78px;
        text-align: center;
        line-height: 50px;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

.arrow {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-right:30px;
}

.sidebar .nav-links li.showMenu .arrow {
    transform: rotate(-180deg);
}

.sidebar.close .nav-links .arrow {
    display: none;
}

    .sidebar .nav-links li a {
        display: flex;
        align-items: center;
        text-decoration: none;
    }

        .sidebar .nav-links li a .link_name {
            font-size: 18px;
            font-weight: 400;
            color: #fff;
            transition: all 0.4s ease;
        }

    .sidebar.close .nav-links li a .link_name {
        opacity: 0;
        pointer-events: none;
    }

    .sidebar .nav-links li .sub-menu {
        padding: 6px 6px 14px 80px;
        margin-top: -10px;
        background: #1d1b31;
        display: none;
    }

    .sidebar .nav-links li.showMenu .sub-menu {
        display: block;
    }

    .sidebar .nav-links li .sub-menu a {
        color: #fff;
        font-size: 15px;
        padding: 5px 0;
        white-space: nowrap;
        opacity: 0.6;
        transition: all 0.3s ease;
    }

        .sidebar .nav-links li .sub-menu a:hover {
            opacity: 1;
        }

    .sidebar.close .nav-links li .sub-menu {
        position: absolute;
        left: 100%;
        top: -10px;
        margin-top: 0;
        padding: 10px 20px;
        border-radius: 0 6px 6px 0;
        opacity: 0;
        display: block;
        pointer-events: none;
        transition: 0s;
    }

    .sidebar.close .nav-links li:hover .sub-menu {
        top: 0;
        opacity: 1;
        pointer-events: auto;
        transition: all 0.4s ease;
    }

    .sidebar .nav-links li .sub-menu .link_name {
        display: none;
    }

    .sidebar.close .nav-links li .sub-menu .link_name {
        font-size: 18px;
        opacity: 1;
        display: block;
    }

    .sidebar .nav-links li .sub-menu.blank {
        opacity: 1;
        pointer-events: auto;
        padding: 3px 20px 6px 16px;
        opacity: 0;
        pointer-events: none;
    }

    .sidebar .nav-links li:hover .sub-menu.blank {
        top: 50%;
        transform: translateY(-50%);
    }

    .sidebar .profile-details {
        position: fixed;
        bottom: 0;
        width: 260px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #1d1b31;
        padding: 12px 0;
        transition: all 0.5s ease;
    }

    .sidebar.close .profile-details {
        background: none;

    }

    .sidebar.close .profile-details {
        width: 78px;
    }

    .sidebar .profile-details .profile-content {
        display: flex;
        align-items: center;
    }

    .sidebar .profile-details img {
        height: 52px;
        width: 52px;
        object-fit: cover;
        border-radius: 16px;
        margin: 0 14px 0 12px;
        background: #1d1b31;
        transition: all 0.5s ease;
    }

    .sidebar.close .profile-details img {
        padding: 10px;
    }

    .sidebar .profile-details .profile_name,
    .sidebar .profile-details .job {
        color: #fff;
        font-size: 18px;
        font-weight: 500;
        white-space: nowrap;
    }

.sidebar.close .profile-details .log-out,
.sidebar.close .profile-details .profile_name,
.sidebar.close .profile-details .job {
    display: none;
}

    .sidebar .profile-details .job {
        font-size: 12px;
    }
.log-out {

    
    line-height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 50px;
}

.main-content {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    transition: margin-left 0.5s ease;
    margin-left: 78px; /* Closed sidebar width */
    /*  padding: 20px;*/
    margin-top: 60px;
    background-color: #f8f9fa;
}

.sidebar.close + .main-content {
    margin-left: 78px; /* When sidebar is closed */
}

.sidebar + .main-content {
    margin-left: 260px; /* When sidebar is open */
}


  @media (max-width: 420px) {
  .sidebar.close .nav-links li .sub-menu {
    display: none;
  } 
}



/* Fixed Header */
.top-header {
    position: fixed;
    top: 0;
    left: 78px; /* Same as closed sidebar */
    width: calc(100% - 78px);
    height: 60px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: left 0.5s ease, width 0.5s ease;
    z-index: 100;
}

/* Adjust Header When Sidebar Expands */
.sidebar:not(.close) ~ .top-header {
    left: 260px;
    width: calc(100% - 260px);
}

/* Header Content */
.header-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

/* Title */
.header-title {
    font-size: 20px;
    font-weight: bold;
}

/* Logout Button */
.logout-btn {
    font-size: 16px;
    padding: 8px 16px;
}



.sidebar.close ~ .footer {
    left: 78px;
    width: calc(100% - 78px);
}

.mobile-menu-icon {
    display: none; /* Hidden by default */
}

.for-mobile-records {
    display:none;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }


        .sidebar.mobile-open {
            transform: translateX(0);
            z-index: 200;
        }

    .main-content {
        margin-left: 0 !important;
    }

    .top-header {
        left: 0 !important;
        width: 100% !important;
    }

    .header-title {
        font-size: 14px;
        font-weight: bold;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 150;
    }

        .overlay.active {
            display: block;
        }

    .mobile-menu-icon{
        display:block;
    }
    .for-mobile-records{
        display:block;
    }


    .for-desktop-records{
        display:none;
    }

  
}













/*header mobile responsiveness*/


/* Compact on extra small screens */
@media (max-width: 420px) {
    .avatar-name {
        font-size: 0.85rem;
    }

    .user-avatar-btn {
        padding: 0.25rem 0.6rem;
    }
}
