@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --light-grey: #f9f9f9;
    --grey: #F1F0F6;
    --dark-grey: #8D8D8D;
    --light: #ffffff;
    --dark: #000;
    --green: #81D43A;
    --light-green: #E3FFCB;
    --blue: #1775F1;
    --light-blue: #D0E4FF;
    --dark-blue: #0C5FCD;
    --red: #FC3B56;
}

.darkstyle {
    --light-grey: #f9f9f9;
    --grey: #f3f3f3;
    --dark-grey: #8D8D8D;
    --light: #f9f9f9;
    --dark: #000;
    --green: #268c31;
    --light-green: #E3FFCB;
    --blue: #417690;
    --light-blue: #D0E4FF;
    --dark-blue: #2e5061;
    --red: #a53b3b;
}

body {
    background: var(--light);
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

/* SIDEBAR */
#sidebar {
    position: fixed;
    width: 260px;
    background: var(--grey);
    top: 0;
    left: 0;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    border-right: 1px solid var(--dark-grey);
}

#sidebar::-webkit-scrollbar {
    display: none;
}

#sidebar .brand {
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 64px;
    font-weight: 700;
    background: var(--blue);
    color: var(--light);
}

#sidebar .icon {
    min-width: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sidebar .side-menu {
    margin: 30px 0;
    padding: 0 20px;
}

#sidebar .side-menu a {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--dark);
    padding: 12px 16px 12px 0;
    transition: all .3s ease;
    border-radius: 10px;
    margin: 4px;
    grid-gap: 6px;
}

#sidebar .side-menu a:hover {
    background: var(--grey);
}

#sidebar .side-menu a.active,
#sidebar .side-menu a.active:hover {
    background: var(--blue);
    color: var(--light);
}

/* SIDEBAR */

/* CONTENT */
#content {
    position: relative;
    width: calc(100% - 260px);
    left: 260px;
}

/* NAVBAR */
nav {
    background: var(--blue);
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    grid-gap: 28px;
}

nav .toogle-sidebar {
    font-size: 18px;
    cursor: pointer;
}

nav form {
    max-width: 400px;
    width: 100%;
    margin-right: auto;
}

nav .form-group {
    position: relative;
}

nav .form-group input {
    width: 100%;
    background: var(--grey);
    border-radius: 5px;
    border: none;
    outline: none;
    padding: 10px 36px 10px 16px;
    transition: all .3s ease;
}

nav .form-group input:focus {
    box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--light-blue);
}

nav .form-group .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    color: var(--dark-grey);
}

nav .nav-link {
    position: relative;
}

nav .nav-link .icon {
    font-size: 18px;
    color: var(--dark);
}

nav .nav-link .badge {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--light);
    background: var(--red);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light);
    font-size: 10px;
    font-weight: 700;
}

nav .divider {
    width: 1px;
    background: var(--grey);
    height: 12px;
    display: block;
}

nav .profile {
    position: relative;
    margin-left: auto;
    color: var(--light);
}

nav .profile .profile-link {
    background: transparent;
    border: none;
    padding: 10px;
    grid-gap: 10px;
    font-size: 14px;
    align-items: center;
    transition: all .3s ease;
}

nav .profile .icon-logout {
    margin-left: 10px;
}

nav .profile .profile-link a:hover {
    background: var(--grey);
}

/* NAVBAR */

/* MAIN */
main {
    width: 100%;
    padding: 24px 64px 20px 64px;
}

main .title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

main .breadcrumbs {
    display: flex;
    grid-gap: 6px;
}

main .breadcrumbs li,
main .breadcrumbs li a {
    font-size: 14px;
}

main .breadcrumbs li a {
    color: var(--blue);
}

main .breadcrumbs li a.active,
main .breadcrumbs li.divider {
    color: var(--dark-grey);
    pointer-events: none;
}

main .table-section {
    background: var(--light);
    min-height: 100vh;
}

main .table-wrapper {
    background: var(--grey);
    box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
    border-radius: 10px;
    overflow: auto;
    height: 75vh;
    border: 1px solid var(--dark-grey);
    scrollbar-color: var(--grey) transparent;
    scrollbar-width: none;
}

main .table-wrapper::-webkit-scrollbar {
    width: 8px;
    border-radius: 10px;
}

main .table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

main .table-wrapper::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: var(--grey);
}

main .table-wrapper a {
    color: var(--dark);
}

main .table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

main .table-wrapper table .icon {
    min-width: 24px;
}

main .table-wrapper table th,
td {
    width: 100%;
    padding: 18px 0 18px 22px;
}

main .table-wrapper table .folder-row {
    color: var(--dark);
    cursor: pointer;
    border-bottom: 1px solid var(--dark-grey);
    font-weight: 700;
}

main .table-wrapper table .folder-row.in-folder {
    display: flex;
    padding-left: 0 0 0 36px;
}

main .table-wrapper table .icon.in-folder {
    margin-left: 36px;
}

main .table-wrapper table .file-row {
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid var(--dark-grey);
}

main .table-wrapper table .file-hidden-row {
    border: none;
    display: flex;
    max-height: 0;
}

main .table-wrapper table .folder-content {
    block-size: 0;
    display: none;
    transition: all .6s ease;
}

main .table-wrapper table .folder-content.show {
    display: block;
    block-size: auto;
    max-height: 100%;
}

main .table-wrapper table .folder-content .td-container {
    display: flex;
    padding: 0 0 0 0;
}

main .table-wrapper table .folders-content .td-container {
    display: flex;
    padding: 0 0 0 0;
}

main .table-wrapper table .folder-content .td-container .file-row {
    display: flex;
}

[data-level="1"] td {
    padding-left: 50px;
}

[data-level="2"] td {
    padding-left: 100px;
}

[data-level="3"] td {
    padding-left: 150px;
}

[data-level="4"] td {
    padding-left: 200px;
}

[data-level="5"] td {
    padding-left: 250px;
}

[data-level="6"] td {
    padding-left: 300px;
}

[data-level="7"] td {
    padding-left: 350px;
}

[data-level="8"] td {
    padding-left: 400px;
}

.search-padding {
    padding-left: 22px !important;
}

main .table-wrapper table .drag-over {
    border: 2px dashed var(--dark-grey);
}

main .table-wrapper .search-tr {
    background: var(--grey);
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--dark-grey);
}

main .table-wrapper .search {
    width: 35%;
    border-radius: 5px;
    border: 1px solid var(--dark-grey);
    outline: none;
    padding: 10px 10px 10px 36px;
}

main .table-wrapper .search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 35px;
}

/* Стиль для іконок */
main .table-wrapper table .file-icons {
    display: flex;
    align-items: center;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

main .table-wrapper table .file-icons a {
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
}

main .table-wrapper table .file-icons button {
    padding: 8px;
    font-size: 16px;
    background: transparent;
    border: none;
}

main .table-wrapper table .file-icons button:hover {
    cursor: pointer;
}

main .table-wrapper table .folder-icon {
    transition: all .3s ease;
}

main .table-wrapper table .edit-icon {
    color: var(--blue);
}

main .table-wrapper table .lock-icon {
    color: var(--green);
}

main .table-wrapper table .delete-icon {
    color: var(--red);
}

main .form-wrapper {
    background: var(--grey);
    box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
    padding: 24px;
    border-radius: 10px;
    overflow: auto;
    height: 75vh;
    border: 1px solid var(--dark-grey);
    scrollbar-color: var(--grey) transparent;
    scrollbar-width: thin;
}

main .form-wrapper.login {
    background: var(--grey);
    box-shadow: 4px 4px 16px rgba(0, 0, 0, .1);
    padding: 24px;
    border-radius: 10px;
    height: 100%;
    width: 400px;
    margin: 0 auto;
    border: 1px solid var(--dark-grey);
}

main .form-wrapper.scripts {
    padding: 0;
}

main .form-wrapper .form-group {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

main .form-wrapper .form-group.scripts {
    margin-bottom: 0;
}

main .form-wrapper .sticky-position {
    position: sticky;
    z-index: 11;
    background: var(--grey);
    padding: 24px;
}

main .form-wrapper .sticky-position.top {
    top: 0;
}

main .form-wrapper .sticky-position.bottom {
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

main .form-wrapper .sticky-position.top.shadow {
    box-shadow: 0px 0px 16px rgba(0, 0, 0, .1);
}

main .form-wrapper .sticky-position.bottom.shadow {
    box-shadow: 0px 0px 16px rgba(0, 0, 0, .1);
}

main .form-wrapper .form-item {
    width: 100%;
}

main .form-wrapper .form-item.p-24 {
    padding: 24px;
}

main .form-wrapper .textarea {
    padding: 0 24px;
}

main .form-wrapper input,
textarea {
    width: 100%;
    padding: 12px 20px;
    outline: none;
    border-radius: 10px;
    border: 1px solid var(--dark-grey);
}

main .form-wrapper .select-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

main .form-wrapper select {
    width: 100%;
    padding: 12px 20px;
    outline: none;
    border-radius: 10px;
    border: 1px solid var(--dark-grey);
}

main .form-wrapper textarea {
    height: 22vh;
}

main .form-wrapper .checkbox-lock {
    display: flex;
    justify-content: start;
    align-items: flex-start;
}

main .form-wrapper .checkbox-lock input {
    width: auto;
    margin-right: 12px;
    border-radius: none;
    padding: 0;
}

.create-btn {
    display: flex;
    margin-bottom: 14px;
}

.create-btn a {
    margin-left: auto;
}

.create-btn .btn-submit {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 10px;
    background: var(--blue);
    color: var(--light);
    border: none;
    outline: none;
}

.btn-submit {
    padding: 14px 24px;
    cursor: pointer;
    border-radius: 10px;
    background: var(--blue);
    color: var(--light);
    border: none;
    outline: none;
}

main .form-wrapper .btn-submit:hover {
    background: var(--dark-blue);
}

.text-danger {
    color: var(--red);
    margin: 14px;
}

.text-danger.login {
    color: var(--red);
    margin-top: 0;
    margin-bottom: 14px;
}

.CodeMirror {
    line-height: 24px;
}

.fa-user-tie {
    color: var(--red);
}

.script-option {
    padding-left: 12px;
}

.disabled-option {
    background: var(--grey);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.backup-group {
    display: flex;
    justify-content: space-between;
}

.backup-group>* {
    margin-left: 10px;
}

.backup-group #backup-select {
    min-width: 150px;
}

.checkbox-fields {
    display: flex;
    align-items: start;
    flex-direction: column;
    height: 35vh;
    border: 1px solid var(--dark-grey);
    border-radius: 10px;
    background: #fff;
    grid-gap: 6px;
    white-space: nowrap;
    padding: 0 12px 12px 12px;
    overflow-y: auto;
    scrollbar-color: var(--grey) transparent;
    scrollbar-width: thin;
}

.checkbox-fields .checkbox-field {
    display: flex;
    align-items: start;
    justify-content: start;
    gap: 6px;
}

.checkbox-fields .category-title {
    color: var(--dark-grey);
    padding: 4px 0;
}

.checkbox-fields .checkbox-field label,
.checkbox-fields .checkbox-field input {
    cursor: pointer;
}

.alert {
    display: none;
    /* Сховати за замовчуванням */
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}

.alert-success {
    color: var(--light);
    background-color: var(--green);
}

.alert-danger {
    color: var(--light);
    background-color: var(--red);
}

.alert .close {
    color: var(--light);
    margin-left: 15px;
    cursor: pointer;
}

.live-search-container {
    background: #fff;
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1;
}

.live-search {
    background: transparent;
    border: none !important;
    border-radius: 0 !important;
}

.scripts-search-row .icon {
    margin: 0 4px;
}

/* MAIN */

/* CONTENT */
