@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  font-family: "Inter", sans-serif;
  letter-spacing: -0.5px;
}

*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: #f6f6f6;
  justify-content: flex-end;
  box-sizing: border-box;
  margin: 0;
}

a {
  text-decoration: none;
  color: black;
}

.icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

/* Контейнер для сетки */
.container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  justify-content: center;
}

/* Стили для боковой панели */
.sidebar {
  background-color: white;
  padding: 20px;
  flex-direction: column;
  display: flex;
}

/* Логотип */
.logo {
  margin-bottom: 40px;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
}

/* Меню */
.menu {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 20px 40px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-text {
  font-size: 18px;
}

/* Эффект при наведении */
.menu-item:hover {
  background-color: #f6f6f6;
  color: #3867df;
}

/* Стили для основного контента */
.content {
  margin: 40px;
}

/* Шапка */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f6f6f6;
}

/* Поле поиска */
.search-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Отступ между полем и кнопкой поиска */
}

.search-input {
  padding: 12px 20px;
  font-size: 16px;
  border: 1px solid #f6f6f6;
  border-radius: 20px; /* Закругленные углы */
  max-width: 100%;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none; /* Убираем стандартный контур */
}

.search-btn {
  border: none; /* Убираем границы */
  cursor: pointer; /* Указатель при наведении */
  background-color: #f6f6f6;
}

.search-btn:hover {
  color: #3867df; /* Цвет кнопки при наведении */
}

/* Кнопка входа */
.login-btn {
  background-color: #3867df;
  color: white;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.login-btn:hover {
  background-color: #1e1e1e;
}

/* sort и add-new */

.under {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 40px;
}

.sort-btn {
  display: flex;
  background-color: white;
  color: #1e1e1e;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  align-items: center;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.sort-btn:hover {
  background-color: #1e1e1e;
  color: white;
}

.add-btn {
  display: flex;
  background-color: white;
  color: #1e1e1e;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  align-items: center;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.add-btn:hover {
  background-color: #1e1e1e;
  color: white;
}

.del-btn {
  display: flex;
  background-color: #f6f6f6;
  color: #1e1e1e;
  border: none;
  padding: 12px 12px;
  font-size: 16px;
  align-items: center;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.del-btn:hover {
  background-color: #ff8888;
  color: #1e1e1e;
}

/* таблица */

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    padding-top: -40px;
  }

  .content {
    grid-row: 2;
  }

  .search-container {
    justify-content: center;
  }

  .search-input {
    width: 100%;
    max-width: none;
  }

  .header {
    flex-direction: column;
  }

  .login-btn {
    margin-top: 20px;
  }

  .under {
    flex-direction: column;
  }

  .add-btn {
    margin-top: 20px;
  }
}
/* таблица */
table {
  margin-top: 20px;
  width: 100%;
  border-radius: 20px;
  border-collapse: collapse;
  background-color: white;
}

th,
td {
  padding: 18px;
  text-align: left;
}

th {
  border-bottom: 1px solid rgb(228, 228, 228);
}

td {
  border-top: 1px solid rgb(228, 228, 228);
}

/* юзер кнопка */
.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 35%;
  margin-right: 12px;

  border-radius: 50%;
  animation: rotate 30s infinite linear;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.user-name {
  font-weight: bold;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 40px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 20px;
  align-items: stretch;
}

.top-modal {
  justify-content: space-between;
  display: flex;
  margin-bottom: 20px;
}

.close-button {
  color: #1e1e1e;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  opacity: 0.5;
}

.bottom-modal {
  display: flex;
  align-items: center;
}

.bottom-modal label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;

  font-weight: bold;
}

.bottom-modal input,
textarea {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.bottom-modal input:focus {
  border-color: #3867df;
  outline: none;
}

textarea:focus {
  border-color: #3867df;
  outline: none;
}

textarea:focus-visible {
  outline-offset: 0px;
  outline: none;
}

textarea {
  outline: none;
  resize: vertical;
  width: 100%;
  min-height: 50px;
  padding: 8px;
  line-height: 1.45;
}

.modal-btn {
  margin-top: 20px;

  background-color: #3867df;
  color: white;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.modal-btn:hover {
  background-color: #1e1e1e;
}
