body {
  font-family: 'Segoe UI', sans-serif;
  background: #eef2f7;
  margin: 20px;
  color: #2c3e50;
}
h1 {
  text-align: center;
  color: #34495e;
}
.row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.row label {
  flex: 1;
}
input, select, textarea {
  padding: 10px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 16px;
}
textarea {
  resize: vertical;
  height: 80px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
th, td {
  border: 1px solid #ddd;
  padding: 10px;
}
th {
  background: #f9fbfd;
  font-weight: bold;
  text-align: left;
}
td input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
}
.controls, .actions {
  margin: 15px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
button {
  padding: 10px 14px;
  border: none;
  background: #3498db;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 15px;
}
button:hover {
  background: #2980b9;
}
tr.draggable {
  cursor: move;
}

/* Стили для выпадающего списка диагнозов */
#diagnosisList {
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  position: absolute;
  max-height: 150px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#diagnosisList div {
  padding: 8px;
  cursor: pointer;
}
#diagnosisList div:hover {
  background-color: #f0f0f0;
}

.template-dropdown {
  position: relative;
  display: inline-block;
}

/* Скрываем меню изначально */
.template-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}

/* Показываем при hover или активности */
.template-dropdown:hover .template-menu,
.template-dropdown.show .template-menu {
  display: block;
}

/* Стиль кнопок внутри меню */
.template-menu button {
  display: block;
  width: 150px;
  padding: 8px;
  margin: 2px 0;
  text-align: left;
  background: #3498db;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.template-menu button:hover {
  background: #2980b9;
}

/* Стиль для поля "Диагноз" */
#diagnosis {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  color: #333;
}

#drugsTable {
  table-layout: fixed;
  width: 100%;
}

/* Фиксированные ширины колонок: подкорректируйте проценты под ваши нужды */
#drugsTable th:nth-child(1),
#drugsTable td:nth-child(1) {
  width: 20%; /* Торговое название */
}

#drugsTable th:nth-child(2),
#drugsTable td:nth-child(2) {
  width: 15%; /* МНН */
}

#drugsTable th:nth-child(3),
#drugsTable td:nth-child(3) {
  width: 40%; /* Дозировка */
}

#drugsTable th:nth-child(4),
#drugsTable td:nth-child(4) {
  width: 25%; /* Цель назначения */
}

/* Если текст слишком длинный, добавляем троеточие */
#drugsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#recommendation {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  color: #333;
}

#subscribeFloating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff5e62;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s;
}

#subscribeFloating:hover {
  background: #ff9966;
}

.icon {
  margin-right: 6px;
}

.secondary-button {
  background-color: #34495e /* зелёный */
}

.secondary-button:hover {
  background-color: #2c3e50;
}
