:root {
  --bg: #0d1117;
  --card-bg: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #fd6b07;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 8px 20px rgba(0,0,0,0.35);
}

/* ОБЩЕЕ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 12px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 1200px;
  margin: 0 auto 40px;
}

h1 {
  font-size: 20px;
  margin: 4px 0 12px;
  font-weight: 600;
}

/* ФИЛЬТРЫ */

.filters {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.filters-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  color: var(--muted);
}

select,
input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #11171f;
  color: var(--text);
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(253,107,7,0.4);
}

/* ДВОЙНОЙ СЛАЙДЕР */

.range-wrapper {
  margin-top: 2px;
}

.range-double {
  position: relative;
  width: 100%;
  height: 24px;
  margin-top: 4px;
}

.range-track {
  position: absolute;
  inset: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #20252f, #222e3b);
}

.range-double input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
}

.range-double input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.range-double input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}

.range-double input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px #000;
  margin-top: -8px;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
  pointer-events: auto;
}

.range-double input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 0 0 2px #000;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
  pointer-events: auto;
}

.range-double input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(253,107,7,.6);
}

.range-double input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(253,107,7,.6);
}

.range-values {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

/* MULTI SELECT */

.multi-select {
  position: relative;
  font-size: 14px;
}

.multi-select-display {
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #11171f;
  cursor: pointer;
}

.multi-select-display::after {
  content: "▾";
  float: right;
  font-size: 10px;
  color: var(--muted);
  margin-left: 8px;
  margin-top: 2px;
}

.multi-select-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #11171f;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 6px 8px;
  display: none;
  max-height: 180px;
  overflow-y: auto;
}

.multi-select.open .multi-select-dropdown {
  display: block;
}

.multi-select-dropdown label {
  display: flex;
  align-items: center;
  font-size: 13px;
  padding: 3px 2px;
  cursor: pointer;
  color: var(--text);
}

.multi-select-dropdown input[type="checkbox"] {
  margin-right: 6px;
}

/* КАРТОЧКИ — каталог лотов */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 140px; /* место под нижнюю панель */
}

.lot-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.lot-card--skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.lot-card-skel-image {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
}

.lot-card-skel-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lot-card-skel-line {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.lot-card-skel-line.w-70 { width: 70%; }
.lot-card-skel-line.w-50 { width: 50%; }
.lot-card-skel-line.w-40 { width: 40%; }

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer-move 1.2s infinite;
}

@keyframes shimmer-move {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.lot-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.5);
}

/* Верхняя часть — фото */

.lot-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #10151d;
}

.lot-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Тело карточки */

.lot-card__body {
  padding: 8px 8px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lot-card__title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
}

.lot-card__subtitle {
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 6px;
}

/* Мета-инфа (аукцион, пробег и т.п.) */

.lot-card__meta {
  color: var(--muted);
  line-height: 1.3;
  font-size: 11px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Низ карточки: цены + избранное */

.lot-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
}

.lot-card__prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lot-card__price-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.lot-card__price-secondary {
  font-size: 11px;
  color: var(--muted);
}

/* Кнопка избранного */

.lot-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.lot-card__favorite {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent url("/img/fav-empty.svg") center/contain no-repeat;
  cursor: pointer;
}

.lot-card__favorite.active {
  background-image: url("/img/fav-fill.svg");
}

/* Skeleton для карточек/изображений, пока грузятся данные */

.image-skeleton {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #1f2933 0%, #263341 50%, #1f2933 100%);
  background-size: 200% 100%;
  animation: cards-skeleton 1.2s ease-in-out infinite;
}

@keyframes cards-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Пустое состояние */

.empty {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 2px;
}


/* КНОПКА ПОДПИСКИ — ПОД ФИЛЬТРАМИ */

.subscribe-bar {
  margin: 10px 0 14px;
}

.subscribe-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.5);
  transition: background .15s ease, transform .12s ease;
}

.subscribe-btn:active {
  transform: scale(0.97);
}

/* МОДАЛКА ЛОТА */

/* Скелетон внутри модалки лота */
.lot-modal__skeleton {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
}

@media (max-width: 768px) {
    .lot-modal__skeleton {
        grid-template-columns: 1fr;
    }
}

.lot-modal-skel-gallery {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    aspect-ratio: 4 / 3;
}

.lot-modal-skel-thumb-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.lot-modal-skel-thumb {
    flex: 1 1 0;
    height: 56px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.lot-modal-skel-block {
    margin-bottom: 10px;
}

.lot-modal-skel-line {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

.lot-modal-skel-line.w-80 { width: 80%; }
.lot-modal-skel-line.w-60 { width: 60%; }
.lot-modal-skel-line.w-40 { width: 40%; }
.lot-modal-skel-line.w-30 { width: 30%; }

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );
    animation: shimmer-move 1.2s infinite;
}

@keyframes shimmer-move {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 12px;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(100%, 640px);
  max-height: 90vh;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
}

.modal-close {
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}

.modal-body {
  padding: 10px 12px;
  overflow-y: auto;
  font-size: 13px;
}

.modal-images {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}

.modal-images img {
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  cursor: pointer;
}

.modal-table {
  width: 100%;
}

.modal-table td {
  padding: 4px 2px;
  font-size: 12px;
}

.modal-table td:first-child {
  color: var(--muted);
  width: 40%;
}

.modal-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.tg-send-btn {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  transition: background .15s ease;
}

/* ============================
   КНОПКА "В избранное"
   ============================ */

#lotModalFavoriteBtn {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  margin-left: 8px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

/* состояние: лот уже в избранном */
#lotModalFavoriteBtn.in-favorites {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tg-send-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ЛАЙТБОКС */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1060;
}

.lightbox-backdrop.show {
  display: flex;
}

.lightbox-content {
  position: relative;
}

.lightbox-image {
  max-width: 100vw;
  max-height: 100vh;
  transition: opacity .22s ease-out, transform .22s ease-out;
}

/* состояние в момент смены кадра */
.lightbox-image--changing {
  transform: translateX(8px) scale(0.99);
  opacity: 0;
}


.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-close {
  top: 10px;
  right: 10px;
  transform: none;
}

/* НИЖНЯЯ ПАНЕЛЬ (ОСТРОВОК) */

.bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  padding: 6px;
  border-radius: 26px;
  background: rgba(15, 18, 26, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.75);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.bottom-nav-item {
  flex: 1;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 4px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background .16s ease-out, transform .12s ease-out, color .16s ease-out;
}

.bottom-nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.bottom-nav-item--active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.bottom-nav-item--active .bottom-nav-icon {
  background: linear-gradient(135deg, #fd6b07, #ff9b3f);
  color: #fff;
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

/* Пагинация (если понадобится) */

.lots-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 16px 0 80px;
  font-size: 14px;
}

.lots-pagination button {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.lots-pagination button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.lots-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.lots-pagination .page-btn--active {
  background: #fd6b07;
  color: #fff;
  font-weight: 600;
}

/* универсальный класс */
.hidden {
  display: none !important;
}

/* Контейнер "Показать ещё" */

.show-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto 90px;
  max-width: 960px;
}

/* Кнопка "Показать ещё" */

.show-more-button {
  width: 100%;
  max-width: 360px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: #fd6b07;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.show-more-button:hover {
  background: #ff822c;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.show-more-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#lotModalFavoriteBtn.in-favorites {
  background-color: #ffaa00;
  color: #000;
}

/* ===========================
   МОЙ КАБИНЕТ / ПЛИТКИ МЕНЮ
   =========================== */

/* когда режим кабинета активен */
.cabinet-mode {
  margin-bottom: 110px;
}

/* обёртка кабинета — те же отступы, что и у сетки лотов */
.cabinet-menu {
  padding: 16px 10px 110px;
  max-width: none;
  margin: 0;
}

/* Заголовок */
.cabinet-menu-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

/* Сетка плиток: как у карточек лотов — две в ряд */
.cabinet-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Плитка меню */
.cabinet-menu-item {
  position: relative;
  border: none;
  padding: 10px 10px 11px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 153, 0, 0.18), transparent 55%),
    #11151f;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  color: #eceff7;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.18s ease,
              box-shadow 0.18s ease,
              background 0.18s ease;
  min-height: 112px;
}

/* лёгкий подъём при ховере */
.cabinet-menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
}

.cabinet-menu-item:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

/* Иконка сверху */
.cabinet-menu-icon {
  font-size: 18px;
  margin-bottom: 4px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

/* Заголовок плитки */
.cabinet-menu-label {
  font-size: 13px;
  font-weight: 600;
}

/* Описание плитки */
.cabinet-menu-desc {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.3;
}

/* ===========================
   PLACEHOLDER ПОДПИСОК
   =========================== */

.cabinet-subscriptions-placeholder {
  max-width: none;
  margin: 0;
  padding: 16px 10px 110px;
}

.cabinet-placeholder-text {
  font-size: 13px;
  opacity: 0.78;
  margin-top: 6px;
}

/* Кнопка "назад" */
.cabinet-back-btn {
  margin-top: 16px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #f5f5f5;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cabinet-back-btn:hover {
  border-color: rgba(255, 153, 0, 0.7);
}

/* ===========================
   КАЛЬКУЛЯТОР В КАБИНЕТЕ
   =========================== */

.cabinet-calculator {
  max-width: none;
  margin: 0;
  padding: 16px 10px 110px;
}

.calc-form {
  margin-top: 12px;
}

/* сетка полей */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

/* стандартное поле */
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.calc-field span {
  color: rgba(255, 255, 255, 0.72);
}

/* инпуты */
.calc-field input {
  background: #11151f;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 9px;
  color: #f5f5f5;
  font-size: 13px;
  outline: none;
}

.calc-field input:focus {
  border-color: rgba(255, 153, 0, 0.8);
}

/* поле на всю ширину */
.calc-field-full {
  grid-column: 1 / -1;
}

/* радио-группа топлива */
.calc-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
}

.calc-radio-group label {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* чекбоксы */
.calc-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* кнопка рассчёта */
.calc-submit-btn {
  margin-top: 18px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ff9b24, #ff6b00);
  color: #0b0e14;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.7);
}

.calc-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
}

/* результат */
.calc-result {
  margin-top: 16px;
  font-size: 13px;
}

.calc-total {
  margin-bottom: 8px;
}

.calc-total strong {
  font-size: 15px;
}

/* строки детализации */
.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 2px;
}

.calc-row-label {
  color: rgba(255, 255, 255, 0.6);
}

.calc-row-value {
  font-variant-numeric: tabular-nums;
}

/* состояния */
.calc-error {
  color: #ff6b6b;
}

.calc-loading {
  color: rgba(255, 255, 255, 0.7);
}

/* отладочный JSON */
.calc-debug {
  margin-top: 8px;
  font-size: 10px;
  background: #05070b;
  padding: 8px;
  border-radius: 10px;
  overflow-x: auto;
  opacity: 0.65;
}
/* В режиме кабинета контейнер карточек НЕ должен быть grid */
.cards-grid.cabinet-mode {
  display: block;          /* выключаем grid и его колонки */
  margin-bottom: 110px;    /* как было у .cabinet-mode */
}
/* В режиме кабинета кнопка "Показать ещё" не нужна */
.cards-grid.cabinet-mode + .show-more-container {
  display: none !important;
}
/* ===========================
   ИЗБРАННОЕ — СПИСОК-СТРОКИ
   =========================== */

.cards-grid.favorites-page {
  display: block; /* отключаем grid-раскладку лотов */
}

/* скрываем "Показать ещё" в избранном */
.cards-grid.favorites-page + .show-more-container {
  display: none !important;
}

.favorites-page-header {
  padding: 16px 10px 6px;
}

.favorites-list {
  padding: 0 10px 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.favorites-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.favorites-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.favorites-row-thumb {
  width: 70px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #10151d;
  flex-shrink: 0;
}

.favorites-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorites-row-thumb--placeholder {
  width: 100%;
  height: 100%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.favorites-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.favorites-row-title {
  font-size: 13px;
  font-weight: 600;
}

.favorites-row-status {
  font-size: 11px;
  color: var(--muted);
}

.favorites-row-price {
  font-size: 11px;
}

.favorites-row-price strong {
  font-weight: 600;
}

.favorites-row-remove {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: #f87171;
  font-size: 11px;
  cursor: pointer;
}

.favorites-row-remove:hover {
  border-color: #f87171;
}

/* пустое избранное */
.favorites-empty {
  padding: 16px 10px 110px;
  font-size: 13px;
  color: var(--muted);
}

.favorites-empty p {
  margin-top: 4px;
}
/* ------------ Админка: настройки калькулятора ------------ */

.admin-calc-section {
  margin-top: 16px;
}

.admin-calc-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.admin-calc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Карточка строки */
.admin-calc-row {
  background: radial-gradient(circle at 0 0, rgba(255, 170, 80, 0.14), rgba(12, 15, 22, 0.98));
  border-radius: 18px;
  padding: 10px 12px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Верхняя строка: страна + крестик */
.admin-calc-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-calc-row-country select.admin-calc-country {
  min-width: 70px;
}

/* Подписи полей внутри карточки */
.admin-calc-row-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-calc-row-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* Описание */
.admin-calc-label {
  width: 100%;
}

/* Нижняя строка: сумма + валюта */
.admin-calc-row-bottom {
  display: flex;
  gap: 8px;
}

.admin-calc-row-amount {
  flex: 2;
}

.admin-calc-row-currency {
  flex: 1;
}

.admin-calc-amount,
.admin-calc-currency,
.admin-calc-country,
.admin-calc-label {
  border-radius: 10px;
}

/* Кнопка удаления */
.admin-calc-remove {
  border: none;
  outline: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.admin-calc-remove:hover {
  background: rgba(255, 99, 71, 0.9);
  transform: translateY(-1px);
}

.admin-calc-remove:active {
  transform: translateY(0);
}
/* Контейнер вкладок */
.admin-calc-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 20px 0;
}

/* Обычная вкладка */
.admin-calc-tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 15px;
    background: #1e1e1e;            /* фон как у карточек */
    color: #c9c9c9;
    border-radius: 10px;
    border: 1px solid #2d2d2d;
    cursor: pointer;
    text-align: center;
    transition: 0.2s ease;
}

/* Ховер */
.admin-calc-tab:hover {
    background: #2a2a2a;
}

/* Активная вкладка */
.admin-calc-tab--active {
    background: #4c9fff;           /* голубой, как у активных кнопок */
    color: #ffffff;
    border-color: #4c9fff;
    box-shadow: 0 0 8px rgba(76,159,255,0.4);
    font-weight: 600;
}

/* При клике */
.admin-calc-tab:active {
    transform: scale(0.97);
}
/* ===== Модалка настроек подписки ===== */

.subscribe-settings-backdrop {
    /* сам бэкдроп я частично задал инлайном в JS,
       но этот блок на случай, если инлайны захочешь убрать */
    position: fixed;
    inset: 0;
    display: none;              /* по умолчанию скрыта, JS включает flex */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.subscribe-settings-modal {
    max-width: 420px;
    width: 94%;
    background: #111;
    border-radius: 16px;
    padding: 16px 14px 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.subscribe-settings-header {
    margin-bottom: 8px;
}

.subscribe-settings-title {
    font-size: 16px;
    font-weight: 600;
}

.subscribe-settings-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
}

.subscribe-settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscribe-settings-field > span {
    font-size: 13px;
    color: #ccc;
}

.subscribe-settings-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #181818;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.subscribe-settings-select:focus {
    border-color: #2a84ff;
}

.subscribe-settings-price-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Ползунок */
#subPriceSlider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: #333;
    outline: none;
}

#subPriceSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2a84ff;
    border: 2px solid #fff;
    cursor: pointer;
    margin-top: -7px; /* чтобы центр совпадал с треком */
}

#subPriceSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2a84ff;
    border: 2px solid #fff;
    cursor: pointer;
}

#subPriceSlider::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #333;
}

.subscribe-settings-price-label {
    font-size: 13px;
    color: #eee;
}

.subscribe-settings-hint {
    font-size: 12px;
    color: #888;
}

/* Общий футер */
.subscribe-settings-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Строка кнопок */
.subscribe-settings-footer-row {
    display: flex;
    gap: 12px;
}

/* Вторая строка — одна широкая кнопка */
.subscribe-settings-footer-row.qr-row .sub-btn {
    flex: 1 1 100%;
}

/* Общий стиль кнопок */
.sub-btn {
    flex: 1 1 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

/* Отменить */
.sub-btn-cancel {
    background: #2c2c2c;
    color: white;
}

/* Сохранить */
.sub-btn-save {
    background: #007bff;
    color: white;
}

/* QR кнопка */
.sub-btn-secondary {
    background: white;
    color: black;
}



.sub-btn-ok {
    background: #2a84ff;
    color: #fff;
}

.sub-btn-ok:hover {
    background: #327fff;
}

/* На очень маленьких экранах даём чуть больше воздуха */
@media (max-width: 380px) {
    .subscribe-settings-modal {
        padding: 14px 10px 10px;
        border-radius: 14px;
    }
}
/* ======= Мои подписки — красивые карточки ======= */
.subscriptions-notify {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(255, 153, 0, 0.18), transparent 55%),
        #11151f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscriptions-notify-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subscriptions-notify-title {
    font-size: 14px;
    font-weight: 600;
}

.subscriptions-notify-desc {
    font-size: 12px;
    opacity: 0.8;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-switch-track {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
    display: inline-flex;
    align-items: center;
    padding: 3px;
    transition: background 0.18s ease-out, box-shadow 0.18s ease-out;
}

.toggle-switch-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    transform: translateX(0);
    transition: transform 0.18s ease-out, background 0.18s ease-out;
}

.toggle-switch input:checked + .toggle-switch-track {
    background: linear-gradient(90deg, #ff8a30, #ffca52);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.55);
}

.toggle-switch input:checked + .toggle-switch-track .toggle-switch-thumb {
    transform: translateX(18px);
    background: #111;
}


.subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.subscription-item {
    background: #151515;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 14px 16px;
    position: relative;
    color: #eee;
    font-size: 14px;
    line-height: 1.35;
}

.subscription-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscription-filters {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.subscription-meta {
    font-size: 13px;
    color: #bbb;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subscription-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2a2a2a;
    border: none;
    border-radius: 6px;
    color: #ccc;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.15s;
}

.subscription-delete-btn:hover {
    background: #ff3b30;
    color: #fff;
}

.subscription-delete-btn:active {
    transform: scale(0.95);
}

/* “Вернуться в кабинет” */
.cabinet-back-btn {
    margin-top: 20px;
    background: #1f1f1f;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #333;
    font-size: 14px;
    color: #ddd;
    cursor: pointer;
    transition: 0.15s;
}

.cabinet-back-btn:hover {
    background: #2c2c2c;
}
.admin-visitors .visitors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.visitor-row {
    padding: 10px 12px;
    border-radius: 12px;
    background: radial-gradient(circle at top left, #1f2937, #020617);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.visitor-main {
    max-width: 55%;
}

.visitor-name {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 4px;
}

.visitor-fullname {
    font-weight: 600;
}

.visitor-username {
    color: #60a5fa;
}

.visitor-id {
    opacity: 0.8;
    font-size: 12px;
}

.visitor-last {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.visitor-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 12px;
}

.visitor-stat-small {
    opacity: 0.9;
    text-align: right;
}

/* ---------- Админка: настройки калькулятора ---------- */

.calc-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.calc-card {
    border-radius: 20px;
    padding: 16px 16px 12px;
    background: radial-gradient(circle at top left, #353535 0, #151515 55%, #0b0b0b 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.calc-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 12px 16px;
}

@media (max-width: 768px) {
    .calc-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.calc-card-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-card-field--wide {
    grid-column: span 2;
}

.calc-card-field--switch {
    align-items: flex-start;
    justify-content: center;
}

.calc-card-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.calc-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.calc-input:focus {
    border-color: #ff8a34;
    box-shadow: 0 0 0 1px rgba(255, 138, 52, 0.6);
}

.calc-input--number {
    text-align: right;
}

/* чекбокс "Активно" */
.calc-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.calc-switch input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* кнопки вверху экрана ("Добавить строку", "Обновить", "Сохранить") */
.calc-settings-actions .subscribe-btn {
    border-radius: 999px;
    padding: 10px 18px;
    border: none;
    background: linear-gradient(90deg, #ff8a34 0%, #ffb347 100%);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, opacity 0.08s;
}

.calc-settings-actions .subscribe-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55);
}

.calc-settings-actions .subscribe-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    opacity: 0.9;
}

.calc-empty {
    padding: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}
/* ===========================
   Админка: настройки калькулятора
   =========================== */

.screen-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.screen-header p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #9fa6b2;
}

/* Вкладки "Обычный / Санкционный калькулятор" */

.admin-calc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-calc-tabs .btn-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #333842;
    background: #151821;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
        box-shadow 0.15s ease, transform 0.05s ease;
}

.admin-calc-tabs .btn-tab:hover {
    background: #1d2230;
}

.admin-calc-tabs .btn-tab.active {
    background: linear-gradient(135deg, #ff9900, #ff6b00);
    border-color: #ff9900;
    color: #0b0c10;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Подпись "Физическое лицо" */

.admin-calc-profile-label {
    margin: 8px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

/* Панель действий: Добавить / Обновить / Сохранить */

.admin-calc-actions {
    display: flex;
    gap: 8px;
    margin: 8px 0 20px;
}

.admin-calc-actions .wide {
    flex: 1;
}

/* Оранжевая кнопка */

.admin-calc-actions .btn-primary {
    padding: 10px 12px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #ff9900, #ff6b00);
    color: #0b0c10;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.05s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.admin-calc-actions .btn-primary:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
    opacity: 0.95;
}

.admin-calc-actions .btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Тёмная кнопка (Обновить) */

.admin-calc-actions .btn-secondary {
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #333842;
    background: #151821;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease,
        transform 0.05s ease, box-shadow 0.15s ease;
}

.admin-calc-actions .btn-secondary:hover {
    background: #1d2230;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.admin-calc-actions .btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Карточки строк – чуть компактнее отступы сверху */

.admin-calc-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-calc-row {
    border-radius: 24px;
    padding: 16px 16px 12px;
}

/* Подписи к полям внутри карточки */

.admin-calc-field-label {
    font-size: 12px;
    font-weight: 500;
    color: #9fa6b2;
    margin-bottom: 4px;
}

/* Чекбокс "Активно" */

.admin-calc-active-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #e5e7eb;
}

.admin-calc-active-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Кнопка "Вернуться в админку" внизу */

.screen-footer {
    margin: 20px 0 8px;
}

.screen-footer .btn-secondary {
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #333842;
    background: #151821;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease,
        transform 0.05s ease, box-shadow 0.15s ease;
}

.screen-footer .btn-secondary:hover {
    background: #1d2230;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.screen-footer .btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
/* ===========================
   Блок авторизации (веб)
   =========================== */
.auth-block {
    width: 100%;
    margin: 10px 0 14px;             /* как у .filters */
    padding: 12px 12px 14px;         /* как у .filters */

    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);

    display: flex;
    align-items: center;
}

.auth-block--hidden {
    display: none;
}

/* Внутренний контейнер содержимого */
.auth-block__inner {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

/* Текст-подсказка справа от кнопки (только десктоп) */
.auth-block__hint {
    font-size: 12px;
    color: #9ca3af;
    flex: 1 1 auto;
}

/* iframe с кнопкой Telegram */
.auth-block iframe {
    flex-shrink: 0;                  /* не сжимать кнопку */
}

/* Мобильный вид: выравниваем по фильтрам, скрываем текст */
@media (max-width: 768px) {
    .auth-block {
        margin: 8px 0 12px;          /* без боковых отступов, как у фильтров */
        padding: 10px 10px 12px;
        border-radius: 12px;
    }

    .auth-block__inner {
        gap: 8px;
    }

    .auth-block__hint {
        display: none;               /* текста на мобиле не нужно */
    }

    .auth-block iframe {
        transform: scale(0.9);
        transform-origin: left center;
    }
}
/* ===== МОДАЛКА v2 ===== */
.modal-v2 {
    background: #fff;
    width: 96%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 14px;
    position: relative;
}

/* Заголовок */
.modal-v2 .modal-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}
.modal-v2 .modal-title {
    font-size: 20px;
    font-weight: 600;
}
.modal-v2 .modal-close {
    font-size: 26px;
    cursor: pointer;
    line-height: 20px;
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-v2 {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #f3f3f3;
}
.gallery-track-v2 {
    display: flex;
    transition: transform 0.3s ease;
}
.gallery-track-v2 img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #fafafa;
}

/* Стрелки */
.gallery-prev-v2, .gallery-next-v2 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 13px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
.gallery-prev-v2 { left: 10px; }
.gallery-next-v2 { right: 10px; }

/* Счётчик */
.gallery-counter-v2 {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    padding: 4px 10px;
    color: #fff;
    border-radius: 12px;
    font-size: 13px;
}

/* ===== ЛАЙТБОКС ===== */
.lightbox-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    display: none;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.lightbox-backdrop.open {
    display: flex;
}
.lightbox-content {
    position: relative;
}
.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
}
.lightbox-prev { left: -50px; }
.lightbox-next { right: -50px; }
.lightbox-close {
    top: -50px;
    right: 0;
}
#lotModalImages {
    position: relative;
    min-height: 120px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.img-skeleton {
    width: 100px;
    height: 75px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ececec 0%, #f5f5f5 40%, #ececec 80%);
    background-size: 200% 100%;
    animation: skeleton-animation 1.2s infinite ease-in-out;
}

@keyframes skeleton-animation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.images-loading .modal-thumb {
    display: none !important;
}

/* Когда загрузились изображения — отключаем skeleton */
.loaded .img-skeleton {
    display: none !important;
}
/* ====== Модалка лота: галерея и скелетон ====== */

.modal-gallery {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.modal-gallery__item {
    flex: 0 0 auto;
    width: 140px;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #151a21;
    scroll-snap-align: start;
}

.modal-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Скелетон для картинок */
.image-skeleton {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #20252c 0px, #2b313a 40px, #20252c 80px);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Таблица характеристик чуть аккуратнее */
.details-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    font-size: 13px;
}

.details-label {
    color: #8c99aa;
    white-space: nowrap;
}

.details-value {
    color: #ffffff;
    font-weight: 500;
    text-align: right;
}
.skeleton-line {
    display: inline-block;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}
.skeleton-line {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}
/* ===== Прогрессивная загрузка изображений в модалке ===== */

.lot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition:
        opacity .25s ease-out,
        filter .25s ease-out;
}

/* Blur → самое первое состояние */
.image-loading-blur {
    filter: blur(12px);
    opacity: 0.55;
}

/* 50px preview */
.image-loading-tiny {
    filter: blur(6px);
    opacity: 0.7;
}

/* 320px preview */
.image-loading-small {
    filter: blur(3px);
    opacity: 0.85;
}

/* 1080px preview */
.image-loading-medium {
    filter: blur(1px);
    opacity: 0.95;
}

/* Full HD / оригинал */
.image-hires {
    opacity: 1;
    filter: blur(0);
}

/* На больших экранах можно слегка ужать ширину модалки */
@media (min-width: 900px) {
    #lotModal {
        max-width: 960px;
    }
}
/* Если у контейнера есть класс modal-gallery — включаем режим горизонтального скролла */
#lotModalImages.modal-gallery {
    flex-wrap: nowrap;
    overflow-x: auto;
}
/* ======= Админка: сообщения ======= */

.admin-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-messages-card {
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 153, 0, 0.12), transparent 55%),
    #11151f;
  box-shadow: 0 10px 26px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-messages-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-messages-label,
.admin-messages-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.admin-messages-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.admin-messages-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
}

.admin-messages-radio input[type="radio"] {
  accent-color: #fd6b07;
}

.admin-messages-recipient {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-messages-input,
.admin-messages-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0f141f;
  color: #ffffff;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}

.admin-messages-input::placeholder,
.admin-messages-textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.admin-messages-textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-messages-help {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.admin-messages-footer {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-messages-send-btn {
  align-self: flex-start;
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #ff8a30, #ffca52);
  color: #111;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.55);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s;
}

.admin-messages-send-btn:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.admin-messages-send-btn:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.admin-messages-status {
  font-size: 11px;
  color: rgba(144, 238, 144, 0.9);
}

.admin-messages-status-error {
  color: rgba(255, 120, 120, 0.95);
}

@media (max-width: 480px) {
  .admin-messages-card {
    padding: 14px 12px;
    border-radius: 16px;
  }
}
/* ===== Фуллскрин-оверлей для QR подписки ===== */

.qr-fullscreen-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;                /* включаем flex из JS */
  align-items: center;
  justify-content: center;
  z-index: 11000;
  padding: 16px;
}

.qr-fullscreen-container {
  max-width: min(90vw, 520px);
  max-height: min(90vh, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-fullscreen-img {
  width: 100%;
  height: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
}

.qr-fullscreen-link {
  font-size: 12px;
  color: #e5e7eb;
  word-break: break-all;
  text-align: center;
  opacity: 0.85;
}

.qr-fullscreen-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
/* ===== Экран с QR внутри backdrop подписки ===== */

/* Фон модалки */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

/* Карточка модалки */
.qr-modal-card {
    background: #1e2430;
    border-radius: 20px;
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

/* Заголовок */
.qr-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

/* Кнопка закрытия */
.qr-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

/* QR-картинка */
.qr-modal-img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    padding: 12px;
}


.qr-modal-link {
  font-size: 12px;
  color: #d1d5db;
  word-break: break-all;
  text-align: center;
}

.qr-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.qr-modal-close:hover {
  color: #f9fafb;
}
