@import url(./utils.css);

* {
    font-family: 'Public Sans', sans-serif;
}

html {
    --antd-wave-shadow-color: #006937 !important;
}

body {
    background-color: #F9FAFC;
}

.flower-bg-circular::before {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background-image: url('https://konten.usu.ac.id/storage/satker/0/statis/preview/flower-bg-circular.svg');
    background-size: contain;
    width: 100%;
    background-color: #F9FAFC;
    height: 30%;
    z-index: 0;
}

a {
    color: var(--antd-wave-shadow-color);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar-thumb,
.no-scrollbar::-webkit-scrollbar-track {
    width: 0;
    height: 0;
    display: none;
}

.thin-scrollbar::-webkit-scrollbar,
.thin-x-scrollbar::-webkit-scrollbar {
    transition: all 300ms ease;
    /* background-color: #f5f5f5; */
}

.thin-scrollbar::-webkit-scrollbar-track,
.thin-x-scrollbar::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: #f5f5f5;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    margin: 8px 0;
}

.thin-scrollbar::-webkit-scrollbar-thumb,
.thin-x-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #12B76A;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.thin-scrollbar::-webkit-scrollbar {
    max-width: 3px;
    max-height: 3px;
}

.thin-x-scrollbar::-webkit-scrollbar {
    max-height: 3px;
}

.text-limit-1 {
    display: -webkit-box;
    overflow: hidden;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Sidebar */
.sidebar {
    width: 100%;
    display: flex;
    background-color: #F9FAFC;
}

.sidebar-nav {
    overflow: hidden;
    position: fixed;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 16px;
    height: 100vh;
    padding: 16px 12px;
    border-right: 1px solid #DCE2E7;
    transition: width 300ms;
}

.sidebar-nav {
    width: 73px;
}

.sidebar-nav.show {
    width: 246px;
}

/* Sidebar Logo */
.sidebar-logo {
    cursor: pointer;
    display: flex;
    width: 100%;
    height: 32px;
    padding: 6px;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    border: 1px solid #DCE2E7;
    background: linear-gradient(270deg, #FFF 66.38%, #FFC600 77.14%, #B8BE14 80.16%, #2EA23B 84.7%, #038A47 88.91%, #0B6839 94.45%, #0B6839 100%);
}

.sidebar-logo__image {
    width: 32px;
}

.sidebar-logo__name {
    background: linear-gradient(270deg, #43AD35 0%, #038A47 25%, #0B6839 50%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    margin: 0;
    letter-spacing: 0px;
}

.sidebar-nav:not(.show) .sidebar-logo .sidebar-logo__name {
    position: absolute;
    visibility: hidden;
    background: linear-gradient(270deg, #FFF 0%, #FFC600 32%, #B8BE14 41%, #2EA23B 54.5%, #038A47 67%, #0B6839 83.5%, #0B6839 100%);
}

.sidebar-nav:not(.show) .sidebar-logo {
    background: linear-gradient(270deg, #FFF 0%, #FFC600 32%, #B8BE14 41%, #2EA23B 54.5%, #038A47 67%, #0B6839 83.5%, #0B6839 100%);
}

/* Sidebar User */
.sidebar-user {
    width: 100%;
    cursor: pointer;
    padding-bottom: 8px;
}

.sidebar-user__container {
    align-items: center;
    gap: 8px;
    display: flex;
    flex-shrink: 0;
    padding: 5px;
    min-width: 44px;
    height: 44px;
    border: 1px solid #DCE2E7;
    border-radius: 8px;
    background-color: white;
}

.sidebar-user__avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 100%;
}

.sidebar-user__info {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
}

.sidebar-user__info-name,
.sidebar-user__info-rank {
    margin-bottom: 0;
}

.sidebar-user__info-name {
    color: #1E1E1E;
    font-size: 14.22px;
    font-weight: 400;
    line-height: 21.3px;
}

.sidebar-user__info-rank {
    color: #8292A1;
    font-size: 11px;
    font-weight: 300;
    line-height: 14.7px;
    text-transform: capitalize;
}

.sidebar-user__icon {
    width: 16px;
    height: 16px;
}

/* Sidebar Dropdown */
.sidebar-user__dropdown {
    top: -54px;
    left: -0px;
    padding: 0;
    position: absolute;
}

.sidebar-user__dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 222px;
    max-width: 222px;
    padding: 5px 12px 0 12px;
}

.sidebar-tabs {
    display: flex;
    padding: 4px;
    align-items: center;
    border-radius: 8px;
    background-color: #F9FAFC;
}

.sidebar-tabs__btn {
    flex: 1 1 100%;
    cursor: pointer;
    padding: 2px 4px;
    color: #1E1E1E;
    font-size: 14.22px;
    font-weight: 400;
    line-height: 21.3px;
    transition: all 0.3s ease;
    border-color: transparent;
    background-color: #F9FAFC;
}

.sidebar-tabs__btn.active {
    border-radius: 6px;
    background-color: white;
}

.sidebar-tabs__wrapper {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.sidebar-tabs__wrapper-items {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 256px;
}

.sidebar-tabs__wrapper-item {
    cursor: pointer;
    padding: 5px 12px;
    border: none;
    background: none;
    color: #131313;
    font-size: 14.22px;
    font-weight: 400;
    line-height: 21.3px;
    text-align: left;
}

.sidebar-tabs__wrapper-item:hover {
    background-color: #F9FAFC;
}

.sidebar-tabs__wrapper-item.active {
    background-color: #F3FFE6;
}

.sidebar-tabs__profile {
    padding: 8px 12px 2px 12px;
    margin-top: 4px;
    border-top: 1px solid #DCE2E7;
}

.sidebar-tabs-profile__item {
    color: #131313;
    font-size: 14.22px;
    font-weight: 400;
    line-height: 21.3px;
}

/* Sidebar Menu */
.sidebar-menu {
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    transition: width 300ms, height 300ms;
}

.sidebar-menu__item-text {
    flex: 1 1 100%;
    color: #131313;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.sidebar-nav .sidebar-menu__item {
    width: 100%;
    height: 44px;
}

.sidebar-nav.show .sidebar-menu__item {
    width: 100%;
    height: 44px;
}

.sidebar-menu__item:hover {
    background-color: #ECF7EA;
}

.sidebar-menu__item.active {
    border: 1px solid #64BE55;
    border-radius: 8px;
    background-color: #FFFFFF;
}

.sidebar-menu__item.active .sidebar-menu__item-text,
.sidebar-menu__item.active .sidebar-menu__item-icon svg {
    fill: #002C17;
    color: #002C17;
}

/* Sidebar Sub Menu */
.sidebar-sub-menu {
    width: 100%;
}

.sidebar-sub-menu.current-active {
    border: 1px solid #64BE55;
    border-radius: 8px;
    background-color: #FFFFFF;
}

.sidebar-sub-menu__button {
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    transition: width 300ms, height 300ms;
    background-color: transparent;
}

.sidebar-sub-menu__button-text {
    display: flex;
    flex: 1 1 100%;
    color: #131313;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.sidebar-nav .sidebar-sub-menu__button {
    width: 44px;
    height: 44px;
}

.sidebar-nav.show .sidebar-sub-menu__button {
    width: 100%;
    height: 44px;
}

.sidebar-sub-menu__items {
    padding: 0 8px;
    overflow: hidden;
    max-height: 0;
    transition: all 300ms ease-out;
}

.sidebar-sub-menu__items.active {
    padding: 0 8px 8px 8px;
    max-height: 500px;
    transition: all 300ms ease-in;
}

.sidebar-sub-menu__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 8px 8px 8px 32px;
    border-radius: 8px;
    color: #131313;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    white-space: nowrap;
    transition: colors 100ms ease;
}

.sidebar-sub-menu__item:hover {
    background-color: #ECF7EA;
    color: #131313;
}

.sidebar-sub-menu__item.active {
    background-color: #C3E6BD;
    color: #002C17;
}

/* Content */
/* .main-content__wrapper {
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-sizing: border-box;
} */

.sidebar-nav~.sidebar-ctn {
    margin-left: 73px;
}

.sidebar-nav.show~.sidebar-ctn {
    margin-left: 246px;
}

.sidebar-ctn {
    position: relative;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 16px 16px 16px 12px;
    transition: all 300ms;
}

.sidebar-ctn__header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    gap: 8px;
}

.sidebar-ctn__header .brand-image {
    width: auto;
    height: 28px;
}

.sidebar-ctn__btn {
    display: flex;
    align-items: center;
    width: 30px !important;
    height: 30px !important;
    padding: 4px;
    cursor: pointer;
    border: 1px solid #DCE2E7;
    border-radius: 4px;
    background-color: white;
}

.ant-breadcrumb {
    flex: 1 1 100%;
}

.sidebar-ctn__breadcrumb {
    display: block;

    @media screen and (max-width: 928px) {
        display: none;
    }
}

.ant-breadcrumb-separator,
.sidebar-ctn__breadcrumb-separator {
    color: #8FA0B1 !important;
    margin: 0 8px;
    display: inline;
}

.sidebar-ctn__breadcrumb a {
    color: inherit !important;
}

/* Show */
.sidebar-nav:not(.show) .sidebar-user .sidebar-user__info,
.sidebar-nav:not(.show) .sidebar-user .sidebar-user__icon {
    position: absolute;
    visibility: hidden;
}

/* Icon */
.sidebar-ctn__btn,
.sidebar-menu__item-icon,
.sidebar-sub-menu__button-icon {
    width: 20px;
    height: 20px;
}

.sidebar-sub-menu__button .pra {
    transition: all 300ms ease;
}

.sidebar-sub-menu__button.active .pra {
    transform: rotate(-180deg);
}

/* Mobile Sidebar Overlay */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-backdrop[x-show] {
    display: block;
}

/* Mobile overlay styles for sidebar-nav */
@media screen and (max-width: 928px) {
    .sidebar-nav.mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        background-color: #F9FAFC;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        transform: translateX(-100%);
        transition: transform 300ms ease-in-out;
        height: 100vh;
        overflow-y: auto;
    }

    .sidebar-nav.mobile-overlay.show {
        transform: translateX(0);
    }

    /* On mobile, content doesn't need margin when sidebar is hidden */
    .sidebar-nav.mobile-overlay~.sidebar-ctn {
        margin-left: 0;
    }

    .sidebar-nav.mobile-overlay.show~.sidebar-ctn {
        margin-left: 0;
    }
}

/* Enhanced Mobile Responsiveness */
@media screen and (max-width: 928px) {

    /* Ensure sidebar navigation is always full width when open on mobile */
    .sidebar-nav.mobile-overlay {
        width: 246px !important;
    }

    .sidebar-nav.mobile-overlay:not(.show) {
        width: 246px !important;
    }

    /* Ensure content takes full width on mobile */
    .sidebar-ctn {
        margin-left: 0 !important;
        padding: 16px 12px;
    }

    /* Make toggle button more prominent on mobile */
    .sidebar-ctn__btn {
        padding: 8px;
        border-radius: 6px;
        background-color: #f0f2f5;
        transition: background-color 0.2s ease;
    }

    .sidebar-ctn__btn:hover {
        background-color: #e6e8eb;
    }
}

/* Ensure sidebar stays hidden initially on mobile */
@media screen and (max-width: 928px) {
    .sidebar-nav:not(.show):not(.mobile-overlay) {
        transform: translateX(-100%);
    }
}

/* Mobile Sidebar Header and Close Button */
.sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
    gap: 8px;
    border-bottom: 1px solid #DCE2E7;
}

.sidebar-logo-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
    border-radius: 6px;
    border: 1px solid #DCE2E7;
    background: linear-gradient(270deg,
            #FFF 72%,
            #FFC600 87%,
            #B8BE14 89%,
            #2EA23B 91%,
            #038A47 93%,
            #0B6839 96%,
            #0B6839 100%);
    padding: 8px;
}

.sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #DCE2E7;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.sidebar-close-btn:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

/* Improved mobile toggle button */
@media screen and (max-width: 928px) {
    .sidebar-ctn__btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background-color: white;
        border: 1px solid #DCE2E7;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Ensure body doesn't scroll when mobile sidebar is open */
body.sidebar-mobile-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}