html {
    font-size: 16px;
}

body {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: Arial, sans-serif;
    text-align: center; 
    margin: 0;
    padding: 0;
}

h1 {
   font-size:20px;
}

h2 {
   font-size:20px;
}

.button {
    background-color: #3498db;
    color: #ecf0f1;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #2980b9;
}

main {
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 15px;
    background-color: #34495e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field {
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    background-color: #ecf0f1;
    font-size: 14px;
    color: #2c3e50;
    width: 100%;
    box-sizing: border-box;
}

.input-field:focus {
    border-color: #3498db;
    outline: none;
}

.login-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.login-button:hover {
    background-color: #2980b9;
}

.error {
    color: #e74c3c;
    font-size: 12px;
    margin-bottom: 8px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #34495e;
    padding: 10px 20px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-buttons button {
    background-color: #3498db;
    color: #ecf0f1;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-buttons button:hover {
    background-color: #2980b9;
}

.logout-button {
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.logout-button:hover {
    background-color: #c0392b;
}


/* Контейнер таблицы */
.table-container {
    flex-grow: 1;
    overflow: auto;
    border: 1px solid #2c3e50;
    position: relative;
    height: calc(100vh - 190px);
}

/* Контейнер таблицы */
.table-new-container {
    flex-grow: 1;
    overflow: auto;
    border: 1px solid #2c3e50;
    position: relative;
    height: calc(100vh - 350px);
}

/* Горизонтальная прокрутка */
.table-wrapper {
    overflow-x: auto;
    max-height: calc(100vh - 150px);
}

/* Таблица */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 12px;
    table-layout: auto; /* Адаптивная ширина столбцов */
}

/* Фиксированный заголовок */
thead {
    position: sticky;
    top: 0;
    background-color: #1abc9c;
    z-index: 100;
}

thead th {
    padding: 8px;
    text-align: center; /* Центрирование заголовков */
    font-weight: bold;
    border-bottom: 2px solid #16a085;
    white-space: nowrap;
}

/* Тело таблицы */
tbody {
    overflow-y: auto;
}

tbody td {
    padding: 6px;
    border-bottom: 1px solid #2c3e50;
    text-align: center; /* Центрирование текста */
    white-space: nowrap; /* Запрещает перенос текста */
}

/* Эффект при наведении */
/*tr:hover {*/
/*    background-color: #3b5998;*/
/*}*/

/* Закрепление первого столбца и жирный текст */
td:first-child, th:first-child {
    position: sticky;
    left: 0;
    background-color: #1abc9c; /* Цвет заголовка */
    font-weight: bold;
    z-index: 101; /* Выше остальных элементов */
}


/* Стили для формы */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.form-table {
    display: table;
    border-spacing: 10px;
    background-color: #34495e;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
}

.form-header, .form-row {
    display: table-row;
}

.form-label, .form-input {
    display: table-cell;
    padding: 5px;
    text-align: center;
}

.form-label {
    font-weight: bold;
    color: #ecf0f1;
    padding-bottom: 10px;
}

.form-input input {
    width: 100%;
    padding: 5px;
    border: 1px solid #16a085;
    border-radius: 5px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
}

.button-danger {
    background-color: #e74c3c;
}

.button-danger:hover {
    background-color: #c0392b;
}


/* Стили для формы удаления */
#deleteForm {
    margin-top: 20px;
    padding: 15px;
    background-color: #34495e;
    border-radius: 10px;
}

#deletePassword {
    width: 100%;
    padding: 5px;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
}


/*Чекбоксы*/
        .checkbox-container {
            margin-bottom: 10px;
        }
        .checkbox-container label {
            font-size: 11px;
            margin-right: 10px;
            cursor: pointer;

        }
        .checkbox-container input {
            cursor: pointer;
            transform: scale(0.8); /* Уменьшает размер чекбокса до 80% от исходного */
        }

        .hidden {
            display: none;
        }


.button-container {
    display: flex;

    margin: 60px auto;

    flex-wrap: wrap;
    justify-content: center;
}

.month {
  display: flex;
  overflow: hidden;

  margin: 10px;
  padding: 12px 12px;

  cursor: pointer;
  user-select: none;
  transition: all 150ms linear;
  text-align: center;
  white-space: nowrap;
  text-decoration: none !important;
  text-transform: none;
  text-transform: capitalize;

  color: var(--color-snow);
  background: #3498db;

  border: 0 none;
  border-radius: 5px;

  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;

  -webkit-appearance: none;
  -moz-appearance:    none;
  appearance:         none;
 
  justify-content: center;
  align-items: center;
  flex: 0 0 160px;
  
  box-shadow: 2px 5px 10px var(--color-smoke);

  &:hover {
    transition: all 150ms linear;

    opacity: .85;
  }
  
  &:active {
    transition: all 150ms linear;
    opacity: .75;
  }
  
  &:focus {
    outline: 1px dotted #959595;
    outline-offset: -4px;
  }
}


@media (max-width: 740px) {

    html {
       font-size:15px;
    }

    h1 {
       font-size:15px;
    }
 
    h2 {
       font-size:15px;
    }

    .button {
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 11px;
    }

    main {
        padding: 15px;
    }

    .login-container {
        max-width: 250px;
        margin: 20px auto;
        padding: 10px;
        border-radius: 6px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    }

    .login-form {
        gap: 8px;
    }

    .input-field {
        padding: 6px;
        border-radius: 4px;
        font-size: 12px;
    }

    .login-button {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 4px;
    }

    .error {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .header-container {
        display: flex;
        padding: 6px 10px;
    }

    .nav-buttons {
        gap: 5px;
    }

    .nav-buttons button {
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 11px;
    }

    .logout-button {
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 11px;
    }

    /* Контейнер таблицы */
    .table-container {
        height: calc(100vh - 100px);
    }

    /* Контейнер таблицы */ 
    .table-new-container {
        height: calc(100vh - 280px);
    }

    /* Горизонтальная прокрутка */
    .table-wrapper {
        max-height: calc(100vh - 100px);
    }

    /* Таблица */
    table {
        font-size: 11px;
    }

    thead th {
        padding: 6px;
        border-bottom: 1px solid #16a085;
    }
 
    tbody td {
        padding: 6px;
        border-bottom: 1px solid #2c3e50;
    }

    /* Закрепление первого столбца и жирный текст */
    td:first-child, th:first-child {
        white-space: normal;
    }

    /* Стили для формы */
    .form-container {
        margin-top: 15px;
    }

    .form-table {
        border-spacing: 8px;
        padding: 10px;
        border-radius: 8px;
        font-size: 11px;
    }

    .form-label, .form-input {
        padding: 4px;
    }

    .form-label {
        padding-bottom: 8px;
    }

    .form-input input {
        padding: 4px;
        border-radius: 4px;
        font-size: 11px;
    }

    /* Стили для формы удаления */
    #deleteForm {
        margin-top: 15px;
        padding: 10px;
        border-radius: 8px;
        font-size: 11px;
    }

    #deletePassword {
        padding: 4px;
        border-radius: 4px;
    }

/*Чекбоксы*/
        .checkbox-container {
            margin-bottom: 7px;
        }
        .checkbox-container label {
            font-size: 5px;
            margin-right: 7px;

        }
        .checkbox-container input {
            transform: scale(0.6); /* Уменьшает размер чекбокса до 80% от исходного */
        }

}


@media (max-width: 540px) {

    html {
       font-size:10px;
    }

    h1 {
       font-size:10px;
    }
 
    h2 {
       font-size:10px;
    }

    .button {
        padding: 3px 5px;
        border-radius: 3px;
        font-size: 7px;
    }

    main {
        padding: 10px;
    }

    .login-container {
        max-width: 200px;
        margin: 15px auto;
        padding: 8px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .login-form {
        gap: 6px;
    }

    .input-field {
        padding: 5px;
        border-radius: 3px;
        font-size: 10px;
    }

    .login-button {
        font-size:10px;
        border-radius: 3px;
    }

    .error {
        font-size: 7px;
        margin-bottom: 4px;
    }

    .header-container {
        padding: 3px 7px;
    }

    .nav-buttons {
        gap: 3px;
    }

    .nav-buttons button {
        padding: 3px 5px;
        border-radius: 3px;
        font-size: 7px;
    }

    .logout-button {
        padding: 3px 5px;
        border-radius: 3px;
        font-size: 7px;
    }

    /* Контейнер таблицы */
    .table-container {
        height: calc(100vh - 70px);
    }

    /* Контейнер таблицы */ 
    .table-new-container {
        height: calc(100vh - 200px);
    }

    /* Горизонтальная прокрутка */
    .table-wrapper {
        max-height: calc(100vh - 100px);
    }

    /* Таблица */
    table {
        font-size: 8px;
    }

    thead th {
        padding: 2px;
    }
 
    tbody td {
        padding: 2px;
        border-bottom: 1px solid #2c3e50;
    }

    /* Закрепление первого столбца и жирный текст */
    td:first-child, th:first-child {
        white-space: normal;
    }

    /* Стили для формы */
    .form-container {
        margin-top: 10px;
    }

    .form-table {
        border-spacing: 6px;
        padding: 7px;
        border-radius: 5px;
        font-size: 7px;
    }

    .form-label, .form-input {
        padding: 3px;
    }

    .form-label {
        padding-bottom: 6px;
    }

    .form-input input {
        padding: 3px;
        border-radius: 3px;
        font-size: 7px;
    }

    /* Стили для формы удаления */
    #deleteForm {
        margin-top: 10px;
        padding: 7px;
        border-radius: 5px;
        font-size: 7px;
    }

    #deletePassword {
        padding: 3px;
        border-radius: 3px;
    }
/*Чекбоксы*/
        .checkbox-container {
            margin-bottom: 5px;
        }
        .checkbox-container label {
            font-size: 6px;
            margin-right: 4px;

        }
        .checkbox-container input {
            transform: scale(0.5); /* Уменьшает размер чекбокса до 80% от исходного */
        }

}
