@keyframes fade {
    from {
        opacity: 0;
    } to {
        opacity: 1;
    }
}

.sel.active .sel-opt[selected] {
    color: var(--cl-main);
}

.sidebar {
    background-color: var(--cl-white);
    max-width: 244px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px 0;
    position: fixed;
    overflow: auto;
    z-index: 100;
}

.sidebar__logo {
    max-width: 190px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.sidebar__profile {
    border: 1px solid var(--cl-light-grey);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 20px 0 20px;
}

.sidebar__profile__acc {
    font-size: 16px; 
}

.sidebar__profile__balance {
    margin-top: 20px;
    font-size: 20px;
}

.sidebar__nav {
    margin-top: 30px;
}

.sidebar__nav__item {
    padding: 16px 20px;
}

.sidebar__nav li:has(.sidebar__nav__sub .sidebar__nav__item[active]) > .sidebar__nav__item.active {
    background-color: var(--cl-main);
}

.sidebar__nav__item[active] {
    background-color: var(--cl-main);
}

.sidebar__nav__item[active] .sidebar__nav__item__title {
    color: var(--cl-white);
}

.sidebar__nav__item[active] .sidebar__nav__item__icon {
    filter: brightness(0) invert(1);
}

.darktheme .sidebar__nav__item .sidebar__nav__item__icon {
    filter: brightness(0) invert(0.8);
}

.sidebar__nav__item__title {
    margin-left: 14px;
    color: var(--cl-grey);
}

.sidebar__nav__logout {
    margin-top: auto;
    margin-bottom: 0;
}

.sidebar__nav__sub {
    display: none;
    animation: fade 0.5s forwards;
}

.sidebar__nav__item.active + .sidebar__nav__sub {
    display: block;
}

.sidebar__nav__sub .sidebar__nav__item,
.sidebar__nav__item.active:not([active]) {
    border-bottom: 1px solid var(--cl-light-grey);
}

.sidebar__nav__sub .sidebar__nav__item__title {
    margin-left: 38px;
}

.sidebar__nav__sub .sidebar__nav__item.active {
    background-color: var(--cl-white);
    position: relative;
}

.sidebar__nav__sub .sidebar__nav__item.active::before,
.sidebar__nav__sub .sidebar__nav__item[active]::before {
    content: "";
    position: absolute;
    display: block;
    left: 25px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background-color: var(--cl-orange);
}

.sidebar__nav__sub .sidebar__nav__item.active .sidebar__nav__item__title,
.sidebar__nav__sub .sidebar__nav__item[active] .sidebar__nav__item__title {
    color: var(--cl-black);
}

.main {
    margin-left: 244px;
    width: 100%;
}

.header {
    background-color: var(--cl-white);
    height: 80px;
}

.header * {
    color: var(--cl-grey);
}

.header__manager__logo {
    width: 52px;
    margin-left: 20px;
    border-radius: 50%;
}

.header__icon {
    vertical-align: middle;
    margin-right: 14px;
}

.header__link {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.sidebar-mobile.right .sidebar__nav__item.active:not([active]) {
    border-color: transparent;
}

.sidebar-mobile.right .sidebar__nav__item.active {
    background-color: transparent;
}

.header__link.active span,
.sidebar-mobile.right .sidebar__nav__item.active .sidebar__nav__item__title {
    color: var(--cl-black);
}

.header__link.active .header__icon,
.sidebar-mobile.right .sidebar__nav__item.active .sidebar__nav__item__icon {
    filter: brightness(0);
}

.header__manager__name {
    margin: 0 40px 0 14px;
}

.header__lang {
    /*padding: 0 30px;*/
    max-width: 80px!important;
    min-width: initial!important;
    margin-right: 20px;
}

.header__lang__item {
    margin: 0 7px;
    cursor: pointer;
}

.container {
    padding: 30px;
}

.title {
    margin-bottom: 30px;
}

.content__container {
    padding: 30px;
    border-radius: 10px;
    background-color: var(--cl-white);
}

@keyframes showHelper {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.tbl__link,
.tbl__title {
    position: relative;
}

.tbl__helper {
    display: none;
    opacity: 0;
    position: absolute;
    top: -48px;
    transform: translateX(-45%);
    background-color: var(--cl-white);
    width: max-content;
    height: 33px;
    padding: 7px 15px;
    box-sizing: border-box;
    z-index: 99;
    text-decoration: none;
    box-shadow: 0px 0px 10px 0px #0000001A;
    border-radius: 10px;
    color: var(--cl-dark-grey);
    cursor: initial;
}

.tbl__helper.helper__left {
    transform: none;
    left: -10px;
}

.tbl__helper.helper__right {
    transform: none;
    right: -10px;
}

.tbl__helper.helper__bottom {
    transform: none;
    top: 20px;
}

.tbl__helper::after {
    content: "";
    position: absolute;
    background-color: var(--cl-white);
    width: 16px;
    height: 16px;
    bottom: -8px;
    right: 0;
    left: 0;
    margin: 0 auto;
    transform: rotate(45deg);
}

.tbl__helper.helper__left::after {
    left: 18px;
    right: auto;
}

.tbl__helper.helper__right::after {
    right: 18px;
    left: auto;
}

.tbl__helper.helper__bottom.helper__right::after {
    right: 18px;
    left: auto;
    top: -8px;
    bottom: auto;
}

.tbl__link:hover img,
.tbl__title:hover img {
    filter: brightness(0.6)!important;
}

.tbl__link:hover .tbl__helper,
.tbl__title:hover .tbl__helper {
    display: block;
    animation: showHelper forwards 1s;
    animation-delay: 0.5s;
}

.info__icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.info__content {
    display: none;
}

.info__content.visible {
    display: block;
}

.uploadfile {
    border-radius: 10px;
    border: 1px dashed var(--cl-light-grey);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.uploadfile__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.uploadfile__delete {
    display: none;
    position: absolute;
    width: 24px;
    height: 24px;
    right: 10px;
    top: 10px;
    padding: 0;
    border-radius: 2px;
}

.uploadfile__info__icon {
    width: 34px;
}

.uploadfile__info__text {
    color: var(--cl-grey);
}

.uploadfile:hover .uploadfile__info {
    display: none;
}

.uploadfile:not(:has(.uploadfile__preview.uploaded)):hover .uploadfile__buttons {
    display: flex;
}

.uploadfile__preview {
    display: none;
}

.uploadfile__preview.uploaded {
    display: block;
    width: 100%;
    height: 100%;
}

.uploadfile__preview.uploaded + .uploadfile__info,
.uploadfile__preview.uploaded + .uploadfile__buttons {
    display: none;
}

.uploadfile:has(.uploadfile__preview.uploaded) .uploadfile__delete {
    display: block;
}

.uploadfile__buttons {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    gap: 10px;
}

.uploadfile__buttons__item {
    position: relative;
    border-radius: 5px;
    font-size: 12px;
    padding: 5px 18px 5px 30px;
    height: 25px;
    width: 110px;
}

.uploadfile__buttons__item::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    margin: auto 0;
    background-repeat: no-repeat;
    background-size: contain;
    width: 14px;
    height: 14px;
}

.uploadfile__buttons__item.button__upload::after {
    background-image: url('../images/upload.svg');
}

.uploadfile__buttons__item.button__editor::after {
    background-image: url('../images/editor.svg');
}

.uploadfile:has(input[type="file"].invalid) {
    border-color: var(--cl-red);
}

.uploadfile:has(input[type="file"].invalid) .uploadfile__info__text {
    color: var(--cl-red);
}

.header__lang__item.active {
    color: var(--cl-black);
}


.header-mobile {
    display: none;
}

.sidebar-mobile {
    display: none;       
}

.title-mobile {
    display: none;
}

table tfoot tr *:first-of-type {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

table tfoot tr *:last-of-type {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.under {
    text-decoration: underline;
}

.message {
    border: 1px solid var(--cl-black);
    background-color: #e0e0e036;
    padding: 8px 12px;
    border-radius: 5px;
}

.darktheme .message {
    color: var(--cl-white);
    border-color: var(--cl-white);
}

.message.success {
    color: var(--cl-green);
    background-color: #1ba41f12;
    border-color: var(--cl-green);
}

.message.error {
    color: var(--cl-red);
    background-color: #c72d2d1a;
    border-color: var(--cl-red);
}

/*Darktheme*/
.darktheme {
    background-color: var(--cl-dark-bg);
} 

.darktheme .sidebar {
    background-color: var(--cl-black);
}

.sidebar__logo__dark {
    display: none;
}

.darktheme .sidebar__logo {
    display: none;
}

.darktheme .sidebar__logo__dark {
    display: block;
}

.darktheme .sidebar__profile {
    border-color: var(--cl-dark-grey);
}

.darktheme .sidebar__profile__acc {
    color: var(--cl-white);
}

.darktheme .sidebar__profile__balance {
    color: var(--cl-main);
}

.darktheme .sidebar__nav__sub .sidebar__nav__item,
.darktheme .sidebar__nav__item.active:not([active]) {
    border-color: var(--cl-dark-grey);
}

.darktheme .sidebar__nav__sub .sidebar__nav__item.active,
.darktheme .sidebar__nav__sub .sidebar__nav__item[active] {
    background-color: transparent;
}

.darktheme .sidebar__nav__sub .sidebar__nav__item.active .sidebar__nav__item__title {
    color: var(--cl-white);
}

.darktheme .header {
    background-color: var(--cl-black);
}

.darktheme .header__manager__name > span {
    color: var(--cl-white)!important;
}

.darktheme .header__icon {
    filter: contrast(0);
}

.darktheme .header__link__title {
    color: var(--cl-white)!important;
}

.darktheme .header__lang__item.active {
    color: var(--cl-main);
}

.darktheme .title {
    color: var(--cl-light-grey);
}

.darktheme .content__container {
    background-color: var(--cl-black);
}

.darktheme .title-mobile {
    color: var(--cl-white);
}

.darktheme .header__link.active span,
.darktheme .sidebar-mobile.right .sidebar__nav__item.active .sidebar__nav__item__title {
    color: var(--cl-white);
}

.darktheme .header__link.active .header__icon,
.darktheme .sidebar-mobile.right .sidebar__nav__item.active .sidebar__nav__item__icon {
    filter: brightness(0) invert(1);
}

.darktheme .tbl__link img {
    filter: brightness(0.3);
}

.darktheme .tbl__link img:hover {
    filter: brightness(0.8);
}

.darktheme .tbl__helper {
    background-color: var(--cl-dark-bg);
    color: var(--cl-white);
}

.darktheme .tbl__helper * {
    color: var(--cl-white);
}

.darktheme .tbl__helper::after {
    background-color: var(--cl-dark-bg);
}

.filter__line {
    width: 15px;
    height: 1px;
    background-color: var(--cl-black);
}

.darktheme .filter__line {
    background-color: #ffffff;
}

.tbl tbody tr:hover td:not(.tbl__td__title) {
    background-color: #f3f5f77a;
}

.darktheme .tbl tbody tr:hover td {
    background-color: #2c2c2c;
}

@keyframes showHideSlow {
    0% {
        opacity: 0;
    } 100% {
        opacity: 1;
    }
}

@keyframes slideRight {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    } 100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideLeft {
    0% {
        opacity: 0;
        transform: translateX(100%);
    } 100% {
        opacity: 1;
        transform: none;
    }
}

@media screen and (max-width: 1600px) {
    body {
        zoom: 70%;
    }
}

@media screen and (max-width: 1000px) {
    .main {
        width: auto!important;
        min-width: 1450px;
    }
}

@media (hover: hover) {
    .sidebar__nav__item:hover {
        background-color: var(--cl-main);
    }

    .sidebar__nav__item:hover .sidebar__nav__item__title {
        color: var(--cl-white);
    }

    .sidebar__nav__item:hover .sidebar__nav__item__icon {
        filter: brightness(0) invert(1);
    }

    .darktheme .sidebar__nav__item:hover .sidebar__nav__item__icon {
        filter: brightness(0) invert(0.8);
    }

}

@media screen and (max-width: 720px) {
    body {
        zoom: 100%;
        background-color: var(--cl-white);
    }

    .title-mobile {
        display: block;
        margin-bottom: 14px;
    }

    .container {
        padding: 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        background-color: var(--cl-light);
        min-height: calc(100dvh - 132px);
    }

    .content__container {
        padding: 0;
        background-color: transparent!important;
    }

    .main {
        width: 100%!important;
        min-width: initial;
        margin-left: 0;
    }

    .sidebar,
    .header {
        display: none;
    }

    .title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .header-mobile {
        margin: 12px 20px;
        display: flex;
    }

    .header-mobile__button,
    .sidebar-mobile__close {
        background: transparent;
        padding: 0;
    }

    .header-mobile__button__icon {
        width: 24px;
    }

    .header-mobile__logo,
    .header-mobile__logo__dark {
        max-width: 124px;
        width: 100%;
    }

    .header-mobile__logo__dark {
        display: none;
    }

    .sidebar-mobile {
        width: 100%;
        height: 100dvh;
        background-color: var(--cl-white);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 25;
        overflow: auto;
        flex-direction: column;
        box-sizing: border-box;
        padding-bottom: 20px;
    }

    .sidebar-mobile.left {
        animation: slideRight 0.3s forwards;
    }

    .sidebar-mobile.right {
        animation: slideLeft 0.3s forwards;
    }

    body:has(.sidebar-mobile.active) {
        overflow: hidden;
    }

    .sidebar-mobile.active {
        display: flex;
    }
    
    .sidebar-mobile__close {
        position: absolute;
        top: 16px;
        right: 20px;
        height: fit-content;
        width: fit-content;
    }

    .sidebar-mobile__close__icon {
        width: 24px;
        height: 24px;
    }

    .sidebar-mobile__title {
        margin-top: 16px;
        color: var(--cl-dark-grey);
        margin-bottom: 45px;
    }

    .sidebar-mobile__profile {
        text-align: center;
        margin: 0 25px;
    }

    .sidebar-mobile__profile ~ .sidebar-mobile__nav {
        margin: 35px auto 0 auto;
        max-width: 244px;
        width: 100%;
    }

    .sidebar-mobile__nav {
        width: fit-content;
        margin: 0 auto;
    }

    .sidebar-mobile__user {
        margin: 0 auto;
        text-align: center;
    }

    .sidebar-mobile__user__logo {
        width: 80px;
        height: 80px;
        border-radius: 50%;
    }

    .sidebar-mobile__user__manager {
        margin-top: 14px;
    }

    .sidebar-mobile__social  {
        margin: 20px auto 0 auto;
    }

    .sidebar-mobile__social__icon {
        vertical-align: middle;
        margin-right: 14px;
    }

    .sidebar-mobile__user ~ .sidebar-mobile__links  {
        margin: 60px auto 0 auto;
    }

    .sidebar-mobile__links {
        width: fit-content;
        margin: 0 auto;
    }

    .sidebar-mobile__lang {
        margin-top: auto;
        padding: 20px;
    }

    .sidebar-mobile__lang__link {
        color: var(--cl-grey);
    }

    .sidebar-mobile__lang__link.active {
        color: var(--cl-black);
    }

    .sidebar-mobile__social__title {
        color: var(--cl-black);
    }

    .tbl__link:hover .tbl__helper, 
    .tbl__title:hover .tbl__helper {
        display: none;
    }

    .darktheme .container {
        background-color: #333333;
    }

    .darktheme .header-mobile__logo {
        display: none;
    }

    .darktheme .header-mobile__info {
        color: var(--cl-light-grey);
    }

    .darktheme .header-mobile__logo__dark {
        display: block;
    }

    .darktheme .header-mobile__button__icon {
        filter: contrast(0);
    }

    .darktheme .sidebar-mobile {
        background-color: var(--cl-dark-bg);
    }

    .darktheme .sidebar-mobile__title {
        color: var(--cl-white);
    }

    .darktheme .sidebar-mobile__close {
        filter: contrast(0);
    }

    .darktheme .sidebar-mobile__social__icon {
        filter: contrast(0);
    }

    .darktheme .sidebar-mobile__social__title {
        color: var(--cl-grey);
    }

    .darktheme .sidebar-mobile__user__name {
        color: var(--cl-white);
    }

    .darktheme .sidebar-mobile__lang__link.active {
        color: var(--cl-main);
    }
}