* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ---------- Основной контент ---------- */

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding-top: 60px;
    background-color: #f4f4f4;
}

/* ---------- Стили полей ввода ---------- */

input {
    background-color: #f9f9f9;
}

.form-group {
    margin-bottom: 15px;
}

.form-input {
    border: 2px solid #e9e1e1;
    border-radius: 8px;
    font-size: 1rem;
    padding: 8px 16px; /* вертикальные отступы + высота шрифта дают 40 px */
    height: 40px;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
}


/* ---------- Стили полей выбора ---------- */

.select-wrapper {
    position: relative;
    width: 100%;
}

.form-select {
    border: 2px solid #e9e1e1;
    border-radius: 8px;
    font-size: 1rem;
    padding: 8px 40px 8px 16px;
    height: 40px;
    width: 100%;
    box-sizing: border-box;
    background-color: #f9f9f9;
    cursor: pointer;
    -webkit-appearance: none; /* Убираем стили по умолчанию в WebKit-браузерах */
    -moz-appearance: none;    /* Убираем стили по умолчанию в Firefox */
    appearance: none;         /* Убираем стили по умолчанию */
}


/* ---------- Стили загрузки файла ---------- */

.custom-file-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}

.file-name {
  display: block;
  padding: 10px 15px;
  border: 2px dashed #ccc;
  border-radius: 4px;
  background: #f8f9fa;
  color: #666;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.file-name:hover {
  border-color: #007bff;
  color: #333;
  background: #e9ecef;
}

.file-name.file-selected {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.file-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

/* ---------- Выпадающее меню ---------- */

.dropdown-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 250px;
    height: 100vh;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
    transition: right 0.3s ease;
    z-index: 999;
    padding-top: 80px;
    padding-right: 40px;
    padding-left: 40px;
}

.dropdown-menu.active {
    right: 0;
}

.dropdown-menu ul {
    list-style: none;
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.dropdown-menu button {
    width: 100%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin: 10px 0;
}

.dropdown-menu li.last-item {
    margin-top: 20px;
}


.dropdown-menu button.active {
    background: linear-gradient(135deg, #8b2a3a 0%, rgb(107, 26, 42) 100%);
}

.dropdown-menu button.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 7px rgba(139, 42, 58, 0.6);
}

/* ---------- Стили бургер меню ---------- */

.burger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1000;
}

.burger-line {
    height: 3px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Анимация бургер‑меню при открытии */
.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}
.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Скрываем бургер меню*/
.hide-burger-menu .burger-menu,
.hide-burger-menu .dropdown-menu {
    display: none;
}

/* ---------- Стили кнопок ---------- */

button {
    display: flex;
    align-items: center;      /* вертикальное центрирование текста */
    justify-content: center; /* горизонтальное центрирование текста */
    text-decoration: none;
    color: white;
    min-height: 40px;        /* фиксированная минимальная высота */
    padding: 0 20px;         /* убираем вертикальные отступы, оставляем горизонтальные */
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.2;       /* улучшаем читаемость текста */
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    width: auto;             /* кнопки подстраиваются под содержимое */
}

button:active {
    transform: translateY(0);
    box-shadow: inset var(--box-shadow);
}

button {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 7px rgba(63, 70, 229, 0.4);
}

.add-btn {
    background: linear-gradient(135deg, #3ceaf6 0%, #1db2d7 100%);
}

.add-btn:hover {
    box-shadow: 0 3px 7px rgba(59, 209, 246, 0.4);
}

.edit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.edit-btn:hover {
    box-shadow: 0 3px 7px rgba(59, 130, 246, 0.4);
}

.cancel-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.cancel-btn:hover {
    box-shadow: 0 3px 7px rgba(107, 114, 128, 0.4);
}

.save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.save-btn:hover {
    box-shadow: 0 3px 7px rgba(16, 185, 129, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.delete-btn:hover {
    box-shadow: 0 3px 7px rgba(239, 68, 68, 0.4);
}

.download-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.download-btn:hower {
    box-shadow: 0 3px 7px rgba(139, 92, 246, 0.4);
}

/* ---------- Стили иконок ---------- */

.icon {
    width: 20px;
    height: 20px;
    pointer-events: none;
    filter: brightness(0) invert(1);
}

.action-btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    box-shadow: var(--box-shadow);
    flex: 0 0 auto;
}