/* ===================================== */
/* ========== 1. ОСНОВНЫЕ НАСТРОЙКИ ==== */
/* ===================================== */

/* Сброс стилей для всех элементов */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================================== */
/* ========== 2. ПЕРЕМЕННЫЕ ============ */
/* ===================================== */

/* Тёмная тема (по умолчанию) */
:root {
  --primary-color: #667eea;
  --primary-hover: #5a6fd8;
  --primary-dark: #5a6fd8;
  --primary-rgb: 102, 126, 234;
  --success-color: #00c087;
  --success-dark: #00a870;
  --success-light: rgba(0, 192, 135, 0.1);
  --danger-color: #f6465d;
  --danger-dark: #e63c52;
  --danger-light: rgba(246, 70, 93, 0.1);
  --warning-color: #ffb400;
  --warning-light: rgba(255, 180, 0, 0.1);
  --info-color: #17a2b8;
  --bg-color: #000000;
  --card-bg: #0a0a0a;
  --header-bg: #000000;
  --filter-bg: #0a0a0a;
  --nav-bg: #000000;
  --text-color: #ffffff;
  --text-light: #a0a0a0;
  --text-muted: #707070;
  --label-color: #a0a0a0;
  --value-color: #ffffff;
  --border-color: #202020;
  --border-light: rgba(255, 255, 255, 0.05);
  --nav-active: #ffffff;
  --nav-inactive: #707070;
  --premium-color: #ffd700;
  --online-color: #00ff00;
  --input-bg: #0a0a0a;
  --input-border: #202020;
  --input-focus: #ffffff;
  --chat-input-bg: #000000;
  --hover-bg: rgba(255, 255, 255, 0.05);
  --active-bg: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --premium-bg: rgba(255, 215, 0, 0.1);
  --online-bg: rgba(0, 255, 0, 0.1);
}

a {
  color: #60a5fa;
}
a:hover {
  color: #93c5fd;
}

/* ===================================== */
/* ========== 3. ТЕЛО СТРАНИЦЫ ========= */
/* ===================================== */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ===================================== */
/* ========== 4. ГЛАВНЫЙ КОНТЕЙНЕР ===== */
/* ===================================== */

.app-container {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--bg-color);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

.main-content {
  height: 100%;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

#mainPage {
  padding-bottom: 0px;
}

/* ===================================== */
/* ========== 5. АДАПТИВНОСТЬ ========== */
/* ===================================== */

/* ----- Базовые стили для контейнера приложения ----- */
@media (max-width: 480px), (pointer: coarse) and (max-width: 932px) {
  .app-container {
    width: 100%;
    height: 100dvh;
    height: -webkit-fill-available;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    padding-bottom: 5px;
    padding-top: 0px;
  }
  body {
    background: var(--bg-color);
    padding: 0 !important;
  }
}

@media (min-width: 481px) and (max-width: 1024px) and (pointer: fine) {
  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
  }
  .app-container {
    width: 450px;
    height: 90vh;
    max-height: 900px;
    border-radius: 36px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
  }
}

@media (min-width: 1025px) {
  body {
    background: linear-gradient(135deg, #00c087 0%, #0a0a0a 100%);
  }
  .app-container {
    width: 400px;
    height: 85vh;
    max-height: 800px;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
  }
}

/* ----- Адаптивность для фильтров и селектов ----- */
@media (min-width: 1025px) {
  .filters-container {
    padding: 16px 16px 12px 16px;
  }

  .filter-select {
    min-width: 120px;
    max-width: 180px;
    font-size: 14px;
    padding: 14px 28px 14px 18px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .filters-container {
    padding: 14px 16px 10px 16px;
  }

  .filter-select {
    min-width: 110px;
    max-width: 160px;
    font-size: 13px;
    padding: 12px 26px 12px 16px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .filters {
    gap: 6px;
  }

  .filter-select {
    flex: 1 1 calc(33.333% - 4px);
    min-width: 0;
    max-width: none;
    font-size: 12px;
    padding: 10px 22px 10px 12px;
    background-position: right 2px center;
  }
}

/* ----- Мобильная адаптивность (до 480px) ----- */
@media (max-width: 480px) {
  /* Фильтры */
  .filters-container {
    padding: 12px 12px 10px 12px;
  }

  .filters {
    gap: 6px;
    margin-bottom: 10px;
  }

  .filter-select {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    max-width: none;
    font-size: 12px;
    padding: 10px 20px 10px 12px;
    background-position: right 2px center;
    background-size: 10px;
  }

  /* Компактная статистика */
  .compact-stats {
    padding: 1px !important;
    gap: 1px !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  .compact-stat-item {
    flex: 1 !important;
    min-width: auto !important;
    padding: 7px 7px !important;
    text-align: center !important;
    max-width: 33% !important;
    box-sizing: border-box !important;
  }

  .compact-stat-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
  }

  .compact-stat-label {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }

  .rating-stars-small span {
    font-size: 12px !important;
  }

  /* Модальные окна */
  .auth-modal-content {
    border-radius: 16px;
  }

  .auth-modal-header {
    padding: 20px;
  }

  .auth-modal-body {
    padding: 24px 20px;
  }

  .auth-form-header h2 {
    font-size: 22px;
  }

  .auth-input {
    padding: 14px 14px 14px 44px;
    font-size: 15px;
  }

  .input-icon {
    left: 14px;
  }

  /* Фильтры ордеров */
  .orders-filter {
    gap: 4px;
    padding: 0 8px;
    flex-wrap: wrap;
  }

  .filter-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .filter-select {
    min-width: 80px;
    padding: 6px 4px;
    font-size: 9px;
  }
}

/* ----- Очень маленькие мобильные (до 400px) ----- */
@media (max-width: 400px) {
  .compact-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-avatar-large {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .profile-name-section h3 {
    font-size: 16px;
  }

  .filter-select {
    font-size: 11px;
    padding: 8px 16px 8px 10px;
  }
}

/* ----- Экстремально маленькие (до 360px) ----- */
@media (max-width: 360px) {
  .filters-container {
    padding: 10px 10px 10px 10px;
  }

  .filters {
    gap: 4px;
  }

  .filter-select {
    flex: 1 1 100%;
    font-size: 11px;
    padding: 8px 18px 8px 10px;
  }

  .orders-filter {
    gap: 4px;
    padding: 0 8px;
  }

  .filter-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .filter-select {
    min-width: 80px;
    padding: 6px 4px;
    font-size: 9px;
  }
}

/* ----- Специфичные диапазоны (385-395px) ----- */
@media (min-width: 385px) and (max-width: 395px) {
  .orders-filter {
    gap: 6px;
    padding: 0 10px;
  }

  .filter-btn {
    padding: 6px 9px;
    font-size: 11.5px;
  }

  .filter-btn::after {
    font-size: 10px;
    padding: 2px 5px;
    margin-left: 4px;
  }
}

/* ----- Сенсорные устройства ----- */
@media (pointer: coarse) and (min-width: 769px) {
  .filter-select {
    min-width: 140px;
    padding: 14px 28px 14px 18px;
    font-size: 14px;
  }
}

@media (pointer: coarse) and (max-width: 768px) {
  .filter-select {
    min-height: 44px;
  }

  .filter-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===================================== */
/* ========== 6. РЕКЛАМНЫЙ БАННЕР ====== */
/* ===================================== */

.ad-banner {
  background: transparent;
  color: white;
  padding: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 24px 24px;
  position: relative;
  overflow: hidden;
  height: 100px;
  border-bottom: 2px solid var(--border-color);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.ad-carousel-container {
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

.ad-carousel {
  will-change: transform;
  display: flex;
  width: 500%;
  height: 100px;
  transition: transform 0.5s ease-in-out;
  border-radius: 0 0 24px 24px; /* ← ДОБАВЬ ЭТО */
}

.ad-slide {
  width: 20%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-text {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px;
  font-size: 12px;
  font-weight: 500;
}

.carousel-indicators {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-arrow-prev {
  left: 10px;
}

.carousel-arrow-next {
  right: 10px;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .carousel-arrow-prev,
  .carousel-arrow-next,
  .carousel-arrow {
    display: none !important;
  }
}

/* ===================================== */
/* ========== 7. КОНТЕЙНЕРЫ СТРАНИЦ === */
/* ===================================== */

.offers-container,
.orders-container,
.profile-container,
.messages-container {
  display: none;
  flex-direction: column;
  flex: 1;
}

.offers-container {
  display: block;
}

.orders-container.active,
.messages-container.active,
.profile-container.active {
  display: flex;
}

.offers-container,
.orders-container,
.profile-container {
  padding: 20px;
}

.messages-container {
  padding: 0;
  width: 100%;
}

/* ===================================== */
/* ========== 8. КОНТЕЙНЕРЫ ВНУТРИ ==== */
/* ===================================== */

.messages-container.active #chatsListContainer {
  padding: 20px 20px 100px 20px;
}

.messages-container.active #activeChatContainer {
  padding: 0;
}

/* ===================================== */
/* ========== 9. КОНТЕЙНЕР ФИЛЬТРОВ === */
/* ===================================== */

.filters-container {
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 100;
  padding: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  border-bottom: 0px solid var(--border-color);
}

.filters-container.hidden {
  display: none;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  width: 100%;
}

/* ========== НАТИВНЫЕ СЕЛЕКТЫ (скрыты) ========== */
.filter-select {
  display: none;
}

/* ========== КАСТОМНЫЕ СЕЛЕКТЫ ========== */
.custom-select-container {
  position: relative;
  flex: 1;
  min-width: 0;
  font-family: "Inter", sans-serif;
}

.custom-select-selected {
  padding: 12px 4px;
  background: transparent;
  color: var(--text-color);
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  letter-spacing: 0.2px;
  transition: none;
  text-align: center;
}

.custom-select-selected::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  width: 14px;
  height: 35px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
}

.custom-select-selected.open::after {
  transform: translateX(-50%) rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 120px;
  width: auto;
  max-width: 150px;
  background: #0a0a0a;
  border: 1px solid #202020;
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 6px 0;
  backdrop-filter: blur(10px);
  margin-top: 4px;
  white-space: normal;
}

.custom-select-option {
  padding: 10px 14px;
  color: var(--text-color);
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  margin: 2px 6px;
  border-radius: 8px;
}

.custom-select-option.selected {
  color: var(--primary-color);
  font-weight: 500;
  background: rgba(var(--primary-rgb), 0.08);
}

.custom-select-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.custom-select-options::-webkit-scrollbar {
  width: 4px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ========== МЕДИА-ЗАПРОСЫ ДЛЯ СЕЛЕКТОВ ========== */
@media (pointer: coarse) and (max-width: 768px) {
  .custom-select-selected {
    min-height: 48px;
  }

  .custom-select-option {
    padding: 14px 16px;
  }
}

@media (max-width: 600px) {
  .filters {
    gap: 6px;
  }

  .custom-select-selected {
    font-size: 11px;
    padding: 10px 20px 10px 10px;
    min-height: 40px;
  }

  .custom-select-selected::after {
    right: 2px;
    width: 12px;
    height: 30px;
  }
}

@media (max-width: 480px) {
  .filters {
    gap: 4px;
  }

  .custom-select-selected {
    font-size: 12px;
    padding: 8px 0px 8px 0px;
    min-height: 38px;
  }

  .custom-select-selected::after {
    right: 2px;
    width: 10px;
    height: 30px;
  }

  .custom-select-option {
    font-size: 11px;
    padding: 10px 12px;
    margin: 2px 4px;
  }
}

@media (max-width: 360px) {
  .custom-select-selected {
    font-size: 10px;
    padding: 8px 16px 8px 6px;
  }

  .custom-select-selected::after {
    width: 8px;
    height: 30px;
  }

  .custom-select-option {
    font-size: 10px;
    padding: 8px 10px;
  }
}

/* ========== СТИЛИ ТОЛЬКО ДЛЯ МОДАЛЬНОГО ОКНА СОЗДАНИЯ ЗАЯВКИ ========== */
#createModal .custom-select-container {
  position: relative;
  width: 100%;
  flex: none;
}

#createModal .custom-select-selected {
  padding: 12px 16px;
  background: var(--input-bg, #1a1a1a);
  border: 1px solid var(--border-color, #333); /* ← это рамка */
  border-radius: 12px;
  font-size: 14px;
  min-height: 48px;
  background: #0f0f0f;
  justify-content: flex-start !important;
}

#createModal .custom-select-selected::after {
  content: "";
  position: relative;
  display: inline-block;
  width: 14px;
  height: 8px;
  flex-shrink: 0;
  margin-left: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
}

#createModal .custom-select-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  max-height: 250px;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

#createModal .custom-select-option {
  padding: 12px 16px;
  font-size: 14px;
  white-space: normal;
  margin: 2px 8px;
  border-radius: 8px;
}

/* Медиа-запросы для модального окна */
@media (max-width: 600px) {
  #createModal .custom-select-selected {
    padding: 10px 14px;
    font-size: 14px;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  #createModal .custom-select-selected {
    padding: 8px 12px;
    font-size: 14px;
    min-height: 42px;
  }
}

/* ===================================== */
/* ========== 10. ПОИСК ГОРОДА ========= */
/* ===================================== */

.main-city-search-container,
.city-search-container {
  position: relative;
  margin-bottom: 15px;
}

.main-city-search-container {
  display: none;
}

.main-city-search-container.active {
  display: block;
}

.main-city-search-input,
.city-search-input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

.main-city-search-input:focus,
.city-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.main-city-search-icon,
.city-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-inactive);
}

.main-city-search-results,
.city-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.main-city-search-result,
.city-search-result {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
  font-size: 14px;
}

.main-city-search-result:hover,
.city-search-result:hover {
  background: var(--filter-bg);
}

.main-city-search-result:last-child,
.city-search-result:last-child {
  border-bottom: none;
}

.close-search {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--nav-inactive);
  display: none;
}

/* ===================================== */
/* ========== 11. СПИСОК ЗАЯВОК ======== */
/* ===================================== */

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  margin-top: -15px;
  overflow: visible;
  padding-bottom: 180px;
}

/* ===================================== */
/* ========== 12. КАРТОЧКА ЗАЯВКИ ====== */
/* ===================================== */

.offer-card {
  background: var(--card-bg);
  padding: 10px;
  border-radius: 20px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
}

.offer-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#mainPage .offer-card.premium {
  border: 2px solid var(--border-color);
  box-shadow: none;
}

#mainPage .premium-badge {
  display: inline-flex !important;
  align-items: center;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  font-size: 11.5px;
  font-weight: bold;
  padding: 5px 13px 5px 9px;
  border-radius: 35px;
  margin-left: auto !important;
  margin-right: 0 !important;
  flex-shrink: 0 !important;
  gap: 4px;
}

#mainPage .price-section {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.offer-card .price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 4px; /* ← добавь эту строку */
}

.offer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0px;
}

.user-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.verified-circle-white {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verified-check-green {
  color: white !important;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verified-text-green {
  font-weight: 600;
  color: white;
  font-size: 11px;
}

.user-rating-info {
  margin-top: -5px;
  margin-bottom: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border-color);
}

.rating-stars-container {
  margin-bottom: 10px;
  font-size: 16px;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.star-container {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
}

.star-background {
  color: #444;
  font-size: 16px;
  position: absolute;
  top: 0;
  left: 0;
  line-height: 1;
}

.star-filled {
  position: absolute;
  top: 0;
  left: 0;
  color: #ffb400;
  font-size: 16px;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.reviews-stats {
  display: flex;
  gap: 8px;
  padding: 0px;
  cursor: pointer;
}

.reviews-stats:hover {
  opacity: 0.8;
}

.review-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reviews-stats:active {
  transform: scale(0.98);
}

.review-stat-count {
  font-weight: 600;
  color: var(--text-color);
}

.review-stat-label {
  font-size: 12px;
  color: var(--nav-inactive);
}

.view-reviews-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: none !important;
}

.view-reviews-btn:hover {
  opacity: 0.9;
}

.offer-content {
  display: flex;
  flex-direction: column; /* ← меняем на колонку */
  width: 100%;
}

.offer-details {
  width: 100%;
}

.price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Цена слева */
.price-section .price {
  margin-right: auto;
}

.price-section .premium-badge {
  margin-left: auto;
  margin-right: 0;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  color: rgb(26, 26, 26);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow:
    rgba(251, 191, 36, 0.3) 0px 3px 9px,
    rgba(255, 255, 255, 0.2) 0px 1.5px 0px 0px inset;
  text-transform: uppercase;
  gap: 5px;
  background: linear-gradient(145deg, rgb(251, 191, 36), rgb(245, 158, 11));
  padding: 5px 13px 5px 9px;
  border-radius: 35px;
  margin-left: auto;
}

.currency-symbol {
  font-size: 16px;
  color: var(--nav-inactive);
  font-weight: 500;
}

.price {
  font-size: 24px;
  font-weight: 700;
}

.price.buy {
  color: var(--success-color);
}

.price.sell {
  color: var(--danger-color);
}

.offer-details-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  min-height: 20px;
  flex-wrap: nowrap;
}

.offer-details-label {
  color: var(--label-color);
  min-width: 80px;
  margin-right: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.offer-details-value {
  color: var(--value-color);
  font-weight: 500;
  white-space: normal;
  word-wrap: break-word;
  overflow: visible;
  flex: 1;
}

.comment-row {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  margin-bottom: 5px !important;
}

.comment-label {
  color: var(--label-color);
  font-weight: 500;
  display: inline;
  margin-right: 4px;
}

.comment-value {
  color: var(--value-color);
  font-weight: 500;
  display: inline;
  word-break: break-word;
}

.order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  height: 28px;
}

.order-status.status-pending {
  color: white !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  height: 28px !important;
  background: linear-gradient(
    145deg,
    rgb(249, 115, 22),
    rgb(234, 88, 12)
  ) !important;
  gap: 4px !important;
  padding: 4px 8px 4px 8px !important;
  border-radius: 20px !important;
  box-shadow: rgba(249, 115, 22, 0.25) 0px 2px 6px !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  white-space: nowrap;
}

.status-active {
  background: var(--success-color);
  color: white;
}

.status-completed {
  background: var(--nav-inactive);
  color: white;
}

.status-rejected {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.action-button {
  align-self: flex-end;
  margin-top: 1px;
  padding: 8px 12px !important;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 60px !important;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
}

.action-button.buy {
  background: var(--success-color);
  color: white;
}

.action-button.sell {
  background: var(--danger-color);
  color: white;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===================================== */
/* ========== 13. КНОПКИ ДЕЙСТВИЙ ====== */
/* ===================================== */

.order-action-buttons {
  margin-top: 1px;
  padding-top: 1px;
}

.order-action-row {
  display: flex;
  gap: 6px !important;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-bottom: 12px;
}

.order-action-row:last-child {
  margin-bottom: 0;
}

.order-action-btn {
  flex: 1;
  padding: 7px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600;
  min-width: 0 !important;
  white-space: nowrap;
  overflow: visible !important;
  text-overflow: clip !important;
  border-radius: 8px;
  text-align: center;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 30px;
}

.order-action-btn.pay {
  background: linear-gradient(145deg, #f97316, #ea580c) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.25);
}

.order-action-btn.edit {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.order-action-btn.complete {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.order-action-btn.republish {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
  min-width: 110px !important;
}

.order-action-btn.delete {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.order-action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===================================== */
/* ========== 14. ПУСТЫЕ СОСТОЯНИЯ ===== */
/* ===================================== */

.no-offers-message,
.no-orders-message,
.no-chats-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--nav-inactive);
}

.no-offers-message .nav-icon,
.no-orders-message .nav-icon,
.no-chats-message .nav-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-offers-actions,
.no-orders-actions,
.no-chats-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.no-offers-actions button,
.no-orders-actions button,
.no-chats-actions button {
  width: 100%;
  max-width: 250px;
}

/* ===================================== */
/* ========== 15. ФОРМЫ ================ */
/* ===================================== */

.create-form,
.create-form-global {
  background: var(--filter-bg);
  padding: 24px;
  border-radius: 20px;
  margin: 20px 0;
  border: 2px solid var(--border-color);
  display: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.form-tabs {
  display: flex;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 6px;
  border: 2px solid var(--border-color);
}

.form-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .form-tab {
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .form-tab {
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 600;
  }
}

.form-tab.active {
  background: var(--primary-color);
  color: white;
}

.form-select,
.form-input {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 15px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s ease;
  font-family: "Inter", sans-serif;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rate-input-container,
.rate-input-container-modal {
  position: relative;
}

.rate-input-container::after,
.currency-symbol-input {
  content: "₽";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-inactive);
  font-weight: 600;
  z-index: 1;
}

.limit-inputs-container {
  display: flex;
  gap: 10px;
}

.limit-input-with-symbol {
  flex: 1;
  position: relative;
}

.limit-currency-symbol {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-inactive);
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.amount-input-container {
  position: relative;
}

.amount-currency-symbol {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-inactive);
  font-weight: 600;
  z-index: 1;
}

.payment-methods-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.payment-method-checkbox {
  display: none;
}

.payment-method-label {
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  background: var(--card-bg);
}

.payment-method-checkbox:checked + .payment-method-label {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

.comment-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s ease;
  font-family: "Inter", sans-serif;
  resize: vertical;
  min-height: 60px;
  max-height: 120px;
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.comment-counter {
  text-align: right;
  font-size: 11px;
  color: var(--nav-inactive);
  margin-top: 4px;
  font-family: "Inter", sans-serif;
}

.comment-counter span {
  font-weight: 600;
  color: var(--primary-color);
}

.form-hint {
  font-size: 12px;
  color: var(--nav-inactive);
  margin-top: 5px;
  display: block;
}

.input-error {
  border-color: var(--danger-color) !important;
}

.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.form-button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
}

.form-button.cancel {
  background: #6c757d;
  color: white;
}

.form-button.submit {
  background: var(--success-color);
  color: white;
}

.form-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================== */
/* ========== 16. НИЖНЯЯ НАВИГАЦИЯ ===== */
/* ===================================== */

.bottom-nav {
  display: flex;
  justify-content: space-around;
  background: var(--nav-bg);
  padding: 8px 0;
  border-top: 2px solid var(--border-color);
  position: relative;
  border-radius: 24px 24px 0 0;
  flex-shrink: 0;
}

@media (max-width: 480px), (pointer: coarse) and (max-width: 932px) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #mainPage {
    padding-bottom: calc(100px + var(--dynamic-panel-height, 0px));
  }

  #ordersPage #userOffersList {
    padding-bottom: calc(120px + var(--dynamic-panel-height, 0px));
  }

  .profile-container.active,
  .profile-container {
    padding-bottom: calc(80px + var(--dynamic-panel-height, 0px));
  }

  /* Сообщения — только отступ для списка чатов, не для самого чата */
  #chatsListContainer {
    padding-bottom: calc(160px + var(--dynamic-panel-height, 0px));
  }

  .offers-list {
    padding-bottom: calc(180px + var(--dynamic-panel-height, 0px));
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--nav-inactive);
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  z-index: 1;
}

.nav-item.active {
  color: var(--nav-active);
}

.nav-icon {
  font-size: 16px;
  transition: all 0.3s ease;
}

.nav-item.create-nav {
  position: relative;
  flex: 0 0 50px;
  min-width: 50px;
  max-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-nav-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--success-color),
    var(--primary-color)
  );
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.create-nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===================================== */
/* ========== 17. МОДАЛЬНЫЕ ОКНА ======= */
/* ===================================== */

.auth-modal,
.edit-profile-modal,
.create-modal,
.telegram-integration-modal,
.modal,
.reminder-modal,
.verification-request-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 0;
  backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
  .auth-modal,
  .edit-profile-modal,
  .create-modal,
  .telegram-integration-modal,
  .modal,
  .reminder-modal,
  .verification-request-modal {
    align-items: stretch;
    padding: 0;
    background: rgba(0, 0, 0, 0.7);
  }
}

.modal-content,
.edit-profile-content,
.telegram-modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .modal-content {
    border-radius: 24px !important;
    max-height: 80vh !important;
    width: min(90%, 400px) !important;
    height: auto !important;
    margin: auto !important;
  }
}

@media (max-width: 768px) {
  .modal-content,
  .edit-profile-content,
  .telegram-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
    max-height: 100dvh;
    padding-bottom: calc(
      20px + var(--dynamic-panel-height, 0px) + env(safe-area-inset-bottom, 0px)
    );
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
}

@media (max-width: 768px) {
  .modal-header {
    padding: 16px 20px;
    border-radius: 0;
  }
}

.modal-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 18px;
  font-weight: 600;
}

.close-modal,
.close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--nav-inactive);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-modal:hover,
.close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 20px 20px 0 20px;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 20px 20px 20px 20px;
    padding-bottom: calc(20px + var(--dynamic-panel-height, 0px));
  }
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 40px 24px 20px 24px;
  background: var(--card-bg);
  border-radius: 0 0 16px 16px;
}

@media (max-width: 768px) {
  .modal-footer {
    border-radius: 0 0 20px 20px;
    padding: 8px 8px calc(8px + var(--dynamic-panel-height, 0px)) 8px;
  }
}

.modal-footer .form-button {
  min-height: 44px !important;
  height: 44px !important;
  padding: 12px 0 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.modal-footer .form-button.cancel {
  background: #dc3545 !important;
  color: white !important;
}

.auth-modal-content {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  animation: modalSlideInAuth 0.3s ease-out;
}

@media (max-width: 768px) {
  .auth-modal-content {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    margin: 0;
    animation: modalSlideUp 0.3s ease-out;
    border-bottom: none;
  }
}

@keyframes modalSlideInAuth {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .auth-modal-header {
    padding: 16px 20px;
  }
}

.auth-modal-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  border-radius: 50%;
}

.auth-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

.auth-modal-body {
  padding: 32px 24px;
}

@media (max-width: 768px) {
  .auth-modal-body {
    padding: 24px 20px;
  }
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-form-header h2 {
  margin: 0 0 8px 0;
  color: var(--text-color);
  font-size: 24px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .auth-form-header h2 {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .auth-form-header {
    margin-bottom: 24px;
  }
}

.auth-subtitle {
  margin: 0;
  color: var(--nav-inactive);
  font-size: 14px;
  line-height: 1.5;
}

.auth-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-color);
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input::placeholder {
  color: var(--nav-inactive);
  opacity: 0.7;
}

.password-input .auth-input {
  padding-right: 48px;
}

.show-password-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--nav-inactive);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: color 0.2s;
}

.show-password-btn:hover {
  color: var(--text-color);
}

.forgot-password-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s;
}

.forgot-password-btn:hover {
  color: #7c3aed;
}

.terms-group {
  margin-top: 24px;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  padding-left: 32px;
  user-select: none;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 2px;
  height: 20px;
  width: 20px;
  background-color: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.terms-link:hover {
  color: #7c3aed;
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-button.secondary-btn {
  background: var(--bg-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.auth-button.secondary-btn:hover {
  background: var(--border-color);
  box-shadow: none;
}

.btn-text {
  flex: 1;
  text-align: center;
}

.btn-icon {
  font-size: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 32px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider-text {
  padding: 0 16px;
  color: var(--nav-inactive);
  font-size: 14px;
  font-weight: 500;
}

.auth-footer {
  text-align: center;
}

.auth-switch-text {
  color: var(--nav-inactive);
  font-size: 14px;
  margin: 0;
}

.auth-switch-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  font-size: 14px;
  text-decoration: underline;
  transition: color 0.2s;
}

.auth-switch-btn:hover {
  color: #7c3aed;
}

@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .auth-modal-header {
      padding-top: max(16px, env(safe-area-inset-top));
    }

    .modal-footer {
      padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
  }
}

/* ===================================== */
/* ========== 18. ПРОФИЛЬ ============== */
/* ===================================== */

.profile-container {
  padding: 16px;
  padding-bottom: 80px;
  max-width: 600px;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 70px;
}

.profile-header-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 0px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  overflow: visible !important;
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.2) !important;
}

.profile-avatar-large:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 25px rgba(255, 255, 255, 0.7),
    0 0 50px rgba(255, 255, 255, 0.3) !important;
}

.profile-avatar-large:hover::after {
  content: "✏️";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.profile-avatar-large > * {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-large .avatar-image,
.profile-avatar-large .avatar-letter {
  width: 80px;
  height: 80px;
  font-size: 32px;
}

.profile-info {
  flex: 1;
}

.profile-name-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 3px;
}

.profile-name-section h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-color);
}

.profile-details-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--nav-inactive);
  font-size: 13px;
}

.detail-label {
  font-weight: 500;
}

.detail-value {
  color: var(--text-color);
  font-weight: 600;
}

.compact-stats {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 1px;
}

.compact-stat-item {
  text-align: center;
}

.compact-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.compact-stat-label {
  font-size: 10px;
  color: var(--nav-inactive);
  text-transform: uppercase;
}

.rating-stars-small {
  display: flex;
  justify-content: center;
  margin-top: 2px;
  gap: 1px;
}

.rating-stars-small .star-container {
  width: 12px;
  height: 12px;
}

.profile-section {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.profile-section h3 {
  margin: 0 0 16px 0;
  color: var(--text-color);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-menu {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background-color: var(--hover-bg);
}

.menu-item i {
  font-size: 18px;
  width: 24px;
  color: var(--nav-inactive);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-item i:first-child {
  margin-right: 16px;
}

.menu-item span {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.menu-item i:last-child {
  font-size: 14px;
  color: var(--nav-inactive);
  opacity: 0.5;
  width: auto;
  margin-left: auto;
}

.verification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.verification-icon i {
  font-size: 14px !important;
  color: white !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.install-button {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary-color), #764ba2);
  color: white;
  border: none;
  cursor: pointer;
  margin-bottom: 8px;
  border-radius: 12px;
}

.install-button i:first-child {
  margin-right: 12px;
  font-size: 20px;
  color: white;
}

.install-button span {
  flex: 1;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
}

.install-button i:last-child {
  font-size: 16px;
  color: white;
  opacity: 0.8;
}

#pwaInstalledInfo {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--success-color);
  margin-bottom: 8px;
  border-radius: 12px;
}

#pwaInstalledInfo i {
  font-size: 20px;
  margin-right: 12px;
}

.menu-item.logout i:first-child,
.menu-item.logout span {
  color: #ff6b6b;
}

.profile-header.guest {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  border-radius: 20px;
  margin-bottom: 20px;
}

.verified-check {
  color: var(--success-color);
  background: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.verified-badge-icon {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 3px solid var(--card-bg);
}

/* ===================================== */
/* ========== 19. СИСТЕМА ЧАТА ========= */
/* ===================================== */

.chats-list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chats-search {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.chats-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  outline: none;
}

.chats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border: 0px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.chat-item:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--primary-color);
}

.chat-item.active {
  border-color: var(--primary-color);
  background: var(--filter-bg);
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  width: 100%;
  gap: 8px;
}

.chat-user-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.chat-time {
  font-size: 12px;
  color: var(--nav-inactive);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.chat-last-message {
  font-size: 14px;
  color: var(--nav-inactive);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.chat-unread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--primary-color);
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 4px;
}

#chatsListContainer {
  height: 400px !important;
  min-height: 300px;
  overflow-y: auto !important;
  padding-bottom: 100px;
}

#chatsList {
  min-height: 500px;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  display: none;
}

.chat-container.active {
  display: flex;
}

/* ===================================== */
/* ========== СТРАНИЦА СООБЩЕНИЙ ======= */
/* ===================================== */

/* По умолчанию скрыта */
#messagesPage {
  display: none;
}

/* Когда активна — показываем */
#messagesPage.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* ========== ГЛАВНЫЙ КОНТЕЙНЕР ЧАТА ========== */

#activeChatContainer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-color);
}

/* ========== ШАПКА ЧАТА (закреплена) ========== */
.chat-header-fixed {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  background: var(--bg-color);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  box-sizing: border-box;
}

.chat-back-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
  display: block !important;
  padding: 8px;
  margin-right: 8px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-back-button:hover {
  background-color: rgba(128, 128, 128, 0.1);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .chat-back-button {
    font-size: 20px;
    width: 30px;
    height: 48px;
    padding: 10;
  }
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
}

.chat-header-avatar > div,
.chat-header-avatar > .avatar-image,
.chat-header-avatar > .avatar-letter {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.chat-header-name {
  font-weight: 600;
  font-size: 16px;
  padding-left: 8px; /* или нужный вам отступ */
}

.chat-header-status {
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.chat-menu-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--nav-inactive);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chat-menu-btn:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.chat-dropdown-menu {
  position: absolute;
  top: 50px;
  right: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.chat-dropdown-menu.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.chat-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.chat-menu-item:last-child {
  border-bottom: none;
}

.chat-menu-item:hover {
  background: var(--filter-bg);
}

.chat-menu-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* ===================================== */
/* ========== 20. СООБЩЕНИЯ ============ */
/* ===================================== */

/* ========== КОНТЕЙНЕР СООБЩЕНИЙ (СКРОЛЛИТСЯ) ========== */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  position: relative;
  background-image: url("images/8.JPG") !important;
  background-size: 958px 500px !important;
  background-repeat: repeat !important;
  background-position: 0 0 !important;
  background-attachment: fixed !important;
}

/* Затемнение — фиксированное, не двигается */
.chat-messages-container::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
  pointer-events: none;
}

.chat-messages-container > * {
  position: relative;
  z-index: 2;
}

/* ========== СПИСОК СООБЩЕНИЙ ========== */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  min-height: 100%;
}

/* ========== ОТДЕЛЬНОЕ СООБЩЕНИЕ ========== */
.chat-message {
  max-width: 80%;
  margin-bottom: 8px;
}

.chat-message.my-message {
  margin-left: auto;
  margin-right: 0;
}

.chat-message.other-message {
  margin-right: auto;
  margin-left: 0;
}

.message-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.my-message .message-row {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.message-avatar .avatar-default,
.message-avatar .avatar-letter,
.message-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.message-content-wrapper {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.my-message .message-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-content {
  padding: 10px 14px;
  word-break: break-word;
  position: relative;
  width: fit-content;
  max-width: 100%;
  border-radius: 18px;
}

.my-message .message-content {
  background: var(--primary-color) !important;
  color: white !important;
  box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
}

.other-message .message-content {
  background: #2a2a2a !important;
  color: #ffffff !important;
  border: 1px solid #404040 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  width: 100%;
}

.message-time {
  font-size: 11px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.my-message .message-time {
  color: rgba(255, 255, 255, 0.7);
  justify-content: flex-end;
}

.other-message .message-time {
  color: var(--nav-inactive);
  justify-content: flex-start;
}

.message-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.message-attachment {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.message-attachment:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.date-divider {
  text-align: center;
  margin: 16px 0;
  width: 100%;
}

.date-divider-text {
  background: var(--card-bg);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--nav-inactive);
  border: 1px solid var(--border-color);
  display: inline-block;
}

/* ===================================== */
/* ========== 21. АВАТАРЫ ============== */
/* ===================================== */

.avatar-default {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: #fff;
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.2) !important;
}

.chat-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: visible !important;
  display: inline-block !important;
  position: relative !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.chat-avatar > div,
.chat-avatar > .avatar-image,
.chat-avatar > .avatar-letter {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

.offer-header .user-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-letter {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 18px;
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.chat-header-avatar .avatar-image,
.chat-header-avatar .avatar-letter {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

/* ===================================== */
/* ========== 22. ИНДИКАТОРЫ СТАТУСА === */
/* ===================================== */

.online-indicator {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background-color: #4caf50;
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  z-index: 10;
}

.offline-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  z-index: 10;
}

/* ===================================== */
/* ========== 23. ПОЛЕ ВВОДА ЧАТА (ЗАКРЕПЛЕНО) ========== */
/* ===================================== */

/* Контейнер для всего нижнего блока (поле ввода + кнопки) */
.chat-footer {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  background: var(--bg-color);
  z-index: 100;
  border-top: 1px solid var(--border-color);
}

/* Поле ввода */
.chat-input-container.avito-style {
  display: flex;
  align-items: flex-end;
  min-height: 52px;
  gap: 6px;
  padding: 8px 12px;
  background: var(--chat-input-bg);
  width: 100%;
  box-sizing: border-box;
}

.chat-attachment-btn.plus-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 20px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-bottom: 2px;
  align-self: flex-end;
}

.chat-attachment-btn.plus-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-attachment-btn.plus-btn:active {
  transform: scale(0.95);
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  min-height: 32px;
  max-height: 100px;
  position: relative;
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 18px;
  transition: border-color 0.2s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--primary-color);
}

.attachments-preview {
  display: flex;
  gap: 6px;
  padding: 6px 6px 0 6px;
  flex-wrap: wrap;
  max-height: 60px;
  overflow-y: auto;
  order: -1;
}

.chat-input {
  width: 100%;
  min-height: 32px;
  max-height: 100px;
  padding: 6px 12px;
  background: transparent !important;
  border: none !important;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  font-family: "Inter", sans-serif;
  color: var(--text-color);
  transition:
    height 0.1s ease,
    border-color 0.2s ease;
  overflow-y: hidden;
  box-sizing: border-box;
}

.chat-input:focus {
  outline: none;
}

.chat-input.auto-scroll {
  overflow-y: auto !important;
}

.chat-input.auto-scroll::-webkit-scrollbar {
  width: 4px;
}

.chat-input.auto-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.chat-input.auto-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.chat-send-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-bottom: 2px;
  align-self: flex-end;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.send-btn-text {
  font-size: 16px;
  font-weight: 600;
  transform: rotate(0deg);
  margin-left: 1px;
}

/* ========== КНОПКИ ДЕЙСТВИЙ В ЧАТЕ (Завершить, Памятка, Проверить) ========== */
.deal-actions-container {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}

/* Убираем лишний отступ снизу именно в чате */
#activeChatContainer {
  padding-bottom: 0 !important;
}

#activeChatContainer .chat-messages-container {
  padding-bottom: 0 !important;
}

/* ===================================== */
/* ========== 24. КНОПКИ ДЕЙСТВИЙ ====== */
/* ===================================== */

.deal-actions-container {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 8px 8px;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}

.deal-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.deal-action-btn:active {
  opacity: 1;
}

.deal-action-btn i {
  font-size: 18px;
}

.deal-action-btn .btn-text {
  text-align: center;
  line-height: 1.2;
}

/* Цвета кнопок */
.deal-action-btn.complete-deal {
  color: #00e676;
}

.deal-action-btn.reminder {
  color: #42a5f5;
}

.deal-action-btn.verify {
  color: #ab47bc;
}

.deal-action-btn.secure-deal {
  color: #ffb300;
}

.deal-action-btn.cancel-request {
  color: #ef4444;
}

.deal-action-btn.confirm-deal {
  color: #34d399;
}

.deal-action-btn.reject-deal {
  color: #ef4444;
}

/* Бейдж "Сделка завершена" */
.deal-completed-badge {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: 500;
  min-height: 48px;
  color: #34d399;
  background: transparent;
}

.deal-completed-badge i {
  font-size: 18px;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 380px) {
  .deal-actions-container {
    padding: 4px 6px;
    gap: 2px;
  }

  .deal-action-btn {
    font-size: 10px;
    gap: 3px;
    padding: 6px 1px;
  }

  .deal-action-btn i {
    font-size: 16px;
  }

  .deal-completed-badge {
    font-size: 10px;
  }

  .deal-completed-badge i {
    font-size: 16px;
  }
}

@media (max-width: 320px) {
  .deal-action-btn .btn-text {
    font-size: 9px;
  }

  .deal-action-btn i {
    font-size: 16px;
  }

  .deal-completed-badge .badge-text {
    font-size: 9px;
  }
}

/* ===================================== */
/* ========== 25. УВЕДОМЛЕНИЯ ========== */
/* ===================================== */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  max-width: 300px;
  animation: slideIn 0.3s ease;
}

.notification.info {
  background: var(--primary-color);
}

.notification.warning {
  background: var(--warning-color);
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  z-index: 1100;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: toastFade 3s ease-in-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 90%;
  text-align: center;
}

@keyframes toastFade {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  10%,
  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===================================== */
/* ========== 26. ПРЕМИУМ ============== */
/* ===================================== */

.premium-ad-button {
  background: var(--premium-color);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.premium-ad-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.offer-card.golden-frame {
  position: relative;
  border: 2px solid transparent !important;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(135deg, gold, gold, #fbbf24, gold) border-box;
  transform: none;
  box-shadow:
    0 0 18px 4px rgba(255, 215, 0, 0.4),
    0 0 0 1px rgba(255, 215, 0, 0.2) inset;
  transition: box-shadow 0.3s ease;
}

.offer-card.golden-frame .premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #1a1a1a;
  padding: 5px 13px 5px 9px;
  border-radius: 35px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow:
    0 3px 9px rgba(251, 191, 36, 0.3),
    0 1.5px 0 0 rgba(255, 255, 255, 0.2) inset;
  margin-left: auto;
  border: none;
  position: relative;
  text-transform: uppercase;
}

.offer-card.golden-frame .premium-badge::before {
  content: none;
}

.offer-card.golden-frame .premium-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  border-radius: 40px;
  pointer-events: none;
}

@keyframes sparkle {
  0% {
    opacity: 0.7;
    filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.2));
  }
  25% {
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5));
  }
  50% {
    opacity: 0.8;
    filter: drop-shadow(0 2px 3px rgba(255, 215, 0, 0.3));
  }
  75% {
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5));
  }
  100% {
    opacity: 0.7;
    filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.2));
  }
}

.offer-card.golden-frame .view-reviews-btn {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.offer-card.golden-frame .view-reviews-btn:hover {
  background: var(--primary-color) !important;
  opacity: 0.9;
  transform: none !important;
  box-shadow: none !important;
}

.offer-card.golden-frame .order-status.status-pending {
  background: linear-gradient(145deg, #f97316, #ea580c) !important;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
  border: none;
  font-weight: 700;
}

.golden-frame-section {
  margin-top: 20px;
}

.golden-frame-container {
  padding: 16px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 2px solid #c5a028;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(197, 160, 40, 0.25);
}

.golden-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.golden-frame-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.golden-frame-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #ffd700, #e5b80b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #4a2e00;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.golden-frame-title-block {
  display: flex;
  flex-direction: column;
}

.golden-frame-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 15px;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.golden-frame-price-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.golden-frame-label {
  font-weight: 500;
  color: var(--text-light);
  font-size: 13px;
}

.golden-frame-price {
  font-weight: 700;
  color: #ffd700;
  font-size: 22px;
  text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.golden-frame-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #c5a028;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: transparent;
}

.golden-frame-checkmark {
  width: 14px;
  height: 14px;
  background: #c5a028;
  border-radius: 3px;
  display: none;
}

.golden-frame-container.selected .golden-frame-checkmark {
  display: block;
}

.golden-frame-benefits {
  border-top: 1px solid rgba(197, 160, 40, 0.2);
  padding-top: 16px;
}

.golden-frame-benefits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.golden-frame-benefits-row:first-child {
  margin-bottom: 14px;
}

.golden-frame-benefit-item {
  flex: 1;
  min-width: 120px;
}

.golden-frame-benefit-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 13px;
}

.golden-frame-benefit-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.golden-frame-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(197, 160, 40, 0.2);
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  letter-spacing: 0.3px;
}

.golden-frame-hidden-checkbox {
  display: none;
}

/* ===================================== */
/* ========== 27. ОТЗЫВЫ =============== */
/* ===================================== */

.reviews-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1px;
  margin: 1px 0;
}

.review-card {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviewer-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.reviewer-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.review-date {
  color: var(--nav-inactive);
  font-size: 12px;
}

.review-content {
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ===================================== */
/* ========== 28. ФИЛЬТРЫ ОРДЕРОВ ====== */
/* ===================================== */

.orders-filter {
  margin-bottom: 20px;
  padding: 0 8px;
  width: 100%;
  box-sizing: border-box;
  position: sticky; /* ← добавляем */
  top: 0; /* ← прилипает к верху */
  z-index: 100; /* ← увеличил с 90 до 100 */
  background: var(--bg-color); /* ← чёрный фон */
}

.orders-container {
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.filter-btn::after {
  content: attr(data-count);
  display: inline-block;
  background: transparent;
  color: var(--nav-inactive);
  font-size: 11px;
  font-weight: 600;
  padding-left: 4px;
  position: static; /* 👈 ИЗМЕНИТЬ sticky → static */
}

/* 👇 СКРЫВАЕМ старую черту */
.orders-filter::after {
  display: none;
}

/* Активная кнопка — только белый цвет, без фона и без овала */
.filter-btn.active {
  background: transparent;
  color: white;
}

/* Убираем :after который добавляет цифры (они уже в тексте) */
.filter-btn:after {
  display: none;
}

.filter-btn.active::after {
  color: var(--text-color); /* это для счетчика, не влияет на черту */
}

.tabs {
  display: flex;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 8px;
  position: relative;
  border: none;
  gap: 4px;
  width: 100%;
}

.tab-button {
  flex: 1;
  padding: 12px 8px 16px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  position: relative;
  color: var(--nav-inactive);
  text-align: center;
}

.tab-button.buy.active {
  color: var(--success-color);
  background: transparent;
}

.tab-button.services.active {
  color: #667eea;
  background: transparent;
}

.tab-button.sell.active {
  color: var(--danger-color);
  background: transparent;
}

.tab-button:hover {
  background: transparent;
  opacity: 0.8;
}

.tab-button:active {
  transform: scale(0.97);
}

.tabs::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 28px;
  height: 3px;
  border-radius: 4px;
  background: var(--success-color);
  transition: left 0.25s ease;
  z-index: 1;
}

.tabs:has(.tab-button.buy.active)::after {
  left: calc(16.66% - 14px);
}

.tabs:has(.tab-button.services.active)::after {
  left: calc(50% - 14px);
  background: #60a5fa;
}

.tabs:has(.tab-button.sell.active)::after {
  left: calc(83.33% - 14px);
  background: var(--danger-color);
}

/* ===================================== */
/* ========== 30. ЭМОДЗИ МАТРЕШКИ ====== */
/* ===================================== */

.matryoshka-emoji {
  font-size: 20px;
  display: inline-block;
  line-height: 1;
  transition: color 0.3s ease;
  filter: grayscale(1);
  opacity: 0.7;
}

.nav-item.active .matryoshka-emoji {
  filter: grayscale(0);
  opacity: 1;
  color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.nav-item:hover .matryoshka-emoji {
  opacity: 1;
  transform: scale(1.05);
}

/* ===================================== */
/* ========== 31. БЕЙДЖИ =============== */
/* ===================================== */

.nav-icon {
  position: relative;
  display: inline-block;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 18px;
  background: #ff3b30;
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(255, 59, 48, 0.3);
  border: 2px solid var(--nav-bg);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1;
  transform: scale(1);
  transition: transform 0.2s ease;
  animation: badgeAppear 0.3s ease;
}

@keyframes badgeAppear {
  0% {
    transform: scale(0);
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.nav-badge.ninety-nine {
  min-width: 24px;
  font-size: 10px;
}

.chat-unread-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
  background: #ffffff !important;
  color: #000000 !important;
}

/* ===================================== */
/* ========== 32. АНИМАЦИИ ============= */
/* ===================================== */

@keyframes nav-blue-pulse-strong {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.3;
  }
}

.offer-card.highlight-pulse,
.offer-card.highlight-pulse-my,
.offer-card.highlight-pulse-other {
  animation: nav-blue-pulse-strong 1.2s ease-in-out infinite !important;
  border: 2px solid #17a2b8 !important;
  background: rgba(23, 162, 184, 0.05) !important;
  position: relative;
  z-index: 100 !important;
}

/* ===================================== */
/* ========== 33. ОТСТУПЫ ============== */
/* ===================================== */

#mainPage .offers-list {
  padding-top: 10;
}

#ordersPage {
  padding: 0 !important;
}

#ordersPage #userOffersList {
  padding: 12px 20px 120px;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

#messagesPage #chatsList {
  padding-top: 0px;
}

/* ===================================== */
/* ========== 34. ВЕРИФИКАЦИЯ ========== */
/* ===================================== */

.verification-source-btn {
  flex: 1;
  padding: 20px 15px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-weight: 600;
}

.verification-source-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

#documentPhotoPreview img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===================================== */
/* ========== 35. НАСТРОЙКИ УВЕДОМЛЕНИЙ = */
/* ===================================== */

.notification-settings-container {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 16px;
}

.setting-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
  border-radius: 8px;
  margin-bottom: 8px;
}

.setting-item:hover {
  background: var(--hover-bg);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item.main-setting {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
  background: rgba(var(--primary-rgb), 0.05);
  border-radius: 12px;
  padding: 16px;
}

.setting-text {
  margin-left: 16px;
  flex-grow: 1;
}

.setting-title {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-color);
  font-size: 15px;
}

.setting-description {
  font-size: 13px;
  color: var(--nav-inactive);
  line-height: 1.4;
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.notification-subsettings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-subsettings.disabled .setting-item {
  opacity: 0.5;
  pointer-events: none;
}

.notification-subsettings.disabled .switch {
  opacity: 0.5;
}

.btn-save {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-save:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
}

.btn-save:active {
  transform: translateY(0);
}

/* ===================================== */
/* ========== 36. ПОИСК (HIGHLIGHT) ==== */
/* ===================================== */

.search-highlight {
  background-color: rgba(255, 215, 0, 0.4);
  color: #ffffff;
  font-weight: 700;
  border-radius: 3px;
  padding: 0;
  margin: 0;
  display: inline;
}

.chat-preview .search-highlight {
  background-color: rgba(102, 126, 234, 0.3);
}

/* ===================================== */
/* ========== 37. СКРОЛЛ =============== */
/* ===================================== */

* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
}

.main-content,
.offers-list,
#chatsListContainer,
#chatMessages,
#userOffersList,
.modal-body {
  -webkit-overflow-scrolling: touch;
}

/* ===================================== */
/* ========== 38. ЛИМИТЫ ОРДЕРОВ ======= */
/* ===================================== */

.order-limit-info {
  padding: 12px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  margin-top: 10px;
  display: none;
}

.order-limit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.order-limit-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 13px;
}

.order-limit-counter {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 14px;
}

.order-limit-text {
  font-size: 11px;
  color: var(--nav-inactive);
  line-height: 1.4;
}

.order-limit-free {
  color: var(--success-color);
  font-weight: 600;
}

.order-limit-paid {
  color: var(--warning-color);
  font-weight: 600;
}

/* ===================================== */
/* ========== 39. ИСПРАВЛЕНИЯ ========== */
/* ===================================== */

.forgot-password-container {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 20px;
}

.auth-submit-container {
  margin-top: 20px;
}

.auth-reset-container {
  margin-top: 20px;
}

.auth-sms-btn {
  margin-top: 12px;
}

.verification-price-container {
  text-align: center;
  margin: 20px 0;
}

.verification-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-color);
}

.verification-price-hint {
  font-size: 12px;
  color: var(--nav-inactive);
  margin-bottom: 20px;
}

.reviews-close-btn {
  width: 100%;
  padding: 14px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reviews-close-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.reviews-close-btn:active {
  transform: scale(0.98);
}

.reviews-close-icon {
  font-size: 18px;
}

.document-instruction-card {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.document-instruction-title {
  margin-top: 0;
  color: var(--text-color);
}

.document-requirements-card {
  background: rgba(93, 106, 251, 0.05);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(93, 106, 251, 0.1);
}

.avatar-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.avatar-modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 25px;
  max-width: 350px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.avatar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.avatar-modal-header h3 {
  margin: 0;
  color: var(--text-color);
}

.avatar-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--nav-inactive);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  overflow: hidden;
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.2) !important;
}

.avatar-status {
  margin-bottom: 25px;
  color: var(--nav-inactive);
  font-size: 14px;
}

.avatar-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.avatar-btn {
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.avatar-btn.primary {
  background: var(--primary-color);
  color: white;
}

.avatar-btn.secondary {
  background: var(--primary-color);
  color: white;
}

.avatar-btn.danger {
  background: #dc3545;
  color: white;
}

.avatar-btn.cancel {
  background: #dc3545;
  color: white;
  margin-top: 10px;
}

.avatar-btn-icon {
  font-size: 20px;
}

/* ===================================== */
/* ========== 40. PWA РЕЖИМ ============ */
/* ===================================== */

@media (display-mode: standalone) {
  body {
    -webkit-tap-highlight-color: transparent;
  }

  .app-container {
    height: 100vh;
    height: -webkit-fill-available;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .auth-modal {
    align-items: flex-start;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }

  .modal-header {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }

  .close-modal {
    top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
  }
}

/* ===================================== */
/* ========== 41. УПРАВЛЕНИЕ ВЫДЕЛЕНИЕМ = */
/* ===================================== */

.chat-messages,
.chat-messages-container {
  -webkit-user-select: text;
  user-select: text;
}

.offer-card {
  -webkit-user-select: text;
  user-select: text;
}

.chat-message .message-content,
.chat-message .message-text,
.message-content,
.message-text {
  -webkit-user-select: text !important;
  user-select: text !important;
  cursor: text;
}

.chat-message .message-time,
.chat-message .message-status {
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

.message-attachment,
.message-attachment * {
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

button,
.nav-item,
.chat-attachment-btn,
.chat-send-btn,
.offer-card-actions button,
.user-avatar,
.chat-avatar {
  -webkit-user-select: none;
  user-select: none;
}

.chat-messages
  *:not(button):not(.chat-message .message-time):not(
    .chat-message .message-status
  ):not(.message-attachment):not(.message-attachment *) {
  -webkit-user-select: text;
  user-select: text;
}

/* ===================================== */
/* ========== 42. ВЫДЕЛЕНИЕ НА ТЕЛЕФОНЕ = */
/* ===================================== */

.chat-messages-container,
.message-content,
.message-text,
.message-content p,
.message-text p,
.chat-message .message-content,
.chat-message .message-text {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  -webkit-touch-callout: text !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-modify: read-only !important;
  touch-action: manipulation;
}

.message-content,
.message-text {
  display: block;
  width: 100%;
  cursor: text;
}

.message-time,
.message-status,
.message-attachment {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  -webkit-touch-callout: none !important;
}

@supports (-webkit-touch-callout: none) {
  .message-content,
  .message-text {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    -webkit-touch-callout: text !important;
    -webkit-user-modify: read-only !important;
  }
}

@supports not (-webkit-touch-callout: none) {
  .message-content,
  .message-text {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
  }
}

.chat-messages *,
.chat-messages-container * {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.chat-messages button,
.chat-messages .message-time,
.chat-messages .message-status,
.chat-messages .message-attachment {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ===================================== */
/* ========== 43. ПРОФИЛЬ ДОПОЛНЕНИЯ === */
/* ===================================== */

.profile-notification {
  background: var(--filter-bg);
  border-left: 4px solid var(--warning-color);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-notification.warning {
  border-left-color: var(--warning-color);
}

.profile-notification.success {
  border-left-color: var(--success-color);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.quick-action-card {
  background: var(--filter-bg);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  background: var(--hover-bg);
}

.quick-action-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-text {
  flex: 1;
}

.quick-action-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.quick-action-text small {
  font-size: 12px;
  color: var(--text-light);
}

.nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-small {
  padding: 6px 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.access-denied-message {
  background: var(--warning-light);
  border: 1px solid var(--warning-color);
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

/* ===================================== */
/* ========== 44. СКРЫТЬ ИМЕНА В ЧАТЕ ====== */
/* ===================================== */

.message-sender-name {
  display: none !important;
}

/* ===================================== */
/* ========== 45. МОДАЛЬНОЕ ОКНО ПАМЯТКИ === */
/* ===================================== */

.reminder-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.reminder-modal-content {
  background: var(--card-bg);
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.reminder-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 2;
  border-radius: 24px 24px 0 0;
}

.reminder-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.close-reminder {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--nav-inactive);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-reminder:hover {
  background: var(--hover-bg);
}

.reminder-modal-body {
  padding: 20px;
}

.reminder-section {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 16px;
}

.reminder-section.warning {
  background: rgba(246, 70, 93, 0.1);
  border-left: 4px solid var(--danger-color);
}

.reminder-section.success {
  background: rgba(0, 192, 135, 0.1);
  border-left: 4px solid var(--success-color);
}

.reminder-section h4 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: var(--text-color);
  font-weight: 600;
}

.reminder-section ul {
  margin: 0;
  padding-left: 20px;
}

.reminder-section li {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-color);
  line-height: 1.4;
}

.reminder-tip {
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), #764ba2);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body:has(.create-modal[style*="display: flex"]) {
  overflow: hidden;
}

/* ===================================== */
/* ========== 46. МОДАЛЬНОЕ ОКНО ЖАЛОБЫ === */
/* ===================================== */

#reportModal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

#reportModal .modal-content {
  max-width: 380px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  #reportModal .modal-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  #reportModal .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
  }

  #reportModal .modal-header,
  #reportModal .modal-footer {
    flex-shrink: 0;
    padding: 16px 20px;
  }

  #reportModal .modal-header {
    border-bottom: 1px solid var(--border-color);
  }

  #reportModal .modal-footer {
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
  }

  #reportModal .modal-footer button {
    flex: 1;
    padding: 14px;
    font-size: 15px;
  }
}

#reportModal select,
#reportModal textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 15px;
  font-family: inherit;
}

#reportModal select:focus,
#reportModal textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#reportModal textarea {
  min-height: 120px;
  resize: vertical;
}

#reportModal .error-message {
  color: var(--danger-color);
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

#reportModal .counter {
  font-size: 12px;
  color: var(--nav-inactive);
  text-align: right;
  margin-top: 5px;
}

#reportModal .counter.warning {
  color: var(--warning-color);
}

#reportModal .counter.danger {
  color: var(--danger-color);
}

/* Карточка баллов в профиле */
.points-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 179, 0, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  transition: all 0.2s ease;
}

.points-card:active {
  background: rgba(255, 179, 0, 0.05);
  transform: scale(0.98);
}

/* Модальное окно баллов — на весь экран */
.points-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.points-modal-box {
  background: var(--bg-color);
  width: 100%;
  height: 100%;
  max-width: 100%;
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.points-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.points-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-color);
  font-weight: 600;
}

.points-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--nav-inactive);
  padding: 4px 8px;
  line-height: 1;
}

.points-balance-block {
  text-align: center;
  padding: 32px 20px;
  background: var(--card-bg);
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.points-balance-value {
  font-size: 48px;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
  margin-bottom: 8px;
}

.points-balance-label {
  font-size: 14px;
  color: var(--nav-inactive);
}

.points-info-section {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.points-info-section h4 {
  font-size: 15px;
  color: var(--text-color);
  margin: 0 0 10px 0;
  font-weight: 600;
}

.points-info-text {
  font-size: 13px;
  color: var(--nav-inactive);
  line-height: 2;
}

.points-history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.points-history-item:last-child {
  border-bottom: none;
}

.points-history-left {
  flex: 1;
  min-width: 0;
}

.points-history-title {
  font-size: 13px;
  color: var(--text-color);
  margin-bottom: 2px;
}

.points-history-reason {
  font-size: 11px;
  color: var(--nav-inactive);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.points-history-date {
  font-size: 10px;
  color: var(--nav-inactive);
  margin-top: 2px;
}

.points-history-amount {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  margin-left: 12px;
}

.points-history-amount.positive {
  color: #4caf50;
}

.points-history-amount.negative {
  color: #f44336;
}

/* ===================================== */
/* ========== 47. МОДАЛЬНОЕ ОКНО ОТЗЫВА === */
/* ===================================== */

#reviewModal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

#reviewModal .modal-content {
  width: 90%;
  max-width: 340px;
  max-height: 80vh;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#reviewModal .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  flex-shrink: 0;
}

#reviewModal .modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

#reviewModal .modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

#reviewModal .modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #reviewModal .modal-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    margin: 0 16px;
  }
}

#reviewModal .rating-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

#reviewModal .rating-star {
  font-size: 32px;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}

#reviewModal .rating-star:hover,
#reviewModal .rating-star.active {
  color: #ffb400;
  transform: scale(1.1);
}

#reviewModal textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 15px;
  min-height: 120px;
  resize: vertical;
  margin: 16px 0;
}

#reviewModal textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#reviewModal .submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#reviewModal .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#reviewModal .user-info {
  text-align: center;
  margin-bottom: 16px;
}

#reviewModal .user-info .label {
  font-size: 14px;
  color: var(--nav-inactive);
  margin-bottom: 4px;
}

#reviewModal .user-info .name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

/* ===================================== */
/* ===== 48. ОБНОВЛЕНИЕ СТРАНИЦЫ (PULL TO REFRESH) ===== */
/* ===================================== */

/* ===================================== */
/* ========== 49. СЕРЫЙ ЦВЕТ ИКОНОК В МЕНЮ, В САМОМ ЧАТЕ====== */
/* ===================================== */

.chat-dropdown-menu .chat-menu-item i {
  color: var(--nav-inactive);
  width: 24px;
  font-size: 16px;
}

/* ===================================== */
/* ========== 50. ПОДТВЕРЖДЕНИЕ УДАЛЕНИЯ ПРОФИЛЯ ПОЛЬЗОВАТЕЛЯ====== */
/* ===================================== */

.menu-item i,
.menu-item span,
.menu-item .fas {
  color: var(--text-color);
  transition: color 0.2s;
}

@media (max-width: 480px) {
  .menu-item {
    -webkit-tap-highlight-color: transparent;
    background-color: transparent !important;
  }

  .menu-item:active {
    background-color: transparent !important;
  }
}

/* ============================================
   МОДАЛЬНОЕ ОКНО ВЕРИФИКАЦИИ
   ============================================ */

/* Основной контейнер модального окна */
.verification-modal .modal-content {
  max-width: 440px;
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Шапка модального окна */
.verification-modal-header {
  padding: 24px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--card-bg);
  z-index: 10;
}

.verification-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

/* Кнопка закрытия */
.verification-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: var(--nav-inactive);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.verification-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Контент с прокруткой */
.verification-modal-body {
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

/* ========== СТАТУС И БЕЙДЖ ========== */
.verification-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.verification-status-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
}

.verified-badge-green-oval {
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  height: auto;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
  width: fit-content !important;
  max-width: 100%;
}

.verified-circle-white {
  width: 22px;
  height: 22px;
  background: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 192, 135, 0.4);
}

.verified-text-green {
  color: var(--success-color);
  font-size: 13px;
  font-weight: 600;
}

.verified-text-green {
  color: var(--success-color);
  font-size: 13px;
}

/* ========== ЗАГОЛОВОК ИНСТРУКЦИИ ========== */
.verification-instruction-header {
  margin-bottom: 16px;
}

.verification-instruction-header h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-color);
}

.verification-instruction-header p {
  font-size: 13px;
  color: var(--nav-inactive);
  margin: 0;
}

/* ========== БЛОКИ ПРАВИЛЬНО/НЕПРАВИЛЬНО ========== */
.example-correct {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.example-incorrect {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.example-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.example-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.example-badge-green {
  background: #21a038;
}

.example-badge-green svg {
  stroke: white;
}

.example-badge-red {
  background: #dc3545;
}

.example-badge-red svg {
  stroke: white;
}

.example-badge svg {
  width: 14px;
  height: 14px;
}

.example-title-green {
  font-weight: 600;
  color: #21a038;
  font-size: 14px;
}

.example-title-red {
  font-weight: 600;
  color: #dc3545;
  font-size: 14px;
}

.example-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.example-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.example-item-content {
  flex: 1;
}

.example-item-title {
  font-weight: 500;
  color: var(--text-color);
  font-size: 13px;
}

.example-item-desc {
  font-size: 11px;
  color: var(--nav-inactive);
}

.example-incorrect .example-item {
  opacity: 1;
}

/* ========== БЛОК БЕЗОПАСНОСТИ ========== */
.security-block {
  background: rgba(33, 160, 56, 0.05);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(33, 160, 56, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.security-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-color);
}

.security-desc {
  font-size: 13px;
  color: var(--nav-inactive);
  line-height: 1.5;
}

/* ========== КНОПКИ ВЫБОРА ИСТОЧНИКА ========== */
.source-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.source-btn {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 500;
}

.source-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.source-btn svg {
  width: 20px;
  height: 20px;
}

/* ========== ШАГ 2 - ПРЕДПРОСМОТР ФОТО ========== */
.photo-preview-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.photo-preview {
  width: 100%;
  height: 220px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-inactive);
  font-size: 14px;
  overflow: hidden;
  position: relative;
}

.preview-placeholder {
  text-align: center;
}

.preview-placeholder svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

/* Кнопки управления фото */
.preview-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.preview-action-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-inactive);
  transition: all 0.2s;
  font-size: 18px;
}

.preview-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Специфичные кнопки */
.preview-action-delete {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.preview-action-delete:hover {
  background: rgba(220, 53, 69, 0.2);
}

.preview-action-zoom {
  background: rgba(33, 160, 56, 0.1);
  border-color: rgba(33, 160, 56, 0.2);
  color: #21a038;
}

.preview-action-zoom:hover {
  background: rgba(33, 160, 56, 0.2);
}

/* Кнопки внизу шага 2 */
.step2-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-back-red {
  flex: 1;
  padding: 14px;
  background: #dc3545;
  border: none;
  border-radius: 18px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-back-red:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.btn-submit-green {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, #21a038, #1e8e32);
  border: none;
  border-radius: 18px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit-green:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit-green:not(:disabled):hover {
  opacity: 0.8;
}

/* ========== ВРЕМЯ ПРОВЕРКИ ========== */
.check-time-info {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.check-time-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.check-time-text {
  font-size: 14px;
  color: var(--nav-inactive);
}

.check-time-text strong {
  font-weight: 600;
}

/* ========== СКРЫТЫЙ INPUT ========== */
.hidden-input {
  display: none;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* ===================================== */
/* ========== 55. ИЗБРАННОЕ ====== */
/* ===================================== */

.user-name-section {
  display: flex;
  flex-direction: column;
  gap: 0px;
  width: 100%;
}

.user-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.favorite-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn:hover {
  transform: scale(1.1);
}

.heart-icon {
  width: 20px;
  height: 20px;
  stroke: #ff4444;
  stroke-width: 2;
  fill: none;
}

.heart-icon.filled {
  fill: #ff4444;
  stroke: #ff4444;
}

.filter-heart-icon {
  stroke: #ff4444;
  stroke-width: 2;
  fill: none;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.filter-heart-icon.filled {
  fill: #ff4444;
  stroke: #ff4444;
}

.filter-btn.active .filter-heart-icon {
  fill: white;
  stroke: white;
}

.filter-btn {
  position: relative !important;
}

.filter-btn.active::after {
  content: "" !important;
  position: absolute !important;
  bottom: 5px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 28px !important;
  height: 3px !important;
  border-radius: 4px !important;
  background: var(--primary-color) !important;
  transition: left 0.25s ease !important;
  display: block !important;
}

/* Убираем другие :after которые могут мешать */
.filter-btn::after {
  content: none !important;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 8px;
}

.filter-btn {
  flex: 1 0 auto; /* все кнопки одинаковой ширины */
  min-width: 0; /* позволяем сжиматься */
  max-width: 120px; /* максимальная ширина */
  padding: 10px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
  color: var(--nav-inactive);
  white-space: nowrap;
  position: relative;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* На мобильных кнопки могут переноситься */
@media (max-width: 480px) {
  .filter-row {
    gap: 4px;
    justify-content: center;
  }

  .filter-btn {
    min-width: 75px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Чип с курсом в шапке чата */
.chat-header-order {
  margin-top: 1px;
  max-width: 220px;
  overflow: hidden;
}

.order-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  letter-spacing: 0.2px;
  max-width: 100%;
}

.order-chip .currency {
  color: #8b8ca6;
}

.order-chip .divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}

.order-chip .rate {
  font-weight: 600;
}

.order-chip .rate.buy {
  color: #22c55e; /* Зеленый для покупки */
}

.order-chip .rate.sell {
  color: #ef4444; /* Красный для продажи */
}

.order-chip .type {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  font-weight: 400;
}

.order-chip .type.buy {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.order-chip .type.sell {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.loading-more-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.loading-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.offer-card.highlight {
  animation: highlight-pulse 1s ease-in-out;
  border: 2px solid var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

@keyframes highlight-pulse {
  0% {
    transform: scale(1);
    background: rgba(99, 102, 241, 0);
  }
  50% {
    transform: scale(1.01);
    background: rgba(99, 102, 241, 0.2);
  }
  100% {
    transform: scale(1);
    background: rgba(99, 102, 241, 0);
  }
}

.rating-stars-small .star-background,
.rating-stars-small .star-filled {
  font-size: 13px !important;
  line-height: 1 !important;
}

#documentUploadModal .verification-modal-body {
  padding-bottom: 90px;
}

@media (max-width: 768px) {
  #documentUploadModal .modal-content {
    max-height: 90dvh !important;
    height: auto !important;
    margin-bottom: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #documentUploadModal {
    align-items: flex-start !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  #documentUploadModal .verification-modal-body {
    overflow-y: visible !important;
  }

  #documentUploadModal .verification-modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
  }
}

.offer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2px;
  line-height: 1.3;
}

.price-unit {
  font-size: 14px;
  margin-left: 4px;
  color: inherit;
}

.tab-button.services.active {
  color: #60a5fa;
}

.price.services {
  color: #60a5fa;
}

.action-button.services {
  background: #60a5fa;
  color: white;
}

.comment-value {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow: visible !important;
  max-height: none !important;
}

#createModal .custom-select-selected.open::after {
  transform: rotate(180deg);
}

.services-subtabs-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 16px 10px 16px;
}

.service-subtab {
  position: relative;
  padding: 8px 20px 12px 20px;
  background: transparent;
  border: none;
  color: var(--nav-inactive);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.service-subtab.active {
  color: #fff;
}

.service-subtab.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #60a5fa;
  border-radius: 50%;
}

.service-subtab-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
}

.services-subtabs-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

#authRegisterForm .custom-select-selected {
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  font-size: 14px;
  min-height: 48px;
  justify-content: flex-start !important;
  text-align: left;
}

#authRegisterForm .custom-select-selected::after {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  width: 14px;
  height: 8px;
  right: auto;
}

#authRegisterForm .custom-select-options {
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  min-width: 100%;
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

#authRegisterForm .custom-select-option {
  padding: 12px 16px;
  font-size: 14px;
}

#editOrgModal .form-input {
  width: 100%;
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  color: var(--text-color);
  font-size: 14px;
  box-sizing: border-box;
}

#editOrgModal .auth-button {
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 16px;
}

#editOrgModal .custom-select-container {
  position: relative;
  width: 100%;
  flex: none;
}

#editOrgModal .custom-select-selected {
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  font-size: 14px;
  min-height: 48px;
  justify-content: flex-start !important;
  text-align: left;
}

#editOrgModal .custom-select-selected::after {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  width: 14px;
  height: 8px;
  right: auto;
}

#editOrgModal .custom-select-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  max-height: 400px !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 12px;
  z-index: 10000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

#editOrgModal .modal-body {
  overflow-y: visible !important;
  -webkit-overflow-scrolling: auto;
}

#editOrgModal .custom-select-option {
  padding: 12px 16px;
  font-size: 14px;
  white-space: normal;
  margin: 2px 8px;
  border-radius: 8px;
}

#editOrgModal .modal-content {
  overflow: visible !important;
}

#editOrgModal.auth-modal {
  overflow: visible !important;
}

.photo-upload-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-preview-item {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  position: relative;
  border: 1px solid #333;
}

.photo-preview-item .photo-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-add-btn {
  width: 70px;
  height: 70px;
  border: 1px dashed #555;
  border-radius: 10px;
  background: transparent;
  color: var(--nav-inactive);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
}

.photo-add-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.photo-add-icon {
  font-size: 24px;
  line-height: 1;
}

.photo-add-text {
  font-size: 9px;
}

/* Галерея фото в карточке */
.offer-card-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  border-radius: 20px;
}

.offer-card-wrapper::-webkit-scrollbar {
  display: none;
}

.offer-card-page,
.offer-gallery-page {
  min-width: 100%;
  scroll-snap-align: start;
  max-height: 380px;
  overflow: hidden;
}

.offer-gallery-page {
  background: #0a0a0a;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.offer-gallery-page img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.gallery-nav-arrow {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-nav-arrow {
    display: flex;
    position: absolute;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

.gallery-dot-card {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  display: inline-block;
}

.gallery-dot-card.active {
  background: var(--primary-color);
  width: 6px;
}

#userOffersList .offer-card-page {
  max-height: 450px !important;
  overflow-y: auto !important;
}

.offer-card.my-offer {
  max-height: 400px;
}

.offer-card-wrapper:has(.golden-frame) {
  box-shadow: 0 0 18px 4px rgba(255, 215, 0, 0.4);
  border-radius: 20px;
}

.offer-card-wrapper.highlight-pulse {
  animation: nav-blue-pulse-strong 1.2s ease-in-out infinite !important;
  border: 2px solid #17a2b8 !important;
  background: rgba(23, 162, 184, 0.05) !important;
  position: relative;
  z-index: 100 !important;
  border-radius: 20px;
}

.bottom-nav .nav-item span {
  font-size: 10px;
  white-space: nowrap;
}

.bottom-nav .nav-item {
  flex: 1;
  min-width: 0;
  max-width: 25%;
}

.verified-badge-green-oval {
  margin-left: 4px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--nav-inactive);
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nav-inactive);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  flex: 1;
  margin-left: 8px;
  margin-right: 8px;
  padding: 12px 40px 12px 32px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

.search-input::placeholder {
  color: var(--nav-inactive);
}

.filter-toggle-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.price-filters-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.price-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.price-filter-input {
  flex: 1;
  padding: 10px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 14px;
  box-sizing: border-box;
}

.price-filter-divider {
  color: var(--nav-inactive);
}

.sort-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.sort-btn {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--nav-inactive);
  font-size: 12px;
  cursor: pointer;
}

.sort-btn.active {
  color: white;
  border-color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.1);
}

.price-filter-actions {
  display: flex;
  gap: 6px;
}

.price-filter-reset,
.price-filter-apply {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.price-filter-reset {
  background: #dc3545;
  color: white;
}

.price-filter-apply {
  background: var(--primary-color);
  color: white;
}

#priceFiltersModal {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}

#priceFiltersModal .modal-content {
  height: 100%;
  max-height: 100vh;
}

#priceFiltersModal .modal-footer {
  position: static;
  margin-top: 20px;
  background: transparent;
  box-shadow: none;
}

#createModal .modal-body {
  padding-bottom: 0;
}

.custom-select-selected {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.3 !important;
  word-break: break-word !important;
}

.custom-select-options {
  white-space: normal !important;
}

.custom-select-option {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  flex-shrink: 0;
  margin-right: 10px;
}

.input-with-icon .form-input {
  flex: 1;
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  font-size: 18px;
  color: #999;
  line-height: 1;
}

/* ========== SPLASH SCREEN ========== */
#splashScreen {
  transition: opacity 0.4s ease-out;
}

#splashScreen.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

#splashScreen p {
  animation: splashBlink 1.5s infinite;
}

@keyframes splashBlink {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

/* ===================================== */
/* ========== 56. ПК-АДАПТАЦИЯ v4 ====== */
/* ===================================== */

@media (min-width: 1025px) {
  .app-container {
    width: min(900px, 95vw); /* было 1100px → стало 700px */
    height: 90vh;
    max-height: 800px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
  }

  /* ВЕРХНЯЯ НАВИГАЦИЯ */
  .bottom-nav {
    position: static;
    flex-direction: row;
    height: 55px;
    min-height: 52px;
    padding: 0 20px;
    border-top: 2px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 24px 24px 0 0; /* ← Верхние углы! */
    gap: 16px;
    justify-content: flex-start;
    max-width: none;
    margin: 0;
    flex-shrink: 0;
  }

  .nav-item {
    flex: 0 0 auto;
    flex-direction: column; /* ← Иконка сверху, текст снизу */
    gap: 2px;
    font-size: 11px;
    padding: 4px 12px;
    max-width: none;
    align-items: center;
    justify-content: center;
  }

  .nav-item span {
    font-size: 10px;
    display: block;
  }

  .nav-icon {
    font-size: 18px;
  }

  .create-nav {
    flex: 0 0 auto;
    min-width: auto;
    max-width: none;
    margin: 0 8px;
  }

  .create-nav-button {
    width: 36px;
    height: 36px;
    margin-top: 0;
  }

  /* РЕКЛАМА СВЕРХУ */
  .ad-banner {
    height: 143px;
    min-height: 120px;
    flex-shrink: 0;
    margin-left: -1px;
    margin-right: -1px;
    width: calc(100% + 2px);
  }

  .ad-carousel {
    height: 120px;
  }

  .ad-slide {
    height: 225px;
  }

  .ad-image {
    object-fit: cover !important;
    object-position: center;
  }

  /* ОСНОВНОЙ КОНТЕНТ — обычный скролл */
  .main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  /* Лента */
  #mainPage {
    min-width: 0;
  }

  /* Фильтры */
  .filters-container {
    flex-shrink: 0;
    padding: 10px 16px 8px 16px;
  }

  .tabs {
    justify-content: center;
    margin-bottom: 4px;
  }

  .filters {
    justify-content: center;
  }

  /* Лента — 3 колонки */
  .offers-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 8px 16px 40px 16px;
    margin-top: 0;
  }

  /* Карточка */
  .offer-card {
    border-radius: 20px;
    transition: all 0.25s ease;
  }

  .offer-card:hover {
    transform: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  /* МОДАЛЬНЫЕ ОКНА */
  .modal-content,
  .auth-modal-content {
    max-width: 460px;
    margin: 40px auto;
  }

  /* ОТСТУПЫ */
  .offers-container,
  .orders-container {
    padding: 0;
  }

  #ordersPage #userOffersList {
    padding: 12px 16px 40px 16px;
  }
}

/* ПЛАНШЕТЫ */
@media (min-width: 768px) and (max-width: 1024px) {
  .app-container {
    width: min(700px, 95vw);
    height: 90vh;
    max-height: 800px;
    border-radius: 20px;
  }

  .offers-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 8px 16px 60px 16px;
    margin-top: 0;
  }
}

.ad-banner,
.ad-carousel,
.ad-slide {
  border-radius: 0 0 24px 24px !important;
}

.ad-banner {
  overflow: hidden !important;
}

/* ===================================== */
/* ===== 59. ПРОФИЛЬ ДЛЯ ПК ============ */
/* ===================================== */

@media (min-width: 1025px) {
  .profile-container {
    max-width: none;
    width: 100%;
    padding: 30px;
    padding-bottom: 40px;
  }

  .profile-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 16px;
    padding-bottom: 40px;
  }

  /* ===== ЛЕВЫЙ БЛОК — ИМЯ ===== */
  .profile-header-card {
    width: calc(50% - 8px);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .profile-avatar-large {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }

  .profile-name-section {
    align-items: flex-start;
    gap: 6px;
  }

  .profile-name-section h3 {
    font-size: 18px;
  }

  .profile-details-row {
    justify-content: flex-start;
    gap: 8px;
  }

  .profile-detail {
    font-size: 13px;
  }

  /* ===== ПРАВЫЙ БЛОК — СТАТИСТИКА ===== */
  .compact-stats {
    width: calc(50% - 8px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* ← gap 20px */
  }

  .compact-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .compact-stat-value {
    font-size: 22px; /* ← крупнее */
  }

  .compact-stat-label {
    font-size: 11px; /* ← крупнее */
  }

  /* ===== МЕНЮ СЕТКОЙ 3×2 ===== */
  .profile-menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: transparent;
    border: none;
    overflow: visible;
  }

  .menu-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.1s;
  }

  .menu-item:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
  }

  .menu-item i:first-child {
    margin-right: 0;
    margin-bottom: 10px;
    font-size: 24px;
  }

  .menu-item span {
    font-size: 13px;
    text-align: center;
  }

  .menu-item i:last-child {
    display: none;
  }

  /* Центрируем содержимое шапки */
  .profile-header-card {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

  .profile-info {
    text-align: center;
  }

  .profile-name-section {
    align-items: center;
  }

  .profile-details-row {
    justify-content: center;
  }

  /* Статистика */
  .compact-stats {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .compact-stat-value {
    font-size: 18px;
  }

  .compact-stat-label {
    font-size: 9px;
  }

  #loginButtonContainer {
    border-bottom: 1px solid var(--border-color);
  }

  #loginButtonContainer:hover {
    border-bottom: 1px solid var(--primary-color);
    border-color: var(--primary-color);
  }

  #deleteProfileButton:hover {
    border-top-color: var(--primary-color) !important;
  }
}

/* ===================================== */
/* ===== 60. СООБЩЕНИЯ ДЛЯ ПК ========= */
/* ===================================== */

@media (min-width: 1025px) {
  .messages-container {
    padding: 0;
  }

  #messagesPage.active {
    flex-direction: row;
    height: 100%;
    overflow: hidden;
  }

  /* Левая колонка — список чатов */
  #chatsListContainer {
    width: 50%;
    min-width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
    border-right: 1px solid var(--border-color);
    padding: 16px;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding-bottom: 16px !important;
    display: flex !important;
    flex-direction: column;
  }

  #chatsList {
    min-height: 0 !important;
    height: auto !important;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Правая колонка — чат */
  #activeChatContainer {
    width: 50%;
    min-width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
    display: none;
    height: 100%;
  }

  #activeChatContainer.active {
    display: flex;
    flex-direction: column;
  }

  /* Компактные чаты */
  .chat-item {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.1s;
  }

  .chat-item:hover {
    border-color: var(--border-color) !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .chat-item.active {
    border-color: var(--border-color) !important;
    background: transparent !important;
  }

  /* Скролл для списка чатов */
  #chatsListContainer::-webkit-scrollbar {
    width: 6px;
  }

  #chatsListContainer::-webkit-scrollbar-track {
    background: transparent;
  }

  #chatsListContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  #chatsListContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
  }

  /* Скролл для сообщений */
  .chat-messages-container::-webkit-scrollbar {
    width: 6px;
  }

  .chat-messages-container::-webkit-scrollbar-track {
    background: transparent;
  }

  .chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  .chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
  }
  .chat-item:focus,
  .chat-item:focus-visible,
  button:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: none !important;
  }
}

/* ===================================== */
/* ===== 61. МОИ ОБЪЯВЛЕНИЯ ДЛЯ ПК ===== */
/* ===================================== */

@media (min-width: 1025px) {
  #ordersPage {
    padding: 20px;
  }

  .no-offers-message,
  .no-orders-message,
  .no-chats-message {
    grid-column: 1 / -1; /* ← На всю ширину сетки! */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .orders-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-top: 20px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 11px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.1s;
  }

  .filter-btn:hover {
    border-color: var(--primary-color);
  }

  .filter-btn.active::after {
    bottom: -15px !important;
  }

  .filter-btn.active {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    color: white;
  }

  #userOffersList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: min-content;
    align-items: start;
    align-content: start;
    gap: 16px;
    padding: 8px 16px 40px 16px;
  }

  #userOffersList .offer-card-wrapper {
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.1s;
  }

  #userOffersList .offer-card-wrapper:hover {
    transform: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  #userOffersList .offer-card-main-container {
    height: auto !important;
    min-height: 0 !important;
  }

  #userOffersList .offer-card-page {
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (min-width: 1025px) {
  #transparencyCloseBtn {
    margin-left: auto !important;
    margin-right: 15px !important;
  }
}

/* ===================================== */
/* ===== 62. ГЛАВНАЯ СТРАНИЦА (OFFERS LIST) ===== */
/* ===================================== */

/* Общие стили для карточек на главной */
#offersList .offer-card-main-container,
#offersList .offer-card-wrapper,
#offersList .offer-card-page,
#offersList .offer-gallery-page {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#offersList {
  overflow: hidden;
}

/* ===== ДЛЯ ПК (от 1025px) ===== */
@media (min-width: 1025px) {
  #offersList {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ===== ДЛЯ ПЛАНШЕТОВ (769-1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  #offersList {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== ДЛЯ МОБИЛЬНЫХ (до 768px) ===== */
@media (max-width: 768px) {
  #offersList {
    grid-template-columns: 1fr !important;
  }
}
