body {
  font-family: Arial, sans-serif;
/*  background-color: #f5f5f5;*/
  background-color: #f5e5e5;
  margin: 0;
  padding: 20px;
  min-width: 720px;
}

.form-container {
  max-width: 700px;
  margin: auto;
/*  background: #ffffff;*/
  background: #efeff4;

  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form-container-1024 {
  max-width: 1024px;
  margin: auto;
/*  background: #ffffff;*/
  background: #efeff4;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form-container-100 {
  width: 1600px;
  margin: auto;
/*  background: #ffffff;*/
  background: #efeff4;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: bold;
}

input, select, button {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;

}

input[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0056b3;
}

@media (max-width: 480px) {
  .form-container {
    padding: 15px;
  }

  input, select, button {
    font-size: 14px;
  }
}

input:disabled, select:disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}
.status-message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
}

.status-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.status-message strong {
  color: #b30000;
}
.status-message {
  transition: opacity 0.5s ease;
}

h3 {
  text-align: center;
}
h2 {
  text-align: center;
}
details {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px 15px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

details:hover {
  background-color: #e6e6e6;
}

details summary {
  font-weight: bold;
  outline: none;
  list-style: none;
  cursor: pointer;
}

details[open] summary::after {
  content: "";
  float: right;
}

details summary::after {
  content: "";
  float: right;
}

table th, table td {
  text-align: center;
  vertical-align: middle;

}
/*th, td {
    border: 1px solid #d2d2d7; 
    text-align: left;
}

th {
    background-color: #f5f5f7; 
    font-weight: 600;
    color: #1d1d1f;
}*/

/* Обращаемся только к нашей конкретной таблице */
.purchase-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

/* Стили для ячеек внутри этой таблицы */
.purchase-table th, 
.purchase-table td {
    border: 1px solid #d2d2d7; 
    padding: 5px 5px;
    text-align: center;
}

/* Стили только для заголовков этой таблицы */
.purchase-table th {
    background-color: #f5f5f7; 
    font-weight: 600;
    color: #1d1d1f;
}
.center-text {
  text-align: center;
}
.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}
.table-wrapper table {
  min-width: 600px; /* или боле, ели нжно */
  width: 100%;
}

#overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* по молани к */
}
.table-container {
  margin: auto;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;

    /* 1. Установите максимальную ширину контейнера, которую он может занять на экране */
    max-width: 100%; 

    /* 2. Самое главное: разрешаем горизонтальную прокрутку, если содержимое (таблица) выходит за пределы max-width */
    overflow-x: auto; 

    /* 3. Дополнительно: чтобы контейнер не сливался с содержимым */
    margin-bottom: 20px;
}

/* Дополнительно, чтобы таблица не сжималась */
.table-container table {
    /* Это гарантирует, что таблица будет занимать столько места, сколько требует ее контент, 
       и не будет сжиматься до max-width контейнера */
    width: max-content; 
    min-width: 100%; /* Гарантирует, что на широких экранах она займет всю доступную ширину */
}
.left-aligned-table td {
    /* Основное правило для выравнивания текста */
    text-align: left;
    vertical-align: middle; 
}
.left-aligned-table th {
    /* Основное правило для выравнивания текста */
    text-align: left;
    vertical-align: middle; 
}


.data-input-table th:nth-child(6),
.data-input-table td:nth-child(6),
.data-input-table th:nth-child(7),
.data-input-table td:nth-child(7),
.data-input-table th:nth-child(8),
.data-input-table td:nth-child(8),
.data-input-table th:nth-child(9),
.data-input-table td:nth-child(9),
.data-input-table th:nth-child(10),
.data-input-table td:nth-child(10) {
    display: none;
}
.data-input-table-custom th:nth-child(6),
.data-input-table-custom td:nth-child(6),
.data-input-table-custom th:nth-child(10),
.data-input-table-custom td:nth-child(10) {
    display: none;
}

table {
    width:100%;
border-collapse: collapse;
}


.btn-wrapper a {
    /* Видаляємо підкреслення */
    text-decoration: none; 
    /* Переконайтеся, що колір тексту передається до кнопки, якщо це необхідно */
    color: inherit; 
    /* Це може допомогти, якщо є проблеми з відображенням блоку */
    display: inline-block;
}

/* Якщо ви хочете стилізувати саму кнопку, а не посилання */
.btn-wrapper a {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
    /* Тут можуть бути ваші основні стилі кнопки */
    /* Наприклад: */
    cursor: pointer;
    border: 1px solid #ccc;
    padding: 8px 15px;
}