* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

:root {
    --body-color: #eef2ff;
    --sidebar-color: #fff;
    --primary-color: #006fed;
    --primary-color-light: #f6f5ff;
    --toggle-color: #ddd;
    --text-color: #707070;
    --tran-03: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--toggle-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

body {
    min-height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-05);
    overflow-x: hidden;
}

::selection {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark {
    --body-color: #18191a;
    --sidebar-color: #242526;
    --primary-color: #3a3b3c;
    --primary-color-light: #3a3b3c;
    --toggle-color: #fff;
    --text-color: #ccc;
}

.container {
    display: flex;
}

@media (max-width: 500px) {
    .menu__btn>span::before {
        content: "";
        top: 16px;
    }

    .menu__btn>span::after {
        content: "";
        top: 8px;
    }
}

#menu__toggle {
    opacity: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 100;
}

.sidebar.close {
    width: 88px;
}

.sidebar li {
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.sidebar header .image {
    min-width: 60px;
    border-radius: 6px;
}

.sidebar .icon {
    min-width: 60px;
    border-radius: 6px;
    min-width: 60px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar .text,
.sidebar .icon {
    color: var(--text-color);
    transition: var(--tran-03);
}

.link-active i,
.link-active span {
    color: #fff !important;
}

.link-active {
    background: var(--primary-color);
    border-radius: 6px;
}

.sidebar .text {
    font-size: 17px;
    font-weight: 300;
    white-space: nowrap;
    opacity: 1;
}

.sidebar.close .text {
    opacity: 0;
}

.sidebar header {
    position: relative;
}

.sidebar header .image-text {
    display: flex;
    align-items: center;
}

.sidebar header .logo-text {
    display: flex;
    flex-direction: column;
}

/* ===== Reusable code - Here ===== */
/* =========================== */
header .image-text .name {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
}

header .image-text .profession {
    font-size: 16px;
    margin-top: -2px;
    display: block;
}

.sidebar header .image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar header .image img {
    width: 40px;
    border-radius: 6px;
}

.sidebar header .toggle {
    position: absolute;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
}

body.dark .sidebar header .toggle {
    color: var(--text-color);
}

.sidebar.close .toggle {
    transform: translateY(-50%) rotate(0deg);
}

.sidebar .menu {
    margin-top: 15px;
}

.sidebar li.search-box {
    border-radius: 6px;
    background-color: var(--primary-color-light);
    cursor: pointer;
    transition: var(--tran-05);
}

.sidebar li.search-box input {
    height: 100%;
    width: 100%;
    outline: none;
    border: none;
    background-color: var(--primary-color-light);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 17px;
    font-weight: 500;
    transition: var(--tran-05);
}

.sidebar li a {
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--tran-03);
}

.sidebar li a:hover,
.active {
    background-color: var(--primary-color);
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text,
.active {
    color: var(--sidebar-color);
}

body.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text,
.active {
    color: var(--text-color);
}

.sidebar .menu-bar {
    height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}

.menu-bar::-webkit-scrollbar {
    display: none;
}

.sidebar .menu-bar .mode {
    border-radius: 6px;
    background-color: var(--primary-color-light);
    position: relative;
    transition: var(--tran-05);
}

.menu-bar .mode .sun-moon {
    height: 50px;
    width: 60px;
}

.mode .sun-moon i {
    position: absolute;
}

.mode .sun-moon i.sun {
    opacity: 0;
}

body.dark .mode .sun-moon i.sun {
    opacity: 1;
}

body.dark .mode .sun-moon i.moon {
    opacity: 0;
}

.menu-bar .bottom-content .toggle-switch {
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-switch .switch {
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-05);
}

.switch::before {
    content: "";
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
    transition: var(--tran-04);
}

body.dark .switch::before {
    left: 20px;
}

@media (min-width: 501px) {
    .home {
        position: absolute;
        top: 0;
        top: 0;
        left: 250px;
        height: 100vh;
        width: calc(100% - 250px);
        background-color: var(--body-color);
        transition: var(--tran-05);
    }
}

.home .text {
    font-size: 30px;
    font-weight: 400;
    color: var(--text-color);
    padding: 12px 60px;
}

@media (min-width: 501px) {
    .sidebar.close~.home {
        left: 78px;
        height: 100vh;
        width: calc(100% - 78px);
    }
}

body.dark .home .text {
    color: var(--text-color);
}

@media (max-width: 500px) {
    .container {
        flex-direction: column;
    }

    .container .home {
        position: relative;
    }

    .container .sidebar {
        padding: 0;
        height: 0;
        width: 100%;
        overflow: hidden;
        position: fixed;
    }

    .container .sidebar i.toggle {
        display: none;
    }

    #menu__toggle:checked+.menu__btn>span {
        transform: rotate(45deg);
        background-color: var(--primary-color);
    }

    #menu__toggle:checked+.menu__btn>span::before {
        top: 0;
        transform: rotate(0deg);
        background-color: var(--primary-color);
    }

    #menu__toggle:checked+.menu__btn>span::after {
        top: 0;
        transform: rotate(90deg);
        background-color: var(--primary-color);
    }

    #menu__toggle:checked~.sidebar {
        padding: 40px 24px 10px;
        height: 100%;
        overflow: inherit;
    }

    .menu__btn {
        position: relative;
        top: 8px;
        left: 20px;
        width: 26px;
        height: 26px;
        cursor: pointer;
        z-index: 101;
    }

    .menu__btn>span {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        transition-duration: 0.25s;
    }

    .menu__btn>span::before {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        transition-duration: 0.25s;
    }

    .menu__btn>span::after {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        transition-duration: 0.25s;
    }
}

.pendingTasks,
.doneTasks,
.totalTasks {
    font-size: 18px;
    padding: 4px 12px;
    border-radius: 6px;
    margin-left: 10px;
    margin-top: 10px;
}

.pendingTasks {
    margin-left: 0;
    background: rgb(255, 190, 190);
    color: var(--text-color);
}

.doneTasks {
    background: rgb(203, 255, 190);
    color: var(--text-color);
}

.totalTasks {
    background: var(--text-color);
    color: var(--sidebar-color);
}

body.dark .pendingTasks {
    background: rgb(120, 0, 0) !important;
}

body.dark .doneTasks {
    background: rgb(25, 123, 0);
    color: var(--text-color);
}

.btn-delete {
    color: rgb(172, 40, 40);
    cursor: pointer;
}

.btn-edit {
    color: rgb(46, 66, 180);
    cursor: pointer;
}

.btn-update {
    color: rgb(36, 149, 83);
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.modal input {
    width: 100%;
    padding: 4px;
}

.modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    background-color: var(--sidebar-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    width: 300px;
    height: 300px;
}

.modal-textarea {
    height: 150px;
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    outline: none;
    border: 1px solid var(--text-color);
    background-color: var(--sidebar-color);
    color: var(--text-color);
    resize: none;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-save,
.btn-cancel {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.btn-save {
    background-color: #4caf50;
    color: #fff;
    margin-right: 10px;
}

.btn-cancel {
    background-color: #f44336;
    color: #fff;
}

@media screen and (width <=500px) {
    .home .text {
        font-size: 30px;
        font-weight: 400;
        color: var(--text-color);
        padding: 12px 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        flex-direction: row;
        justify-content: center;
    }

    .main-content {
        padding: 20px !important;
    }

    .inputTask {
        margin-left: 0 !important;
    }
}

@media screen and (width <=1045px) {
    .inputTask {
        margin-left: 0 !important;
    }
}

@media screen and (width <=395px) {
    .tag {
        font-size: 14px;
    }

    .inputTask {
        font-size: 14px;
        width: 60%;
    }

    .taskCreate {
        font-size: 14px;
    }
}

.main-content {
    padding: 20px 60px 60px;
}

.tasks {
    list-style-type: none;
    background-color: rgba(255, 255, 255, .7);
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark .tasks {
    background-color: rgb(65 65 65 / 70%) !important;
    color: var(--text-color);
}

.done {
    opacity: 0.4;
}

.inputTask {
    font-size: 18px;
    padding: 4px 12px;
    border-radius: 6px;
    margin-left: 10px;
    outline: none;
    border: none;
    color: var(--text-color);
    background: var(--sidebar-color);
}

.taskCreate {
    font-size: 18px;
    padding: 4px 12px;
    border-radius: 6px;
    margin-left: 10px;
    outline: none;
    border: none;
    background: var(--text-color);
    color: var(--sidebar-color);
}

.appInfo,
.appInfo div {
    margin-top: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.searchMobile {
    display: none;
}

@media screen and (width <=500px) {
    .search-box {
        display: none !important;
    }

    .searchMobile {
        display: block;
        width: 100%;
        font-size: 18px;
        padding: 4px 12px;
        border-radius: 6px;
        outline: none;
        border: none;
        margin-top: 10px;
        color: var(--text-color);
        background: var(--sidebar-color);
    }

    .appInfo {
        justify-content: space-between;
    }

    .pendingTasks,
    .doneTasks,
    .totalTasks {
        margin: 0;
    }

    .pendingTasks {
        width: 40%
    }

    .doneTasks {
        width: 27%
    }

    .totalTasks {
        width: 28%
    }
}