/* Підключення шрифту Angry */
@font-face {
    font-family: "Angry";
    src: url("/fonts/Angry/Angry-Regular.woff2") format("woff2"),
        url("/fonts/Angry/Angry-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

/* Скидання стилів */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Загальні стилі */
body {
    font-family: "Helvetica", "sans-serif";
    background-color: #000;
    color: #c8c8c8;
    min-height: 100vh;
    min-width: 320px;
}

/* Приховуємо контент до авторизації */
body.hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.5s, opacity 0.5s ease;
}

body:not(.hidden) {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Стилі кнопок */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 180px;
    border: 1px solid rgba(37, 218, 219, 0.35);
    text-transform: uppercase;
    color: #474848;
    border-radius: 20px;
    position: relative;
    background-color: #1d1e28;
    box-shadow: 0 0 0 0 black inset;
    transition: all 0.5s;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.button::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 20px;
    box-shadow: 0 0 15px 2px rgba(16, 94, 98, 0.8);
    transition: all 0.5s;
    z-index: 0;
}

.button>* {
    position: relative;
    z-index: 1;
}

.button:hover {
    box-shadow: 0 0 8px 2px black inset;
    color: #25dadb;
    text-decoration: none;
}

.button:hover::before {
    box-shadow: 0 0 15px 2px #105e62;
}

.modal-button {
    min-height: 30px;
    min-width: 90px;
    font-size: 0.7rem;
    border-radius: 15px;
    padding: 0 10px;
    margin: 0 4px;
}

.modal-button::before {
    border-radius: 15px;
}

.secondary-button {
    border: 1px solid rgba(255, 147, 0, 0.35);
    background-color: #1d1e28;
}

.secondary-button::before {
    box-shadow: 0 0 15px 2px rgba(255, 147, 0, 0.6);
}

.secondary-button:hover {
    color: #ff9300;
    box-shadow: 0 0 8px 2px black inset;
}

.secondary-button:hover::before {
    box-shadow: 0 0 15px 2px rgba(255, 147, 0, 0.8);
}

#recordIndex {
    color: #d3f157;
    font-weight: bold;
}

.timer {
    display: block !important;
    margin-bottom: 10px;
    color: red;
    font-weight: bold;
    font-size: 16px;
    visibility: visible;
    position: relative;
    z-index: 1000;
}

/* Стилі модальних вікон і вікна авторизації */
.modal-bg,
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-bg.active,
.login-container.active {
    opacity: 1;
}

.modal-bg {
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
}

.modal-bg.active {
    display: flex;
}

.modal,
.login-container .inner {
    background-color: #1d1e28;
    color: #c8c8c8;
    padding: 1rem;
    border: 1px solid rgba(37, 218, 219, 0.35);
    box-shadow: 0 0 20px 2.5px rgba(16, 94, 98, 0.8);
    border-radius: 8px;
    min-width: 280px;
    max-width: 90%;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    will-change: transform, opacity;
}

.modal-bg.active .modal,
.login-container.active .inner {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal h2,
.login-container h2 {
    margin: 1rem;
    font-weight: 400;
    font-size: 1.2rem;
    color: #d3f157;
}

.modal label,
.login-container label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.modal input,
.modal select,
.modal textarea,
.login-container input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(37, 218, 219, 0.35);
    background-color: #1d1e28;
    color: #c8c8c8;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: 0.2rem;
}

.login-container input {
    margin: 1rem 0 0 0;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.login-container input:focus,
#filterDateFrom:focus,
#filterDateTo:focus,
#filterText:focus,
#filterDelivery:focus {
    outline: none;
    border-color: #25dadb;
    box-shadow: 0 0 8px 1px #25dadb;
}

.modal textarea {
    resize: vertical;
    min-height: 60px;
}

.modal .buttons,
.login-container .buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* Стилі для index.html */
.login-container .inner {
    width: 90%;
    max-width: 360px;
    text-align: center;
}

/* Стилі для логотипу в блоці авторизації */
.login-container .inner .logo {
    display: block;
    max-width: 290px;
    margin: 0 auto 1rem auto;
}

.error {
    color: #d3f157;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Стилі для journal.html */
.navbar {
    background-color: #1d1e28;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(37, 218, 219, 0.35);
}

.navbar img {
    height: 40px;
}

.navbar-title {
    font-size: 1.5rem;
    color: #25dadb;
    letter-spacing: 0.025em;
    font-family: "Angry", "sans-serif";
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
}

.navbar div {
    display: flex;
    gap: 0.5rem;
}

.filters {
    padding: 0.75rem;
    background-color: #1d1e28;
    margin: 0.75rem;
    border: 1px solid rgba(37, 218, 219, 0.35);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filters input,
.filters select {
    padding: 0.5rem;
    border: 1px solid rgba(37, 218, 219, 0.35);
    background-color: #1d1e28;
    color: #c8c8c8;
    border-radius: 4px;
    font-size: 0.75rem;
    min-width: 90px;
}

.page {
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.page[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: fixed;
    background-color: #1d1e28;
}

th,
td {
    border: 1px solid rgba(37, 218, 219, 0.35);
    padding: 0.5rem;
    text-align: left;
    word-wrap: break-word;
    overflow: hidden;
}

th:nth-child(1),
td:nth-child(1) {
    width: 14%;
}

th:nth-child(2),
td:nth-child(2) {
    width: 10%;
}

th:nth-child(3),
td:nth-child(3) {
    width: 30%;
}

th:nth-child(4),
td:nth-child(4) {
    width: 30%;
}

th:nth-child(5),
td:nth-child(5) {
    width: 8%;
}

th:nth-child(6),
td:nth-child(6) {
    width: 8%;
}

th {
    background-color: #252630;
}

.reserved {
    background-color: rgba(211, 241, 87, 0.2);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.pagination .button {
    min-height: 30px;
    min-width: 50px;
    padding: 0 10px;
}

.pagination span {
    font-size: 0.75rem;
    line-height: 30px;
}

.icon {
    cursor: pointer;
    font-size: 0.875rem;
    color: #c8c8c8;
    margin: 0 4px;
    display: inline-block;
    transition: color 0.3s ease;
}

.icon.edit-icon:hover {
    color: #25dadb;
}

.icon.info-icon:hover {
    color: #d3f157;
}

.lock-message {
    display: none;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d3f157;
    color: #000;
    padding: 0.5rem;
    border-radius: 4px;
    z-index: 1001;
    font-size: 0.75rem;
}

/* Адаптивність */
@media (max-width: 1000px) {
    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 0.4rem;
    }

    th:nth-child(1),
    td:nth-child(1) {
        width: 20%;
    }

    th:nth-child(2),
    td:nth-child(2) {
        width: 15%;
    }

    th:nth-child(3),
    td:nth-child(3) {
        width: 25%;
    }

    th:nth-child(4),
    td:nth-child(4) {
        width: 25%;
    }

    th:nth-child(5),
    td:nth-child(5) {
        width: 10%;
    }

    th:nth-child(6),
    td:nth-child(6) {
        width: 5%;
    }

    .navbar-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .login-container .inner {
        padding: 0.75rem;
        width: 95%;
        max-width: 320px;
    }

    .login-container .inner .logo {
        max-width: 240px;
    }

    .button {
        min-height: 36px;
        min-width: 120px;
        font-size: 0.75rem;
        border-radius: 18px;
    }

    .button::before {
        border-radius: 18px;
    }

    .modal {
        min-width: 95%;
        padding: 0.75rem;
    }

    .modal h2,
    .login-container h2 {
        font-size: 1rem;
        color: #d3f157;
    }

    .modal label,
    .login-container label {
        font-size: 0.75rem;
    }

    .modal input,
    .modal select,
    .modal textarea,
    .login-container input {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .modal textarea {
        min-height: 50px;
    }

    .navbar {
        padding: 0.5rem;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .navbar img {
        height: 32px;
    }

    .navbar-title {
        display: none;
    }

    .navbar div {
        flex-direction: column;
        gap: 0.25rem;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
        margin: 0.5rem;
        padding: 0.5rem;
    }

    .filter-inputs,
    .filter-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.25rem;
    }

    .filter-buttons .button,
    .filter-inputs .button {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        font-size: 0.75rem;
    }

    .filters input,
    .filters select {
        width: 100%;
        margin: 0.25rem 0;
        min-width: 0;
        font-size: 0.7rem;
        padding: 0.4rem;
    }

    .page {
        margin: 0.5rem 0;
        padding: 0.5rem;
    }

    table {
        font-size: 0.7rem;
    }

    th,
    td {
        padding: 0.3rem;
    }
}

@media (max-width: 480px) {
    .login-container .inner .logo {
        max-width: 210px;
    }

    .modal-button {
        min-height: 28px;
        min-width: 60px;
        font-size: 0.65rem;
        padding: 0 8px;
    }

    .modal-button::before {
        border-radius: 14px;
    }

    .page {
        padding: 0.5rem;
    }

    .pagination .button {
        min-height: 28px;
        min-width: 40px;
        padding: 0 8px;
    }

    .pagination span {
        font-size: 0.7rem;
        line-height: 28px;
    }

    .icon {
        font-size: 0.75rem;
    }
}