/* === Базовые стили === */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: #1e2a4a;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 15px 80px;
}

/* === Заголовки и тексты === */
.app-title,
.page-title {
  text-align: center;
  color: #0d47a1;
  font-weight: 600;
  margin-bottom: 6px;
}

.app-title {
  font-size: 1.6rem;
  letter-spacing: 0.5px;
}

.subtitle {
  text-align: center;
  color: #6070a8;
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.logo-container {
  width: 100%;
  text-align: center;
}

.logo {
  width: 50vw;          /* 30% ширины экрана */
  max-width: 450px;     /* но не больше 150px */
  min-width: 240px;      /* и не меньше 80px */
  height: auto;
  object-fit: contain;
}


/* === Карточки === */
.cards-container {
  display: grid;
  gap: 16px;
}

.card {
  background: #e8eefc;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #123a8d;
  font-weight: 600;
}

.card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 14px;
  line-height: 1.4;
}

.card button {
  background: #1b4de4;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: background 0.2s ease;
}

.card button:hover {
  background: #163bbd;
}

.card .draft-actions {
    display: flex;
    justify-content: flex-end; /* кнопки выравниваются справа */
    align-items: center;
    gap: 8px; /* 👈 небольшое пространство между кнопками */
    margin-top: 10px;
}

.card .delete-btn {
    background: #d9534f;
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: auto;
    display: inline-block;
    align-self: flex-end;
}

/* === Поиск поставщиков === */
.standart-section {
  background: #e8eefc;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
  margin-bottom: 20px;
}

.standart-section label {
  font-weight: 500;
  font-size: 0.9rem;
  display: block;
  color: #123a8d;
}

.input-main {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cdd7f0;
  margin-bottom: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.main-btn {
  width: 100%;
  background: #1b4de4;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.main-btn:hover {
  background: #153cc7;
}

.supplier-card {
  background-color: #eaf1ff;
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px 15px 80px;
}

.profile-container h2 {
  text-align: center;
  color: #0d47a1;
  font-weight: 600;
  margin-bottom: 6px;
}

.profile-container p {
  text-align: center;
  color: #6070a8;
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 22px;
}

#calculate-result h4 {
  margin-top: 0;
  color: #0d47a1;
  font-weight: 600;
}

#calculate-result p {
  font-size: 0.9rem;
  color: #6070a8;
  margin: 8px 0 0 0;
}

/* === Лоты фильтрация === */
.filters-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.price-row {
    display: flex;
    gap: 10px;
}

.price-row .input-main {
    flex: 1;
}

/* === Нижнее меню (Bottom Navigation) === */
.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #dbe2ef;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 9999;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8fa1d1;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.25s ease, transform 0.2s ease;
  padding: 0 6px;
}

.nav-item.active {
  color: #1b4de4;
  font-weight: 600;
}

.icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-bottom: 4px;
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-item:hover .icon-img {
  opacity: 1;
  transform: scale(1.1);
}

.nav-item p {
  margin: 4px 0 0;
  text-align: center;
  line-height: 1.1;
}

/* === Адаптивность === */
@media (max-width: 480px) {
  .bottom-nav {
    height: 68px;
  }
  .icon-img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 600px) {
  .cards-container {
    gap: 14px;
  }
}


.pagination-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.pagination-controls .main-btn {
  flex: 1;
  font-size: 0.95rem;
  padding: 10px;
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none; /* скрыто по умолчанию */
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #d9534f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 16px;
  cursor: pointer;
}
