/* Контейнер для табов */
.admission-tabs-container {
  margin: 20px 0;
  line-height: 1.2;
}

/* Табы навигации */
.admission-tabs {
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: 30px;
  display: flex;
}

.admission-tab {
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  letter-spacing: -0.2px;
  color: #1d71b8;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
  border: 1px solid #bad4ea;
  border-radius: 4px;
  background: #ffffff none;
  margin: 0 10px;
  width: 33.33333%;
  height: 80px;
  outline: none !important;
}

.admission-tab:hover {
  background-color: #f5f5f5;
}

.admission-tab.active {
  background-color: #1d71b8;
  color: #ffffff;
  border-color: #1d71b8;
}

.admission-tab.active:hover {
  background-color: #1d71b8;
}

/* Прелоадер на табе во время загрузки данных */
.admission-tab.loading {
  pointer-events: none;
  opacity: 0.85;
}

.admission-tab.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  animation: admission-tab-spin 0.8s linear infinite;
}

@keyframes admission-tab-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Контент табов */
.admission-tab-content {
  display: none;
  padding: 30px 24px;
  border: 1px solid #bad4ea;
  border-radius: 4px;
}

.admission-tab-content.active {
  display: block;
}

/* Фильтры */

.admission-controls {
  display: flex;
  gap: 15px;
  justify-content: space-between;
}
.admission-controls-right {
  max-width: 480px;
  flex: 1;
}
.admission-filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admission-filter-row:last-child {
  margin-bottom: 0;
}

.admission-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admission-filter-group label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0;
}

.admission-filter-select {
  padding: 9px 10px;
  border: 1px solid #8c8c8c;
  border-radius: 4px;
  font-size: 16px;
  min-width: 200px;
  background-color: #ffffff;
  cursor: pointer;
}

.admission-filter-select:focus {
  outline: none;
}

/* Кнопки */
.admission-btn-apply,
.admission-btn-reset {
  padding: 10px 30px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  line-height: 1;
  outline: none !important;
  background-color: #fff;
}

.admission-btn-apply {
  background-color: #27348b;
  color: #ffffff;
}

.admission-btn-apply:hover {
  background-color: #165a9e;
}

.admission-btn-reset {
  border: 1px solid #27348bb2;
  color: #27348b;
}

.admission-btn-reset:hover {
  background-color: #d0d0d0;
}

.admission-btn-search {
  background-color: #ffffff;
  border: 1px solid #27348bb2;
  color: #27348b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 20px;
  transition: all 200ms ease-in-out;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
  justify-content: center;
}

.admission-btn-search:hover {
  background-color: #d0d0d0;
}

.admission-btn-search::before {
  content: "";
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-bottom: 2px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.25 14.25C11.5637 14.25 14.25 11.5637 14.25 8.25C14.25 4.93629 11.5637 2.25 8.25 2.25C4.93629 2.25 2.25 4.93629 2.25 8.25C2.25 11.5637 4.93629 14.25 8.25 14.25Z' stroke='%2327348B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15.75 15.7498L12.4875 12.4873' stroke='%2327348B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
}

/* Информация об обновлении */
.admission-update-info {
  text-align: right;
  line-height: 1;
  margin-bottom: 3px;
}

.admission-update-text {
  font-size: 12px;
  color: #8c8c8c;
}

/* Поиск */
.admission-search-section {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admission-search-input {
  padding: 9px 19px;
  border: 1px solid #8c8c8c;
  font-size: 16px;
  min-width: 250px;
  line-height: 1;
  flex: 1;
}

.admission-search-input:focus {
  outline: none;
  border-color: #1d71b8;
}

/* Таблица */
/* Контейнер таблицы делаем независимой зоной скролла */
.admission-table-container {
  overflow: auto; /* Включаем внутренний скролл */
  max-height: 75vh; /* Ограничиваем высоту (75% экрана), чтобы скролл работал */
  display: none;
  margin-top: 32px;
}

.admission-table-container.visible {
  display: block;
}

.admission-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-size: 16px;
}

/* Намертво фиксируем шапку */
.admission-table thead th {
  position: sticky;
  top: 0; 
  background-color: #ffffff; /* Чтобы текст таблицы не просвечивал снизу */
  z-index: 10;
  padding: 15px;
  text-align: center;
  font-weight: 700;
  
  /* box-shadow используем вместо border, чтобы рамки не исчезали при скролле */
  box-shadow: inset 0 -1px 0 #8c8c8c, 
              inset 0 1px 0 #8c8c8c, 
              inset -1px 0 0 #8c8c8c, 
              inset 1px 0 0 #8c8c8c;
}

/* Понижаем z-index второго ряда, чтобы он не перекрывал первый, и задаем отступы */
.admission-table thead tr.sub-header th {
  z-index: 9;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 10px;
}

.admission-table td {
  padding: 12px;
  border: 1px solid #8c8c8c;
}

.admission-table tbody tr:nth-child(even) {
  background-color: #e1f8fe;
}

.admission-table .admission-list-link {
  color: #1d71b8;
  text-decoration: underline;
  font-weight: 500;
}

/* Состояние загрузки */
.admission-loading {
  text-align: center;
  padding: 40px;
  font-size: 16px;
}

.admission-loading::after {
  content: "...";
  animation: admission-dots 1.5s steps(4, end) infinite;
}

@keyframes admission-dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

/* Пустой результат */
.admission-no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
}

/* Адаптивность */
@media (max-width: 991px) {
  .admission-controls {
    flex-direction: column;
    gap: 40px;
  }
  .admission-filter-group,
  .admission-btn-apply,
  .admission-btn-reset {
    flex: 1;
  }
  .admission-btn-apply,
  .admission-btn-reset {
    padding: 16px;
  }
  .admission-update-info {
    text-align: left;
    margin-bottom: 4px;
  }
  .admission-controls-right {
    max-width: 100%;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .admission-tabs {
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;
    gap: 20px;
    margin-bottom: 20px;
  }
  .admission-tab {
    margin: 0;
    width: 100%;
  }
  .admission-tab-content {
    padding: 20px 17px;
  }
  .admission-filter-row {
    flex-direction: column;
    gap: 16px;
  }
  .admission-filter-select {
    width: 100%;
  }

  .admission-search-section {
    flex-direction: column;
    align-items: stretch;
  }

  .admission-search-input {
    width: 100%;
    min-width: auto;
  }

  .admission-btn-search {
    width: 100%;
  }

  .admission-table-container {
    overflow-x: scroll; /* Оставляем на мобильных родное поведение */
  }

  .admission-table {
    font-size: 12px;
  }

  .admission-table th,
  .admission-table td {
    padding: 8px;
  }
}

.admission-table-clone {
    border-collapse: collapse;
}