/* ============================================================
   TankMarket — стили
   ============================================================ */

:root {
  color-scheme: dark;

  --bg-main:     #0a0a1a;
  --bg-card:     #161630;
  --bg-card-alt: #1a1a35;
  --bg-nav:      #121225;
  --border:      #333366;
  --accent:      #00e0ff;
  --accent-2:    #2563eb;

  --text:        #ffffff;
  --text-70:     rgba(255,255,255,0.7);
  --text-60:     rgba(255,255,255,0.6);
  --text-38:     rgba(255,255,255,0.38);

  --green:       #00e08a;
  --red:         #ff4d4d;
  --orange:      #ff9f43;
  --yellow:      #ffd93d;
  --amber:       #ffb302;

  --r-card:      12px;
  --r-button:    10px;
  --r-chip:      8px;

  --t-title-l:   18px;
  --t-title-m:   14px;
  --t-body:      12px;
  --t-small:     11px;
  --t-tiny:      10px;
  --t-micro:     9px;

  --nav-h:       58px;
  --content-w:   380px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-main);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: var(--t-body);
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.24); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   ЭКРАНЫ
   ============================================================ */
.screen {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen--center {
  align-items: center;
  justify-content: center;
  padding: 30px;
}

/* ============================================================
   ЗАГРУЗКА
   ============================================================ */
.loader-box { text-align: center; max-width: 320px; }

.loader-logo {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 38px;
}

.loader-title {
  font-size: 22px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}

.loader-text {
  font-size: 13px; color: var(--text-60); line-height: 1.5;
}

.spinner {
  width: 40px; height: 40px;
  margin: 20px auto 0;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.mt-16 { margin-top: 16px; }

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0; border-radius: var(--r-button);
  font-size: 13px; font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--accent-2); }
.btn--green   { background: #157347; }
.btn--red     { background: #b23a3a; }
.btn--orange  { background: #a25a1c; }
.btn--ghost   { background: var(--bg-card-alt); color: var(--text-70); }
.btn--block   { width: 100%; }
.btn--sm      { padding: 6px 12px; font-size: 11px; }

/* ============================================================
   ПРИЛОЖЕНИЕ
   ============================================================ */
.app-header { flex-shrink: 0; padding: 8px 15px 0; }

.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 15px 20px;
}

.app-content.main-screen {
  display: flex;
  flex-direction: column;
  padding: 8px 15px 20px;
}

/* ============================================================
   НИЖНЯЯ НАВИГАЦИЯ
   ============================================================ */
.bottom-nav {
  flex-shrink: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-70);
  padding: 6px 0;
  position: relative;
  transition: color 0.15s;
  user-select: none;
}

.nav-item.active { color: var(--accent); }

.nav-icon-svg {
  width: 22px; height: 22px;
  display: block;
  color: var(--text-70);
  transition: color 0.15s;
}

.nav-item.active .nav-icon-svg { color: var(--accent); }

.nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
  line-height: 1.1;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================================
   КАРТОЧКИ
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px;
  margin-bottom: 8px;
}

.card--flat { padding: 10px; }
.card--alt  { background: var(--bg-card-alt); }

/* ============================================================
   БАННЕР
   ============================================================ */
.banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 240px;
  background: var(--bg-card);
}

.banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.banner-title {
  font-size: 16px; font-weight: 600;
  color: #fff; margin-bottom: 3px;
}

.banner-subtitle {
  font-size: var(--t-small);
  color: rgba(255,255,255,0.7);
}

.banner-arrows {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 100%;
  display: flex; justify-content: space-between;
  padding: 0 4px;
  pointer-events: none;
}

.banner-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.67);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  cursor: pointer;
  pointer-events: all;
  user-select: none;
}

.banner-dots {
  display: flex; justify-content: center;
  gap: 6px; margin-top: 8px;
}

.banner-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.38);
  transition: all 0.2s;
  cursor: pointer;
}

.banner-dot.active { width: 20px; background: #fff; }

/* ============================================================
   ИГРЫ
   ============================================================ */
.main-screen .games-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 60px;
}

.games-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.games-row {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.game-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}

.game-item:active .game-circle { transform: scale(0.95); }

.game-circle img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.game-name {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text);
  text-align: center;
  max-width: 95px;
  line-height: 1.2;
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */
.text-center { text-align: center; }
.text-70 { color: var(--text-70); }
.text-60 { color: var(--text-60) !important; }
.text-38 { color: var(--text-38); }
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-yellow { color: var(--yellow) !important; }
.text-accent { color: var(--accent) !important; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 56px; opacity: 0.24;
  margin-bottom: 10px;
}

.empty-state-title {
  font-size: var(--t-title-m);
  font-weight: 600;
  color: var(--text-70);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: var(--t-small);
  color: var(--text-38);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.25s ease-out; }

/* ============================================================
   КАТАЛОГ
   ============================================================ */
.shop-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.back-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.shop-title {
  font-size: var(--t-title-l);
  font-weight: 600;
  color: var(--text);
}

.shop-count {
  font-size: var(--t-tiny);
  color: var(--text-60);
}

/* ============================================================
   ФИЛЬТРЫ — МОБИЛЬНАЯ ВЕРСИЯ (базовая, по умолчанию)
   ============================================================ */
.filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.filters-row {
  display: flex;
  gap: 6px;
}

.filter-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-label {
  font-size: var(--t-micro);
  color: var(--text-60);
  font-weight: 500;
  padding-left: 4px;
  line-height: 1;
}

/* ============================================================
   INPUT / SELECT — единый стиль
   ============================================================ */
.input,
select.input,
input.input {
  flex: 1;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--bg-card);
  background-image: none;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  color: var(--text);
  font-size: var(--t-body);
  padding: 10px 12px;
  font-family: inherit;
  outline: none;
  width: 100%;
}

select.input {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23ffffff' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select.input option {
  background: var(--bg-card);
  color: var(--text);
}

input.input[type="number"]::-webkit-outer-spin-button,
input.input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input.input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.input:focus,
select.input:focus,
input.input:focus {
  border-color: #4a4a80;
  outline: none;
}

/* Базовый (мобилка) — 1 колонка */
.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 900px) {
  /* Магазин — 3 колонки */
  .shop-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }
}

@media (min-width: 1500px) {
  .shop-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.product-card:active {
  transform: scale(0.99);
  opacity: 0.9;
}

.product-icon {
  width: 45px; height: 45px;
  border-radius: var(--r-button);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}


.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Название сверху, остальное прижато вниз */
.product-info .product-title {
  margin-bottom: auto;
}

.product-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.pc-server {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 500;
}

.pc-binding {
  color: var(--text-60);
  font-size: var(--t-tiny);
}

.pc-stats {
  color: var(--text-60);
  font-size: var(--t-tiny);
}

.product-stats {
  color: var(--text-60);
  font-size: var(--t-tiny);
}

.product-seller {
  color: var(--yellow);
  font-size: var(--t-tiny);
  margin-top: 1px;
}

.product-price {
  color: var(--green);
  font-size: var(--t-title-m);
  font-weight: 600;
  margin-top: 4px;
}

.pc-price-label {
  color: var(--green);
  font-weight: 500;
}

.product-arrow {
  color: var(--text-38);
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================================
   КАРТОЧКА ТОВАРА
   ============================================================ */
.product-header { margin-bottom: 8px; }

.product-title-l {
  font-size: var(--t-title-l);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.25;
}

.product-cat { color: var(--accent); font-size: var(--t-body); margin-bottom: 4px; }

.product-price-l {
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.product-extra {
  color: var(--text-60);
  font-size: var(--t-small);
  margin-bottom: 12px;
}

.product-desc-label {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  margin: 10px 0 4px;
}

.product-desc {
  color: var(--text-70);
  font-size: var(--t-body);
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.product-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.product-photo {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
}

.product-no-photo {
  color: var(--text-38);
  font-size: var(--t-small);
  padding: 10px;
}

.product-seller-row {
  color: var(--text-60);
  font-size: var(--t-body);
  margin-bottom: 14px;
}

.link-btn {
  background: none; border: 0;
  color: var(--accent);
  font-size: var(--t-body);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.product-actions .btn { flex: 1; }
.product-actions-wrap { margin-top: 12px; }

/* ============================================================
   ПРОФИЛЬ
   ============================================================ */
.profile-header-wrap { position: relative; }

.profile-menu-wrap {
  position: absolute;
  top: 8px; right: 8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-70);
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
}

.profile-menu-wrap:active {
  background: var(--bg-card);
  color: var(--text);
}

.profile-menu-dropdown {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-card);
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 2000;
  animation: menuFade 0.15s ease-out;
}

@keyframes menuFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 500;
  border-radius: var(--r-button);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.profile-menu-item:active { background: var(--bg-card-alt); }
.profile-menu-item svg { color: var(--text-60); flex-shrink: 0; }

.profile-menu-item--danger { color: #ff6b6b; }
.profile-menu-item--danger svg { color: #ff6b6b; }

.profile-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 8px;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 10px;
}

.profile-avatar-wrap {
  width: 120px; height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--bg-card);
  background: var(--bg-card);
  margin-bottom: 10px;
}

.profile-avatar {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: var(--t-title-l);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-rating {
  font-size: var(--t-title-m);
  color: var(--yellow);
  font-weight: 600;
}
.profile-registered {
  font-size: var(--t-tiny);
  color: var(--text-38);
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.section-title {
  font-size: var(--t-title-m);
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 8px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 8px;
}

.section-title-row .section-title {
  margin: 0;
}

.section-title-row .btn {
  flex-shrink: 0;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  gap: 10px;
}

.mini-product-title {
  flex: 1;
  color: var(--text);
  font-size: var(--t-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-product-price {
  color: var(--green);
  font-size: var(--t-body);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   ОТЗЫВЫ — компактные карточки (как Playerok)
   ============================================================ */
.review-card {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 8px;
  user-select: none;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rc-avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.rc-avatar {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.rc-avatar-letter {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.rc-author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.rc-author-wrap:active {
  opacity: 0.7;
}

.rc-author {
  color: var(--accent);
  font-size: var(--t-body);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-stars {
  font-size: 12px;
  flex-shrink: 0;
}

.rc-date {
  color: var(--text-60);
  font-size: var(--t-small);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Текст отзыва */
.review-text {
  color: var(--text-70);
  font-size: var(--t-body);
  line-height: 1.45;
  margin-bottom: 8px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Блок товара (не кликабельный) */
.rc-product {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.rc-product--clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.rc-product--clickable:active {
  opacity: 0.7;
}

.rc-product-title {
  color: var(--text);
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.rc-product-price {
  color: var(--green);
  font-size: var(--t-body);
  font-weight: 600;
}

.rc-product-price .pc-price-label {
  color: var(--green);
  font-weight: 500;
}

@media (min-width: 900px) {
  .section-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }

  .section-body.products-grid {
    grid-template-columns: 1fr;
  }

  /* Карточки товаров внутри профиля — одинаковая высота в ряду */
  .section-body .product-card {
    height: 100%;
  }

  .section-body .product-card .product-info {
    height: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   ЗАКАЗЫ
   ============================================================ */
.period-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.period-tabs::-webkit-scrollbar { display: none; }

.period-tab {
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-card);
  color: var(--text-60);
  border-radius: var(--r-button);
  font-size: var(--t-tiny);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: all 0.15s;
}

.period-tab.active {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

.orders-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 12px;
}

.stat-block { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: var(--t-micro); color: var(--text-60); }
.stat-value { font-size: 13px; font-weight: 700; color: var(--text); }

.orders-list { display: flex; flex-direction: column; gap: 8px; }

.order-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.order-title-btn {
  flex: 1;
  background: none; border: 0;
  padding: 0;
  text-align: left;
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.order-num { color: var(--accent); font-size: var(--t-tiny); font-weight: 600; flex-shrink: 0; }

.order-row2 {
  display: flex;
  gap: 4px;
  font-size: var(--t-small);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.order-row3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: var(--t-small);
  font-weight: 600;
}

.order-time { color: var(--text-38); font-size: var(--t-micro); margin-top: 4px; }

.oc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--t-tiny);
  flex-wrap: wrap;
}

.oc-num {
  color: var(--accent);
  font-weight: 600;
}

.oc-time {
  color: var(--text-38);
  font-size: var(--t-micro);
  margin-top: 4px;
}

.order-arrow {
  color: var(--text-38);
  font-size: 20px;
  flex-shrink: 0;
  margin-left: 4px;
}

/* ============================================================
   ОТЗЫВ О ТОВАРЕ
   ============================================================ */
.rev-product-card {
  padding: 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 12px;
}

.rev-product-title {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  margin-bottom: 4px;
}

.rev-product-price {
  color: var(--green);
  font-size: var(--t-title-m);
  font-weight: 700;
  margin-bottom: 4px;
}

.rev-product-seller {
  color: var(--yellow);
  font-size: var(--t-tiny);
}

.rev-section {
  margin-bottom: 16px;
}

.rev-label {
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 8px;
}

.rev-stars {
  display: flex;
  gap: 8px;
  font-size: 36px;
  justify-content: center;
  padding: 8px 0;
}

.rev-star {
  color: var(--text-38);
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
  user-select: none;
}

.rev-star:active {
  transform: scale(1.15);
}

.rev-star--active {
  color: var(--yellow);
}

/* ============================================================
   OV (order_view)
   ============================================================ */
.ov-meta {
  font-size: var(--t-small);
  color: var(--text-60);
  margin-bottom: 8px;
}

.ov-people {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
  font-size: var(--t-body);
}

.ov-person {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ov-time {
  color: var(--text-38);
  font-size: var(--t-tiny);
  margin-top: 12px;
  margin-bottom: 12px;
}

/* ============================================================
   ЧАТЫ
   ============================================================ */
.chats-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-card);
  border-radius: var(--r-card);
  margin-bottom: 12px;
}

.chats-tab {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--text-60);
  font-size: var(--t-body);
  font-weight: 600;
  border-radius: var(--r-button);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.chats-tab.active {
  background: var(--accent-2);
  color: #fff;
}

.chats-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: all 0.15s;
}

.chat-item:active { transform: scale(0.99); opacity: 0.9; }

.chat-item--unread {
  background: linear-gradient(90deg, #1a2240 0%, #141a35 100%);
  border-color: #2f5fb8;
}

.chat-avatar-wrap {
  position: relative;
  width: 44px; height: 44px;
  flex-shrink: 0;
}

.chat-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-unread-dot {
  position: absolute;
  top: 0; right: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ff4d4d;
  border: 2px solid var(--bg-card);
}

.chat-info { flex: 1; min-width: 0; }

.chat-name {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item--unread .chat-name { font-weight: 700; }

.chat-last {
  color: var(--text-60);
  font-size: var(--t-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.chat-item--unread .chat-last { color: var(--text); }

.chat-time {
  color: var(--text-38);
  font-size: var(--t-micro);
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.msg-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
}

.msg-row--me { justify-content: flex-end; }
.msg-row--admin { justify-content: center; }

.msg-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  font-size: var(--t-body);
  word-wrap: break-word;
  word-break: break-word;
}

.msg-bubble--me { background: #222244; }
.msg-bubble--admin { background: #331a1a; border: 1px solid rgba(255,77,77,0.3); }

.msg-sender {
  font-size: var(--t-micro);
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--accent);
}

.msg-bubble--me .msg-sender { color: var(--text-70); }
.msg-bubble--admin .msg-sender { color: #ff6b6b; }

.msg-text { color: var(--text); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }

.msg-time {
  font-size: 9px;
  color: var(--text-38);
  text-align: right;
  margin-top: 3px;
}

.msg-ticks {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--text-38);
  letter-spacing: -1px;
  transition: color 0.2s;
}

.msg-ticks--read {
  color: var(--accent);
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border);
}

.msg-avatar:active { transform: scale(0.95); }

.msg-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.msg-avatar-letter {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  background: var(--bg-card-alt);
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-shrink: 0;
  width: 100%;
}

.chat-input { flex: 1; font-size: var(--t-body); }

.chat-send-btn,
.chat-photo-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s;
  font-family: inherit;
}

.chat-photo-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
}

.chat-send-btn:active,
.chat-photo-btn:active { transform: scale(0.95); }

.chat-photo {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 4px;
  display: block;
  cursor: pointer;
}

.global-chat {
  flex: 1;
  overflow-y: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.msg-highlight {
  background: rgba(255, 217, 61, 0.35);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

/* ============================================================
   ЗАКРЕПЛЁННЫЕ
   ============================================================ */
.chat-pinned {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-button);
  margin-bottom: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-pinned:active { background: var(--bg-card); }

.chat-pinned-icon { font-size: 16px; flex-shrink: 0; }

.chat-pinned-body { flex: 1; min-width: 0; }

.chat-pinned-sender {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 600;
  margin-bottom: 2px;
}

.chat-pinned-text {
  color: var(--text-70);
  font-size: var(--t-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-pinned-close {
  background: transparent;
  border: 0;
  color: var(--text-60);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: inherit;
}

.chat-pinned-close:active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.chat-pinned-counter {
  color: var(--text-60);
  font-size: var(--t-tiny);
  font-weight: 600;
  flex-shrink: 0;
  padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}

.msg-pin-btn {
  background: transparent;
  border: 0;
  color: var(--text-38);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 4px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
  vertical-align: middle;
  font-family: inherit;
}

.msg-bubble:hover .msg-pin-btn { opacity: 1; }
.msg-pin-btn:active { color: var(--accent); }

/* ============================================================
   PINS MODAL
   ============================================================ */
.pins-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: photoFade 0.2s ease-out;
}

.pins-content {
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.pins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.pins-title { font-size: var(--t-title-m); font-weight: 600; color: var(--text); }

.pins-close {
  font-size: 26px;
  color: var(--text-60);
  background: none;
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.pins-close:active { background: rgba(255,255,255,0.1); }

.pins-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pins-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-button);
  cursor: pointer;
  transition: background 0.15s;
}

.pins-item:active { background: var(--bg-card-alt); }

.pins-item-body { flex: 1; min-width: 0; }

.pins-item-sender {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 600;
  margin-bottom: 3px;
}

.pins-item-text {
  color: var(--text-70);
  font-size: var(--t-body);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.pins-item-unpin {
  background: transparent;
  border: 0;
  color: var(--text-38);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: inherit;
}

.pins-item-unpin:active {
  color: var(--red);
  background: rgba(255,77,77,0.1);
}

/* ============================================================
   QUICK REPLIES
   ============================================================ */
.chat-quick-replies {
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  margin-bottom: 6px;
  flex-shrink: 0;
  animation: fadeIn 0.15s ease-out;
}

.quick-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}

.quick-item:last-child { border-bottom: 0; }
.quick-item:active { background: var(--bg-card-alt); }

.quick-trigger {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 700;
  margin-bottom: 2px;
}

.quick-text {
  color: var(--text-70);
  font-size: var(--t-small);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   QUICK REPLIES — экран
   ============================================================ */
.qr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

.qr-item-body { flex: 1; min-width: 0; }

.qr-item-trigger {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 700;
  margin-bottom: 3px;
}

.qr-item-text {
  color: var(--text-70);
  font-size: var(--t-small);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.qr-item-edit,
.qr-item-delete {
  background: transparent;
  border: 0;
  color: var(--text-60);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.qr-item-edit:active { background: rgba(255,255,255,0.08); color: var(--accent); }
.qr-item-delete:active { background: rgba(255,77,77,0.1); color: var(--red); }

.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 3300;
  display: flex;
  align-items: flex-end;
  animation: photoFade 0.2s ease-out;
}

.qr-modal-content {
  width: 100%;
  max-height: 90vh;
  background: var(--bg-main);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  animation: emojiSlideUp 0.25s ease-out;
}

.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.qr-modal-title { font-size: var(--t-title-m); font-weight: 600; color: var(--text); }

.qr-modal-close {
  font-size: 26px;
  color: var(--text-60);
  background: none;
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.qr-modal-close:active { background: rgba(255,255,255,0.1); }

.qr-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.qr-label {
  display: block;
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 6px;
}

.qr-modal-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.qr-modal-actions .btn { flex: 1; padding: 12px 16px; }

/* ============================================================
   ПОДДЕРЖКА
   ============================================================ */
.ticket-card {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ticket-card:active { transform: scale(0.99); opacity: 0.9; }

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ticket-id { color: var(--accent); font-size: var(--t-small); font-weight: 600; }
.ticket-status { font-size: var(--t-tiny); font-weight: 600; }

.ticket-order { color: var(--yellow); font-size: var(--t-tiny); margin-bottom: 2px; }

.ticket-subject {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ticket-time { color: var(--text-38); font-size: var(--t-micro); }

.wizard-steps {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 16px;
  font-size: var(--t-micro);
}

.wizard-step {
  padding: 4px 8px;
  border-radius: var(--r-chip);
  background: var(--bg-card);
  color: var(--text-38);
}

.wizard-step.active { background: var(--accent-2); color: #fff; }
.wizard-step.done { background: #157347; color: #fff; }

.wizard-body { display: flex; flex-direction: column; gap: 10px; }

.wizard-hint {
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 4px;
}

.wizard-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: all 0.15s;
}

.wizard-cat-card:active { transform: scale(0.99); border-color: var(--accent); }

.wizard-cat-icon {
  font-size: 26px;
  width: 42px; height: 42px;
  border-radius: var(--r-button);
  background: var(--bg-card-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.wizard-cat-title { color: var(--text); font-size: var(--t-body); font-weight: 600; }
.wizard-cat-sub { color: var(--text-60); font-size: var(--t-tiny); margin-top: 2px; }

.wizard-roles { display: flex; gap: 8px; }

.wizard-role-card {
  flex: 1;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-button);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.wizard-role-card.active { background: var(--accent-2); border-color: var(--accent); color: #fff; }
.wizard-role-icon { font-size: 22px; margin-bottom: 4px; }

/* ============================================================
   НАСТРОЙКИ
   ============================================================ */
.settings-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 12px;
}

.settings-avatar-wrap {
  width: 110px; height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--bg-card);
  margin-bottom: 12px;
  background: var(--bg-card);
}

.settings-avatar {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.settings-change-avatar { padding: 10px 20px; cursor: pointer; }

.settings-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 4px 0;
  margin-bottom: 12px;
  overflow: hidden;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
}

.settings-row + .settings-row { border-top: 1px solid rgba(255,255,255,0.06); }

.settings-label { color: var(--text-60); font-size: var(--t-small); }

.settings-value {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  max-width: 60%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-action:active { background: var(--bg-card-alt); }

.settings-action-icon {
  font-size: 22px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.settings-action-text { flex: 1; min-width: 0; }

.settings-action-title { color: var(--text); font-size: var(--t-body); font-weight: 600; }
.settings-action-sub { color: var(--text-60); font-size: var(--t-tiny); margin-top: 2px; }
.settings-action-arrow { color: var(--text-38); font-size: 20px; flex-shrink: 0; }

.settings-footer {
  text-align: center;
  color: var(--text-38);
  font-size: var(--t-tiny);
  padding: 20px 0;
}

/* ============================================================
   ДОБАВЛЕНИЕ ТОВАРА
   ============================================================ */
.ap-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ap-form .filter-field {
  margin-bottom: 0;
}

.ap-form .filter-label {
  font-size: var(--t-small);
  color: var(--text-70);
  font-weight: 500;
  margin-bottom: 6px;
  padding-left: 2px;
  display: block;
  line-height: 1.2;
}

.ap-form .input,
.ap-form .ap-input {
  width: 100%;
}

.ap-form .ap-input-with-emoji {
  position: relative;
}

.ap-form .ap-input-with-emoji .ap-input {
  padding-right: 44px;
}

.ap-form .ap-input-with-emoji--textarea .ap-input {
  padding-right: 44px;
  padding-bottom: 40px;
}

.ap-form .ap-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.ap-form .ap-row:last-child { margin-bottom: 0; }

.ap-form .ap-row .input {
  flex: 1;
  min-width: 0;
}

.ap-form .ap-section {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.ap-form .ap-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.ap-input { width: 100%; }

.ap-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.ap-row { display: flex; gap: 6px; }

.ap-label {
  font-size: var(--t-small);
  color: var(--text-70);
  font-weight: 600;
  margin-bottom: 6px;
}

.ap-photos-section { margin: 12px 0; }

.ap-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ap-photo-wrap { position: relative; width: 80px; height: 80px; }

.ap-photo {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}

.ap-photo-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #b23a3a;
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
}

.ap-add-photo-btn { cursor: pointer; }

.ap-commission {
  padding: 10px 12px;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-button);
  color: var(--text-60);
  font-size: var(--t-tiny);
  margin: 8px 0 12px;
  line-height: 1.4;
}

.ap-input-with-emoji {
  position: relative;
}

.ap-input-with-emoji .ap-input {
  padding-right: 44px;
}

.ap-emoji-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-60);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.ap-emoji-btn:active { background: rgba(255,255,255,0.08); }

.ap-input-with-emoji--textarea .ap-emoji-btn {
  top: auto;
  bottom: 12px;
  transform: none;
}

/* Черновик-индикатор */
.draft-indicator {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: var(--t-small);
  font-weight: 600;
  z-index: 500;
  animation: fadeIn 0.2s ease-out;
  pointer-events: none;
}

/* ============================================================
   БОКОВОЕ МЕНЮ
   ============================================================ */
.side-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s;
}

.side-menu-backdrop.open { opacity: 1; }

.side-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 250px;
  max-width: 80vw;
  background: var(--bg-main);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.side-menu.open { transform: translateX(0); }

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.side-menu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.side-menu-close {
  font-size: 26px;
  color: var(--text-60);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  line-height: 1;
  user-select: none;
}

.side-menu-close:active { background: rgba(255,255,255,0.1); }

.side-menu-items {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 500;
  border-radius: var(--r-button);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.side-menu-item:active { background: var(--bg-card); }

.side-menu-icon-svg {
  width: 20px; height: 20px;
  display: block;
  color: var(--text-70);
  flex-shrink: 0;
  transition: color 0.15s;
}

.side-menu-item:active .side-menu-icon-svg { color: var(--accent); }

.side-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 12px;
}

/* ============================================================
   МОБИЛЬНЫЙ АДАПТИВ (< 420px и до 899px)
   ============================================================ */
@media (min-width: 420px) and (max-width: 899px) {
  .app-content, .app-header {
    max-width: var(--content-w);
    margin: 0 auto;
    width: 100%;
  }
}

/* ============================================================
   ЭМОДЗИ-ПИКЕР
   ============================================================ */
.emoji-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  animation: emojiFade 0.2s ease-out;
}

@keyframes emojiFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.emoji-picker-content {
  width: 100%;
  max-height: 50vh;
  background: var(--bg-main);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  animation: emojiSlideUp 0.25s ease-out;
}

@keyframes emojiSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.emoji-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.emoji-picker-title { font-size: var(--t-body); font-weight: 600; color: var(--text); }

.emoji-picker-close {
  font-size: 26px;
  color: var(--text-60);
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.emoji-picker-close:active { background: rgba(255,255,255,0.1); }

.emoji-picker-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  overflow-y: auto;
  max-height: calc(50vh - 60px);
}

.emoji-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}

.emoji-picker-item:active { background: rgba(255,255,255,0.1); }

/* ============================================================
   ПРОСМОТР ФОТО
   ============================================================ */
.photo-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
  animation: photoFade 0.2s ease-out;
}

@keyframes photoFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.photo-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* ============================================================
   ПРЕВЬЮ ФОТО ПЕРЕД ОТПРАВКОЙ
   ============================================================ */
.photo-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 3500;
  display: flex;
  align-items: flex-end;
  animation: photoFade 0.2s ease-out;
}

.photo-preview-content {
  width: 100%;
  max-height: 85vh;
  background: var(--bg-main);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  animation: emojiSlideUp 0.25s ease-out;
}

.photo-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.photo-preview-title { font-size: var(--t-body); font-weight: 600; color: var(--text); }

.photo-preview-close {
  font-size: 26px;
  color: var(--text-60);
  background: none;
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.photo-preview-close:active { background: rgba(255,255,255,0.1); }

.photo-preview-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.photo-preview-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.photo-preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 0;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  font-family: inherit;
}

.photo-preview-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.photo-preview-actions .btn { flex: 1; padding: 12px 16px; }

/* ============================================================
   ГРУППИРОВКА ПО ДНЯМ
   ============================================================ */
.chat-date-divider {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.chat-date-label {
  padding: 3px 10px;
  background: #1e1e3f;
  border-radius: var(--r-button);
  font-size: var(--t-tiny);
  color: var(--text-60);
}

/* ============================================================
   ФОРМА ВВОДА В ЧАТЕ
   ============================================================ */
.chat-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  min-height: 44px;
  overflow: hidden;
}

.chat-input-wrapper .chat-input {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 10px 90px 10px 14px !important;
  color: var(--text);
  font-size: var(--t-body);
  outline: none !important;
  min-height: 44px;
  font-family: inherit;
  line-height: 1.3;
}

.chat-input-wrapper .chat-input::placeholder { color: var(--text-38); }

.chat-input-icons {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
  align-items: center;
  z-index: 2;
}

.chat-input-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-70);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-input-icon:active { background: rgba(255,255,255,0.12); }

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s;
  font-family: inherit;
}

.chat-send-btn:active { transform: scale(0.92); }

.chat-input-wrapper .chat-input:-webkit-autofill,
.chat-input-wrapper .chat-input:-webkit-autofill:hover,
.chat-input-wrapper .chat-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset !important;
  -webkit-text-fill-color: var(--text) !important;
}

/* ============================================================
   ПОИСК ПО ПЕРЕПИСКЕ
   ============================================================ */
.chat-search-btn {
  background: transparent;
  border: 0;
  color: var(--text-70);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.chat-search-btn:active {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
}

.chat-search-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.chat-search-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: var(--t-body);
  padding: 6px 0;
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.chat-search-input::placeholder { color: var(--text-38); }

.chat-search-count {
  color: var(--text-60);
  font-size: var(--t-tiny);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.chat-search-close {
  background: transparent;
  border: 0;
  color: var(--text-60);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: inherit;
}

.chat-search-close:active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* ============================================================
   ЭКРАН ЧАТА / СПИСОК ЧАТОВ — фикс позиции
   ============================================================ */
.chat-screen,
.chats-screen {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  bottom: var(--nav-h);
  padding: 0 15px 6px;
  background: var(--bg-main);
  z-index: 5;
}

.chat-screen .chat-messages,
.chat-screen .global-chat,
.chats-screen .chats-list,
.chats-screen .global-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 4px;
}

.chat-screen .chat-input-row,
.chats-screen .chat-input-row {
  flex-shrink: 0;
  margin-top: 4px;
  margin-bottom: 3px;
  padding-bottom: 0;
}

.chats-screen .chats-tabs {
  flex-shrink: 0;
}

.chats-screen .chats-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   ОНБОРДИНГ
   ============================================================ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  animation: fadeIn 0.25s ease-out;
}

.onboarding-tooltip {
  position: fixed;
  max-width: 280px;
  min-width: 240px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  pointer-events: all;
  z-index: 5001;
  transform: translateY(-100%);
  animation: obAppear 0.2s ease-out;
}

@keyframes obAppear {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.onboarding-tooltip--leaving {
  animation: obLeave 0.16s ease-in forwards;
}

@keyframes obLeave {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.onboarding-tooltip-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.onboarding-tooltip-text {
  font-size: var(--t-body);
  color: var(--text-70);
  line-height: 1.45;
  margin-bottom: 12px;
}

.onboarding-tooltip-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.onboarding-skip {
  background: transparent;
  border: 0;
  color: var(--text-60);
  font-size: var(--t-small);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--r-button);
  font-family: inherit;
}

.onboarding-skip:active { background: rgba(255,255,255,0.08); color: var(--text); }

.onboarding-next {
  background: var(--accent-2);
  color: #fff;
  border: 0;
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--r-button);
  font-family: inherit;
}

.onboarding-next:active { transform: scale(0.95); }

.onboarding-progress {
  color: var(--text-38);
  font-size: var(--t-micro);
  text-align: center;
  margin-top: 10px;
}

.onboarding-highlight {
  position: relative;
  z-index: 5002 !important;
}

.onboarding-highlight::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 224, 255, 0.2), 0 0 24px rgba(0, 224, 255, 0.5);
  animation: ob-pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ob-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.1); opacity: 0.7; }
}

/* ============================================================
   ИЗБРАННОЕ — удаление
   ============================================================ */
.fav-remove-btn {
  background: transparent;
  border: 0;
  color: var(--red);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-button);
  flex-shrink: 0;
  font-family: inherit;
  font-size: var(--t-small);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.fav-remove-btn:active {
  background: rgba(255, 77, 77, 0.15);
}

/* На мобилке — крестик */
.fav-remove-btn__icon {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

.fav-remove-btn__text {
  display: none;
}

/* На ПК — текст */
@media (min-width: 900px) {
  .fav-remove-btn__icon { display: none; }
  .fav-remove-btn__text { display: inline-block; }
}

.fav-remove-btn:active {
  transform: scale(0.9);
  background: rgba(255,77,77,0.1);
}

.fav-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.fav-mini-btn {
  background: transparent;
  border: 0;
  color: var(--text-38);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.1s;
  font-family: inherit;
}

.fav-mini-btn:active { transform: scale(0.9); }
.fav-mini-btn--active { color: var(--red); }

.fav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 20px;
  color: var(--text-60);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, transform 0.1s;
  font-family: inherit;
}

.fav-btn:active { transform: scale(0.92); }
.fav-btn--active {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 77, 77, 0.1);
}

/* ============================================================
   БЕЙДЖ САЙДБАРА — круглый, всегда
   ============================================================ */
.sidebar-badge,
.side-nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
  box-sizing: border-box;
  text-align: center;
}

/* ============================================================
   DESKTOP LAYOUT (≥ 900px)
   ============================================================ */

.app-sidebar {
  display: none;
}

.app-sidebar--admin {
  display: none;
}

/* Внутри @media (min-width: 900px) .app-sidebar получает display:flex */

@media (min-width: 900px) {
  .orders-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }

  /* Нижняя навигация — скрыта */
  .bottom-nav { display: none !important; }

  /* Сайдбар */
  .app-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--bg-nav);
    border-right: 1px solid var(--border);
    z-index: 100;
    padding: 16px 8px;
    gap: 4px;
  }

  .app-sidebar-header {
    padding: 8px 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 12px;
  }

  .app-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
  }

  .app-sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 4px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-70);
    font-size: var(--t-body);
    font-weight: 500;
    border-radius: var(--r-button);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    position: relative;
  }
  /* Админ-сайдбар — стили элементов */
  .app-sidebar--admin .sidebar-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
  }

  .app-sidebar--admin .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-70);
    font-size: var(--t-body);
    font-weight: 500;
    border-radius: var(--r-button);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
  }

  .app-sidebar--admin .sidebar-item:active {
    background: rgba(255,255,255,0.06);
  }

  .app-sidebar--admin .sidebar-item.active {
    background: rgba(0, 224, 255, 0.15);
    color: var(--accent);
    font-weight: 600;
  }

  .app-sidebar-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .sidebar-item:active { background: rgba(255,255,255,0.06); }

  .sidebar-item.active {
    background: rgba(0, 224, 255, 0.15);
    color: var(--accent);
    font-weight: 600;
  }

  .sidebar-item svg { flex-shrink: 0; color: inherit; }
  .sidebar-item span:not(.sidebar-badge) { flex: 1; }

  /* Контент центрируется */
  #app-screen {
    padding-left: 240px;
  }

  .app-content,
  .app-header {
    max-width: 1100px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 32px;
    padding-right: 32px;
  }

  /* Фильтры — grid 5 колонок, 2 ряда */
  .filters {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px;
    align-items: end;
    margin-bottom: 20px !important;
  }

  .filters-row {
    display: contents !important;
  }

  .filters .filter-field {
    grid-column: span 1 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  /* Поиск — на 2 колонки */
  .filters .filter-field:has(#f-search) {
    grid-column: span 2 !important;
  }

  /* Кнопка + Добавить — на 1 колонку */
  .filters #f-add {
    grid-column: span 1 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 16px !important;
    white-space: nowrap;
    align-self: end;
  }

  .filters .input,
  .filters select.input {
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    font-size: var(--t-body) !important;
  }

  /* Магазин — 3 колонки */
  .shop-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  /* Профиль — кнопка «Написать» не растягивается */
  .profile-actions {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Пустое состояние в grid — на всю ширину */
  .shop-list > .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    padding: 40px 20px;
  }

  /* Избранное — 1 колонка по центру */
  .favorites-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }

  .favorites-list .product-card {
    width: 100%;
  }

  .favorites-list > .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    padding: 40px 20px;
    width: 100%;
  }

  /* Чат учитывает сайдбар */
  .chat-screen,
  .chats-screen {
    left: 240px !important;
    right: 0 !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Боковое меню не нужно */
  .side-menu,
  .side-menu-backdrop {
    display: none !important;
  }

  /* Общее: карточки товаров на ПК — одинаковой высоты, низ прижат */
  .product-card {
    height: 100%;
  }

  .product-card .product-info {
    height: 100%;
    justify-content: space-between;
  }
}
	
/* ============================================================
   ЧАТЫ ДЛЯ ПК — две колонки
   ============================================================ */
.chats-desktop {
  display: none;
}

@media (min-width: 900px) {
  .chats-desktop {
    display: flex;
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    bottom: 0;
    background: var(--bg-main);
    z-index: 5;
  }

  .chats-desktop-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    overflow: hidden;
  }

  .chats-desktop-tabs {
    display: flex;
    gap: 6px;
    padding: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
  }

  .chats-desktop-tab {
    flex: 1;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--text-60);
    font-size: var(--t-body);
    font-weight: 600;
    border-radius: var(--r-button);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }

  .chats-desktop-tab.active {
    background: var(--accent-2);
    color: #fff;
  }

  .chats-desktop-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .chats-desktop-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chats-desktop-main .chat-screen--embedded {
    position: static;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    min-height: 0;
    padding: 12px 20px;
    background: var(--bg-main);
    box-sizing: border-box;
  }

  .chats-desktop-main .chat-messages,
  .chats-desktop-main .global-chat {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .chat-item--active {
    background: rgba(0, 224, 255, 0.1) !important;
    border-color: var(--accent) !important;
  }
}

/* ============================================================
   БАЛАНС
   ============================================================ */
.balance-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.balance-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.balance-actions .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: var(--t-small);
}

.balance-hint {
  color: var(--text-38);
  font-size: var(--t-micro);
  margin-top: 4px;
}

/* История */
.balance-history {
  display: flex;
  flex-direction: column;
}

.bal-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bal-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px 100px;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  font-size: var(--t-small);
  align-items: center;
}

.bal-row--head {
  background: var(--bg-card-alt);
  color: var(--text-60);
  font-weight: 700;
  font-size: var(--t-tiny);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bal-dt {
  color: var(--text-60);
  font-size: var(--t-micro);
}

.bal-title {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.bal-order {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 600;
}

.bal-sum {
  text-align: right;
  font-weight: 700;
  font-family: monospace;
}

.bal-amount-plus {
  color: var(--green);
}

.bal-amount-minus {
  color: var(--red);
}

@media (max-width: 500px) {
  .bal-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title sum"
      "dt order";
    gap: 4px;
  }
  .bal-title { grid-area: title; }
  .bal-sum { grid-area: sum; }
  .bal-dt { grid-area: dt; }
  .bal-order { grid-area: order; text-align: right; }
  .bal-row--head { display: none; }
}

/* ============================================================
   БАЛАНС
   ============================================================ */
.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.balance-label {
  color: var(--text-60);
  font-size: var(--t-small);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.balance-actions {
  display: flex;
  gap: 8px;
}

.balance-actions .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: var(--t-small);
}

/* История — таблица */
.balance-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.balance-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  align-items: center;
}

.balance-row-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bh-type {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
}

.bh-title {
  color: var(--text-70);
  font-size: var(--t-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bh-meta {
  color: var(--text-38);
  font-size: var(--t-micro);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bh-order {
  color: var(--accent);
  font-weight: 600;
}

.balance-row-amount {
  font-size: var(--t-title-m);
  font-weight: 700;
  font-family: monospace;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

.balance-row-amount.text-green {
  color: var(--green);
}

.balance-row-amount.text-red {
  color: var(--red);
}

/* ============================================================
   ЗАПРЕТ ВЫДЕЛЕНИЯ ТЕКСТА И КОПИРОВАНИЯ КАРТИНОК
   ============================================================ */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Разрешаем выделять текст в полях ввода */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Запрет перетаскивания картинок */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

/* Отключаем контекстное меню на долгое нажатие */
img,
.msg-avatar,
.chat-avatar,
.profile-avatar,
.product-photo,
.ap-photo {
  -webkit-touch-callout: none;
}

/* ============================================================
   БАЛАНС В САЙДБАРЕ
   ============================================================ */
.sidebar-balance-sum {
  margin-left: auto;
  color: var(--green);
  font-size: var(--t-small);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}


/* Сумма баланса в ⋮ меню профиля */
.profile-menu-sum {
  margin-left: auto;
  color: var(--green);
  font-size: var(--t-small);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  padding-left: 8px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
}


.balance-row--clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.balance-row--clickable:active {
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
}


/* ============================================================
   ЗАКАЗЫ (покупки/продажи) — сетка
   ============================================================ */

/* Мобилка — 1 колонка */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ПК — 2 колонки */
/* ПК — 2 колонки */
@media (min-width: 900px) {
  .orders-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
    grid-auto-rows: 1fr;
  }
  .order-card {
    padding: 12px;
    gap: 10px;
    align-items: flex-start;
    height: 100%;
  }

  .order-card .product-info {
    height: 100%;
    justify-content: space-between;
  }

  /* Заголовок + номер */
  .order-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 2px;
  }

  .order-title-btn {
    font-size: var(--t-body);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
  }

  /* Мета-строка (цена, продавец) */
  .order-row2 {
    font-size: var(--t-small);
    color: var(--text-60);
    gap: 6px;
  }

  /* Статус + кнопка */
  .order-row3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  /* Кнопка — компактнее */
  .order-row3 .btn--sm {
    padding: 6px 12px;
    font-size: var(--t-tiny);
  }

  /* Время — мелко внизу */
  .order-time {
    color: var(--text-38);
    font-size: var(--t-micro);
    margin-top: 2px;
  }
}

/* ============================================================
   АДМИН-ПАНЕЛЬ
   ============================================================ */
.admin-screen {
  width: 100%;
  min-height: 100%;
}

/* Мобильная раскладка — вертикально */
.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px;
}

.admin-sidebar-header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
}

.admin-sidebar-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}

.admin-sidebar-role {
  font-size: var(--t-tiny);
  color: var(--text-60);
}

.admin-sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-70);
  font-size: var(--t-body);
  font-weight: 500;
  border-radius: var(--r-button);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.admin-menu-item:active { background: rgba(255,255,255,0.06); }

.admin-menu-item.active {
  background: rgba(0, 224, 255, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.admin-menu-item--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-menu-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.admin-menu-title {
  flex: 1;
  min-width: 0;
}

.admin-sidebar-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.admin-exit-btn {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-exit-btn:active {
  background: rgba(255,77,77,0.1);
}

.admin-content {
  flex: 1;
  min-width: 0;
}

.admin-page-header {
  margin-bottom: 14px;
}

.admin-page-title {
  font-size: var(--t-title-l);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.admin-page-sub {
  font-size: var(--t-small);
  color: var(--text-60);
}

/* Счётчики */
.admin-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.admin-counter {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.admin-counter:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.admin-counter-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.admin-counter-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.admin-counter-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
}

/* Блоки данных */
.admin-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.admin-block-title {
  font-size: var(--t-title-m);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.admin-kv {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: var(--t-body);
  color: var(--text-60);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.admin-kv-row:last-child { border-bottom: 0; }

.admin-kv-row b {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* Модалка входа */
.admin-login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.admin-login-content {
  width: 100%;
  max-width: 400px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.admin-login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-login-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--accent);
}

.admin-login-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.admin-login-close:active { background: rgba(255,255,255,0.1); }

.admin-login-body {
  padding: 14px 16px;
}

.admin-login-label {
  display: block;
  font-size: var(--t-small);
  color: var(--text-70);
  font-weight: 600;
  margin-bottom: 8px;
}

.admin-login-roles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.admin-login-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-button);
  cursor: pointer;
  font-size: var(--t-body);
  color: var(--text-70);
  transition: all 0.15s;
}

.admin-login-radio input { display: none; }

.admin-login-radio:has(input:checked) {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--accent-2);
  color: var(--text);
}

.admin-login-radio span { flex: 1; }

.admin-login-password-wrap {
  margin-bottom: 4px;
}

.admin-login-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,77,77,0.1);
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
}

.admin-login-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.admin-login-actions .btn { flex: 1; }

/* ============================================================
   АДМИНКА НА ПК
   ============================================================ */
@media (min-width: 900px) {
  .admin-layout {
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }

  /* Админ-сайдбар на ПК — фикс. позиция слева, как у обычного */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-nav);
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: 16px 8px;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* Заголовок админки — как у обычного сайдбара */
  .admin-sidebar-header {
    padding: 8px 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 12px;
  }

  .admin-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
  }

  /* admin-mode → скрываем обычный сайдбар, показываем админский */
  #app-screen.admin-mode .app-sidebar:not(.app-sidebar--admin) {
    display: none !important;
  }

  #app-screen.admin-mode .app-sidebar--admin {
    display: flex !important;
  }

  /* Админ-меню — на всю ширину сайдбара */
  .admin-sidebar-items {
    flex: 1;
    overflow-y: auto;
    gap: 2px;
  }

  /* Футер сайдбара — прижат к низу */
  .admin-sidebar-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  /* .admin-content больше не flex-item, а основной блок с отступом */
  #app-screen.admin-mode .admin-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    margin-left: 0;
  }

  /* Сам layout — в админке не flex-row, а просто колонка без сайдбара */
  #app-screen.admin-mode .admin-layout {
    display: block;
  }

  .admin-counters {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .admin-counter {
    padding: 18px 14px;
  }

  .admin-counter-value { font-size: 26px; }
}

/* ============================================================
   АДМИНКА — РАЗДЕЛ ЮЗЕРЫ
   ============================================================ */
.admin-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-search-row .input {
  flex: 1;
  min-width: 0;
}

.admin-search-row .btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 16px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.admin-user-row:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

.admin-user-row--blocked {
  border-color: rgba(255,77,77,0.35);
  background: rgba(255,77,77,0.04);
}

.admin-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
}

.admin-user-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.admin-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-user-nick {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--t-tiny);
  color: var(--text-60);
}

.admin-user-balance {
  color: var(--green);
  font-weight: 600;
}

.admin-user-arrow {
  color: var(--text-38);
  font-size: 18px;
  flex-shrink: 0;
}

/* Бейджи ролей и блокировки */
.admin-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.admin-badge--arbiter {
  background: rgba(0, 224, 255, 0.15);
  color: var(--accent);
}

.admin-badge--moderator {
  background: rgba(37, 99, 235, 0.2);
  color: #6aa3ff;
}

.admin-badge--super {
  background: rgba(255, 217, 61, 0.15);
  color: var(--yellow);
}

.admin-badge--blocked {
  background: rgba(255, 77, 77, 0.15);
  color: var(--red);
}

/* Модалка карточки юзера */
.admin-user-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.admin-user-modal-content {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.admin-user-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.admin-user-modal-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--text);
}

.admin-user-modal-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.admin-user-modal-close:active { background: rgba(255,255,255,0.1); }

.admin-user-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.admin-user-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-user-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-card-alt);
}

.admin-user-card-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.admin-user-card-nick {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  word-break: break-word;
}

.admin-user-card-role {
  font-size: var(--t-small);
  color: var(--accent);
  font-weight: 600;
}

.admin-user-blocked-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255,77,77,0.08);
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
  line-height: 1.5;
}

.admin-user-blocked-info b { color: var(--red); }

.admin-user-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   АДМИНКА — ТИКЕТЫ
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text-60);
  font-size: var(--t-small);
  font-weight: 600;
  border-radius: var(--r-button);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}

.admin-tab.active {
  background: var(--accent-2);
  color: #fff;
}

.admin-ticket-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.admin-ticket-row:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

.admin-ticket-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-ticket-id {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--accent);
}

.admin-ticket-status {
  font-size: var(--t-tiny);
  font-weight: 600;
}

.admin-ticket-subject {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.admin-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--t-tiny);
  color: var(--text-60);
}

/* Модалка тикета */
.admin-ticket-info {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.admin-ticket-info-subject {
  color: var(--text);
  font-size: var(--t-title-m);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
  word-break: break-word;
}

.admin-ticket-desc {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
}

.admin-ticket-desc-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
  margin-bottom: 4px;
  font-weight: 600;
}

.admin-ticket-desc-text {
  font-size: var(--t-body);
  color: var(--text-70);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-ticket-messages {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  min-height: 100px;
  flex: 1;
}

.admin-ticket-warning {
  margin: 0 16px;
  padding: 10px 12px;
  background: rgba(255, 217, 61, 0.08);
  border: 1px solid rgba(255, 217, 61, 0.3);
  border-radius: var(--r-button);
  color: var(--yellow);
  font-size: var(--t-small);
  flex-shrink: 0;
}

.admin-ticket-closed {
  margin: 0 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-button);
  color: var(--text-60);
  font-size: var(--t-small);
  flex-shrink: 0;
}

.admin-ticket-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-shrink: 0;
}

.admin-ticket-input-row .input {
  flex: 1;
  min-width: 0;
}

.admin-ticket-input-row .btn {
  padding: 10px 14px;
  flex-shrink: 0;
}

.admin-ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}


/* ============================================================
   СПОРЫ — модалка открытия (в order_view)
   ============================================================ */
.dispute-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.dispute-modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.dispute-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.dispute-modal-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--orange);
}

.dispute-modal-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.dispute-modal-close:active { background: rgba(255,255,255,0.1); }

.dispute-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.dispute-modal-order {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  font-size: var(--t-body);
  margin-bottom: 12px;
  line-height: 1.4;
}

.dispute-modal-warning {
  padding: 10px 12px;
  background: rgba(255, 159, 67, 0.08);
  border: 1px solid rgba(255, 159, 67, 0.3);
  border-radius: var(--r-button);
  color: var(--orange);
  font-size: var(--t-small);
  line-height: 1.5;
  margin-bottom: 14px;
}

.dispute-modal-label {
  display: block;
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 8px;
}

.dispute-modal-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  font-size: var(--t-body);
}

.dispute-modal-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,77,77,0.1);
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
}

.dispute-modal-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.dispute-modal-actions .btn { flex: 1; }

/* ============================================================
   АДМИНКА — СПОРЫ
   ============================================================ */
.admin-dispute-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.admin-dispute-row:active {
  transform: scale(0.99);
  border-color: var(--orange);
}

.admin-dispute-section-title {
  padding: 8px 16px 4px;
  font-size: var(--t-small);
  color: var(--text-60);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.admin-dispute-old-messages {
  max-height: 25vh !important;
  background: rgba(255,255,255,0.02);
}

.admin-dispute-resolve {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}

.admin-dispute-resolve-label {
  font-size: var(--t-small);
  color: var(--text-60);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn--orange {
  background: #a25a1c;
  color: #fff;
}
/* ============================================================
   ЭКРАН СПОРА (полный)
   ============================================================ */
.admin-dispute-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

.admin-dispute-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.admin-dispute-header-info {
  flex: 1;
  min-width: 0;
}

.admin-dispute-header-title {
  font-size: var(--t-title-l);
  font-weight: 700;
  color: var(--text);
}

.admin-dispute-header-sub {
  font-size: var(--t-small);
  color: var(--text-60);
  margin-top: 2px;
}

.admin-dispute-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.admin-dispute-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-dispute-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 14px;
}

.admin-dispute-order-title {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-word;
}

.admin-dispute-order-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
}

.admin-dispute-order-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--t-small);
  line-height: 1.4;
}

.admin-dispute-reason {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255, 159, 67, 0.06);
  border: 1px solid rgba(255, 159, 67, 0.25);
  border-radius: var(--r-button);
}

.admin-dispute-reason-label {
  font-size: var(--t-tiny);
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-dispute-reason-text {
  font-size: var(--t-small);
  color: var(--text-70);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-dispute-resolved-box {
  padding: 10px 12px;
  background: rgba(0, 224, 138, 0.08);
  border: 1px solid rgba(0, 224, 138, 0.3);
  border-radius: var(--r-card);
  font-size: var(--t-small);
  color: var(--green);
  line-height: 1.5;
}

.admin-dispute-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}

.admin-dispute-messages {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-dispute-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.admin-dispute-input-row .input {
  flex: 1;
  min-width: 0;
}

.admin-dispute-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.admin-dispute-resolve {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}

.admin-dispute-resolve-label {
  font-size: var(--t-small);
  color: var(--text-60);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ПК — 2 колонки */
@media (min-width: 900px) {
  .admin-dispute-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .admin-dispute-side {
    width: 340px;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

  .admin-dispute-main {
    height: calc(100vh - 140px);
  }
}


/* ============================================================
   ВИЗАРД ПОДДЕРЖКИ — новые элементы
   ============================================================ */

/* Контекст (заказ / на кого) */
.wizard-context {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  font-size: var(--t-small);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Список заказов */
.wizard-orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.wizard-order-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.wizard-order-card:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

.wizard-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.wizard-order-num {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 700;
}

.wizard-order-status {
  font-size: var(--t-tiny);
  font-weight: 600;
}

.wizard-order-title {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 4px;
  word-break: break-word;
}

.wizard-order-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-tiny);
  color: var(--text-60);
}

/* Список target_user */
.wizard-target-group-title {
  font-size: var(--t-small);
  color: var(--text-60);
  font-weight: 600;
  margin: 12px 0 6px;
  padding-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wizard-target-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 30vh;
  overflow-y: auto;
}

.wizard-target-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.wizard-target-card:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

.wizard-target-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.wizard-target-name {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 500;
  word-break: break-word;
}

.wizard-target-empty {
  color: var(--text-38);
  font-size: var(--t-small);
  padding: 8px 0;
}

/* Чипы подкатегорий */
.wizard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wizard-chip {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.wizard-chip:active {
  transform: scale(0.97);
}

.wizard-chip--active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  font-weight: 600;
}



  /* Админ-сайдбар — всегда скрыт вне admin-mode */
  .app-sidebar--admin {
    display: none !important;
  }

  /* Внутри admin-mode — показываем */
  #app-screen.admin-mode .app-sidebar--admin {
    display: flex !important;
  }
  .app-sidebar--admin .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-70);
    font-size: var(--t-body);
    font-weight: 500;
    border-radius: var(--r-button);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
  }

  .app-sidebar--admin .sidebar-item:active { background: rgba(255,255,255,0.06); }

  .app-sidebar--admin .sidebar-item.active {
    background: rgba(0, 224, 255, 0.15);
    color: var(--accent);
    font-weight: 600;
  }

  .app-sidebar--admin .sidebar-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
  }

  .app-sidebar-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

/* Проданный товар в избранном */
.product-card--sold {
  opacity: 0.6;
  cursor: default;
}

.product-icon--sold {
  background: rgba(255, 77, 77, 0.1);
  color: var(--red);
}

/* ============================================================
   ОНЛАЙН-СТАТУС В ЧАТЕ
   ============================================================ */
.chat-status-line {
  font-size: var(--t-tiny);
  color: var(--text-60);
  margin-top: 2px;
  min-height: 14px;
  line-height: 1.2;
  transition: color 0.2s;
}

.chat-status-line--online {
  color: var(--green);
  font-weight: 600;
}

.chat-registered-line {
  font-size: 10px;
  color: var(--text-38);
  margin-top: 1px;
  line-height: 1.2;
}


/* ============================================================
   ЖАЛОБА — модалка
   ============================================================ */
.complaint-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.complaint-modal-content {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.complaint-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.complaint-modal-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--red);
}

.complaint-modal-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}

.complaint-modal-close:active { background: rgba(255,255,255,0.1); }

.complaint-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.complaint-modal-target {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  font-size: var(--t-body);
  margin-bottom: 12px;
}

.complaint-modal-label {
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 8px;
}

.complaint-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.complaint-chip {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.complaint-chip:active { transform: scale(0.97); }

.complaint-chip--active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
}

.complaint-modal-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  font-size: var(--t-body);
}

.complaint-modal-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,77,77,0.1);
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
}

.complaint-modal-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.complaint-modal-actions .btn { flex: 1; }

/* ============================================================
   АДМИНКА — КАРТОЧКА ЖАЛОБЫ
   ============================================================ */
.complaint-target-block {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
}

.complaint-target-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.complaint-target-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.complaint-target-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.complaint-target-info {
  flex: 1;
  min-width: 0;
}

.complaint-target-nick {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.complaint-target-role {
  font-size: var(--t-tiny);
  color: var(--text-60);
  margin-top: 2px;
}

.complaint-target-product {
  font-size: var(--t-body);
  color: var(--text);
}

.complaint-reason-block,
.complaint-desc-block,
.complaint-comment-block {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--r-button);
}

.complaint-reason-block {
  border-left: 3px solid var(--red);
}

.complaint-comment-block {
  background: rgba(0, 224, 255, 0.05);
  border-left: 3px solid var(--accent);
}

.complaint-reason-label,
.complaint-desc-label,
.complaint-comment-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.complaint-reason-text,
.complaint-desc-text,
.complaint-comment-text {
  font-size: var(--t-body);
  color: var(--text-70);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.complaint-action-label {
  font-size: var(--t-small);
  color: var(--text-60);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.complaint-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.complaint-resolved-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(0, 224, 138, 0.06);
  border: 1px solid rgba(0, 224, 138, 0.25);
  border-radius: var(--r-button);
  color: var(--green);
  font-size: var(--t-small);
  text-align: center;
}


/* ============================================================
   ГАРАНТИИ
   ============================================================ */
.guarantees-screen {
  display: flex;
  flex-direction: column;
}

/* Hero-блок */
.g-hero {
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: var(--r-card);
  text-align: center;
  margin-bottom: 16px;
}

.g-hero-icon {
  font-size: 48px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 20px rgba(0, 224, 255, 0.4));
}

.g-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.g-hero-text {
  font-size: var(--t-body);
  color: var(--text-70);
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.g-hero-text b { color: var(--accent); }

/* Фичи 2x2 */
.g-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .g-features {
    grid-template-columns: 1fr 1fr;
  }
}

.g-feature {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color 0.15s;
}

.g-feature:active { border-color: var(--accent); }

.g-feature-icon {
  font-size: 26px;
  margin-bottom: 8px;
  display: block;
}

.g-feature-title {
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.g-feature-text {
  font-size: var(--t-small);
  color: var(--text-70);
  line-height: 1.5;
}

/* Секции */
.g-section {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  margin-bottom: 16px;
}

.g-section-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Шаги */
.g-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.g-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.g-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 224, 255, 0.15);
  border: 1px solid rgba(0, 224, 255, 0.3);
  color: var(--accent);
  font-size: var(--t-small);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.g-step-body { flex: 1; min-width: 0; }

.g-step-title {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.g-step-text {
  font-size: var(--t-small);
  color: var(--text-70);
  line-height: 1.45;
}

/* Возврат — 4 карточки */
.g-return-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .g-return-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.g-return-card {
  padding: 12px 14px;
  background: var(--bg-card-alt);
  border-radius: var(--r-button);
  border-left: 3px solid var(--accent-2);
}

.g-return-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.g-return-title {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.g-return-text {
  font-size: var(--t-tiny);
  color: var(--text-70);
  line-height: 1.45;
}

/* Статистика — 3 карточки */
.g-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .g-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.g-stat {
  padding: 16px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  text-align: center;
}

.g-stat-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.g-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.g-stat-text {
  font-size: var(--t-tiny);
  color: var(--text-60);
  line-height: 1.4;
}

/* CTA */
.g-cta {
  padding: 18px 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(0, 224, 255, 0.08) 100%);
  border: 1px solid rgba(0, 224, 255, 0.2);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.g-cta-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.g-cta-sub {
  font-size: var(--t-small);
  color: var(--text-70);
  line-height: 1.4;
}

.g-cta-actions {
  display: flex;
  gap: 8px;
}

.g-cta-actions .btn { flex: 1; }

@media (min-width: 600px) {
  .g-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .g-cta-text { flex: 1; }
  .g-cta-actions { flex: 0 0 auto; }
  .g-cta-actions .btn { flex: 0 0 auto; }
}


/* ============================================================
   АДМИНКА — НАСТРОЙКИ (тумблеры)
   ============================================================ */
.admin-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.admin-setting-row:last-child { border-bottom: 0; }

.admin-setting-info { flex: 1; min-width: 0; }

.admin-setting-title {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.admin-setting-sub {
  font-size: var(--t-tiny);
  color: var(--text-60);
  line-height: 1.4;
}

.admin-setting-status {
  margin-top: 8px;
  font-size: var(--t-small);
  color: var(--green);
  font-weight: 600;
}

/* Тумблер */
.admin-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 26px;
  transition: all 0.25s;
}

.admin-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: var(--text-60);
  border-radius: 50%;
  transition: all 0.25s;
}

.admin-switch input:checked + .admin-switch-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.admin-switch input:checked + .admin-switch-slider::before {
  transform: translateX(22px);
  background: #fff;
}

/* ============================================================
   ЗИМНЯЯ ТЕМА
   ============================================================ */

/* Новогодний градиентный фон */
body.winter-theme {
  background:
    radial-gradient(ellipse at top, rgba(20, 40, 90, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(60, 20, 80, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a1a 0%, #101535 50%, #0a0a1a 100%);
}

body.winter-theme .app-content,
body.winter-theme .screen {
  background: transparent !important;
}

/* Гирлянда сверху — с прогибом */
.tm-garland {
  position: fixed;
  top: calc(6px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 9990;
  padding: 0 6px;
  overflow: visible;
}

/* Дуга-нить */
.tm-garland::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 6px;
  right: 6px;
  height: 55px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
}

/* Лампочка */
.tm-garland-bulb {
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #ff4d4d;
  box-shadow: 0 0 10px 2px #ff4d4d;
  animation: garlandPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
  position: relative;
}

.tm-garland-bulb:nth-child(4n+1) { background: #ff4d4d; box-shadow: 0 0 10px 2px #ff4d4d; }
.tm-garland-bulb:nth-child(4n+2) { background: #ffdd33; box-shadow: 0 0 10px 2px #ffdd33; }
.tm-garland-bulb:nth-child(4n+3) { background: #4da6ff; box-shadow: 0 0 10px 2px #4da6ff; }
.tm-garland-bulb:nth-child(4n+4) { background: #2ec25a; box-shadow: 0 0 10px 2px #2ec25a; }

/* Прогиб — каждая лампочка ниже в середине */
.tm-garland-bulb:nth-child(1)  { transform: translateY(0); }
.tm-garland-bulb:nth-child(2)  { transform: translateY(4px); }
.tm-garland-bulb:nth-child(3)  { transform: translateY(9px); }
.tm-garland-bulb:nth-child(4)  { transform: translateY(15px); }
.tm-garland-bulb:nth-child(5)  { transform: translateY(20px); }
.tm-garland-bulb:nth-child(6)  { transform: translateY(24px); }
.tm-garland-bulb:nth-child(7)  { transform: translateY(27px); }
.tm-garland-bulb:nth-child(8)  { transform: translateY(29px); }
.tm-garland-bulb:nth-child(9)  { transform: translateY(30px); }
.tm-garland-bulb:nth-child(10) { transform: translateY(30px); }
.tm-garland-bulb:nth-child(11) { transform: translateY(29px); }
.tm-garland-bulb:nth-child(12) { transform: translateY(27px); }
.tm-garland-bulb:nth-child(13) { transform: translateY(24px); }
.tm-garland-bulb:nth-child(14) { transform: translateY(20px); }
.tm-garland-bulb:nth-child(15) { transform: translateY(15px); }
.tm-garland-bulb:nth-child(16) { transform: translateY(9px); }
.tm-garland-bulb:nth-child(17) { transform: translateY(4px); }
.tm-garland-bulb:nth-child(18) { transform: translateY(0); }
.tm-garland-bulb:nth-child(19) { transform: translateY(4px); }
.tm-garland-bulb:nth-child(20) { transform: translateY(9px); }

/* Ёлочные игрушки между лампочек */
.tm-garland-bulb::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  animation: ornamentPulse 2.5s ease-in-out infinite;
}

.tm-garland-bulb:nth-child(2n)::after { content: "⭐"; }
.tm-garland-bulb:nth-child(3n)::after { content: "🔔"; }
.tm-garland-bulb:nth-child(5n)::after { content: "🎄"; }
.tm-garland-bulb:nth-child(7n)::after { content: "❄️"; }

@keyframes ornamentPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.15); }
}

@keyframes garlandPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Ёлка — прозрачнее */
.tm-xmas-tree {
  position: fixed;
  bottom: 70px;
  right: 16px;
  pointer-events: none;
  z-index: 9989;
  opacity: 0.45;
  filter: drop-shadow(0 0 10px rgba(46, 194, 90, 0.4));
  animation: treeGlow 3s ease-in-out infinite;
  transition: opacity 0.3s;
  transform: scale(0.75);
  transform-origin: bottom right;
}

.tm-xmas-tree:hover { opacity: 0.85; }

@keyframes treeGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(46, 194, 90, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 221, 51, 0.5)); }
}

/* Отступы сверху, чтобы гирлянда не закрывала контент */
body.winter-theme .app-content {
  padding-top: 40px;
}

body.winter-theme #loader-screen,
body.winter-theme #blocked-screen {
  padding-top: 50px;
}

/* Шапка Деда Мороза над аватаркой */
.tm-santa-hat {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) rotate(-10deg);
  width: 95px;
  height: 65px;
  pointer-events: none;
  z-index: 6;
  animation: hatBounce 2.5s ease-in-out infinite;
}

@keyframes hatBounce {
  0%, 100% { transform: translateX(-50%) rotate(-10deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(-10deg) translateY(-3px); }
}

/* Иней на карточках (зимняя тема) */
body.winter-theme .product-card,
body.winter-theme .admin-block,
body.winter-theme .admin-counter,
body.winter-theme .g-feature,
body.winter-theme .g-section,
body.winter-theme .g-stat,
body.winter-theme .order-card,
body.winter-theme .review-card,
body.winter-theme .settings-block,
body.winter-theme .balance-card,
body.winter-theme .ticket-card,
body.winter-theme .chat-item {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 30%),
    linear-gradient(0deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 30%);
}

body.winter-theme .product-card::after,
body.winter-theme .order-card::after,
body.winter-theme .review-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(180, 220, 255, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 90% 90%, rgba(180, 220, 255, 0.1) 0%, transparent 25%);
  opacity: 0.8;
}

/* Гирлянда — на ПК не за сайдбаром */
@media (min-width: 900px) {
  .tm-garland {
    left: 240px;
  }
  #snow-canvas {
    left: 240px !important;
  }
}

/* ============================================================
   HALLOWEEN ТЕМА
   ============================================================ */

body.halloween-theme {
  background:
    radial-gradient(ellipse at top, rgba(50, 20, 70, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(80, 30, 10, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(60, 20, 40, 0.15) 0%, transparent 60%),
    #050308;
}

body.halloween-theme .app-content,
body.halloween-theme .screen {
  background: transparent !important;
}

/* Все карточки — тёмные, с подсветкой из центра */
body.halloween-theme .product-card,
body.halloween-theme .admin-block,
body.halloween-theme .admin-counter,
body.halloween-theme .order-card,
body.halloween-theme .review-card,
body.halloween-theme .settings-block,
body.halloween-theme .balance-card,
body.halloween-theme .ticket-card,
body.halloween-theme .chat-item,
body.halloween-theme .card {
  position: relative;
  background: #0a0710;
  border-color: rgba(255, 140, 30, 0.12);
  overflow: hidden;
  isolation: isolate;
}

/* Мягкое радиальное свечение из центра карточки */
body.halloween-theme .product-card::before,
body.halloween-theme .admin-block::before,
body.halloween-theme .admin-counter::before,
body.halloween-theme .order-card::before,
body.halloween-theme .review-card::before,
body.halloween-theme .settings-block::before,
body.halloween-theme .balance-card::before,
body.halloween-theme .ticket-card::before,
body.halloween-theme .chat-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 150, 50, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 50%, rgba(255, 100, 30, 0.08) 0%, transparent 45%);
  z-index: 0;
}

/* Текст поверх свечения */
body.halloween-theme .product-card > *,
body.halloween-theme .admin-block > *,
body.halloween-theme .admin-counter > *,
body.halloween-theme .order-card > *,
body.halloween-theme .review-card > *,
body.halloween-theme .settings-block > *,
body.halloween-theme .balance-card > *,
body.halloween-theme .ticket-card > *,
body.halloween-theme .chat-item > * {
  position: relative;
  z-index: 1;
}

/* Тыквы — свечение */
@keyframes pumpkinGlow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 140, 30, 0.6)); }
  50% { filter: drop-shadow(0 0 22px rgba(255, 180, 50, 0.9)); }
}

/* Призрак — пролёт */
@keyframes ghostFly {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { opacity: 0.75; }
  100% { transform: translateY(110vh) scale(1.1); opacity: 0; }
}

.tm-web {
  position: fixed;
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 9987;
  opacity: 0.85;
  transition: top 0.5s ease-in-out, bottom 0.5s ease-in-out, opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
  filter: drop-shadow(0 0 6px rgba(200, 200, 230, 0.6));
}

.tm-web svg {
  stroke: #d8d8e8;
  stroke-opacity: 0.9;
  filter: drop-shadow(0 0 3px rgba(200, 200, 230, 0.7));
}

/* Сверху слева */
.tm-web--top[data-side="left"] {
  top: 0;
  left: 240px;
  bottom: auto;
  right: auto;
  transform: rotate(0deg);
}

/* Сверху справа */
.tm-web--top[data-side="right"] {
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  transform: rotate(90deg);
}

/* Снизу слева */
.tm-web--bottom[data-side="left"] {
  bottom: 0;
  left: 240px;
  top: auto;
  right: auto;
  transform: rotate(270deg);
}

/* Снизу справа */
.tm-web--bottom[data-side="right"] {
  bottom: 0;
  right: 0;
  top: auto;
  left: auto;
  transform: rotate(180deg);
}

/* Спрятано */
.tm-web--hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* Мобилка — паутина только в профиле, по углам, средняя */
@media (max-width: 899px) {
  .tm-web {
    width: 110px;
    height: 110px;
  }
  .tm-web--top[data-side="left"] {
    top: 0;
    left: 0;
  }
  .tm-web--top[data-side="right"] {
    top: 0;
    right: 0;
  }
}

/* Иней → свечи (оранжевое свечение) */
body.halloween-theme .product-card,
body.halloween-theme .admin-block,
body.halloween-theme .admin-counter,
body.halloween-theme .order-card,
body.halloween-theme .review-card,
body.halloween-theme .settings-block,
body.halloween-theme .balance-card,
body.halloween-theme .ticket-card,
body.halloween-theme .chat-item {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(255, 140, 30, 0.06) 0%, rgba(255, 140, 30, 0) 30%);
}

body.halloween-theme .product-card::after,
body.halloween-theme .order-card::after,
body.halloween-theme .review-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 150, 50, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(180, 80, 220, 0.1) 0%, transparent 30%);
  opacity: 0.85;
}

/* На ПК — паутина/тыквы не за сайдбаром */
@media (min-width: 900px) {
  .tm-web[style*="top: 0"][style*="left: 0"] { left: 240px !important; }
}

/* ============================================================
   HALLOWEEN — свечи на нитках
   ============================================================ */
.tm-hanging-candle {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tm-candle-thread {
  width: 1px;
  background: linear-gradient(180deg, rgba(200, 200, 220, 0.5) 0%, rgba(200, 200, 220, 0.15) 100%);
}

.tm-candle-body {
  position: relative;
  width: 10px;
  height: 34px;
  background: linear-gradient(180deg, #fef2d0 0%, #e8c980 40%, #d4b060 100%);
  border-radius: 3px 3px 4px 4px;
  box-shadow:
    inset -2px 0 3px rgba(0,0,0,0.2),
    0 0 12px rgba(255, 180, 60, 0.5),
    0 0 24px rgba(255, 140, 40, 0.25);
  animation: candleFlickerCSS 1.8s ease-in-out infinite;
}

.tm-candle-flame {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 12px;
  background: radial-gradient(ellipse at bottom, #ffb84d 0%, #ff8c1a 40%, transparent 90%);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  box-shadow:
    0 0 10px 2px rgba(255, 180, 60, 0.9),
    0 0 20px 4px rgba(255, 140, 40, 0.5);
  animation: flameFlicker 0.6s ease-in-out infinite alternate;
}

.tm-candle-wax {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 3px;
  background: #c8a050;
  border-radius: 2px;
}

@keyframes candleFlickerCSS {
  0%, 100% { box-shadow: inset -2px 0 3px rgba(0,0,0,0.2), 0 0 12px rgba(255, 180, 60, 0.5), 0 0 24px rgba(255, 140, 40, 0.25); }
  50% { box-shadow: inset -2px 0 3px rgba(0,0,0,0.2), 0 0 18px rgba(255, 200, 80, 0.7), 0 0 32px rgba(255, 160, 50, 0.4); }
}

@keyframes flameFlicker {
  0%   { transform: translateX(-50%) scale(1) translateY(0); opacity: 0.95; }
  50%  { transform: translateX(-50%) scale(1.1) translateY(-1px); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.95) translateY(1px); opacity: 0.85; }
}

@keyframes candleSwing {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}

/* Тыква-пасхалка — кликабельна */
/* На ПК — не залезать на сайдбар */
/* ============================================================
   АДМИНКА — ВЫБОР ТЕМЫ
   ============================================================ */
.admin-theme-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 0;
}

.admin-theme-option {
  padding: 14px 10px;
  background: var(--bg-card-alt);
  border: 2px solid transparent;
  border-radius: var(--r-card);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.admin-theme-option:hover {
  border-color: rgba(0, 224, 255, 0.3);
}

.admin-theme-option.active {
  border-color: var(--accent);
  background: rgba(0, 224, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 224, 255, 0.2);
}

.admin-theme-preview {
  font-size: 32px;
  margin-bottom: 6px;
  line-height: 1;
}

.admin-theme-preview--normal {
  filter: drop-shadow(0 0 6px rgba(180, 180, 255, 0.5));
}

.admin-theme-preview--winter {
  filter: drop-shadow(0 0 6px rgba(120, 200, 255, 0.7));
}

.admin-theme-preview--halloween {
  filter: drop-shadow(0 0 8px rgba(255, 140, 30, 0.8));
}

.admin-theme-title {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.admin-theme-sub {
  font-size: var(--t-micro);
  color: var(--text-60);
  line-height: 1.3;
}

/* Мобилка — колонка */
@media (max-width: 500px) {
  .admin-theme-picker {
    grid-template-columns: 1fr;
  }
  .admin-theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
  }
  .admin-theme-preview {
    margin-bottom: 0;
    font-size: 28px;
  }
  .admin-theme-title {
    margin-bottom: 1px;
  }
}
/* Фикс для паутины на мобилке: не должна скроллиться */
@media (max-width: 899px) {
  .tm-web {
    position: fixed !important;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
}


/* ============================================================
   HALLOWEEN — дождь, листья, ветер
   ============================================================ */
.tm-halloween-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9986;
  overflow: hidden;
}

.tm-halloween-rain-drop {
  position: absolute;
  top: -20px;
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, rgba(180, 200, 240, 0) 0%, rgba(180, 200, 240, 0.75) 100%);
  border-radius: 1px;
  animation: halloweenRainDrop linear infinite;
}

@keyframes halloweenRainDrop {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(calc(100vh + 20px)); opacity: 0; }
}

.tm-halloween-rain-splash {
  position: absolute;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(180, 200, 240, 0.65);
  animation: halloweenRainSplash 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes halloweenRainSplash {
  0%   { transform: scale(0.5); opacity: 0.95; }
  70%  { transform: scale(2.2) translateY(-10px); opacity: 0.5; }
  100% { transform: scale(0.4) translateY(-16px); opacity: 0; }
}

/* Листья */
.tm-leaf {
  position: fixed;
  pointer-events: none;
  z-index: 9985;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: leafFly linear forwards;
  will-change: transform;
}

.tm-leaf--1 {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M20 3 C8 10, 4 22, 20 37 C36 22, 32 10, 20 3 Z' fill='%23c25a1a' opacity='0.85'/><path d='M20 4 L20 36' stroke='%238a3f10' stroke-width='1' fill='none'/></svg>");
}

.tm-leaf--2 {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M20 2 L22 10 L30 8 L26 15 L34 18 L26 20 L32 26 L24 24 L20 38 L16 24 L8 26 L14 20 L6 18 L14 15 L10 8 L18 10 Z' fill='%23d67a1a' opacity='0.85'/></svg>");
}

.tm-leaf--3 {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><ellipse cx='20' cy='20' rx='9' ry='16' fill='%23d4a030' opacity='0.85'/></svg>");
}

@keyframes leafFly {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg);
    opacity: 0;
  }
  5%  { opacity: 1; }
  95% { opacity: 1; }
  100% {
    transform: translateX(calc(100vw + 100px)) translateY(var(--y-end, 0px)) rotate(var(--rotate, 720deg));
    opacity: 0;
  }
}

/* Ветер — быстрее */
.tm-leaf--wind {
  animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
}

/* Большой призрак при переходе */
.tm-big-ghost {
  filter: drop-shadow(0 0 20px rgba(200, 200, 255, 0.7));
  will-change: left, transform, opacity;
}

/* ============================================================
   СВЕТИЛЬНИК ДЖЕКА — в чатах
   ============================================================ */
.tm-jack-lantern {
  position: fixed;
  bottom: 70px; /* над нижней панелью навигации */
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 9994; /* над контентом, под дождём */
  filter: drop-shadow(0 0 20px rgba(255, 140, 30, 0.8)) drop-shadow(0 0 40px rgba(255, 100, 20, 0.5));
  animation: jackPulse 2.5s ease-in-out infinite;
}

@keyframes jackPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(255, 140, 30, 0.8)) drop-shadow(0 0 40px rgba(255, 100, 20, 0.5));
    transform: translateX(-50%) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(255, 180, 60, 1)) drop-shadow(0 0 60px rgba(255, 120, 40, 0.8));
    transform: translateX(-50%) scale(1.05);
  }
}

/* На ПК — учесть сайдбар */
@media (min-width: 900px) {
  .tm-jack-lantern {
    left: calc(50% + 120px); /* сдвиг из-за сайдбара 240px */
    bottom: 30px;
  }
}

/* Дождь поверх фонарика — капли «бьются» о светильник */
.tm-halloween-rain {
  z-index: 9995; /* выше светильника (9994) */
}

/* ============================================================
   HALLOWEEN — панели, фильтры, форма
   ============================================================ */

/* --- Нижняя навигация (мобилка) --- */
body.halloween-theme .bottom-nav {
  background: linear-gradient(180deg, #12081a 0%, #0a0510 100%);
  border-top: 1px solid rgba(255, 140, 30, 0.3);
  box-shadow: 0 -4px 20px rgba(255, 140, 30, 0.1);
}

body.halloween-theme .nav-item {
  color: rgba(220, 200, 230, 0.65);
}

body.halloween-theme .nav-item.active {
  color: #ff8c1a;
}

body.halloween-theme .nav-item.active .nav-icon-svg {
  color: #ff8c1a;
  filter: drop-shadow(0 0 8px rgba(255, 140, 30, 0.8));
}

body.halloween-theme .nav-icon-svg {
  color: rgba(220, 200, 230, 0.65);
}

body.halloween-theme .nav-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* --- Сайдбар (ПК) --- */
body.halloween-theme .app-sidebar {
  background: linear-gradient(180deg, #12081a 0%, #0a0510 100%);
  border-right: 1px solid rgba(255, 140, 30, 0.25);
  box-shadow: 4px 0 30px rgba(255, 140, 30, 0.08);
}

body.halloween-theme .app-sidebar-header {
  border-bottom: 1px solid rgba(255, 140, 30, 0.15);
}

body.halloween-theme .app-sidebar-title {
  color: #ff8c1a;
  text-shadow: 0 0 12px rgba(255, 140, 30, 0.6);
}

body.halloween-theme .sidebar-item {
  color: rgba(220, 200, 230, 0.65);
}

body.halloween-theme .sidebar-item.active {
  background: linear-gradient(90deg, rgba(255, 140, 30, 0.2) 0%, rgba(255, 140, 30, 0.05) 100%);
  color: #ff8c1a;
  box-shadow: inset 3px 0 0 #ff8c1a;
}

body.halloween-theme .sidebar-item.active svg {
  color: #ff8c1a;
  filter: drop-shadow(0 0 6px rgba(255, 140, 30, 0.9));
}

body.halloween-theme .sidebar-badge {
  background: #ff6a1a;
  box-shadow: 0 0 10px rgba(255, 100, 30, 0.8);
}

/* --- Админ-сайдбар --- */
body.halloween-theme .app-sidebar--admin {
  background: linear-gradient(180deg, #12081a 0%, #0a0510 100%);
}

body.halloween-theme .app-sidebar--admin .sidebar-item.active {
  background: linear-gradient(90deg, rgba(255, 140, 30, 0.2) 0%, rgba(255, 140, 30, 0.05) 100%);
  color: #ff8c1a;
  box-shadow: inset 3px 0 0 #ff8c1a;
}

/* --- Фильтры --- */
body.halloween-theme .filters {
  background: transparent;
}

body.halloween-theme .filter-label {
  color: rgba(255, 180, 100, 0.8);
  text-shadow: 0 0 6px rgba(255, 140, 30, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

body.halloween-theme .filters .input,
body.halloween-theme .filters select.input {
  background-color: #0f0818;
  border-color: rgba(255, 140, 30, 0.35);
  color: #ffd9b0;
  box-shadow: inset 0 0 12px rgba(255, 140, 30, 0.08);
}

body.halloween-theme .filters .input::placeholder {
  color: rgba(255, 180, 100, 0.4);
}

body.halloween-theme .filters .input:focus,
body.halloween-theme .filters select.input:focus {
  border-color: #ff8c1a;
  box-shadow:
    inset 0 0 12px rgba(255, 140, 30, 0.15),
    0 0 12px rgba(255, 140, 30, 0.4);
}

body.halloween-theme .filters #f-add {
  background: linear-gradient(135deg, #d67116 0%, #ff8c1a 100%);
  box-shadow: 0 0 16px rgba(255, 140, 30, 0.5);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

body.halloween-theme .filters #f-add:hover {
  box-shadow: 0 0 24px rgba(255, 140, 30, 0.8);
}

/* --- Форма добавления товара --- */
body.halloween-theme .ap-form .filter-label,
body.halloween-theme .ap-label,
body.halloween-theme .ap-form .filter-label {
  color: rgba(255, 180, 100, 0.9);
  text-shadow: 0 0 6px rgba(255, 140, 30, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

body.halloween-theme .ap-input,
body.halloween-theme .ap-textarea,
body.halloween-theme .input {
  background-color: #0f0818;
  border-color: rgba(255, 140, 30, 0.3);
  color: #ffd9b0;
  box-shadow: inset 0 0 10px rgba(255, 140, 30, 0.06);
}

body.halloween-theme .input::placeholder,
body.halloween-theme .ap-textarea::placeholder {
  color: rgba(255, 180, 100, 0.4);
}

body.halloween-theme .input:focus,
body.halloween-theme .ap-input:focus,
body.halloween-theme .ap-textarea:focus {
  border-color: #ff8c1a;
  box-shadow:
    inset 0 0 12px rgba(255, 140, 30, 0.15),
    0 0 12px rgba(255, 140, 30, 0.4);
}

body.halloween-theme .ap-commission {
  background: rgba(255, 140, 30, 0.08);
  border-color: rgba(255, 140, 30, 0.3);
  color: #ffb066;
}

body.halloween-theme .ap-photo,
body.halloween-theme .ap-photo-wrap {
  border-color: rgba(255, 140, 30, 0.4);
  box-shadow: 0 0 12px rgba(255, 140, 30, 0.2);
}

body.halloween-theme .ap-photo-remove {
  background: #d67116;
  box-shadow: 0 0 10px rgba(255, 140, 30, 0.6);
}

body.halloween-theme .ap-emoji-btn {
  color: #ffb066;
}

body.halloween-theme .ap-emoji-btn:active {
  background: rgba(255, 140, 30, 0.15);
}

/* --- Кнопка «Добавить» (универсальная) --- */
body.halloween-theme .btn--primary {
  background: linear-gradient(135deg, #d67116 0%, #ff8c1a 100%);
  box-shadow: 0 0 14px rgba(255, 140, 30, 0.4);
}

body.halloween-theme .btn--primary:active {
  box-shadow: 0 0 20px rgba(255, 140, 30, 0.7);
}


/* ============================================================
   HALLOWEEN — боковое меню на мобилке
   ============================================================ */
body.halloween-theme .side-menu-backdrop {
  background: rgba(10, 5, 15, 0.8);
}

body.halloween-theme .side-menu {
  background: linear-gradient(180deg, #150a1f 0%, #0a0510 100%);
  box-shadow:
    4px 0 40px rgba(255, 140, 30, 0.25),
    0 0 30px rgba(255, 140, 30, 0.1);
  border-right: 1px solid rgba(255, 140, 30, 0.3);
}

body.halloween-theme .side-menu-header {
  border-bottom: 1px solid rgba(255, 140, 30, 0.2);
  background: linear-gradient(180deg, #1a0d24 0%, #150a1f 100%);
}

body.halloween-theme .side-menu-title {
  color: #ff8c1a;
  text-shadow:
    0 0 12px rgba(255, 140, 30, 0.8),
    0 0 24px rgba(255, 100, 20, 0.5);
  letter-spacing: 1px;
}

body.halloween-theme .side-menu-close {
  color: rgba(255, 180, 100, 0.8);
}

body.halloween-theme .side-menu-close:active {
  background: rgba(255, 140, 30, 0.15);
  color: #ff8c1a;
}

body.halloween-theme .side-menu-item {
  color: rgba(230, 210, 240, 0.85);
  transition: background 0.15s, color 0.15s;
}

body.halloween-theme .side-menu-item:active {
  background: linear-gradient(90deg, rgba(255, 140, 30, 0.18) 0%, rgba(255, 140, 30, 0.05) 100%);
  color: #ff8c1a;
  box-shadow: inset 3px 0 0 #ff8c1a;
}

body.halloween-theme .side-menu-icon-svg {
  color: rgba(255, 180, 100, 0.75);
}

body.halloween-theme .side-menu-item:active .side-menu-icon-svg {
  color: #ff8c1a;
  filter: drop-shadow(0 0 6px rgba(255, 140, 30, 0.9));
}

body.halloween-theme .side-menu-divider {
  background: rgba(255, 140, 30, 0.18);
}


/* ============================================================
   SHOP: Подробные фильтры (кнопка + скрытый блок)
   ============================================================ */
.filters-found-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 4px;
  margin-top: 4px;
}

.filters-found-text {
  font-size: 14px;
  color: var(--text-secondary, #8a8aa0);
  letter-spacing: 0.2px;
}

.filters-advanced-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color, #2a2a45);
  border-radius: 8px;
  background: var(--bg-card, #161630);
  color: var(--text-secondary, #8a8aa0);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filters-advanced-btn:hover {
  border-color: var(--accent, #00e0ff);
  color: var(--accent, #00e0ff);
}

.filters-advanced-btn.is-open {
  border-color: var(--accent, #00e0ff);
  color: var(--accent, #00e0ff);
  background: rgba(0, 224, 255, 0.08);
}

.filters-advanced {
  display: block;
  animation: fadeInAdvanced 0.2s ease;
}

.filters-advanced[hidden] {
  display: none;
}

@keyframes fadeInAdvanced {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* На мобилке — кнопка чуть меньше и строка компактнее */
@media (max-width: 600px) {
  .filters-found-row {
    padding: 6px 2px 2px;
  }
  .filters-found-text {
    font-size: 13px;
  }
  .filters-advanced-btn {
    width: 32px;
    height: 32px;
  }
}

/* Подзаголовок внутри формы товара */
.ap-subsection-title {
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--text-secondary, #8a8aa0);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ============================================================
   SHOP: Подробные фильтры — сетка и секции
   ============================================================ */

/* Кнопка-ползунки в строке "Аккаунтов найдено" */
.filters-found-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 4px;
  margin-top: 4px;
}

.filters-found-text {
  font-size: 14px;
  color: var(--text-secondary, #8a8aa0);
  letter-spacing: 0.2px;
}

.filters-advanced-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color, #2a2a45);
  border-radius: 8px;
  background: var(--bg-card, #161630);
  color: var(--text-secondary, #8a8aa0);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filters-advanced-btn:hover {
  border-color: var(--accent, #00e0ff);
  color: var(--accent, #00e0ff);
}

.filters-advanced-btn.is-open {
  border-color: var(--accent, #00e0ff);
  color: var(--accent, #00e0ff);
  background: rgba(0, 224, 255, 0.08);
}

/* Раскрытый блок подробных фильтров */
.filters-advanced {
  display: block;
  margin-top: 14px;
  padding: 18px 0 6px;
  border-top: 1px solid var(--border-color, #2a2a45);
}

.filters-advanced[hidden] {
  display: none;
}

/* Заголовок секции внутри подробных фильтров */
.filters-section-title {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #8a8aa0);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.85;
}

.filters-section-title:first-child {
  margin-top: 0;
}

/* Ряды внутри подробных фильтров — сетка 4 колонки */
.filters-advanced .filters-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.filters-advanced .filter-field {
  margin: 0;
  min-width: 0;
}

.filters-advanced .filter-label {
  font-size: 12px;
  margin-bottom: 4px;
  display: block;
}

.filters-advanced .input {
  width: 100%;
  box-sizing: border-box;
}

/* Планшет (600-899): 3 колонки */
@media (min-width: 600px) and (max-width: 899px) {
  .filters-advanced .filters-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Мобилка (до 600): 2 колонки */
@media (max-width: 599px) {
  .filters-advanced {
    margin-top: 12px;
    padding: 14px 0 4px;
  }
  .filters-advanced .filters-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .filters-section-title {
    margin: 14px 0 6px;
    font-size: 11px;
  }
  .filters-advanced-btn {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   SHOP: Подробные фильтры — ФОРС (последнее слово)
   ============================================================ */
.filters-advanced .filters-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
  margin: 0 !important;
}
@media (min-width: 600px) and (max-width: 899px) {
  .filters-advanced .filters-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 599px) {
  .filters-advanced .filters-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================================
   SHOP: Подробные фильтры — на всю ширину
   ============================================================ */
@media (min-width: 900px) {
  .filters .filters-found-row,
  .filters .filters-advanced {
    grid-column: 1 / -1 !important;
  }
}

/* Лейблы в одну строку */
.filters-advanced .filter-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.2;
}

/* Чуть больше отступ между полем и лейблом */
.filters-advanced .filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ============================================================
   SHOP: ФИНАЛ — фильтры-advanced на всю ширину, поля растянуты
   ============================================================ */
@media (min-width: 900px) {
  .filters .filters-advanced {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
  .filters .filters-found-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
  .filters-advanced .filters-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .filters-advanced .filter-field {
    grid-column: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .filters-advanced .filter-label {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }
  .filters-advanced .input {
    width: 100% !important;
    box-sizing: border-box !important;
    height: 40px !important;
    padding: 8px 12px !important;
  }
}


/* ============================================================
   АДМИНКА: БАННЕРЫ
   ============================================================ */

/* Кнопка «+ Добавить баннер» */
#adm-banner-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 180px;
  padding: 10px 20px;
  margin: 0 0 14px 0;
  font-size: var(--t-body);
  font-weight: 600;
}

/* Список карточек */
.admin-banners-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Карточка баннера */
.admin-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color 0.15s;
}

.admin-banner:hover {
  border-color: var(--accent);
}

.admin-banner--inactive {
  opacity: 0.55;
}

/* Превью — маленькое */
.admin-banner-preview {
  width: 120px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
}

.admin-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Инфо-блок */
.admin-banner-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-banner-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-banner-pos {
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 700;
}

.admin-banner-title {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-banner-subtitle {
  color: var(--text-60);
  font-size: var(--t-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-banner-file {
  color: var(--text-38);
  font-size: var(--t-micro);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Кнопки действий */
.admin-banner-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

.admin-banner-actions .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Превью в модалке редактора */
.admin-banner-editor-preview {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-banner-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-banner-placeholder {
  color: var(--text-38);
  font-size: var(--t-small);
}

/* Мобилка — превью поменьше */
@media (max-width: 599px) {
  .admin-banner-preview {
    width: 80px;
    height: 48px;
  }
  .admin-banner-actions .btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 14px;
  }
}



/* ============================================================
   PRODUCT: Новая карточка товара
   ============================================================ */

/* Топбар: назад + избранное */
.product-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.product-topbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Раскладка: галерея + инфо */
.product-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

@media (min-width: 900px) {
  .product-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
  }
}

/* ============================================================
   ГАЛЕРЕЯ
   ============================================================ */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.product-gallery--empty {
  min-height: 280px;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

.product-gallery-placeholder {
  color: var(--text-38);
  font-size: var(--t-body);
  padding: 40px 20px;
}

.product-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.product-gallery-main:hover img {
  transform: scale(1.02);
}

.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.product-gallery-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.product-gallery-thumb:hover {
  border-color: var(--accent);
}

.product-gallery-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   ИНФО-КАРТОЧКА (правая колонка)
   ============================================================ */
.product-info-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

@media (max-width: 899px) {
  .product-info-card {
    padding: 14px;
  }
}

/* Бейджи */
.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--t-tiny);
  font-weight: 600;
  border-radius: 20px;
  line-height: 1;
  letter-spacing: 0.2px;
}

.badge--top {
  background: rgba(255, 217, 61, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 61, 0.3);
}

.badge--topprem {
  background: rgba(255, 159, 67, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.badge--prem {
  background: rgba(0, 224, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 224, 255, 0.3);
}

/* Заголовок */
.product-title-l {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

@media (min-width: 900px) {
  .product-title-l {
    font-size: 24px;
  }
}

/* Мета-строка (рейтинг, просмотры, дата) */
.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--t-small);
  color: var(--text-60);
}

.product-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Цена */
.product-price-block {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-price-l {
  font-size: 26px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.5px;
}

@media (min-width: 900px) {
  .product-price-l {
    font-size: 30px;
  }
}

/* Продавец */
.product-seller-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-seller-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-seller-btn {
  text-align: left;
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--accent);
  padding: 0;
}

/* Теги (сервер, привязка) */
.product-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: var(--t-tiny);
  color: var(--text-70);
  font-weight: 500;
}

/* ============================================================
   СЕТКА ХАРАКТЕРИСТИК (6 карточек)
   ============================================================ */
.product-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

@media (min-width: 600px) {
  .product-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .product-stats-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
}

.product-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color 0.15s;
}

.product-stat:hover {
  border-color: var(--accent);
}

.product-stat-icon {
  font-size: 18px;
  line-height: 1;
  opacity: 0.85;
}

.product-stat-label {
  font-size: var(--t-micro);
  color: var(--text-60);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.product-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

@media (min-width: 900px) {
  .product-stat-value {
    font-size: 18px;
  }
}

/* ============================================================
   СОСТАВ КОЛЛЕКЦИИ
   ============================================================ */
.product-section {
  margin-bottom: 18px;
}

.product-section-title {
  font-size: var(--t-title-m);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.product-collection {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.product-collection-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  min-width: 84px;
  transition: border-color 0.15s;
}

.product-collection-item:hover {
  border-color: var(--accent);
}

.product-collection-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.product-collection-label {
  font-size: var(--t-micro);
  color: var(--text-60);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.1;
}

/* ============================================================
   КНОПКИ (обновлённые)
   ============================================================ */
.product-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.product-actions .btn {
  flex: 1;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
}

/* Описание */
.product-desc {
  color: var(--text-70);
  font-size: var(--t-body);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}



/* ============================================================
   PRODUCT: фиксы v2
   ============================================================ */

/* Сердечко в топбаре — фикс размера */
.product-topbar-actions .fav-btn,
.product-topbar .fav-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  flex: 0 0 40px !important;
  font-size: 20px;
  padding: 0;
}

/* Рейтинг продавца в кнопке */
.product-seller-rating {
  color: var(--yellow);
  font-weight: 600;
  margin-left: 4px;
}

.product-seller-btn {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* Сетки статистики и ресурсов */
.product-stats-grid--stats {
  grid-template-columns: repeat(2, 1fr);
}

.product-stats-grid--resources {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .product-stats-grid--stats,
  .product-stats-grid--resources {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) {
  .product-stats-grid--stats,
  .product-stats-grid--resources {
    grid-template-columns: repeat(4, 1fr);
  }
}



/* Продавец: ник отдельно, рейтинг отдельно */
.product-seller-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product-seller-line .product-seller-btn {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--t-body);
}

.product-seller-line .product-seller-rating {
  color: var(--yellow);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
}



/* ============================================================
   АЛЬФА: ЧЕК-ЛИСТ
   ============================================================ */
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.cl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color 0.15s;
}

.cl-item:hover {
  border-color: var(--accent);
}

.cl-item--done {
  background: rgba(0, 224, 138, 0.05);
  border-color: rgba(0, 224, 138, 0.3);
}

.cl-item-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.cl-item-body { flex: 1; min-width: 0; }

.cl-item-title {
  color: var(--text);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.35;
}

.cl-item--done .cl-item-title {
  color: var(--text-60);
  text-decoration: line-through;
}

.cl-item-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  background: transparent;
  border: 2px solid var(--border);
  color: transparent;
}

.cl-item--done .cl-item-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Виджет на главной */
.alpha-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(0, 224, 255, 0.2);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s;
}

.alpha-widget:hover {
  border-color: var(--accent);
}

.alpha-widget-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.alpha-widget-body {
  flex: 1;
  min-width: 0;
}

.alpha-widget-title {
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.alpha-widget-sub {
  font-size: var(--t-small);
  color: var(--text-60);
}

.alpha-widget-arrow {
  color: var(--text-38);
  font-size: 20px;
  flex-shrink: 0;
}



/* Кнопка «Назад» в чужом профиле */
.profile-back-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 11;
}




/* Прогресс-бар чек-листа */
.cl-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-card-alt);
  border-radius: 4px;
  margin: 4px 0 14px;
  overflow: hidden;
}

.cl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}


/* Ряды подробных фильтров с явным числом колонок */
.filters-advanced .filters-row--3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 599px) {
  .filters-advanced .filters-row--3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}



/* ============================================================
   SHOP: фикс наложения лейблов в подробных фильтрах
   ============================================================ */

/* Лейблы в 2 строки — фиксированной высоты */
.filters-advanced .filter-label {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  line-height: 1.2;
  min-height: 26px;
  max-height: 26px;
  display: flex;
  align-items: flex-end;
}

/* Больше отступ между рядами */
.filters-advanced .filters-row {
  margin-bottom: 6px;
}

/* Поля — фиксированная высота */
.filters-advanced .filter-field {
  min-height: 70px;
}



/* ============================================================
   ADD_PRODUCT: секции формы (v2)
   ============================================================ */
.ap-section {
  background: rgba(22, 22, 48, 0.6);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  position: relative;
}

.ap-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.15);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Поля с лейблами */
.ap-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ap-label {
  font-size: 11px;
  color: var(--text-60);
  font-weight: 500;
  padding-left: 2px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

/* Подсекция (Техника, Ресурсы) — как маленький заголовок */
.ap-subsection-title {
  margin: 16px 0 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.3px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-subsection-title:first-child {
  margin-top: 0;
}

/* Ряд внутри секции */
.ap-section .ap-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.ap-section .ap-row:last-child {
  margin-bottom: 0;
}

/* Внутри секции filter-field без лишних отступов */
.ap-section .filter-field {
  margin-bottom: 0;
}

/* Старый filter-label внутри секций — оставляем, но делаем его как .ap-label */
.ap-section .filter-label {
  font-size: 11px;
  color: var(--text-60);
  font-weight: 500;
  padding-left: 2px;
  margin-bottom: 5px;
  display: block;
  line-height: 1.2;
}



/* Бейджи тематических баннеров */
.admin-badge--halloween {
  background: rgba(255, 140, 30, 0.15);
  color: #ff8c1a;
}

.admin-badge--winter {
  background: rgba(120, 200, 255, 0.15);
  color: #78c8ff;
}



/* ============================================================
   CHECKLIST: табы Альфа / Бета + прогресс
   ============================================================ */
.cl-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.cl-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s;
}

.cl-tab:hover {
  border-color: var(--accent);
}

.cl-tab.active {
  border-color: var(--accent);
  background: rgba(0, 224, 255, 0.06);
}

.cl-tab-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cl-tab.active .cl-tab-title {
  color: var(--accent);
}

.cl-tab-bar {
  height: 6px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
}

.cl-tab-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.4s ease;
}

.cl-tab-count {
  font-size: 11px;
  color: var(--text-60);
}

/* Прогресс внутри задания */
.cl-item-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cl-item-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
}

.cl-item-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.4s ease;
}

.cl-item-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* Виджет на главной — прогресс */
.alpha-widget-bar {
  height: 5px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.alpha-widget-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.4s ease;
}



/* ============================================================
   CHECKLIST: компактные табы, без скролла страницы
   ============================================================ */

/* Экран чек-листа — фиксированная высота, без скролла страницы */
.screen[data-screen="checklist"],
.chat-screen .checklist-screen {
  height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Список задач — единственный скроллируемый контейнер */
.cl-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 10px;
}

/* Табы — компактные */
.cl-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.cl-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s;
}

.cl-tab:hover {
  border-color: var(--accent);
}

.cl-tab.active {
  border-color: var(--accent);
  background: rgba(0, 224, 255, 0.06);
}

.cl-tab-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.cl-tab.active .cl-tab-title {
  color: var(--accent);
}

.cl-tab-bar {
  height: 4px;
  background: var(--bg-card-alt);
  border-radius: 2px;
  overflow: hidden;
}

.cl-tab-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.4s ease;
}

.cl-tab-count {
  font-size: 10px;
  color: var(--text-60);
}

/* Задание — компактнее */
.cl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.cl-item:hover {
  border-color: var(--accent);
}

.cl-item--done {
  background: rgba(0, 224, 138, 0.05);
  border-color: rgba(0, 224, 138, 0.3);
}

.cl-item-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.cl-item-body {
  flex: 1;
  min-width: 0;
}

.cl-item-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.cl-item--done .cl-item-title {
  color: var(--text-60);
  text-decoration: line-through;
}

.cl-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: transparent;
  border: 2px solid var(--border);
  color: transparent;
}

.cl-item--done .cl-item-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Подшаги (steps) */
.cl-item-steps {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cl-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-60);
}

.cl-step--done {
  color: var(--green);
}

.cl-step-icon {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  width: 14px;
}

/* Прогресс внутри задания */
.cl-item-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cl-item-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
}

.cl-item-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.4s ease;
}

.cl-item-progress-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
}


/* Кнопки действий в карточке товара — фикс размера */
.product-actions .btn {
  white-space: nowrap;
  font-size: 13px;
  padding: 12px 14px;
  min-height: 44px;
}

@media (max-width: 599px) {
  .product-actions {
    flex-direction: column;
  }
  .product-actions .btn {
    width: 100%;
  }
}



/* Рейтинг продавца в карточке товара (лента) */
.pc-seller-rating {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 600;
}


/* Профиль: группы «Мои товары» по играм */
.profile-products-group {
  margin-bottom: 16px;
}

.profile-products-group:last-child {
  margin-bottom: 0;
}

.profile-products-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-card);
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.profile-products-group-title:hover {
  border-color: var(--accent);
  background: rgba(0, 224, 255, 0.04);
}

.profile-products-group-title > span:first-child {
  flex: 1;
  color: var(--accent);
  font-size: var(--t-body);
  font-weight: 700;
}

.profile-products-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  background: rgba(0, 224, 255, 0.15);
  color: var(--accent);
  border-radius: 11px;
  font-size: var(--t-tiny);
  font-weight: 700;
}

.profile-products-group-arrow {
  color: var(--text-38);
  font-size: 18px;
  flex-shrink: 0;
}

.profile-products-group-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 900px) {
  .profile-products-group-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}




/* Профиль: фильтры отзывов */
.review-filters {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.review-filter-label {
  font-size: var(--t-tiny);
  color: var(--text-60);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 56px;
}

.review-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.review-chip {
  padding: 5px 10px;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text-70);
  font-size: var(--t-tiny);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.review-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.review-chip.active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

@media (max-width: 599px) {
  .review-filter-label {
    min-width: auto;
    width: 100%;
  }
  .review-filter-row {
    gap: 6px;
  }
}




/* ============================================================
   МОДАЛКА «СМЕНИТЬ НИК»
   ============================================================ */
.nickname-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.nickname-modal-content {
  width: 100%;
  max-width: 420px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.nickname-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.nickname-modal-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--text);
}

.nickname-modal-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nickname-modal-close:active {
  background: rgba(255, 255, 255, 0.1);
}

.nickname-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.nickname-modal-body label,
.nickname-modal-body .admin-login-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-70);
  font-size: var(--t-small);
  font-weight: 600;
}

.nickname-modal-body input {
  width: 100%;
  box-sizing: border-box;
}

.nickname-modal-body .admin-login-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: var(--r-button);
  color: var(--red);
  font-size: var(--t-small);
}

.nickname-modal-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.nickname-modal-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--t-body);
}



/* Модалка смены ника — отступы */
.nickname-info {
  margin-bottom: 14px;
  color: var(--text-70);
  font-size: var(--t-body);
}
.nickname-info b {
  color: var(--accent);
  font-weight: 700;
}
.nickname-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-60);
  font-size: var(--t-small);
  font-weight: 600;
}
.nickname-hint {
  margin-top: 10px;
  color: var(--text-38);
  font-size: var(--t-tiny);
  line-height: 1.4;
}
#nm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: var(--t-body);
}
.nickname-modal-body {
  padding: 20px 18px !important;
}



/* ============================================================
   PRODUCT CARD (в ленте): бейджи + чипы
   ============================================================ */
.pc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 2px;
}

.pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.badge--top {
  background: rgba(255, 217, 61, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 61, 0.3);
}

.badge--topprem {
  background: rgba(255, 159, 67, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.badge--prem {
  background: rgba(0, 224, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 224, 255, 0.3);
}

.badge--collection {
  background: rgba(180, 100, 255, 0.15);
  color: #b464ff;
  border: 1px solid rgba(180, 100, 255, 0.3);
}

.badge--level {
  background: rgba(120, 200, 255, 0.15);
  color: #78c8ff;
  border: 1px solid rgba(120, 200, 255, 0.3);
}

/* Чипы: сервер + привязка */
.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 2px;
}

.pc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 10px;
  color: var(--text-60);
  font-weight: 500;
  white-space: nowrap;
}



/* ============================================================
   PRODUCT CARD NEW (переработанная карточка в ленте)
   ============================================================ */
.product-card--new {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.product-card--new:hover {
  border-color: var(--accent);
}

.product-card--new:active {
  transform: scale(0.99);
}

.product-card--new .product-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.product-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-card--new .product-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.product-card--new .pc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.product-card--new .pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-card--new .pc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 10px;
  color: var(--text-60);
  font-weight: 500;
  white-space: nowrap;
}

.product-seller-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.product-seller-row .product-seller {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-seller-row .pc-seller-rating {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-card--new .pc-stats {
  color: var(--text-60);
  font-size: var(--t-tiny);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-price-row .product-price {
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.pc-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pc-actions .fav-mini-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.pc-actions .product-arrow {
  color: var(--text-38);
  font-size: 18px;
}



/* ============================================================
   PRODUCT CARD (лента) — новые элементы
   ============================================================ */

/* Бейджи и чипы */
.product-info .pc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0;
}

.product-info .pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.product-info .badge--top {
  background: rgba(255, 217, 61, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 61, 0.3);
}

.product-info .badge--topprem {
  background: rgba(255, 159, 67, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.product-info .badge--prem {
  background: rgba(0, 224, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 224, 255, 0.3);
}

.product-info .badge--collection {
  background: rgba(180, 100, 255, 0.15);
  color: #b464ff;
  border: 1px solid rgba(180, 100, 255, 0.3);
}

.product-info .badge--level {
  background: rgba(120, 200, 255, 0.15);
  color: #78c8ff;
  border: 1px solid rgba(120, 200, 255, 0.3);
}

.product-info .pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0;
}

.product-info .pc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 10px;
  color: var(--text-60);
  font-weight: 500;
  white-space: nowrap;
}

/* Продавец + рейтинг */
.product-seller-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.product-seller-row .product-seller {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-seller-row .pc-seller-rating {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Статистика */
.product-info .pc-stats {
  color: var(--text-60);
  font-size: var(--t-tiny);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* ============================================================
   PRODUCT CARD v2: продавец + отступы (фикс)
   ============================================================ */

/* Продавец — отдельный блок */
.product-card--v2 .pc-seller-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.product-card--v2 .pc-seller-name {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.product-card--v2 .pc-seller-reviews {
  color: var(--text-60);
  font-size: var(--t-tiny);
  font-weight: 500;
  white-space: nowrap;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.product-card--v2 .pc-seller-no-reviews {
  color: var(--text-38);
  font-style: italic;
}

/* Фикс отступа между продавцом и статистикой */
.product-card--v2 .pc-stats {
  margin-top: 4px !important;
  padding: 0 !important;
}

/* Убрать лишние отступы у product-info */
.product-card--v2 .product-info {
  gap: 4px !important;
}


.product-card--v2 .pc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
  gap: 8px;
}

.product-card--v2 .product-price {
  flex: 1;
  min-width: 0;
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card--v2 .pc-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}



/* ============================================================
   PRODUCT CARD v3 — финальная компактная карточка
   ============================================================ */
.product-card--v3 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.product-card--v3:hover {
  border-color: var(--accent);
}

.product-card--v3:active {
  transform: scale(0.995);
}

.product-card--v3 .product-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.product-card--v3 .product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-card--v3 .product-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Бейджи */
.product-card--v3 .pc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0;
}

.product-card--v3 .pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.product-card--v3 .badge--top {
  background: rgba(255, 217, 61, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 61, 0.3);
}

.product-card--v3 .badge--topprem {
  background: rgba(255, 159, 67, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.product-card--v3 .badge--prem {
  background: rgba(0, 224, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 224, 255, 0.3);
}

.product-card--v3 .badge--collection {
  background: rgba(180, 100, 255, 0.15);
  color: #b464ff;
  border: 1px solid rgba(180, 100, 255, 0.3);
}

.product-card--v3 .badge--level {
  background: rgba(120, 200, 255, 0.15);
  color: #78c8ff;
  border: 1px solid rgba(120, 200, 255, 0.3);
}

/* Инфо-строка (сервер + привязка) */
.product-card--v3 .pc-info-line {
  color: var(--text-60);
  font-size: var(--t-tiny);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Продавец */
.product-card--v3 .pc-seller-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.product-card--v3 .pc-seller-name {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card--v3 .pc-seller-rating {
  color: var(--yellow);
  font-size: var(--t-tiny);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Статистика */
.product-card--v3 .pc-stats {
  color: var(--text-60);
  font-size: var(--t-tiny);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Цена + действия — внизу */
.product-card--v3 .product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-card--v3 .product-price {
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .product-card--v3 .product-price {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
  }
}

.product-card--v3 .pc-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.product-card--v3 .fav-mini-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.product-card--v3 .product-arrow {
  color: var(--text-38);
  font-size: 18px;
}

/* Мобильный адаптив — компактнее */
@media (max-width: 599px) {
  .product-card--v3 {
    padding: 10px;
    gap: 10px;
  }
  .product-card--v3 .product-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .product-card--v3 .product-price {
    font-size: 16px;
  }
}



/* Продавец: нет отзывов */
.product-card--v3 .pc-seller-no-reviews {
  color: var(--text-38);
  font-style: italic;
  font-weight: 500;
}


/* Ссылка «открыть товар» в карточке заказа */
.order-product-link {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  font-size: var(--t-tiny);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px dashed rgba(0, 224, 255, 0.4);
  transition: color 0.15s;
}

.order-product-link:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}



/* Иконка товара: картинка внутри .product-icon */
.product-card--v3 .product-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}



/* Центрирование карточки товара (ПК + мобилка) */
.product-layout {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.product-header,
.product-topbar {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Статистика, ресурсы, коллекция, действия, описание — тоже центрируем */
.product-stats-grid,
.product-section,
.product-actions,
.product-desc {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}



/* Иконка в карточке заказа — фикс */
.order-card .product-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.order-card .product-icon img,
.order-card .product-icon picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.order-card .product-icon picture {
  display: block;
  width: 100%;
  height: 100%;
}



/* Иконка в карточке заказа — фикс (тыква не растягивается) */
.order-card .product-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.order-card .product-icon img,
.order-card .product-icon picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.order-card .product-icon picture {
  display: block;
  width: 100%;
  height: 100%;
}



/* Строка заказа сверху (order_view) */
.ov-order-bar {
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  font-size: var(--t-small);
  color: var(--text-70);
}



/* ============================================================
   ПРОФИЛЬ (ПК): товары и отзывы в 3 колонки, фильтры сверху
   ============================================================ */
@media (min-width: 900px) {
  /* Товары в профиле — 3 колонки */
  .profile-products-group-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  /* Карточки товаров в профиле — одинаковой высоты */
  .profile-products-group-list .product-card {
    height: 100%;
  }

  /* Отзывы — 3 колонки */
  .review-filters {
    display: flex !important;
    flex-direction: column !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .review-filtered-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  /* Фильтры отзывов — над списком (не сбоку) */
  .review-filters {
    margin-bottom: 14px !important;
  }

  .review-filter-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  /* Убираем 2-колоночный layout для фильтров + отзывов */
  .section-body.products-grid,
  .section-body {
    display: block !important;
  }

  /* Карточки отзывов — компактнее */
  .review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* Мобилка — оставляем как было (1 колонка) */
@media (max-width: 899px) {
  .profile-products-group-list {
    display: flex;
    flex-direction: column;
  }

  .review-filtered-list {
    display: flex;
    flex-direction: column;
  }
}


/* ============================================================
   ИКОНКИ ТОВАРА (picker в add_product)
   ============================================================ */
.icon-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.icon-pack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icon-pack--locked {
  opacity: 0.6;
}

.icon-pack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.icon-pack-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.icon-pack-lock {
  font-size: 10px;
  color: var(--text-38);
}

.icon-pack-hint {
  font-size: 10px;
  color: var(--text-38);
  font-style: italic;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.icon-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--bg-card-alt);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, transform 0.1s;
  overflow: hidden;
  position: relative;
}

.icon-cell:hover {
  border-color: var(--accent);
}

.icon-cell--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2);
}

.icon-cell--locked {
  cursor: not-allowed;
  opacity: 0.4;
}

.icon-cell--locked:hover {
  border-color: transparent;
}

.icon-cell-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.icon-cell-inner img,
.icon-cell-inner picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.icon-cell-inner picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}



/* ============================================================
   ИКОНКА ТОВАРА — превью + модалка
   ============================================================ */
.icon-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-button);
}

.icon-preview {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.icon-preview .icon-cell-inner {
  font-size: 30px;
}

.icon-preview .icon-cell-inner img,
.icon-preview .icon-cell-inner picture,
.icon-preview .icon-cell-inner picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.icon-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.icon-preview-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Модалка выбора */
.icon-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 3600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.icon-modal-content {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: menuFade 0.2s ease-out;
}

.icon-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.icon-modal-title {
  font-size: var(--t-title-m);
  font-weight: 700;
  color: var(--text);
}

.icon-modal-close {
  background: none;
  border: 0;
  color: var(--text-60);
  font-size: 26px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-modal-close:active {
  background: rgba(255, 255, 255, 0.1);
}

.icon-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Старые стили для icon-pack/icon-grid/icon-cell — уже есть, оставляем */



/* ============================================================
   ЧЕК-ЛИСТ: баннер награды
   ============================================================ */
.reward-banner {
  background: linear-gradient(135deg, rgba(255, 140, 30, 0.08) 0%, rgba(180, 80, 220, 0.08) 100%);
  border: 1px solid rgba(255, 140, 30, 0.3);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.reward-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 150, 50, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(180, 80, 220, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.reward-banner--completed {
  background: linear-gradient(135deg, rgba(0, 224, 138, 0.12) 0%, rgba(0, 224, 255, 0.08) 100%);
  border-color: rgba(0, 224, 138, 0.4);
}

.reward-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.reward-icon-big {
  font-size: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(255, 140, 30, 0.6));
}

.reward-header-text {
  flex: 1;
  min-width: 0;
}

.reward-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.reward-banner--completed .reward-title {
  color: var(--green);
}

.reward-sub {
  font-size: 11px;
  color: var(--text-60);
  line-height: 1.35;
}

.reward-check {
  font-size: 24px;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.reward-icons-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.reward-icon {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255, 140, 30, 0.25);
  transition: transform 0.15s;
}

.reward-icon:hover {
  transform: scale(1.05);
}

.reward-icon--locked {
  opacity: 0.35;
  filter: grayscale(0.7);
}

.reward-icon img,
.reward-icon picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reward-icon picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reward-progress-row {
  position: relative;
  z-index: 1;
}

.reward-progress-label {
  font-size: 11px;
  color: var(--text-70);
  margin-bottom: 6px;
}

.reward-progress-label b {
  color: var(--accent);
  font-weight: 700;
}

.reward-progress-bar {
  height: 8px;
  background: var(--bg-card-alt);
  border-radius: 4px;
  overflow: hidden;
}

.reward-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c1a 0%, #b450dc 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.reward-completed-hint {
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  padding: 8px 10px;
  background: rgba(0, 224, 138, 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--green);
  position: relative;
  z-index: 1;
}

@media (max-width: 599px) {
  .reward-icons-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .reward-banner {
    padding: 14px;
  }
  .reward-title {
    font-size: 13px;
  }
}



/* ============================================================
   Убираем контекстное меню на картинках (long-press)
   ============================================================ */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
  -webkit-user-drag: none;
}

a img,
img {
  -webkit-touch-callout: none !important;
}



/* ============================================================
   Защита картинок от long-press (Telegram WebView)
   ============================================================ */
.img-shield-wrapper {
  display: contents;
}
.img-shield-wrapper > img {
  pointer-events: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.img-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  pointer-events: auto;
  cursor: inherit;
}


/* ============================================================
   ПОДСКАЗКИ (ctx-hint) — фикс позиционирования
   ============================================================ */
.ctx-hint {
  position: fixed !important;
  left: 50% !important;
  bottom: calc(var(--nav-h, 58px) + 20px) !important;
  transform: translateX(-50%) translateY(20px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 16px !important;
  background: var(--bg-card, #161630) !important;
  border: 1.5px solid var(--accent, #00e0ff) !important;
  border-radius: 12px !important;
  color: var(--text, #fff) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 224, 255, 0.2) !important;
  max-width: calc(100vw - 40px) !important;
  width: auto !important;
  opacity: 0 !important;
  pointer-events: auto !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.ctx-hint--shown {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

.ctx-hint-text {
  flex: 1 !important;
  min-width: 0 !important;
  color: var(--text, #fff) !important;
}

.ctx-hint-close {
  background: transparent !important;
  border: 0 !important;
  color: var(--text-60, rgba(255,255,255,0.6)) !important;
  font-size: 16px !important;
  cursor: pointer !important;
  padding: 4px 6px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  font-family: inherit !important;
  line-height: 1 !important;
  width: 26px !important;
  height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ctx-hint-close:active {
  background: rgba(255, 255, 255, 0.1) !important;
}



/* ============================================================
   Иконка товара — фикс размера (без растяжения при переходе)
   ============================================================ */
.product-icon {
  width: 45px !important;
  height: 45px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.product-card--v3 .product-icon {
  width: 52px !important;
  height: 52px !important;
}

.product-icon picture,
.product-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  max-width: 100% !important;
}

.product-icon picture {
  display: block !important;
  overflow: hidden !important;
}



/* ============================================================
   ШКАЛА ПРОГРЕССА ЗАГРУЗКИ ФОТО
   ============================================================ */
.upload-progress {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 40px);
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease-out;
}

.upload-progress--done {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.upload-progress-text {
  color: var(--accent);
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.upload-progress-bar {
  height: 6px;
  background: var(--bg-card-alt);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--green) 100%);
  transition: width 0.3s ease;
}



/* ============================================================
   Родители картинок с img-shield — должны быть position: relative
   ============================================================ */
.product-gallery-main,
.product-gallery-thumb,
.product-icon,
.msg-bubble,
.chat-photo,
.ap-photo-wrap,
.ap-photo,
.reward-icon,
.profile-avatar-wrap,
.profile-avatar,
.settings-avatar-wrap,
.settings-avatar,
.chat-avatar,
.chat-avatar-wrap,
.msg-avatar,
.product-photo,
.review-card .rc-avatar-wrap,
.banner img {
  position: relative;
}


/* ============================================================
   НОВЫЙ ОНБОРДИНГ v2 (свайп-слайды)
   ============================================================ */
.tm-ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #0a0a1a);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 56px 24px 32px;
  opacity: 1;
  transition: opacity .25s ease;
  user-select: none;
  -webkit-user-select: none;
}
.tm-ob-overlay--hide {
  opacity: 0;
  pointer-events: none;
}
.tm-ob-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-70, #a0a0b8);
  font-size: 14px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
}
.tm-ob-skip:hover { color: var(--text, #fff); }

.tm-ob-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 360px;
  width: 100%;
  flex: 1;
  justify-content: center;
  gap: 16px;
}
.tm-ob-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--accent, #00e0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #00e0ff);
  background: rgba(0, 224, 255, 0.05);
}
.tm-ob-icon svg {
  width: 48px;
  height: 48px;
}
.tm-ob-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}
.tm-ob-image img,
.tm-ob-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 8px 24px rgba(255, 140, 40, 0.35));
}
.tm-ob-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text, #fff);
  margin: 4px 0 0;
  line-height: 1.3;
}
.tm-ob-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-70, #a0a0b8);
  margin: 0;
}

.tm-ob-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 12px;
  width: 100%;
  max-width: 360px;
}
.tm-ob-btn {
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .1s ease, background .15s ease;
}
.tm-ob-btn:active { transform: scale(0.97); }
.tm-ob-btn--back {
  background: transparent;
  color: var(--text-70, #a0a0b8);
}
.tm-ob-btn--back:hover { color: var(--text, #fff); }
.tm-ob-btn--next {
  background: var(--accent, #2f8cff);
  color: #fff;
}
.tm-ob-btn--finish {
  background: var(--green, #22c55e);
}
.tm-ob-btn-arrow {
  font-size: 18px;
  line-height: 1;
}

.tm-ob-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-bottom: 8px;
}
.tm-ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: width .2s ease, background .2s ease;
}
.tm-ob-dot--active {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

@media (min-width: 900px) {
  .tm-ob-stage { max-width: 420px; }
  .tm-ob-actions { max-width: 420px; }
  .tm-ob-icon { width: 140px; height: 140px; }
  .tm-ob-icon svg { width: 56px; height: 56px; }
  .tm-ob-image { width: 160px; height: 160px; }
  .tm-ob-title { font-size: 21px; }
  .tm-ob-text { font-size: 15px; }
}
/* ============================================================
   КОРОНА ИЗ ПЕПЛА — дневник конца XIX века
   ============================================================ */
.folio-screen {
  background-color: #2a2620;
  background-image:
    radial-gradient(ellipse at top, rgba(220, 210, 190, 0.08) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(180, 170, 150, 0.08) 28px,
      transparent 29px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.03) 0px,
      rgba(0, 0, 0, 0.03) 1px,
      transparent 1px,
      transparent 80px
    );
  color: #3a342a;
  font-family: 'Courier Prime', 'Courier New', monospace;
  min-height: 100vh;
  padding: 24px 18px 80px;
  position: relative;
}
.folio-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 250, 240, 0.04) 0%, transparent 40%);
  z-index: 0;
}

.folio-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #4a4438;
  position: relative;
  z-index: 1;
}
.folio-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: #3a342a;
}
.folio-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #d4c9a8;
  margin: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.folio-header .folio-back {
  background: transparent;
  border: 1px solid #4a4438;
  color: #d4c9a8;
  width: 36px;
  height: 36px;
  border-radius: 2px;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
}
.folio-header .folio-back:hover {
  background: rgba(212, 201, 168, 0.08);
  border-color: #d4c9a8;
}

/* Модерн (ар-нуво) разделитель */
.folio-ornament {
  text-align: center;
  color: #8a7f60;
  margin: 20px 0;
  font-size: 14px;
  letter-spacing: 4px;
}
.folio-ornament::before,
.folio-ornament::after {
  content: '───';
  color: #4a4438;
  margin: 0 8px;
}

/* Тулбар */
.folio-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.folio-btn {
  background: rgba(240, 230, 210, 0.05);
  border: 1px solid #4a4438;
  color: #d4c9a8;
  padding: 8px 16px;
  border-radius: 2px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s;
}
.folio-btn:hover {
  background: rgba(240, 230, 210, 0.1);
}
.folio-btn--active {
  background: rgba(212, 201, 168, 0.15);
  border-color: #d4c9a8;
}
.folio-btn--primary {
  background: rgba(180, 60, 50, 0.25);
  border-color: #a04030;
  color: #f0dcc0;
}
.folio-btn--primary:hover {
  background: rgba(180, 60, 50, 0.4);
}
.folio-btn--danger {
  background: rgba(120, 30, 20, 0.3);
  border-color: #6a2020;
  color: #f0c0c0;
}

/* Список сцен */
.folio-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.folio-item {
  background: rgba(240, 230, 210, 0.04);
  border: 1px solid #4a4438;
  border-left: 3px solid #8a7f60;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s, border-left-color 0.15s;
  position: relative;
}
.folio-item:hover {
  background: rgba(240, 230, 210, 0.08);
  border-left-color: #d4c9a8;
}
.folio-item-id {
  font-size: 10px;
  color: #8a7f60;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
  font-family: 'Courier Prime', 'Courier New', monospace;
}
.folio-item-title {
  font-size: 16px;
  color: #d4c9a8;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.5px;
}
.folio-item-meta {
  font-size: 11px;
  color: #8a7f60;
  margin-top: 6px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.folio-empty {
  text-align: center;
  color: #8a7f60;
  padding: 40px 20px;
  font-style: italic;
  font-family: 'Courier Prime', 'Courier New', monospace;
}

/* Редактор */
.folio-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.folio-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.folio-field label {
  font-size: 11px;
  color: #8a7f60;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Courier Prime', 'Courier New', monospace;
}
.folio-field input,
.folio-field textarea {
  background: rgba(240, 230, 210, 0.04);
  border: 1px solid #4a4438;
  color: #d4c9a8;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 2px;
  outline: none;
}
.folio-field input:focus,
.folio-field textarea:focus {
  border-color: #d4c9a8;
  background: rgba(240, 230, 210, 0.08);
}
.folio-field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}
.folio-field input[readonly] {
  opacity: 0.6;
}

.folio-image-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border: 1px solid #4a4438;
  border-radius: 2px;
  background: #1a1610;
}
.folio-image-empty {
  width: 100%;
  height: 120px;
  border: 1px dashed #4a4438;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a5040;
  font-style: italic;
  font-size: 13px;
  font-family: 'Courier Prime', 'Courier New', monospace;
}

/* Кнопки выбора в редакторе */
.folio-choice {
  display: grid;
  grid-template-columns: 1fr 140px 160px 36px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: rgba(240, 230, 210, 0.03);
  border: 1px solid #4a4438;
  border-radius: 2px;
  margin-bottom: 8px;
}
.folio-choice input {
  width: 100%;
}
.folio-choice-del {
  width: 36px;
  height: 36px;
  background: rgba(120, 30, 20, 0.3);
  border: 1px solid #6a2020;
  color: #f0c0c0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
}
.folio-choice-del:hover { background: rgba(120, 30, 20, 0.5); }

@media (max-width: 700px) {
  .folio-choice {
    grid-template-columns: 1fr;
  }
  .folio-choice-del {
    width: 100%;
  }
}

/* ПРЕВЬЮ — дневник */
.folio-preview {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px;
  background-color: #2a2620;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(180, 170, 150, 0.06) 28px,
      transparent 29px
    );
  min-height: 100vh;
  color: #d4c9a8;
}
.folio-preview-image {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border: 1px solid #4a4438;
  border-radius: 2px;
  margin-bottom: 24px;
  background: #1a1610;
  position: relative;
  z-index: 1;
}
.folio-preview-image:not([src]),
.folio-preview-image[src=""] {
  display: none;
}
.folio-scene-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #d4c9a8;
  margin: 0 0 20px;
  text-align: center;
  letter-spacing: 1.5px;
  position: relative;
  z-index: 1;
}
.folio-scene-text {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.8;
  color: #c4b998;
  margin-bottom: 28px;
  white-space: pre-wrap;
  text-align: left;
  padding: 0 4px;
  position: relative;
  z-index: 1;
}
.folio-scene-text em {
  color: #e8d8a8;
  font-style: italic;
}
.folio-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.folio-choice-btn {
  background: rgba(240, 230, 210, 0.04);
  border: 1px solid #4a4438;
  border-left: 3px solid #8a7f60;
  color: #d4c9a8;
  padding: 14px 18px;
  border-radius: 2px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-left-color 0.2s, transform 0.1s;
  position: relative;
}
.folio-choice-btn:hover {
  background: rgba(240, 230, 210, 0.1);
  border-left-color: #d4c9a8;
}
.folio-choice-btn:active {
  transform: scale(0.99);
}
.folio-choice-effects {
  display: block;
  font-size: 11px;
  color: #8a7f60;
  margin-top: 4px;
  font-style: italic;
  font-family: 'Courier Prime', 'Courier New', monospace;
}

/* ============================================================
   ПЕРЕЛИСТЫВАНИЕ СТРАНИЦЫ (плавное затухание + появление)
   ============================================================ */

/* Анимация ухода страницы (исчезновение) */
.folio-page-turn-out {
  animation: folio-page-fade-out 0.35s ease-in forwards;
  pointer-events: none;
}

@keyframes folio-page-fade-out {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Анимация появления новой страницы */
.folio-preview {
  animation: folio-page-fade-in 0.45s ease-out both;
}

@keyframes folio-page-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}


/* ============================================================
   ГОСТЕВОЙ ВХОД
   ============================================================ */
.guest-login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--bg, #0a0a1a);
}
.guest-login-box {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.guest-login-logo {
  font-size: 64px;
  margin-bottom: 16px;
}
.guest-login-title {
  font-size: 24px;
  color: var(--text, #fff);
  margin: 0 0 8px;
}
.guest-login-sub {
  font-size: 14px;
  color: var(--text-70, #a0a0b8);
  margin: 0 0 24px;
  line-height: 1.5;
}
.guest-login-sub code {
  color: var(--accent, #00e0ff);
  font-family: monospace;
  background: rgba(0, 224, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.guest-login-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 20px;
  font-family: monospace;
  text-align: center;
  letter-spacing: 2px;
  background: #1a1a2e;
  border: 2px solid #2a2a44;
  border-radius: 8px;
  color: var(--text, #fff);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.guest-login-input:focus {
  border-color: var(--accent, #00e0ff);
}
.guest-login-error {
  color: #ff5577;
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 85, 119, 0.1);
  border-radius: 6px;
}
.guest-login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: var(--accent, #00e0ff);
  color: #0a0a1a;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.guest-login-btn:hover { opacity: 0.9; }
.guest-login-btn:disabled { opacity: 0.5; cursor: default; }
.guest-login-btn--secondary {
  background: transparent;
  color: var(--text-70, #a0a0b8);
  border: 1px solid #2a2a44;
}
.guest-login-btn--secondary:hover {
  color: var(--text, #fff);
  border-color: var(--accent, #00e0ff);
}
.guest-login-divider {
  color: var(--text-38, #666);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 4px;
}

/* Модалка ожидания привязки Telegram */
.link-wait-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 10, 26, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.link-wait-box {
  background: #161630;
  border: 1px solid #2a2a44;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
}
.link-wait-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #2a2a44;
  border-top-color: var(--accent, #00e0ff);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: link-spin 1s linear infinite;
}
@keyframes link-spin {
  to { transform: rotate(360deg); }
}
.link-wait-title {
  font-size: 18px;
  color: var(--text, #fff);
  font-weight: 600;
  margin-bottom: 8px;
}
.link-wait-text {
  font-size: 14px;
  color: var(--text-70, #a0a0b8);
  line-height: 1.5;
  margin-bottom: 20px;
}
.link-wait-cancel {
  background: transparent;
  color: var(--text-70, #a0a0b8);
  border: 1px solid #2a2a44;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.link-wait-cancel:hover {
  color: var(--text, #fff);
  border-color: #ff5577;
}

/* StPageFlip — стили страниц */
.page {
  width: 400px;
  height: 600px;
  background: #2a2620;
  color: #d4c9a8;
  font-family: 'Courier Prime', monospace;
  overflow: hidden;
  box-sizing: border-box;
}
.page-content {
  padding: 24px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}
.page-content h1 {
  font-family: 'Playfair Display', serif;
  color: #d4c9a8;
  margin-top: 0;
  font-size: 28px;
}

