/* Основные стили для body */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f7fa;
}

/* Стили для header */
header {
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  color: black;
  margin: 0;
  font-size: 26px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

header h1 img {
  width: 25px;
  height: 25px;
  margin-right: 12px;
}

/* Стили для content-blocks */
.content-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  padding: 24px;
  box-sizing: border-box;
}

/* Стили для content-block */
.content-block {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-list-info {
  color: #0056b3;
}

.content-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.parents-tablee th,
.parents-tablee td {
  padding: 10px;
}

/* Стили для large-block */
.large-block {
  grid-column: 1 / -1;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.large-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Иконки в блоках */
.content-block img,
.large-block img {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.content-block img:hover,
.large-block img:hover {
  transform: scale(1.1);
}

/* Заголовки в блоках */
.content-block h2,
.large-block h2 {
  font-size: 20px;
  margin: 12px 0;
  color: #333;
  font-weight: 500;
}

/* Бейдж */
.badge {
  background: linear-gradient(135deg, #ff4d4f, #ff7878);
  color: white;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Список в content-block */
.content-block ul {
  list-style: none;
  padding: 12px;
  margin: 0;
  text-align: left;
  width: 100%;
}

.content-block li {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  color: #555;
  font-size: 14px;
}

/* Стили для списка текущих занятий */
.current-class {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.current-class:hover {
  background: #f8f9fa;
}

/* Стили для сообщения об отсутствии занятий */
.no-classes-info {
  color: #555;
  font-size: 14px;
  margin: 12px 0;
}

/* Основной контейнер контента */
.main-content {
  padding: 0;
}

/* Стили для боковой панели */
.main-content.sidebar-closed {
  margin-left: 40px;
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
  margin-left: 250px;
  transition: margin-left 0.3s ease;
}

/* Стили для кнопок */
.btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #003d80);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268, #4b5156);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Модальное окно для формы клиента */
.client-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.client-form-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  position: relative;
  overflow-y: auto;
  max-height: 85vh;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Заголовок модального окна */
.client-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.client-form-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #333;
  transition: color 0.3s ease;
}

.client-form-close:hover {
  color: #007bff;
}

/* Вкладки формы */
.client-form-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-button {
  background: #e9ecef;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}

.tab-button.active {
  background: #007bff;
  color: white;
}

.tab-button:hover {
  background: #d3d7db;
}

.client-form-tab-content {
  display: none;
}

.client-form-tab-content.active {
  display: block;
}

/* Таблица родителей */
.parents-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.parents-table th,
.parents-table td {
  border: 1px solid #e9ecef;
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

.parents-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Футер формы */
.client-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Контейнер расписания */
.schedule-container {
  width: 100%;
  overflow-x: auto;
}

.schedule-table {
  display: grid;
  gap: 1px;
  background: #e9ecef;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.schedule-row {
  display: grid;
  grid-template-columns: 60px repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1px solid #e9ecef;
  min-height: 60px;
}

.schedule-header {
  font-weight: 600;
  background: #f8f9fa;
}

.schedule-time {
  padding: 12px;
  background: #fff;
  border-right: 1px solid #e9ecef;
  font-size: 14px;
}

.schedule-cell {
  padding: 12px;
  background: #fff;
  min-height: 60px;
  position: relative;
}

.schedule-class {
  background: #e9ecef;
  border-radius: 6px;
  padding: 6px;
  margin: 2px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
}

.schedule-group {
  background: #d4edda;
}

.schedule-individual {
  background: #d1ecf1;
}

.schedule-special {
  background: #fff3cd;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
  .content-blocks {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    gap: 16px;
    padding: 16px;
  }

  .large-block {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .schedule-row {
    grid-template-columns: 60px 1fr;
  }

  .btn-primary,
  .btn-secondary {
    padding: 10px 20px;
    font-size: 13px;
  }

  .client-form-content {
    padding: 16px;
    max-width: 90%;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .content-blocks {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
  }

  .large-block {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (min-width: 1201px) {
  .content-blocks {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 24px;
  }

  .large-block {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

#add-client-home {
  margin-bottom: 10px;
}
