path {
    stroke: var(--primary-color)
}

h1,
p,
h2 {
    color: var(--primary-color);
}

.istok-web-regular {
    font-family: "Istok Web", serif;
    font-weight: 400;
    font-style: normal;
}

.istok-web-bold {
    font-family: "Istok Web", serif;
    font-weight: 700;
    font-style: normal;
}

.istok-web-black {
    font-family: "Istok Web", serif;
    font-weight: 900;
    font-style: normal;
}

.istok-web-regular-italic {
    font-family: "Istok Web", serif;
    font-weight: 400;
    font-style: italic;
}

.istok-web-bold-italic {
    font-family: "Istok Web", serif;
    font-weight: 700;
    font-style: italic;
}

#header {
    background-color: var(--white-transparent-60);
    width: auto;
    border-radius: 24px;
    align-items: center;
    display: flex;
    justify-content: flex-start;
    height: 54px;
}

#header .left-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.title {
    font-size: 20px;
}

#container {
    width: 100%;
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#union-box {
    margin-top: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    align-items: end;
}

#top-box-row {
    display: flex;
    align-items: center;
    width: 100%;
    flex-direction: row;
}

#name {
    font-size: 24px;
    margin-left: 24px;
}

#name-container {
    display: flex;
    gap: 12px;
    flex-grow: 1;
    flex-direction: row;
    align-items: center;
}

#count-text {
    flex-shrink: 0;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 3px 8px;
    color: var(--secondary-color);
    font-size: 12px;
    opacity: .9;
}

#top-box {
    width: 80px;
    height: 55px;
    background-color: var(--white-transparent-60);
    border-radius: 20px 20px 0px 0px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-box-row-up {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 55px;
    width: 100%;
}

.actions-row {
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    display: flex;
    flex-direction: row;
    align-items: center;
}

.actions-row.hide {
    transform: translateX(60px);
    opacity: 0;
    visibility: hidden;
}

#top-box-row-container {
    align-self: flex-start;
    justify-content: flex-end;
    flex-grow: 1;
    position: relative;
}

#filters-container {
    opacity: 0;
    position: absolute;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    top: 60px;
    width: 100%;
    display: grid;
    visibility: hidden;
    column-gap: 16px;
    row-gap: 4px;
    grid-template-columns: repeat(auto-fill, minmax(40vw, 1fr));
    align-items: end;
    justify-content: flex-start;
}

.filter-label {
    font-size: 16px;
    opacity: .8;
    color: var(--primary-color);
    margin-left: 8px;
}

#filters-container.show {
    visibility: visible;
    opacity: 1;
}

#filter-submit-button {
    color: var(--white);
    background-color: var(--secondary-color);
    border-radius: 16px;
    padding: 12px 40px;
    height: 44px;
    outline: none;
    margin-top: 12px;
    border: none;
    transition: .1s linear;
    cursor: pointer;
}

#filter-submit-button:hover {
    opacity: .9;
}

.filter-field {
    border: 1px solid var(--secondary-color);
    padding: 12px 24px;
    border-radius: 16px;
    color: var(--primary-color);
    width: 100%;
    height: 44px;
    font-size: 16px;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 2rem !important;
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.6199%205.22084L7.81655%209.02417C7.36738%209.47334%206.63238%209.47334%206.18322%209.02417L2.37988%205.22084%22%20stroke%3D%22%23292D32%22%20stroke-width%3D%221.5%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat;
    background-position: calc(100% - 0.75rem) center !important;
}

:root.theme-dark .filter-field {
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.6199%205.22084L7.81655%209.02417C7.36738%209.47334%206.63238%209.47334%206.18322%209.02417L2.37988%205.22084%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%221.5%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat;
}

.filter-input-date {
    border: 1px solid var(--secondary-color);
    padding: 12px 24px;
    color: var(--primary-color);
    width: calc(50% - 4px);;
    height: 44px;
    font-size: 16px;
    background-color: var(--white);
}

.filter-field-parent-date .filter-input-date:nth-child(1) {
    border-radius: 16px 0 0 16px;
}

.filter-field-parent-date .filter-input-date:nth-child(2) {
    border-radius: 0 16px 16px 0;
}

.filter-input-date:focus {
    border: 2px solid var(--secondary-color);
    outline: none;
}

.filter-field-parent {
    border-radius: 16px;
    background-color: var(--white);
}

.filter-field-parent-date {
    border-radius: 16px;
    gap: 4px;
    width: 100%;
}

.filter-field:focus {
    outline: none;
}

.filter-field::placeholder {
    color: var(--primary-color);
    font-size: 16px;
}

#top-box-icon {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#top-box.show-filters {
    height: 220px;
}

#top-box svg {
    transform: rotateZ(0deg);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-box.show-filters svg {
    transform: rotateZ(45deg);
}

#bottom-box {
    width: 100%;
    flex: 1;
    min-height: 0;
    background-color: var(--white-transparent-60);
    border-radius: 20px 0 20px 20px;
    overflow-y: auto;
    position: relative;
    display: flex;
    gap: 16px;
    /*flex-wrap: wrap;*/
    flex-direction: column;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    align-items: center;
}

@media (max-width: 850px) {
    #menu-expand-icon {
        display: none;
    }
}

#bottom-box table {
    width: 100%;
    flex-grow: 1;
    table-layout: fixed;
    border-collapse: collapse;
}


#bottom-box::-webkit-scrollbar {
    display: none;
}

thead,
tbody {
    display: block;
    width: 100%;
    position: relative;
}

thead::after {
    content: '';
    position: absolute;
    left: 16px;
    width: calc(100% - 16px);
    height: 1px;
    background-color: var(--transparent-black-10);
}

tr {
    width: 100%;
    flex-wrap: nowrap;
    display: flex;
    transition: .1s;
}

th,
td {
    padding-left: 16px;
    position: relative;
    text-align: left;
    justify-content: flex-start;
    align-items: center;
    display: inline-flex;
    height: 54px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding-right: 16px;
}

th[data-col="checkbox"], td[data-col="checkbox"] {
    width: 100px;
    min-width: 100px;
}

td .item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-lines: 1;
}

.column-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


th:has(svg) .column-name {
    max-width: calc(100% - 20px);
}

th {
    gap: 4px;
}

th:not([data-col="checkbox"]), td:not([data-col="checkbox"]) {
    flex: 1;
    min-width: 100px;
}

tr {
    cursor: pointer;
}

tbody tr:nth-child(even) td {
    background-color: var(--background-gradient-start-30);
}

tbody tr:hover {
    background-color: var(--secondary-color-20);
}

td::before,
th::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 25px;
    background-color: var(--transparent-black-20);
    border: 1px;
}

td:last-child::before,
th:last-child::before {
    display: none;
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox .checkmark {
    display: flex;
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid var(--highlight-color);
    background-color: var(--background-color-f4);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.custom-checkbox .checkmark-icon path {
    stroke: var(--white);
}

.pagination {
    margin-bottom: 16px;
    display: flex;
    width: auto;
    flex-direction: row;
    gap: 4px;
    align-content: center;
}

.pagination .other-pages {
    background-color: var(--background-gradient-start);
    border-radius: 8px;
    color: var(--primary-color);
    padding: 4px 12px;
    cursor: pointer;
    transition: .1s;
}

.pagination .current {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 4px 12px;
    color: var(--white);
}

.pagination .dots {
    font-size: 18px;
    color: var(--primary-color);
    padding: 0 8px;
    cursor: default;
    background: transparent;
}

.pagination .other-pages:hover {
    background-color: var(--secondary-color);
}

.custom-checkbox input:checked + .checkmark {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
}

.custom-checkbox .checkbox-input:checked + .checkmark .checkmark-icon {
    display: block;
}

.custom-checkbox .checkmark-icon {
    display: none;
}


.menu:hover ~ .sidebar {
    left: 0;
}

#curved-diagonal-cut {
    width: 24px;
    height: 24px;
    background-color: var(--white-transparent-60);
    clip-path: path("M0,0 H24 V24 H0 Q24,24 24,0 Z");
    align-self: flex-end;
}

.actions-container {
    background-color: var(--white-transparent-60);
    border-radius: 16px 0 0 16px;
    position: relative;
    height: 48px;
    left: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: center;
    opacity: 1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.perform-action {
    background-color: var(--secondary-color);
    color: var(--white);
    height: 48px;
    position: relative;
    margin-right: 4px;
    padding: 0 20px;
    left: 20px;
    border-radius: 0 16px 16px 0;
    transition: .1s linear;
    border: none;
    cursor: pointer;
}

.actions-row:not(:has(.filter-button)) .perform-action {
    margin-right: 0;
}

.perform-action:hover {
    opacity: .9;
}

.actions-input {
    display: flex;
    width: 100%;
    align-items: center;
    flex-direction: row;
    background-color: var(--background-gradient-start);
    border-radius: 12px;
    height: 36px;
    padding: 0 16px;
    min-width: 15vw;
    border: none;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 2rem !important;
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.6199%205.22084L7.81655%209.02417C7.36738%209.47334%206.63238%209.47334%206.18322%209.02417L2.37988%205.22084%22%20stroke%3D%22%23292D32%22%20stroke-width%3D%221.5%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat;
    background-position: calc(100% - 0.75rem) center !important;
}

:root.theme-dark .actions-input {
    background: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M11.6199%205.22084L7.81655%209.02417C7.36738%209.47334%206.63238%209.47334%206.18322%209.02417L2.37988%205.22084%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%221.5%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat;
}

.actions-input:focus {
    outline: none;
}

.filter-button {
    background-color: var(--white-transparent-60);
    border-radius: 18px;
    position: relative;
    width: 57px;
    height: 48px;
    left: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: center;
    opacity: 1;
}

.group-text {
    font-size: 16px;
    color: var(--primary-color);
    opacity: .8;
    margin-left: 16px;
    margin-top: 16px;
}

.search-container {
    display: flex;
    align-items: center;
    flex-direction: row;
    height: 40px;
    padding-left: 8px;
    gap: 8px;
    min-width: 20vw;
    padding-right: 8px;
    margin-right: auto;
    margin-left: auto;
}

.search-container:has(input) {
    background-color: var(--background-gradient-start);
    border-radius: 16px;
}

.mobile-search {
    display: none;
    margin-top: 12px;
    visibility: hidden;
    background-color: var(--white-transparent-60) !important;
    border-radius: 20px;
    width: 100%;
}

.mobile-action {
    display: none;
    margin-top: 12px;
    width: 100%;
    max-height: 48px;
    transform: scaleY(1);
}

.mobile-action.hide {
    transform: scaleY(0);
    max-height: 0;
}

@media (max-width: 500px) {
    .search-container:not(.mobile-search) {
        visibility: hidden;
    }

    .actions-row:not(.mobile-action) {
        display: none;
    }

    .mobile-search {
        display: flex;
        visibility: visible;
    }

    .mobile-action {
        display: flex;
        overflow: hidden;
        flex-direction: row;
    }

    .actions-container {
        left: 0;
        flex-grow: 1;
    }

    .filter-button {
        left: 0;
    }

    .perform-action {
        left: 0;
    }
}

.search-container path {
    stroke: var(--primary-color);
}

.search-input {
    background-color: transparent;
    border: none;
    flex-grow: 1;
    outline: none;
}

.search-input::placeholder {
    color: var(--primary-color);
}

.search-input:focus {
    outline: none;
}


.file-link {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    background-color: transparent;
    cursor: pointer;
    border: none;
    color: var(--secondary-color);
}

.file-link path {
    stroke: var(--secondary-color);
}

.file-link:focus {
    border: none;
    outline: none;
}

.file-link:hover {
    opacity: .7;
}

#loading {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--transparent-black-50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--white);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#menu-title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

#menu-expand-icon {
    cursor: pointer;
}

#menu-expand-icon {
    cursor: pointer;
    transform: rotateY(0deg);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-expand-icon.expanded {
    transform: rotateY(180deg);
}

.menu {
    width: 24px;
    display: flex;
    visibility: visible;
    align-items: center;
    opacity: 1;
    justify-content: center;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu.shrink {
    opacity: 0;
    visibility: hidden;
    width: 0;
}

#logout {
    color: var(--error-color);
}

.status-container {
    display: inline-block;
    position: relative;
    width: 100%;
    max-width: 120px;
}

.status-style {
    position: relative;
    display: flex;
    border-radius: 8px;
    padding: 4px 12px;
    gap: 8px;
    flex-direction: row;
    width: 100%;
    align-items: center;
    background-color: var(--background-gradient-start);
    z-index: 2;
}

.status-style span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    font-size: 14px;
    flex-grow: 1;
}


.status-dot {
    border-radius: 50%;
    width: 8px;
    flex-shrink: 0;
    height: 8px;
}

.status-border {
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-width: 1px;
    border-style: solid;
    border-radius: 9px;
    z-index: 1;
    opacity: .4;
    transition: .2s ease-in;
}

.status-container:hover .status-border {
    border-width: 2px;
    opacity: 1;
    border-radius: 10px;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
}

.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--transparent-black-50);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-box {
    background: var(--white-transparent-80);
    padding: 20px;
    width: 90vw;
    max-width: 500px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    transform: translateY(-10px);
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-overlay.active .dialog-box {
    transform: translateY(0px);
}

.dialog-box h2 {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
}

.dialog-actions-container {
    align-self: flex-end;
    margin-top: 24px;
}

.dialog-box button {
    padding: 10px 20px;
    border: none;
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.confirm-dialog {
    background: var(--error-color);
}

.confirm-dialog:hover {
    background: #ca0202;
}

.close-dialog {
    background: var(--secondary-color);
}

.close-dialog:hover {
    background: var(--highlight-color);
}