/* ==================== ТЕМА (цвета) ==================== */
/* Значения по умолчанию — Pos Service. Другая организация переопределяет их в themes/<имя>/css/theme.css */
:root {
  --accent: #00aadd; --accent-light: #00d4ff; --accent-2: #00aaee; --accent-dark: #007aaa; --accent-violet: #9900cc;
  --surface: #1a2540; --surface-2: #232c47; --bg-deep: #131929; --border-soft: #2a3a5c;
  --grad-soft: linear-gradient(135deg, #5ecbfa 0%, #7c3aed 100%);
  --grad-soft-hover: linear-gradient(135deg, #4fb9ee 0%, #6d28d9 100%);
  --grad-primary: var(--grad-soft);
  --grad-primary-hover: var(--grad-soft-hover);
  --grad-action: linear-gradient(180deg, #00aadd 0%, #007aaa 100%);
  --grad-out: linear-gradient(180deg, #0090bb 0%, #006699 100%);
  --grad-bar: linear-gradient(90deg, #00aadd 0%, #007aaa 100%);
  --rgb-a: 0, 200, 255; --rgb-b: 0, 180, 255; --rgb-c: 0, 170, 238; --rgb-d: 0, 170, 221; --rgb-e: 0, 212, 255; --rgb-v: 153, 0, 204;
  --rgb-card-1: 30, 35, 52; --rgb-card-2: 20, 24, 38;
}

/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'PT Root UI', sans-serif;
  font-weight: 500;
  background-color: var(--bg-deep);
  color: white;
  height: 100vh;
  overflow: hidden;
  font-size: clamp(14px, 2.5vw, 18px);
}

.hidden {
  display: none !important;
}

/* ==================== ЛОГОТИПЫ ==================== */
/* Общий логотип для всех страниц */
.main-logo-container {
  position: fixed;
  display: flex;
  justify-content: center;
  padding: 0;
  background: linear-gradient(to bottom, var(--bg-deep) 55%, transparent 100%);
  z-index: 10;
  width: 100%;
  top: 16px;
  height: 120px;
}

#main-logo {
  max-width: 1000px;
  width: 90vw;
  height: auto;
  object-fit: contain;
  max-height: 280px;
}

body.hide-main-logo .main-logo-container {
  display: none;
}

/* ==================== ЭКРАН ПРИВЕТСТВИЯ ==================== */
#welcome-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-deep);
  position: fixed;
  z-index: 1000;
  opacity: 0;
  border-radius: 12px;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
  height: 100%;
}

#welcome-screen.fade-in,
#welcome-screen.fade-in #welcome-logo,
#welcome-screen.fade-in p {
  opacity: 1;
  transform: translateY(0);
}

#welcome-logo {
  max-width: 200px;
  width: 40vw;
  height: auto;
  margin-bottom: clamp(15px, 3vw, 30px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#welcome-screen p {
  font-weight: 700;
  font-size: clamp(24px, 5vw, 48px);
  text-align: center;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  line-height: 1.2;
}

/* ==================== ОСНОВНОЕ ПРИЛОЖЕНИЕ ==================== */
#main-app {
  display: none;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

#home.page {
  position: relative;
  padding-top: 72px;
}

.home-hidden-select {
  display: none;
}

.home-centered-logo {
  position: absolute;
  left: 80px;
  top: 85px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: none;
  transform: none;
}

.home-centered-logo img {
  width: min(26vw, 125px);
  height: auto;
  object-fit: contain;
  opacity: 0.98;
}

.home-layout {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
  min-height: min(54vh, 500px);
  padding-top: 74px;
  transform: translateY(-100px);
}

.home-secondary-card,
.home-primary-card {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: min(26vh, 258px);
  margin: 0;
  padding: 18px 18px;
  border: none;
  border-radius: 32%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.home-secondary-card {
  color: #f2f2f2;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(122, 129, 145, 0.28) 0%, rgba(79, 84, 96, 0.22) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.20), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.home-secondary-card--right {
  transform: none;
}

.home-secondary-card--bottom {
  grid-column: 1 / -1;
  min-height: min(16vh, 122px);
  border-radius: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.home-secondary-card--primary {
  color: #ffffff;
  background: var(--grad-soft);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.home-primary-card {
  border-radius: 28px;
  background: var(--grad-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.home-secondary-card__title,
.home-primary-card__title {
  max-width: 100%;
  font-size: clamp(16px, 3.6vw, 24px);
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.home-secondary-card__subtitle {
  max-width: 100%;
  font-size: clamp(13px, 2.8vw, 18px);
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.84);
}

.home-market-row__media {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-market-row__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.home-market-row__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.home-market-row__title {
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.home-market-row__subtitle {
  font-size: clamp(13px, 2.8vw, 18px);
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.84);
}

.home-market-row__arrow {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1;
}

.home-secondary-card__icon,
.home-primary-card__icon {
  align-self: flex-end;
  display: inline-block;
  font-size: clamp(26px, 5.6vw, 36px);
  line-height: 1;
}

.home-secondary-card__icon {
  color: rgba(255, 255, 255, 0.92);
}

.home-primary-card__icon {
  color: #ffffff;
}

.home-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 6px;
  margin: 10px 0 18px;
  scrollbar-width: none;
}

.home-strip::-webkit-scrollbar {
  display: none;
}

.home-news-card {
  position: relative;
  min-height: 158px;
  border: none;
  border-radius: 28px;
  padding: 14px;
  color: #ffffff;
  text-align: left;
  overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-news-card.btn-AddRestaurant,
.home-create-card,
.home-market-card {
  width: 100%;
  max-width: none;
  margin: 0;
}

.home-news-card__badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
}

.home-news-card__title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 34px;
  font-size: 18px;
  line-height: 1.02;
  font-weight: 700;
}

.home-news-card__meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.1;
}

.home-news-card--max {
  background:
    radial-gradient(circle at 78% 30%, rgba(114, 66, 255, 0.95), transparent 18%),
    linear-gradient(145deg, #6d4c33 0%, #181818 58%);
}

.home-news-card--iiko {
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.1), rgba(10, 10, 10, 0.55)),
    linear-gradient(145deg, #5c5d67 0%, #2e2f36 100%);
}

.home-news-card--fns {
  background: linear-gradient(145deg, #f2271d 0%, #db160f 100%);
}

.home-news-card--support {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.34)),
    linear-gradient(145deg, #54565f 0%, #2f3037 100%);
  cursor: pointer;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.home-side-column {
  display: grid;
  gap: 12px;
}

.home-side-card {
  position: relative;
  min-height: 110px;
  border: none;
  border-radius: 30px;
  background:
    radial-gradient(circle at 70% 85%, rgba(173, 39, 39, 0.18), transparent 28%),
    #2f3037;
  color: #ffffff;
  text-align: left;
  padding: 22px 24px;
  cursor: pointer;
}

.home-side-card__title {
  font-size: clamp(22px, 4.2vw, 32px);
  line-height: 1.05;
  font-weight: 700;
}

.home-side-card__arrow {
  position: absolute;
  top: 24px;
  right: 22px;
  font-size: 28px;
  color: #ffffff;
}

.home-create-card {
  position: relative;
  min-height: 232px;
  max-width: none;
  margin: 0;
  border-radius: 34px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  overflow: hidden;
  background: linear-gradient(180deg, #ef1f17 0%, #d9130d 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.home-create-card__title {
  max-width: 78%;
  font-size: clamp(28px, 5.6vw, 46px);
  line-height: 0.98;
  font-weight: 700;
}

.home-create-card__icon {
  align-self: flex-end;
  display: inline-flex;
  width: clamp(58px, 13vw, 72px);
  height: clamp(58px, 13vw, 72px);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #d9130d;
  font-size: clamp(26px, 5vw, 34px);
}

.home-market-card {
  width: 100%;
  max-width: none;
  margin: 0 0 28px;
  padding: 22px 24px;
  border: none;
  border-radius: 30px;
  background: #34353b;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  text-align: left;
}

.home-market-card__media {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #4a4d56 0%, #2c2d33 100%);
  font-size: 34px;
}

.home-market-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-market-card__title {
  font-size: clamp(24px, 4.6vw, 42px);
  line-height: 1;
  font-weight: 700;
}

.home-market-card__subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 3vw, 22px);
}

.home-market-card__arrow {
  font-size: 34px;
}

#requests.page {
  padding-top: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  position: relative;
  overflow: hidden;
}

body.hide-main-logo #requests.page,
body.hide-main-logo #profile.page,
body.hide-main-logo #accounts.page {
  margin-top: 0;
  padding-top: 12px;
}

.page {
  display: none;
  width: 100%;
  height: calc(100% - clamp(60px, 12vw, 100px));
  padding: clamp(12px, 2.5vw, 24px);
  overflow-y: auto;
  background-color: var(--bg-deep);
  margin-top: 90px;
}

.page p {
  margin-top: clamp(30px, 6vw, 60px);
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.4;
}

.page.active {
  display: block;
  align-items: center;
}

/* ==================== НАВИГАЦИОННАЯ ПАНЕЛЬ ==================== */
.nav-bar {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  background: rgba(19, 25, 41, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0 0;
  position: fixed;
  z-index: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  font-weight: 500;
  width: 100%;
  bottom: 2px;
  height: auto;
  padding-bottom: 0;
  pointer-events: none;
}

.nav-bar.slide-in {
  opacity: 1;
  transform: translateY(0);
}

.nav-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 19px;
  color: #aaaaaa;
  font-size: clamp(11px, 2.2vw, 15px);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  pointer-events: auto;
  position: relative;
}

.nav-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-54%);
  height: 56px;
  width: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  transition: left 0.38s cubic-bezier(0.34, 1.3, 0.64, 1), width 0.38s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: left, width;
}

.nav-btn i {
  font-size: clamp(22px, 4.4vw, 34px);
  margin-bottom: clamp(3px, 0.7vw, 7px);
  position: relative;
  z-index: 1;
}

.nav-btn.active {
  color: white;
}

/* ==================== ОБЩИЕ СТИЛИ КНОПОК ==================== */
/* Базовые стили для всех кнопок */
.btn-Create,
.btn-Share,
.btn-Feedback,
.btn-Save,
.btn-CancelModal,
.btn-AddRestaurant,
.btn-Market,
.btn-SelectRestModal,
.btn-RestModal {
  font-family: 'PT Root UI', sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 999px;
  font-size: clamp(14px, 2.5vw, 18px);
  cursor: pointer;
  margin-top: clamp(10px, 2vw, 20px);
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(10px, 2.5vw, 16px) clamp(20px, 5vw, 32px);
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  
  /* Анимационные свойства - перенесены сюда */
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 1.5s ease, transform 1.5s ease, background-color 0.4s ease;

  /* Добавляем transition для scale эффекта */
  will-change: transform;
}

/* Основные кнопки действия */
.btn-Create,
.btn-Share,
.btn-Feedback,
.btn-AddRestaurant,
.btn-Market,
.btn-SelectRestModal {
  background: var(--grad-primary);
  color: white;
}

.btn-Create:hover,
.btn-Share:hover,
.btn-Feedback:hover,
.btn-AddRestaurant:hover,
.btn-Market:hover,
.btn-SelectRestModal:hover {
  background: var(--grad-soft-hover);
}

/* Вспомогательные кнопки */
.btn-Save {
  background: var(--grad-primary);
  color: white;
}

.btn-Save:hover {
  background: var(--grad-soft-hover);
}

.btn-CancelModal,
.btn-RestModal {
  background-color: #333;
  color: white;
}

.btn-CancelModal:hover,
.btn-RestModal:hover {
  background-color: #444;
}

/* Эффекты при нажатии */
.btn-Create:active,
.btn-Share:active,
.btn-Feedback:active,
.btn-AddRestaurant:active,
.btn-Market:active,
.btn-Save:active,
.btn-CancelModal:active,
.btn-RestModal:active {
  transform: translateX(-30px) scale(0.98);
  transition: all 0.1s ease;
}

/* Сброс активного состояния */
.btn-Create:not(:active),
.btn-Share:not(:active),
.btn-Feedback:not(:active),
.btn-AddRestaurant:not(:active),
.btn-Market:not(:active),
.btn-Save:not(:active),
.btn-CancelModal:not(:active),
.btn-RestModal:not(:active) {
  transform: translateX(-30px) scale(1);
  transition: all 0.2s ease;
}

/* Специальный сброс для Cancel кнопки */
.btn-CancelModal:not(:active) {
  background-color: #333;
}

/* Состояния для анимации выезда */
.btn-Create.slide-in,
.btn-Share.slide-in,
.btn-Feedback.slide-in,
.btn-AddRestaurant.slide-in,
.btn-Market.slide-in,
.btn-Save.slide-in
.btn-SelectRestModal.slide-in {
  opacity: 1;
  transform: translateX(0);
}

/* Специальные позиции для некоторых кнопок */
.btn-Share.slide-in,
.btn-Create.slide-in {
  transform: translateX(0); /* Исправлено - должно быть 0, а не 30px */
}

/* Исходные позиции для анимации справа (без slide-in класса) */
.btn-Share:not(.slide-in),
.btn-Create:not(.slide-in) {
  transform: translateX(500px);
}

/* Исходные позиции для анимации слева (без slide-in класса) */
.btn-AddRestaurant:not(.slide-in),
.btn-Market:not(.slide-in),
.btn-Feedback:not(.slide-in),
.btn-SelectRestModal:not(.slide-in) {
  transform: translateX(-500px);
}

.home-layout .btn-Create.home-secondary-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 18px;
  border-radius: 28px;
  opacity: 1;
  transform: none;
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.home-layout .btn-Create.home-secondary-card:active,
.home-layout .btn-Create.home-secondary-card:not(:active),
.home-layout .btn-Create.home-secondary-card.slide-in,
.home-layout .btn-Create.home-secondary-card:not(.slide-in) {
  transform: none;
}

/* ==================== СОСТОЯНИЕ ВЫБРАННОГО ЗАВЕДЕНИЯ ==================== */

.btn-RestModal.selected {
  transform: scale(0.96) !important;
  background-color: #2a2a2a !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  color: white;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* ==================== СТРАНИЦА ПРОФИЛЯ ==================== */
.profile-header {
  display: flex;
  align-items: center;
  padding: 18px;
  background-color: var(--surface);
  border-radius: 24px;
  margin-bottom: 14px;
  margin-top: 0;
  width: 100%;
}

#user-avatar {
  width: clamp(50px, 12vw, 80px);
  height: clamp(50px, 12vw, 80px);
  border-radius: 50%;
  object-fit: cover;
  margin-right: clamp(10px, 2vw, 20px);
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-info h2 {
  font-weight: 700;
  font-size: clamp(16px, 3vw, 24px);
  margin-bottom: clamp(2px, 0.5vw, 6px);
  text-align: left;
  margin-top: clamp(4px, 1vw, 12px);
}

.user-info p {
  font-size: clamp(12px, 2.5vw, 16px);
  color: #aaa;
  text-align: left;
  margin-bottom: 0;
  margin-top: 0;
}

#edit-icon {
  font-size: clamp(18px, 3vw, 24px);
  color: #aaa;
  margin-left: clamp(6px, 1vw, 12px);
  cursor: pointer;
  margin-top: clamp(4px, 1vw, 8px);
  align-items: right;
}

.profile-actions-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 14px;
}

.profile-actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-actions-card .btn-SelectRestModal,
.profile-actions-card .btn-Create,
.profile-actions-card .btn-Feedback,
.profile-actions-card .btn-Share,
.bg-gray-800 .btn-Feedback {
  opacity: 1;
  transform: none;
  max-width: none;
  margin-top: 8px;
}


/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
/* РЕДАКТИРОВАНИЕ ПРОФИЛЯ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #1e1e1e;
  padding: clamp(20px, 4vw, 32px);
  border-radius: clamp(10px, 2vw, 16px);
  width: 90%;
  max-width: clamp(280px, 50vw, 400px);
  position: relative;
}

/* Редактирование профиля — полноэкранная страница */
.edit-profile-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #121929;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.edit-profile-fullscreen.hidden {
  display: none;
}
.edit-profile-fs-body {
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.edit-profile-fs-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8e92a0;
  margin-bottom: 8px;
  margin-top: 20px;
}
.edit-profile-fs-label:first-child {
  margin-top: 0;
}
.edit-profile-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--surface);
  color: #ffffff;
  font-family: 'PT Root UI', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
}
.edit-profile-input:focus {
  border-color: rgba(var(--rgb-d), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--rgb-d), 0.10);
}
.edit-profile-cancel-btn {
  width: 100%;
  margin-top: 12px;
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.07);
  color: #8e92a0;
  font-family: 'PT Root UI', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.edit-profile-toggle-list {
  margin-top: 4px;
  background: var(--surface);
  border-radius: 14px;
  padding: 4px 16px;
}

.edit-profile-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.edit-profile-toggle-row:last-child {
  border-bottom: none;
}

.edit-profile-toggle-label {
  font-size: 15px;
  font-weight: 500;
  color: #f2f3f7;
}

.edit-profile-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.edit-profile-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.edit-profile-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.edit-profile-toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.edit-profile-toggle input:checked + .edit-profile-toggle-slider {
  background: var(--grad-primary);
}

.edit-profile-toggle input:checked + .edit-profile-toggle-slider::before {
  transform: translateX(20px);
}

.establishment-modal-content {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0d111c 100%);
}

.establishment-modal-content h3 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-2) 50%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-content input {
  font-weight: 500;
  border: none;
  outline: none;
  padding: clamp(10px, 2vw, 16px);
  margin-bottom: clamp(10px, 2vw, 20px);
  border-radius: clamp(6px, 1.5vw, 10px);
  font-size: clamp(14px, 2.5vw, 16px);
  width: 100%;
  background-color: #333;
  color: white;
}

.modal-content h3 {
  font-weight: 700;
  font-size: clamp(18px, 3vw, 24px);
  margin-bottom: clamp(15px, 3vw, 25px);
}

.modal-content .btn-Save,
.modal-content .btn-CancelModal {
  margin-top: clamp(8px, 2vw, 16px);
  padding: clamp(10px, 2.5vw, 14px) clamp(16px, 4vw, 24px);
  font-size: clamp(14px, 2.5vw, 16px);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent);
}

/* ==================== МОДАЛКА "ПОДЕЛИТЬСЯ НОМЕРОМ" ==================== */
.contact-share-card {
  width: min(520px, 92vw);
  border-radius: 22px;
  padding: 26px 22px 22px;
  background: linear-gradient(180deg, rgba(43, 45, 55, 0.98) 0%, rgba(33, 35, 44, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  text-align: center;
}

.contact-share-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.85);
  font-size: 24px;
  cursor: pointer;
}

.contact-share-close:hover {
  border-color: rgba(var(--rgb-a), 0.35);
  color: var(--accent);
}

.contact-share-icon {
  width: 92px;
  height: 92px;
  margin: 8px auto 14px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(12, 134, 255, 0.18), rgba(12, 134, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-share-icon i {
  font-size: 40px;
  color: #73bdff;
}

.contact-share-title {
  font-weight: 700;
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.15;
  margin-top: 2px;
  color: #ffffff;
}

.contact-share-subtitle {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(13px, 2.6vw, 16px);
  line-height: 1.35;
}

.contact-share-btn {
  margin-top: 18px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-family: 'PT Root UI', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: 0 10px 22px rgba(var(--rgb-b), 0.18);
}

.contact-share-btn:hover {
  filter: brightness(1.05);
}

.contact-share-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.task-create-content {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  overflow-y: auto;
  padding: 20px 18px 24px;
  border-radius: 0;
  background: var(--bg-deep);
}

#task-create-modal {
  align-items: stretch;
  justify-content: stretch;
  background: var(--bg-deep);
}

.task-create-header {
  margin-bottom: 20px;
  padding-top: 2px;
}

.task-create-header h3 {
  margin: 0;
  text-align: center;
  font-size: clamp(22px, 4.6vw, 30px);
}

.task-create-label {
  display: block;
  margin: 6px 0 8px;
  font-size: 14px;
  color: #c7cbda;
}

.task-establishment-picker {
  position: relative;
  margin-bottom: 12px;
  z-index: 8;
}

.task-establishment-toggle {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: #ffffff;
  border-radius: 20px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: 'PT Root UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.task-establishment-toggle i {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.task-establishment-toggle.is-open i {
  transform: rotate(180deg);
}

.task-establishment-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 12;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--bg-deep);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.task-establishment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.task-establishment-empty {
  min-height: 50px;
  border-radius: 16px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  background: var(--surface);
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.task-establishment-option,
.task-add-establishment-btn {
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 16px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'PT Root UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.task-establishment-option {
  justify-content: space-between;
  background: var(--surface);
  color: #ffffff;
}

.task-establishment-option i {
  opacity: 0;
}

.task-establishment-option.is-selected {
  background: linear-gradient(180deg, rgba(12, 134, 255, 0.32) 0%, rgba(5, 96, 220, 0.28) 100%);
  box-shadow: inset 0 0 0 1px rgba(12, 134, 255, 0.42);
}

.task-establishment-option.is-selected i {
  opacity: 1;
}

.task-add-establishment-btn {
  justify-content: center;
  margin-top: 8px;
  background: var(--surface);
  color: #ffffff;
  font-weight: 700;
}

.task-add-establishment-btn i {
  font-size: 18px;
}

.task-create-input--hidden {
  display: none;
}

.task-create-input,
.task-create-textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: #ffffff;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-family: 'PT Root UI', sans-serif;
  outline: none;
  margin-bottom: 12px;
}

.task-create-input:focus,
.task-create-textarea:focus {
  border-color: var(--accent);
}

.task-create-textarea {
  resize: vertical;
  min-height: 100px;
}

.task-create-file-row {
  display: block;
  margin-bottom: 8px;
  background: transparent;
}

.task-create-file-row.has-files {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-create-file-row .btn-CancelModal,
.task-create-actions .btn-Save,
.task-create-actions .btn-CancelModal {
  opacity: 1;
  transform: none;
  max-width: none;
  margin-top: 0;
  min-height: 50px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
}

.task-create-file-row .btn-CancelModal {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--grad-primary);
  color: #ffffff;
}

.task-create-file-row .btn-CancelModal:hover {
  background: var(--grad-primary-hover);
}

.task-create-file-row .btn-CancelModal.is-compact {
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 50%;
  flex: 0 0 auto;
}

.task-create-file-row .btn-CancelModal.is-compact span {
  display: none;
}

.task-create-file-row .btn-CancelModal.is-compact i {
  font-size: 21px;
}

.task-create-file-input {
  display: none;
}

.task-create-files-list {
  flex: 1;
  margin-bottom: 0;
  background: transparent;
}

.task-create-file-summary {
  min-height: 56px;
  border-radius: 16px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.task-create-file-indicator {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 134, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.task-create-file-indicator::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(12, 134, 255, 0.18);
}

.task-create-file-indicator.is-busy::before {
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: #73bdff;
  animation: contact-share-spin 0.9s linear infinite;
}

.task-create-file-indicator__count {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.task-create-file-remove {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.task-create-file-remove i {
  font-size: 19px;
}

.task-create-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-create-file-title {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.task-create-file-size {
  font-size: 14px;
  color: #ffffff;
  opacity: 0.92;
}

.task-create-file-uploading {
  font-size: 12px;
  font-weight: 600;
  color: #73bdff;
}

.task-create-actions {
  display: block;
  margin-top: 10px;
  position: sticky;
  bottom: 0;
  background: transparent;
  padding-top: 0;
}

.task-create-actions .btn-Save,
.task-create-actions .btn-CancelModal {
  width: 100%;
}

.task-create-actions .btn-Save {
  background: #ffffff;
  color: #111111;
}

.task-create-actions .btn-Save:hover {
  background: #f3f4f6;
  color: #111111;
}

.task-create-actions .btn-Save.is-disabled,
.task-create-actions .btn-Save:disabled {
  background: #2b2d34;
  color: rgba(255, 255, 255, 0.58);
  cursor: default;
  box-shadow: none;
  opacity: 1;
}

.task-create-actions .btn-Save.is-disabled:hover,
.task-create-actions .btn-Save:disabled:hover {
  background: #2b2d34;
  color: rgba(255, 255, 255, 0.58);
}

.task-create-actions .btn-Save.is-loading,
.task-create-actions .btn-Save.is-loading:hover {
  background: #343841;
  color: rgba(255, 255, 255, 0.86);
}

.contact-share-progress {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

.contact-share-progress.hidden {
  display: none;
}

.contact-share-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: contact-share-spin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

/* ВЫБОР ЗАВЕДЕНИЯ */
.establishment-list {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.establishment-modal-content .establishment-list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.establishment-staff-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.establishment-staff-card {
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(var(--rgb-card-1), 0.98) 0%, rgba(var(--rgb-card-2), 0.98) 100%);
  border: 1px solid rgba(var(--rgb-a), 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.establishment-staff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.establishment-staff-main {
  min-width: 0;
  flex: 1 1 auto;
}

.establishment-staff-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.establishment-staff-meta {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.establishment-staff-role {
  min-width: 120px;
  max-width: 44%;
  flex: 0 0 auto;
  text-align: right;
}

.establishment-staff-role-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(var(--rgb-b), 0.3);
  background: rgba(var(--rgb-c), 0.08);
  color: var(--accent-light);
  padding: 7px 28px 7px 10px;
  font-family: 'PT Root UI', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2300d4ff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.establishment-staff-role-select option {
  background: #1a1f2e;
  color: #ffffff;
}

div.establishment-staff-role-select {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.establishment-staff-delete {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 70, 70, 0.3);
  background: rgba(255, 50, 50, 0.08);
  color: rgba(255, 90, 90, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.establishment-staff-delete:active {
  background: rgba(255, 50, 50, 0.22);
  border-color: rgba(255, 70, 70, 0.6);
  transform: scale(0.92);
}

.establishment-staff-delete i {
  font-size: 13px;
}

#establishment-staff-request-access-btn {
  opacity: 1;
  transform: none;
  margin-top: auto;
  flex-shrink: 0;
}

#confirm-modal-ok-btn,
#confirm-modal-cancel-btn,
#knowledge-base-link-ru,
#knowledge-base-link-howto {
  opacity: 1;
  transform: none;
}

.establishment-staff-empty {
  padding: 24px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(var(--rgb-b), 0.04);
  border: 1px solid rgba(var(--rgb-b), 0.08);
  border-radius: 16px;
  font-size: 14px;
}

.establishment-list::-webkit-scrollbar {
  width: 6px;
}

.establishment-list::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 3px;
}

.establishment-item {
  font-family: 'PT Root UI', sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 2.5vw, 16px);
  color: white;
  border: none;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s ease;
}

.establishment-modal-content .establishment-item,
.establishment-modal-content .btn-RestModal {
  opacity: 1;
  transform: none;
  max-width: none;
  margin-top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(var(--rgb-card-1), 0.98) 0%, rgba(var(--rgb-card-2), 0.98) 100%);
  border: 1px solid rgba(var(--rgb-a), 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  text-align: left;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.establishment-modal-content .establishment-item:active,
.establishment-modal-content .btn-RestModal:active {
  border-color: rgba(var(--rgb-a), 0.35);
  box-shadow: 0 4px 20px rgba(var(--rgb-c), 0.2);
  transform: scale(0.99) !important;
  background: linear-gradient(180deg, rgba(35, 42, 62, 0.98) 0%, rgba(25, 30, 48, 0.98) 100%);
}

.establishment-item__label {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 10px;
  font-size: 15px;
  font-weight: 600;
}

.establishment-item__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.establishment-item__share {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--rgb-e), 0.25) 0%, rgba(var(--rgb-v), 0.25) 100%);
  border: 1px solid rgba(var(--rgb-b), 0.35);
  color: var(--accent-light);
  transition: background 0.2s ease, transform 0.2s ease;
}

.establishment-item__share:active {
  transform: scale(0.92);
  background: linear-gradient(135deg, rgba(var(--rgb-e), 0.45) 0%, rgba(var(--rgb-v), 0.45) 100%);
}

.establishment-item__share i {
  font-size: 14px;
}



/* Страница счетов */
#accounts.page.active {
  display: block;
  position: relative;
  padding: 24px 20px;
}

#selected-establishment {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(15px, 3vw, 18px);
  color: #aaa;
  text-align: center;
  background: var(--surface);
  border-radius: 20px;
  padding: 24px 20px;
  width: calc(100% - 40px);
  max-width: 380px;
  line-height: 1.6;
}

/* ==================== СТРАНИЦА СЧЕТОВ ==================== */
.accounts-establishment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.accounts-establishment-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: none;
  border-radius: 14px;
  padding: 16px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
}
.accounts-establishment-name {
  font-size: 15px;
  font-weight: 600;
  color: #f2f3f7;
}
.accounts-establishment-arrow {
  color: var(--accent);
  font-size: 14px;
}
.accounts-placeholder {
  color: #8e92a0;
  font-size: 15px;
  text-align: center;
  margin-top: 40px;
}

.accounts-bills-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.accounts-bills-title {
  font-size: 18px;
  font-weight: 700;
  color: #f2f3f7;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.accounts-filter-btn {
  flex: 1 1 0;
  font-family: 'PT Root UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--rgb-b), 0.2);
  background: rgba(var(--rgb-c), 0.05);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.accounts-filter-btn.is-active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #ffffff;
}

.accounts-bill-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(var(--rgb-card-1), 0.98) 0%, rgba(var(--rgb-card-2), 0.98) 100%);
  border: 1px solid rgba(var(--rgb-a), 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-family: 'PT Root UI', sans-serif;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.accounts-bill-card:active {
  border-color: rgba(var(--rgb-a), 0.35);
  box-shadow: 0 4px 20px rgba(var(--rgb-c), 0.2);
  transform: scale(0.99);
}

.accounts-bill-card.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.accounts-bill-main {
  min-width: 0;
}

.accounts-bill-number {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.accounts-bill-meta {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.accounts-bill-status {
  flex: 0 0 auto;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(140, 146, 160, 0.25);
}

.accounts-bill-status--paid {
  background: rgba(40, 195, 80, 0.30);
}

.accounts-bill-status--unpaid {
  background: rgba(255, 70, 70, 0.30);
}

.accounts-bill-status--cancelled {
  background: rgba(140, 146, 160, 0.30);
}

/* ==================== ВЫПАДАЮЩИЕ СПИСКИ ==================== */
.dropdown-container {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(20px, 4vw, 40px);
  margin-top: clamp(20px, 4vw, 40px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.dropdown-container.slide-in {
  opacity: 1;
  transform: translateY(0);
}

.main-dropdown {
  font-family: 'PT Root UI', sans-serif;
  font-weight: 500;
  background-color: #1e1e1e;
  color: white;
  border: 1px solid #333;
  padding: clamp(12px, 2.5vw, 16px) clamp(20px, 5vw, 32px);
  border-radius: clamp(6px, 1.5vw, 12px);
  font-size: clamp(14px, 2.5vw, 16px);
  cursor: pointer;
  width: 100%;
  max-width: 400px;
  outline: none;
  transition: border-color 0.3s ease;
}

.main-dropdown:focus {
  border-color: var(--accent);
}

.main-dropdown option {
  background-color: #1e1e1e;
  color: white;
}

/* ==================== КНОПКИ В СТРОКУ ==================== */
.buttons-row {
  display: flex;
  gap: clamp(15px, 3vw, 30px);
  justify-content: center;
  align-items: stretch;
  margin-bottom: clamp(30px, 6vw, 60px);
  flex-wrap: wrap;
}

.buttons-row--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 22px);
  width: min(100%, 760px);
  margin: 0 auto clamp(30px, 6vw, 60px);
}

.home-action-card {
  position: relative;
  min-height: clamp(210px, 38vw, 320px);
  max-width: none;
  margin: 0;
  padding: clamp(22px, 5vw, 30px);
  border-radius: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transition: opacity 1.5s ease, transform 1.5s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.home-action-card::before {
  content: '';
  position: absolute;
  inset: auto -18% -24% auto;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.home-action-card:hover {
  filter: brightness(1.04);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
}

.home-action-card--create {
  background: var(--grad-action);
  grid-column: 1 / -1;
}

.home-action-card--restaurant {
  background: var(--grad-action);
}

.home-action-card--market {
  background: linear-gradient(180deg, #0058d9 0%, #003fa7 100%);
}

.home-action-card__title {
  position: relative;
  z-index: 1;
  max-width: 75%;
  font-size: clamp(28px, 5.5vw, 44px);
  line-height: 1;
  font-weight: 700;
}

.home-action-card__icon {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  width: clamp(58px, 13vw, 72px);
  height: clamp(58px, 13vw, 72px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: inherit;
  font-size: clamp(26px, 5vw, 34px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.home-action-card--create .home-action-card__icon,
.home-action-card--market .home-action-card__icon {
  color: currentColor;
}

.home-action-card--restaurant .home-action-card__icon {
  color: #0a4ea8;
}

/* ==================== ТАБЛИЦЫ ==================== */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: clamp(10px, 2vw, 20px);
  background-color: #1e1e1e;
  border-radius: clamp(8px, 2vw, 16px);
  padding: clamp(15px, 3vw, 30px);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.table-container.slide-in {
  opacity: 1;
  transform: translateY(0);
}

/* Стили для таблицы на странице заявок с анимацией выезжания снизу */
.requests-table {
  width: 100%;
  overflow-x: auto;
  background-color: #1e1e1e;
  border-radius: clamp(8px, 2vw, 16px);
  padding: clamp(15px, 3vw, 30px);
  /* без анимации «водопада»: список заявок сразу на месте при открытии вкладки */
  opacity: 1;
  transform: none;
  transition: none;
  margin-top: 10px;
}

.requests-table.slide-in {
  opacity: 1;
  transform: none;
}

.main-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(12px, 2vw, 14px);
  color: white;
}

.main-table th {
  font-weight: 700;
  text-align: left;
  padding: clamp(10px, 2vw, 15px);
  border-bottom: 2px solid #333;
  background-color: #2a2a2a;
}

.main-table td {
  padding: clamp(8px, 1.5vw, 12px);
  border-bottom: 1px solid #333;
}

.main-table tbody tr:hover {
  background-color: #2a2a2a;
}

.main-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================== ФИЛЬТРЫ ТАБЛИЦЫ ==================== */
.table-filters {
  background-color: #1e1e1e;
  border-radius: clamp(8px, 2vw, 16px);
  padding: clamp(15px, 3vw, 20px);
  margin-bottom: clamp(15px, 3vw, 25px);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;

  margin-top: 0; /* Убираем отступ сверху */
  position: relative;
  top: -60px; /* Поднимаем вверх на 20px */
}

.table-filters.slide-in {
  opacity: 1;
  transform: translateY(0);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 15px);
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-size: clamp(12px, 2vw, 14px);
  margin-bottom: clamp(4px, 1vw, 8px);
  color: #aaa;
}

.filter-input {
  font-family: 'PT Root UI', sans-serif;
  background-color: #333;
  color: white;
  border: 1px solid #444;
  padding: clamp(8px, 1.5vw, 12px);
  border-radius: clamp(4px, 1vw, 8px);
  font-size: clamp(12px, 2vw, 14px);
  outline: none;
}

.filter-input:focus {
  border-color: var(--accent);
}

.btn-ClearFilters {
  background-color: #333;
  color: white;
  border: none;
  padding: clamp(8px, 1.5vw, 12px) clamp(15px, 3vw, 20px);
  border-radius: clamp(4px, 1vw, 8px);
  font-size: clamp(12px, 2vw, 14px);
  cursor: pointer;
  height: fit-content;
  margin-top: clamp(20px, 4vw, 25px);
}

.btn-ClearFilters:hover {
  background-color: #444;
}

/* ==================== СОРТИРОВКА ТАБЛИЦЫ ==================== */
.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sort-arrow {
  margin-left: 5px;
  font-size: 0.8em;
  color: #777;
}

.sort-arrow.asc::after {
  content: "▲";
  color: var(--accent);
}

.sort-arrow.desc::after {
  content: "▼";
  color: var(--accent);
}

/* ==================== АДАПТИВНЫЕ СТИЛИ ==================== */
@media (max-width: 768px) {
  /* Адаптация логотипов */
  #welcome-logo { 
    width: 60vw; 
    max-width: 200px; 
  }
  
  #main-logo { 
    max-width: 150px; 
  }

  /* Адаптация таблиц */
  .main-table {
    font-size: clamp(10px, 2.5vw, 12px);
  }
  
  .main-table th,
  .main-table td {
    padding: clamp(6px, 1.5vw, 10px);
  }
  
  /* Горизонтальная прокрутка для таблиц на мобильных */
  .table-container {
    overflow-x: auto;
  }
  
  .main-table {
    min-width: 800px; /* Минимальная ширина для всех колонок */
  }
  
  /* Адаптивные фильтры */
  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2vw, 12px);
  }
  
  .filter-group:nth-child(3) {
    grid-column: span 2;
  }
  
  .btn-ClearFilters {
    grid-column: span 2;
    justify-self: start;
  }
  
  /* Адаптация кнопок в строку */
  .buttons-row {
    gap: clamp(10px, 2vw, 20px);
  }

  .home-layout {
    min-height: 44vh;
    gap: 12px;
    padding-top: 62px;
  }

  .home-centered-logo {
    left: 80px;
    top: 85px;
  }

  .home-secondary-card {
    max-width: none;
    width: 100%;
    min-height: calc(25vh + 20px);
  }

  .home-secondary-card--right {
    transform: none;
  }

  .home-secondary-card--bottom {
    grid-column: 1 / -1;
    min-height: 14vh;
  }

  .home-primary-card {
    max-width: 158px;
    width: 158px;
    min-height: calc(25vh + 20px);
  }

  .home-dashboard {
    grid-template-columns: 1fr;
  }

  .home-create-card {
    min-height: 210px;
  }

  .home-news-card {
    min-height: 148px;
  }

  .home-side-card {
    min-height: 104px;
  }

  .home-market-card {
    grid-template-columns: 68px 1fr 28px;
    gap: 14px;
    padding: 18px 18px;
  }

  .home-market-card__media {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

  .home-market-card__arrow {
    font-size: 28px;
  }
}

@media (min-width: 1200px) {
  /* Адаптация логотипов для больших экранов */
  #welcome-logo { 
    width: 25vw; 
    max-width: 300px; 
  }
  
  #main-logo { 
    max-width: 430px; 
  }
}

/* ==================== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ЗАГОЛОВКОВ ==================== */
.page h3 {
  font-weight: 700;
}

/* ==================== НОВЫЙ ЭКРАН ЗАЯВОК ==================== */
.requests-modern {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.requests-modern.requests-table {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.requests-title {
  text-align: center;
  font-size: clamp(24px, 4.8vw, 34px);
  font-weight: 700;
  margin-top: 0;
}

.requests-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: 18px;
  min-height: 46px;
  padding: 11px 14px;
  margin-top: 5px;
}

.requests-search-icon {
  color: #7e8291;
  font-size: 18px;
}

.requests-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: clamp(16px, 3.3vw, 17px);
  outline: none;
}

.requests-search-input::placeholder {
  color: #7e8291;
}

.requests-filter-btn {
  background: transparent;
  border: none;
  color: #8a8fa0;
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.requests-filter-btn.is-active {
  color: #ffffff;
  background: rgba(12, 134, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(12, 134, 255, 0.24);
}

.requests-filters-modal {
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.requests-filters-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.requests-filters-sheet {
  width: 100%;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(var(--rgb-c), 0.10) 0%, rgba(var(--rgb-c), 0) 45%),
    var(--surface);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.32);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.requests-filters-modal.is-open .requests-filters-sheet {
  transform: translateY(0);
}

.requests-filters-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}

.requests-filters-icon-btn,
.requests-filters-reset-btn {
  border: none;
  background: transparent;
  font-family: 'PT Root UI', sans-serif;
}

.requests-filters-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b90a0;
  font-size: 22px;
}

.requests-filters-title {
  text-align: center;
  font-size: clamp(22px, 4.5vw, 30px);
  font-weight: 700;
  color: #f7f8fc;
}

.requests-filters-reset-btn {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  justify-self: end;
}

.requests-filters-label {
  display: block;
  margin-top: 24px;
  margin-bottom: 10px;
  color: #f6f7fb;
  font-size: clamp(16px, 3.8vw, 22px);
  font-weight: 700;
}

.requests-filters-select-wrap {
  position: relative;
}

.requests-filters-select {
  width: 100%;
  min-height: 58px;
  padding: 0 54px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: var(--bg-deep);
  color: #ffffff;
  font-family: 'PT Root UI', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.requests-filters-select:focus {
  border-color: rgba(12, 134, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(var(--rgb-d), 0.12);
}

.requests-filters-select option {
  background: var(--bg-deep);
  color: #fff;
}

.requests-filters-select-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 18px;
  pointer-events: none;
}

.requests-filters-apply-btn {
  width: 100%;
  margin-top: 42px;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  background: var(--grad-primary);
  color: #ffffff;
  font-family: 'PT Root UI', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.request-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 12px;
  color: #f2f3f7;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.request-card:active {
  background: var(--surface);
}

#requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 12px;
}

.requests-empty {
  padding: 18px 14px;
  border-radius: 14px;
  background: var(--surface);
  color: #8e92a0;
  text-align: center;
  font-size: 14px;
}

.request-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.request-number {
  background: var(--grad-bar);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: clamp(13px, 3vw, 16px);
}

.request-status {
  color: #fff;
  font-size: clamp(11px, 2.4vw, 13px);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  background: rgba(140, 146, 160, 0.25);
}
.request-status--new       { background: rgba(30,  120, 255, 0.30); }
.request-status--progress  { background: rgba(255, 140,  30, 0.30); }
.request-status--waiting   { background: rgba(220, 185,   0, 0.35); }
.request-status--message   { background: rgba(160,  60, 255, 0.30); }
.request-status--transfer  { background: rgba( 20, 200, 190, 0.30); }
.request-status--resolved  { background: rgba( 40, 195,  80, 0.30); }

.request-topic {
  margin-top: 8px;
  font-size: clamp(16px, 3.8vw, 20px);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.request-meta {
  margin-top: 5px;
  color: #8c90a0;
  font-size: clamp(12px, 2.7vw, 15px);
}

.request-meta-row {
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-meta-row .request-meta {
  margin-top: 0;
}

.request-unread-badge {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-action);
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(var(--rgb-d), 0.12);
}

.request-text {
  margin-top: 6px;
  color: #7e8291;
  font-size: clamp(12px, 2.4vw, 14px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.requests-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 14px;
  padding: 8px 6px;
  color: #9ca0af;
}

.requests-page-btn {
  background: transparent;
  border: none;
  color: #818594;
  font-size: 18px;
}

.requests-page-info {
  font-size: clamp(12px, 2.5vw, 15px);
}

#requests.page .btn-NewRequest {
  position: fixed !important;
  right: 16px !important;
  left: auto !important;
  bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  margin-top: 0;
  margin-left: 0;
  align-self: auto;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: 'PT Root UI', sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 3.2vw, 19px);
  color: white;
  background: var(--grad-soft);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  z-index: 10 !important;
}

.request-dialog-modal {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: rgba(8, 10, 18, 0.86);
}

.request-dialog-sheet {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  overflow: hidden;
  margin: 0 auto;
  background: #1b1e28 url('../assets/icons/chat-bg.webp?v=20261105-1') top left / 260px 260px repeat;
  display: flex;
  flex-direction: column;
}

.request-dialog-top {
  margin: -4px 0 0 -1px;
  width: calc(100% + 3px);
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  flex: 0 0 auto;
}

.request-dialog-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 2px 0 8px;
}

.request-dialog-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.request-dialog-number {
  background: var(--grad-bar);
  color: #ffffff;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 12px;
}

.request-dialog-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.request-dialog-topic {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.request-dialog-company {
  margin-top: 5px;
  color: #8e93a4;
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.request-dialog-chat {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
}

.request-dialog-chat > * {
  position: relative;
  z-index: 1;
}

.request-chat-empty {
  margin: auto;
  color: #8f94a4;
  font-size: 14px;
}

.request-msg {
  max-width: 82%;
  background: var(--grad-action);
  color: #ffffff;
  border-radius: 16px;
  padding: 10px 12px 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.request-msg-left {
  align-self: flex-start;
}

.request-msg-right {
  align-self: flex-end;
}

.request-msg-outgoing {
  background: var(--grad-out);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.request-msg-staff {
  background: var(--grad-out);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.request-msg-outgoing .request-msg-time {
  color: rgba(255, 255, 255, 0.8);
}

.request-msg-staff .request-msg-time {
  color: rgba(255, 255, 255, 0.8);
}

.request-msg-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.request-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(160deg, #b8bcc9 0%, #8e94a4 100%);
}

.request-msg-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  padding: 0;
  margin-bottom: 3px;
}

/* Входящее сообщение: аватар слева снаружи пузыря (как в Telegram) */
.request-msg-row {
  align-self: flex-start;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}
.request-msg-row.is-cont { margin-top: -6px; }
.request-msg-row > .request-msg { max-width: none; min-width: 0; padding: 7px 11px 6px; }
.request-msg-row .request-msg-ava { width: 34px; height: 34px; flex: none; font-size: 15px; }
.request-msg-ava-gap { flex: none; width: 34px; height: 34px; }
.request-msg-row .request-msg-time, .msg-menu-clone .request-msg-time { margin-top: 2px; }

.request-msg-text {
  font-size: 14px;
  line-height: 1.35;
}

.request-photo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.request-photo-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  max-width: 240px;
  background: rgba(0, 0, 0, 0.18);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}


.request-photo-img {
  display: block;
  width: 100%;
  max-width: 240px;
  max-height: 260px;
  object-fit: cover;
  flex: 1 1 auto;
}

.request-photo-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 22px;
}

.request-photo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  min-height: 64px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 22px;
  text-align: center;
}

.request-photo-fallback span {
  font-size: 11px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.request-photo-author {
  flex: 0 0 auto;
  padding: 7px 10px;
  background: linear-gradient(90deg, var(--accent) 0%, #0088bb 100%);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.request-msg-ava {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.28); color: #fff; font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.request-msg-ava.is-logo { background: #ffffff; }
.request-msg-ava.is-logo img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.request-msg-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.request-photo-author .request-msg-author {
  margin-bottom: 0;
}

/* Telegram-style: photo-only message has no bubble */
.request-msg--photo-only {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  position: relative;
}

.request-msg--photo-only .request-photo-wrap {
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.request-msg--photo-only .request-photo-img {
  border-radius: 16px;
}

.request-msg--photo-only .request-msg-body {
  margin: 0;
}

.request-msg--photo-only .request-msg-time {
  position: absolute;
  bottom: 8px;
  right: 10px;
  margin: 0;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 11px;
  color: #fff;
  pointer-events: none;
}

.request-msg-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.request-file-chip {
  min-width: 220px;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  text-align: left;
  font-family: 'PT Root UI', sans-serif;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.request-msg-outgoing .request-file-chip {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.request-file-chip.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.request-file-chip.is-pending {
  cursor: default;
  opacity: 0.92;
}

.request-file-chip__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  flex: 0 0 auto;
}

.request-msg-outgoing .request-file-chip__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.request-file-chip__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.request-file-chip__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.request-file-chip__action {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.request-msg-outgoing .request-file-chip__action {
  color: rgba(255, 255, 255, 0.82);
}

.file-viewer-modal {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: rgba(5, 8, 14, 0.94);
  z-index: 1100;
}

.dialog-refresh-modal {
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 10, 16, 0.68);
  z-index: 1150;
}

.dialog-refresh-card {
  width: min(100%, 340px);
  border-radius: 18px;
  background: linear-gradient(180deg, #2d2f38 0%, #23252d 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  padding: 20px 18px 18px;
}

.dialog-refresh-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.dialog-refresh-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #b8bdca;
}

.dialog-refresh-btn {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 14px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 16px;
}

.file-viewer-sheet {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #111318;
}

.file-viewer-header {
  min-height: 64px;
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(19, 21, 28, 0.96);
}

.file-viewer-title {
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-viewer-download-header {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-action);
  color: #ffffff;
  font-size: 17px;
  flex: 0 0 auto;
}

.file-viewer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.file-viewer-body.is-document {
  align-items: flex-start;
  justify-content: flex-start;
}

.file-viewer-state {
  width: min(100%, 420px);
  padding: 22px 18px;
  border-radius: 22px;
  background: #1f222b;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.file-viewer-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: file-viewer-spin 0.9s linear infinite;
}

.file-viewer-state-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.file-viewer-state-text {
  font-size: 14px;
  color: #98a0b3;
  line-height: 1.35;
}

.file-viewer-image {
  width: 100%;
  max-width: 980px;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.file-viewer-video {
  width: 100%;
  max-width: 980px;
  max-height: 78vh;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.file-viewer-pdf {
  width: 100%;
  min-height: 78vh;
  border: none;
  border-radius: 18px;
  background: #1a1c22;
}

.file-viewer-pdf-pages {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file-viewer-pdf-page {
  border-radius: 14px;
  overflow: hidden;
  background: #10131b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  padding: 0;
}

.file-viewer-pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.file-viewer-pdf-note {
  margin-top: 2px;
  font-size: 13px;
  color: #98a0b3;
  text-align: center;
}

.file-viewer-fallback {
  width: min(100%, 420px);
  padding: 20px 18px;
  border-radius: 22px;
  background: #1f222b;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-viewer-fallback-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--rgb-d), 0.16);
  color: var(--accent);
  font-size: 24px;
}

.file-viewer-fallback-name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  word-break: break-word;
}

.file-viewer-fallback-size {
  font-size: 14px;
  color: #98a0b3;
}

.file-viewer-download {
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--grad-action);
  color: #ffffff;
  font-family: 'PT Root UI', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.file-viewer-download-secondary {
  background: transparent;
  border: 1px solid #4a5164;
  color: #d8deef;
}

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

.request-msg-time {
  margin-top: 5px;
  text-align: right;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.request-dialog-composer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 86px;
  padding: 12px 12px calc(26px + env(safe-area-inset-bottom));
  margin: 0;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
  flex: 0 0 auto;
  transform: translateY(calc(-1 * var(--dialog-keyboard-offset, 0px)));
  transition: transform 0.2s ease;
  position: relative;
  z-index: 3;
}

.request-composer-file-preview {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #1f2027;
  border: 1px solid #3b3f4d;
}

.request-composer-file-preview.hidden {
  display: none;
}

.request-composer-file-preview-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #313441;
  color: #c7cbda;
  flex: 0 0 auto;
}

.request-composer-file-preview-meta {
  flex: 1;
  min-width: 0;
}

.request-composer-file-preview-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.request-composer-file-preview-size {
  margin-top: 3px;
  color: #8f94a4;
  font-size: 12px;
}

.request-composer-file-preview-remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #3b3d47;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.request-dialog-composer.hidden,
.request-dialog-closed.hidden {
  display: none;
}

.request-dialog-closed {
  margin: 0;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
  color: #ffffff;
  text-align: center;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  font-size: 16px;
  font-weight: 700;
}

.request-chat-system {
  align-self: center; margin: 8px auto 4px; padding: 6px 14px; border-radius: 999px;
  background: rgba(26, 37, 64, 0.85); color: #ffffff; font-size: 13px; font-weight: 600; text-align: center;
}
.request-dialog-rating { margin-top: 12px; }
.request-dialog-rating.hidden { display: none; }
.request-dialog-rating-title { font-size: 14px; font-weight: 600; opacity: .85; margin-bottom: 10px; }
.request-dialog-rating-row { display: flex; gap: 8px; justify-content: center; }
.request-dialog-rating-btn {
  flex: 1 1 0; max-width: 64px; height: 48px; border: none; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); font-size: 26px; line-height: 1; cursor: pointer;
}
.request-dialog-rating-btn:active { background: rgba(255, 255, 255, 0.25); }
.request-dialog-rating-btn:disabled { opacity: .5; }
.request-dialog-rating-btn.is-picked { background: rgba(255, 255, 255, 0.3); outline: 2px solid #fff; opacity: 1; }
.request-dialog-rating-thanks { font-size: 14px; font-weight: 600; opacity: .9; }

.request-composer-attach,
.request-composer-send {
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.request-composer-attach i,
.request-composer-send i {
  font-size: 19px;
}

.request-composer-attach {
  background: #3b3d47;
  color: #c7cbda;
}

.request-composer-send {
  background: var(--grad-action);
  color: #ffffff;
}

.request-composer-input {
  flex: 1;
  border: 1px solid #3b3f4d;
  outline: none;
  background: #1f2027;
  color: #ffffff;
  border-radius: 22px;
  padding: 12px 16px;
  min-height: 44px;
  max-height: 120px;
  font-size: 16px;
  line-height: 1.4;
  font-family: inherit;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.request-composer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 134, 255, 0.18);
}

.request-composer-input::placeholder {
  color: #8f94a4;
}

.request-composer-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
  top: 0;
}

/* ==================== УТИЛИТЫ ==================== */
.w-full { width: 100%; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.gap-2 { gap: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-white { color: #ffffff; }
.text-gray-400 { color: #9ca3af; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: var(--surface); border-radius: 24px; padding: 18px; margin-bottom: 14px; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; }


/* ==================== ОТВЕТ НА СООБЩЕНИЕ ==================== */
.request-msg { position: relative; }
.request-msg-quote {
  border-left: 3px solid #e23cc8;
  background: rgba(0, 0, 0, 0.24);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 6px;
  min-width: 0;
}
.request-msg-quote-author { font-size: 12px; font-weight: 700; color: #ff9ae8; }
.request-msg-quote-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.request-msg-reply {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.request-msg-reply:active { background: rgba(255, 255, 255, 0.28); }
.request-dialog-replybar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 6px;
  padding: 6px 10px;
  border-left: 3px solid #e23cc8;
  background: #1d2b3f;
  border-radius: 8px;
  position: relative;
  z-index: 4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  /* поднимается вместе с композером над клавиатурой */
  transform: translateY(calc(-1 * var(--dialog-keyboard-offset, 0px)));
  transition: transform 0.2s ease;
}
.request-replybar-body { flex: 1; min-width: 0; }
.request-replybar-author { font-size: 12px; font-weight: 700; color: #ff9ae8; }
.request-replybar-text { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-replybar-close { border: none; background: transparent; color: rgba(255, 255, 255, 0.7); font-size: 16px; padding: 4px 6px; cursor: pointer; }

/* меню сообщения (зажатие / правая кнопка) */
.request-msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.msg-menu {
  position: fixed;
  z-index: 10000;
  min-width: 170px;
  background: rgba(28, 34, 52, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  padding: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.msg-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.msg-menu-item i { width: 18px; text-align: center; color: #ff9ae8; }
.msg-menu-item:hover, .msg-menu-item:active { background: rgba(255, 255, 255, 0.1); }
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(20, 26, 44, 0.95);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10001;
  pointer-events: none;
}
.app-toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Группа сообщений одного дня + «плавающая» дата как в Telegram */
.request-day { display: flex; flex-direction: column; gap: 10px; }
.request-day-chip {
  position: sticky; top: 6px; z-index: 5; align-self: center;
  padding: 4px 14px; border-radius: 14px;
  background: rgba(20, 28, 48, 0.78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 13px; font-weight: 600;
}

.request-msg-row .request-msg-author, .msg-menu-clone .request-msg-author { font-size: 13px; }
.request-msg-row .request-msg-author, .msg-menu-clone .request-msg-author { display: inline-flex; width: fit-content; max-width: 100%; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 700; line-height: 1.25; border: 1px solid rgba(255,255,255,.35); box-shadow: 0 1px 3px rgba(0,0,0,.3); margin-bottom: 5px; }

.request-day-chip { transition: opacity .25s ease; }
.request-day-chip.is-stuck { opacity: 0; pointer-events: none; }
.request-dialog-chat.is-scrolling .request-day-chip.is-stuck { opacity: 1; }

/* Долгое нажатие на сообщение: пузырь «вжимается», в момент срабатывания — короткий «поп» */
.request-msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .3s ease, filter .3s ease; }
.request-msg.is-pressing { transform: scale(0.94); filter: brightness(0.88); transition: transform .33s cubic-bezier(.2,.7,.3,1), filter .33s ease; }
.request-msg.is-popped { transform: scale(1.04); transition: transform .12s ease-out; }

/* Свайп влево по сообщению = «Ответить» */
.request-msg { position: relative; touch-action: pan-y; }
.msg-swipe-ico {
  position: absolute; right: -42px; top: 50%;
  width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 28, 48, 0.78); color: #fff; font-size: 14px;
  opacity: var(--sw, 0); transform: scale(calc(0.5 + var(--sw, 0) * 0.5));
  pointer-events: none;
}
.request-msg.is-swipe-ready .msg-swipe-ico { background: var(--accent); }

/* Меню сообщения: размытый фон и «поднятая» копия пузыря */
.msg-menu-backdrop {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(6, 10, 20, 0); 
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: background .2s ease, backdrop-filter .2s ease, -webkit-backdrop-filter .2s ease;
}
.msg-menu-backdrop.is-open {
  background: rgba(6, 10, 20, 0.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.request-msg.msg-menu-clone {
  position: fixed; z-index: 9999; margin: 0; max-width: none;
  transform: none; pointer-events: none; visibility: visible;
  animation: msgClonePop .18s ease-out;
}
@keyframes msgClonePop { from { transform: scale(0.96); } to { transform: scale(1); } }

.msg-menu.msg-menu--late { animation: msgMenuIn .2s ease-out .08s both; }
@keyframes msgMenuIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Голосовые ── */
.request-composer-send .fa-microphone, .request-composer-send .fa-video { display: none; }
.request-composer-send[data-mode="mic"] .fa-paper-plane, .request-composer-send[data-mode="cam"] .fa-paper-plane { display: none; }
.request-composer-send[data-mode="mic"] .fa-microphone { display: inline-block; }
.request-composer-send[data-mode="cam"] .fa-video { display: inline-block; }
.request-composer-send.is-pop { animation: sendPop .25s ease-out; }
@keyframes sendPop { 0% { transform: scale(0.8) rotate(-20deg); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.request-composer-send { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none; transition: transform .18s ease, background .18s ease; }
.request-composer-send .fa-arrow-up { display: none; }
.request-dialog-composer.is-rec .request-composer-send { position: relative; z-index: 5; }
.request-composer-send.is-recording {
  transform: translateY(var(--ry, 0px)) scale(1.5); z-index: 5;
  background: linear-gradient(180deg, #19bff0 0%, #0088c4 100%);
  box-shadow: 0 0 0 7px rgba(var(--rgb-d), 0.25); animation: recPulse 1.2s ease-in-out infinite;
}
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(var(--rgb-d), 0.28); } 50% { box-shadow: 0 0 0 14px rgba(var(--rgb-d), 0.08); } }
/* запись целиком занимает место поля ввода (поверх него ничего не просвечивает) */
.voice-rec {
  position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: var(--surface);
  display: flex; align-items: center; padding: 12px 74px calc(26px + env(safe-area-inset-bottom)) 12px;
  box-sizing: border-box; animation: recIn .18s ease-out;
}
@keyframes recIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.voice-rec-bar {
  flex: 1; height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-radius: 23px; background: var(--surface-2); color: #fff; overflow: hidden;
}
.voice-rec-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #ff4d4f; animation: recBlink 1s ease-in-out infinite; }
@keyframes recBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.voice-rec.is-paused .voice-rec-dot { animation: none; opacity: 0.45; }
.voice-rec-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 17px; min-width: 40px; }
.voice-rec-hint { margin-left: auto; font-size: 14px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; transition: color .15s; }
.voice-rec.is-cancel .voice-rec-hint { color: #ff7b7d; font-weight: 700; }
.voice-rec-cancel {
  margin: 0 auto; border: none; background: none; color: #4cc3ff; font-size: 17px; font-weight: 600;
  padding: 10px 14px; cursor: pointer; font-family: inherit;
}

/* замок над кнопкой во время удержания; после фиксации превращается в «паузу» */
.voice-lock {
  position: absolute; right: 12px; top: -92px; z-index: 6; width: 48px; height: 84px; border-radius: 24px;
  background: var(--surface-2); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); font-size: 17px; padding: 6px 0;
  animation: lockIn .22s ease-out; transition: background .15s, box-shadow .15s;
}
@keyframes lockIn { from { opacity: 0; transform: translateY(14px) scale(0.9); } to { opacity: 1; transform: none; } }
.voice-lock .fa-chevron-up { font-size: 12px; opacity: 0.7; animation: lockHint 1.1s ease-in-out infinite; }
@keyframes lockHint { 0%, 100% { transform: translateY(2px); opacity: 0.4; } 50% { transform: translateY(-3px); opacity: 0.9; } }
.voice-lock.is-near { background: #0a86bd; box-shadow: 0 0 0 4px rgba(var(--rgb-d), 0.3), 0 6px 18px rgba(0, 0, 0, 0.45); }
.voice-lock.is-near .fa-lock { animation: lockPop .25s ease-out; }
@keyframes lockPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.voice-lock.is-pause {
  top: -84px; right: 14px; width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; cursor: pointer;
  background: var(--surface-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); font-size: 17px; animation: lockIn .22s ease-out;
}
.voice-lock.is-pause:active { transform: scale(0.92); }

/* зафиксировано: большая круглая «Отправить» со стрелкой вверх */
.request-composer-send.is-locked {
  transform: scale(1.42); z-index: 5; animation: lockedPop .22s ease-out;
  background: linear-gradient(180deg, #19bff0 0%, #0088c4 100%); box-shadow: 0 6px 18px rgba(0, 136, 196, 0.5);
}
@keyframes lockedPop { from { transform: scale(1.1); } to { transform: scale(1.42); } }
.request-composer-send.is-locked i { display: none !important; }
.request-composer-send.is-locked .fa-arrow-up { display: inline-block !important; font-size: 20px; }

.request-voice-list { display: flex; flex-direction: column; gap: 6px; }
.voice-player { display: flex; align-items: center; gap: 10px; width: 232px; max-width: 100%; padding: 2px 0; }
.voice-play {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.95); color: var(--accent-dark); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.voice-play:not(.is-playing) i.fa-play { margin-left: 2px; }
.voice-body { flex: 1; min-width: 0; }
.voice-wave { display: flex; align-items: center; gap: 2px; height: 26px; cursor: pointer; }
.voice-wave i { flex: 1; min-width: 2px; max-width: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.4); display: block; transition: background .15s; }
.voice-wave i.is-on { background: #fff; }
.voice-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, 0.85); }
.voice-time { font-variant-numeric: tabular-nums; }
.voice-speed { border: none; border-radius: 9px; padding: 0 7px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.22); color: #fff; cursor: pointer; }
.voice-speed.hidden { display: none; }


/* ── Видео-кружки ── */
.rec-backdrop {
  position: absolute; inset: 0; z-index: 20; background: rgba(12, 16, 28, 0.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.15); backdrop-filter: blur(22px) saturate(1.15);
  animation: recBdIn .2s ease-out;
}
@keyframes recBdIn { from { opacity: 0; } to { opacity: 1; } }
.circle-rec {
  position: absolute; left: 50%; top: 45%; z-index: 21; border-radius: 50%; overflow: hidden;
  transform: translate(-50%, -50%); background: #000; box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
  animation: circleRecIn .22s ease-out;
}
@keyframes circleRecIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } to { opacity: 1; transform: translate(-50%, -50%); } }
.circle-rec video { width: 100%; height: 100%; object-fit: cover; display: block; }
.circle-rec video.is-front { transform: scaleX(-1); }
.circle-rec svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.circle-rec svg circle { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.request-dialog-composer.is-rec { z-index: 22; }
.rec-cam-tools { position: absolute; left: 12px; top: -60px; z-index: 7; display: flex; gap: 10px; }
.rec-tool {
  width: 48px; height: 48px; border: none; border-radius: 50%; color: #fff; font-size: 19px; cursor: pointer;
  background: rgba(60, 66, 86, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.rec-tool:active { transform: scale(0.9); }
.rec-tool { position: relative; }
.rec-tool[data-act="flash"]:not(.is-on) i { opacity: 0.55; }
.rec-tool[data-act="flash"]:not(.is-on)::after { content: ''; position: absolute; width: 26px; height: 2.5px; border-radius: 2px; background: #fff; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px rgba(60, 66, 86, 0.9); }
.rec-tool.is-on { background: #f5c518; color: #1b1e28; }
.request-circle-list { display: flex; flex-direction: column; gap: 6px; }
.circle-player { position: relative; width: 220px; height: 220px; max-width: 100%; cursor: pointer; }
.circle-holder { position: absolute; inset: 4px; border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, 0.35); display: flex; align-items: center; justify-content: center; }
.circle-holder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.circle-wait { color: rgba(255, 255, 255, 0.6); font-size: 26px; }
.circle-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.circle-ring circle { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }
.circle-badge { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 12px; pointer-events: none; }
.circle-badge i { font-size: 11px; }
.circle-player.is-playing .circle-badge { background: rgba(0, 0, 0, 0.35); }

/* кружок без пузыря, как в Telegram */
.request-msg--circle {
  background: none !important; border: none !important; box-shadow: none !important;
  padding: 0 !important; position: relative;
}
.request-msg--circle .request-msg-body { margin: 0; }
.request-msg--circle .circle-holder { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
.request-msg--circle .request-msg-time {
  position: absolute; bottom: 8px; right: 6px; margin: 0; padding: 2px 7px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.48); font-size: 11px; color: #fff; pointer-events: none;
}

/* белая подсветка экрана вместо вспышки на фронтальной камере */
.rec-backdrop { transition: background .25s; }
.rec-backdrop.is-flash { background: #fdfdfd; -webkit-backdrop-filter: none; backdrop-filter: none; }
.circle-rec { transition: box-shadow .25s; }
.circle-rec.is-flash { box-shadow: 0 0 80px 60px rgba(70, 70, 82, 0.5); overflow: visible; }
.circle-rec.is-flash video { border-radius: 50%; }
.request-dialog-composer.is-flash { background: transparent; }
.request-dialog-composer.is-flash .voice-rec { background: transparent; }
.request-dialog-composer.is-flash .voice-rec-bar { background: rgba(120, 120, 128, 0.22); color: #1c1c1e; }
.request-dialog-composer.is-flash .voice-rec-hint { color: rgba(0, 0, 0, 0.5); }
.request-dialog-composer.is-flash .voice-rec-time { color: #1c1c1e; }
.request-dialog-composer.is-flash .voice-lock { background: rgba(150, 150, 156, 0.75); box-shadow: none; }
.request-dialog-composer.is-flash .rec-tool, .request-dialog-composer.is-flash .rec-tool.is-on { background: rgba(150, 150, 156, 0.75); color: #fff; }
.request-dialog-composer.is-flash .rec-tool[data-act="flash"]:not(.is-on)::after { box-shadow: 0 0 0 1.5px rgba(150, 150, 156, 0.9); }

/* при воспроизведении кружок «раздувается» прямо в ленте (сообщения ниже плавно сдвигаются) */
.circle-player { aspect-ratio: 1; max-width: none; transition: width .3s cubic-bezier(.2, .8, .2, 1), height .3s cubic-bezier(.2, .8, .2, 1); }
.circle-player.is-playing { width: calc(220px * var(--cs, 1.5)); height: calc(220px * var(--cs, 1.5)); }
.circle-player.is-playing .circle-holder { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); }
.request-msg--circle { max-width: none; }
.request-msg--circle .request-msg-time { z-index: 31; }

/* фото без пузыря: имя — цветной «таблеткой» поверх фото в левом верхнем углу, аватарка снизу слева (как у остальных) */
.request-msg--photo-only .request-msg-author { position: absolute; top: 8px; left: 8px; z-index: 3; margin: 0; max-width: calc(100% - 16px); }


/* ── Оплата счёта по QR ── */
.pay-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(14, 18, 30, 0) 0%, rgba(14, 18, 30, 0.92) 40%); pointer-events: none; }
.pay-bar .pay-btn { pointer-events: auto; }
.pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 14px; padding: 13px 18px; font-size: 16px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit; background: var(--grad-action); box-shadow: 0 6px 18px rgba(0, 120, 170, 0.45); }
.pay-btn-main { width: 100%; font-size: 17px; padding: 15px 18px; background: linear-gradient(180deg, #2fc46a 0%, #1f9d51 100%); box-shadow: 0 6px 20px rgba(31, 157, 81, 0.45); }
.pay-btn-sec { background: #2b3350; box-shadow: none; }
.pay-btn:active { transform: scale(0.97); }
.pay-sheet { position: absolute; inset: 0; z-index: 20; background: rgba(6, 8, 16, 0.7); display: flex; align-items: flex-end; animation: recBdIn .2s ease-out; }
.pay-sheet-card { position: relative; width: 100%; max-height: 90%; overflow-y: auto; box-sizing: border-box; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 22px 22px 0 0; color: #fff; animation: paySheetIn .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes paySheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pay-sheet-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; }
.pay-sheet-title { font-size: 18px; font-weight: 700; text-align: center; }
.pay-sheet-sum { margin-top: 4px; text-align: center; font-size: 28px; font-weight: 800; color: #5be08e; }
.pay-sheet-qr { display: block; margin: 14px auto 8px; width: 210px; max-width: 70%; border-radius: 14px; background: #fff; padding: 6px; box-sizing: border-box; image-rendering: pixelated; }
.pay-sheet-hint { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, 0.65); text-align: center; margin-bottom: 12px; }
.pay-sheet-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.pay-sheet-actions .pay-btn { flex: 1; font-size: 15px; padding: 12px 10px; }
.pay-sheet-rows { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: grid; grid-template-columns: 112px 1fr 18px; align-items: center; gap: 8px; text-align: left; border: none; border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: #fff; padding: 10px 12px; font-family: inherit; cursor: pointer; }
.pay-row-k { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.pay-row-v { font-size: 14px; word-break: break-word; }
.pay-row i { font-size: 13px; opacity: 0.5; }

.pay-sheet-banks-title { font-size: 13px; color: rgba(255, 255, 255, 0.65); text-align: center; margin: 4px 0 8px; }
.pay-sheet-banks { display: flex; gap: 8px; margin-bottom: 12px; }
.pay-bank { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; background: rgba(255, 255, 255, 0.07); color: #fff; padding: 12px 6px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; }
.pay-bank:active { transform: scale(0.96); }
.pay-bank-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.pay-sheet-actions .pay-btn { font-size: 16px; padding: 14px 10px; }
.pay-sheet-qr { width: 250px; max-width: 78%; }

/* шапка просмотра файла убрана: «Отправить» и «Скачать» — по правой кнопке / долгому нажатию */
.file-viewer-header { display: none; }
.file-viewer-body { padding-top: calc(14px + env(safe-area-inset-top)); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.file-menu { min-width: 190px; }

/* компактная шапка диалога: без большого заголовка «Заявка», меньше отступов */
.request-dialog-top { padding: 8px 12px 9px; }
.request-dialog-title { display: none; }
.request-dialog-number { font-size: 11.5px; padding: 2px 8px; }
.request-dialog-status { font-size: 11.5px; padding: 2px 8px; }
.request-dialog-topic { margin-top: 5px; font-size: 16px; line-height: 1.25; }
.request-dialog-company { margin-top: 2px; font-size: 11.5px; line-height: 1.25; }

/* непрочитанные — красным */
.request-unread-badge { width: 11px; height: 11px; background: linear-gradient(180deg, #ff6b6b 0%, #e5383b 100%); box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.18); animation: unreadPulse 2s ease-in-out infinite; }
@keyframes unreadPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.18); } 50% { box-shadow: 0 0 0 6px rgba(255, 77, 79, 0.08); } }
.request-card--unread { box-shadow: inset 3px 0 0 #ff4d4f; }
.request-card--unread .request-text { color: #d9dbe4; font-weight: 600; }

/* Длинные строки без пробелов (пути, ссылки, ключи) переносятся внутри пузыря и не растягивают диалог */
.request-day, .request-msg-row { min-width: 0; max-width: 100%; }
.request-msg, .request-msg-body, .request-msg-text, .request-msg-quote-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.request-dialog-chat { overflow-x: hidden; }

/* Предпросмотр фото перед отправкой (как в Telegram) */
.attach-preview {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  transition: background .2s ease, backdrop-filter .2s ease;
}
.attach-preview.is-open { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.attach-preview-sheet {
  width: 100%; max-width: 560px; max-height: 94vh; display: flex; flex-direction: column; gap: 10px;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 22, 38, 0.97); border-radius: 22px 22px 0 0; color: #fff;
  transform: translateY(100%); transition: transform .25s ease;
}
.attach-preview.is-open .attach-preview-sheet { transform: translateY(0); }
.attach-preview-grip { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); }
.attach-preview-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.attach-preview-title { text-align: center; font-size: 17px; font-weight: 700; }
.attach-preview-count { text-align: right; font-size: 13px; font-weight: 600; opacity: .75; }
.attach-preview-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 16px; cursor: pointer; }
/* обои чата позади фото — как в диалоге (у темы Pos Bazar подменяется тем же файлом) */
.attach-preview-stage {
  min-height: 0; overflow: auto; border-radius: 16px; padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1b1e28 url('../assets/icons/chat-bg.webp?v=20261105-1') top left / 260px 260px repeat;
}
.attach-preview-grid { display: grid; gap: 8px; grid-template-columns: 1fr; justify-items: center; }
.attach-preview-grid.is-2, .attach-preview-grid.is-3, .attach-preview-grid.is-4 { grid-template-columns: repeat(2, 1fr); justify-items: stretch; }
.attach-preview-cell { position: relative; min-width: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(0, 0, 0, 0.3); }
.attach-preview-img { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
.attach-preview-grid.is-2 .attach-preview-img, .attach-preview-grid.is-3 .attach-preview-img, .attach-preview-grid.is-4 .attach-preview-img { height: 22vh; object-fit: cover; }
.attach-preview-del {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; cursor: pointer;
}
.attach-preview-plus {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 17px; cursor: pointer;
}
.attach-preview-plus.hidden { display: none; }
.attach-preview-bar { display: flex; align-items: flex-end; gap: 8px; }
.attach-preview-caption {
  flex: 1; min-width: 0; resize: none; padding: 11px 14px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07); color: #fff; font: inherit; font-size: 16px; line-height: 1.3; outline: none; max-height: 120px;
}
.attach-preview-caption::placeholder { color: rgba(255, 255, 255, 0.5); }
.attach-preview-send { flex: none; }

/* Предупреждение о просрочке оплаты лицензий: полоса закреплена в самом верху экрана поверх вкладок */
.overdue-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 9px;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); border-radius: 0 0 14px 14px; text-align: left; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #d32f2f, #b71c1c); box-shadow: 0 4px 18px rgba(183, 28, 28, 0.5);
  font: inherit;
}
.overdue-banner.hidden { display: none; }
.overdue-banner__icon { flex: none; font-size: 18px; }
.overdue-banner__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.overdue-banner__title { font-size: 13.5px; font-weight: 700; line-height: 1.25; color: #fff; }
.overdue-banner__sub { display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, 0.95); }
.overdue-banner__line { overflow-wrap: anywhere; }
.overdue-banner__sub:empty { display: none; }

/* Отступ под полосу просрочки: высоту полосы в --overdue-h выставляет JS */
html.has-overdue .main-logo-container { top: calc(16px + var(--overdue-h, 0px)); }
html.has-overdue .page { margin-top: calc(90px + var(--overdue-h, 0px)); height: calc(100% - clamp(60px, 12vw, 100px) - var(--overdue-h, 0px)); }
html.has-overdue body.hide-main-logo #requests.page,
html.has-overdue body.hide-main-logo #profile.page,
html.has-overdue body.hide-main-logo #accounts.page { margin-top: var(--overdue-h, 0px); }

/* Красные отметки просрочки: кнопка «Счета» и заведения в списке */
.nav-btn.is-overdue,
.nav-btn.is-overdue.active { color: #ff6b6b; }
.nav-btn.is-overdue i { color: #ff5252; }
.nav-btn.is-overdue i::after {
  content: '!'; position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; border-radius: 8px;
  background: #e53935; color: #fff; font: 700 11px/16px Arial, sans-serif; text-align: center;
  box-shadow: 0 0 0 2px rgba(19, 25, 41, 0.9);
}
.accounts-establishment-btn.is-overdue {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.28), rgba(183, 28, 28, 0.2));
  box-shadow: inset 0 0 0 1.5px rgba(255, 82, 82, 0.75);
}
.accounts-establishment-btn.is-overdue .accounts-establishment-name::after {
  content: 'просрочена оплата'; display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: #ff8a80;
}
.accounts-establishment-btn.is-overdue .accounts-establishment-arrow { color: #ff5252; }

/* Полоса просрочки не показывается, пока идёт заставка (появляется вместе с основным экраном) */
.overdue-banner { visibility: hidden; }
body.app-ready .overdue-banner { visibility: visible; }

/* Свайп назад из счетов заведения: список заведений лежит под экраном счетов */
/* top/left не задаём: список остаётся ровно на своём обычном месте (отступ страницы разный на разных вкладках), иначе после свайпа он «прыгает» */
#accounts-establishment-list.swipe-under { position: absolute; width: calc(100% - 40px); z-index: 0; }
#accounts-bills-view.swipe-over { position: relative; z-index: 1; background: var(--bg-deep); min-height: 100%; margin: 0 -20px; padding: 0 20px; }

/* Фото с известными размерами: рамка нужной формы сразу, до загрузки картинки (спиннер поверх рамки) */
.request-photo-wrap.has-ratio { min-height: 0; max-width: 100%; }
.request-photo-wrap.has-ratio .request-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.request-photo-wrap.has-ratio .request-photo-loading,
.request-photo-wrap.has-ratio .request-photo-fallback { position: absolute; inset: 0; min-height: 0; }

/* Заявки под баннером просрочки: поиск без лишнего верхнего отступа (как карточка на «Счета») */
html.has-overdue .requests-modern.requests-table { margin-top: 0; }
html.has-overdue .requests-modern .requests-search-wrap { margin-top: 0; }



/* ===== Профиль: две плитки ===== */
.profile-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.profile-tile{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;
  min-height:132px;padding:16px;border-radius:24px;border:1px solid transparent;color:#fff;text-align:left;font:inherit;font-size:16px;font-weight:500;
  -webkit-tap-highlight-color:transparent;cursor:pointer;transition:transform .12s ease}
.profile-tile:active{transform:scale(.97)}
.profile-tile-brand{background:var(--grad-soft)}
.profile-tile-dark{background:var(--surface);border-color:rgba(var(--rgb-a),.38)}
.profile-tile-icon{font-size:26px}
.profile-tile-dark .profile-tile-icon{color:var(--accent-light)}
.profile-tile-text{position:relative;display:block;line-height:1.25}
.profile-tile-text small{display:block;margin-top:2px;font-size:12px;font-weight:400;opacity:.85}
.profile-tile-dark .profile-tile-text small{color:#9aa6c7;opacity:1}
.profile-tile-wm{position:absolute;right:-10px;bottom:-14px;font-size:84px;opacity:.12;pointer-events:none}


/* ===== Единый градиент кнопок (как у плитки «Заведения») ===== */
.request-composer-send,
.file-viewer-download,
.file-viewer-download-header,
.pay-btn:not(.pay-btn-main) { background: var(--grad-soft); }
.pay-btn:not(.pay-btn-main) { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }

/* Заявки: непрочитанная — ровная тонкая рамка вместо «кривой» полосы слева (она повторяла скругление угла) */
.request-card--unread { box-shadow: inset 0 0 0 1px rgba(255, 77, 79, 0.55); }

/* Счета/заведения: круглая кнопка справа без циановой рамки */
.establishment-item__share { background: rgba(255, 255, 255, 0.08); border: none; }
.establishment-item__share:active { background: rgba(255, 255, 255, 0.16); }

/* Градиент рассчитывается по границе (border-box): иначе при прозрачной рамке он повторяется по краю и даёт тонкую линию другого цвета */
.accounts-filter-btn.is-active,
.profile-tile-brand,
.requests-filters-apply-btn,
.btn-Save,
.btn-SelectRestModal,
.btn-Feedback { background-origin: border-box; }
.profile-tile-brand { border-color: transparent; }

/* Главная под баннером просрочки: логотип и карточки ближе к баннеру (отступ как на других вкладках) */
html.has-overdue #home.page {
  margin-top: calc(64px + var(--overdue-h, 0px));
  height: calc(100% - clamp(60px, 12vw, 100px) - var(--overdue-h, 0px) + 26px);
}

/* Главная под баннером: общий логотип (он fixed) поднимаем вместе с карточками, иначе его полоса затемняет верх карточек */
html.has-overdue .main-logo-container { top: calc(var(--overdue-h, 0px) - 7px); }


/* ===== Главная: карточки с узором, стеклянной иконкой и крупной иконкой-водяным знаком ===== */
.home-card-kb,
.home-secondary-card--primary,
.home-card-market { position: relative; overflow: hidden; background-origin: border-box; }
.home-card-kb {
  background: var(--surface);
  border: 1px solid rgba(var(--rgb-a), 0.30);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.home-card-market {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.home-card-kb::before,
.home-secondary-card--primary::before,
.home-card-market::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
}
.home-card-kb::before { opacity: 0.3; }
.home-card-market::before { opacity: 0.12; }
.home-card-wm {
  position: absolute; right: -8px; bottom: -12px; font-size: 96px; line-height: 1;
  color: #fff; opacity: 0.14; pointer-events: none;
}
.home-card-glass {
  position: relative; width: 42px; height: 42px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; background: rgba(255, 255, 255, 0.2);
}
.home-card-kb .home-card-glass { background: rgba(var(--rgb-a), 0.16); color: var(--accent-light); }
.home-card-text { position: relative; display: flex; flex-direction: column; gap: 4px; }
.home-card-sub { font-size: clamp(12px, 2.6vw, 14px); font-weight: 400; line-height: 1.15; color: rgba(255, 255, 255, 0.85); }
.home-card-kb .home-card-sub { color: #9aa6c7; }
.home-card-market > * { position: relative; }


/* ===== База знаний: панель, выезжающая снизу ===== */
#knowledge-base-modal.kb-modal { align-items: flex-end; background-color: rgba(0, 0, 0, 0.62); }
.kb-sheet.modal-content {
  width: 100%; max-width: none; box-sizing: border-box;
  background: var(--surface); border-radius: 26px 26px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
}
#knowledge-base-modal:not(.hidden) .kb-sheet { animation: kbSheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes kbSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.kb-grab { width: 40px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); margin: 0 auto 12px; }
.kb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kb-head__icon {
  width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--accent-light); background: rgba(var(--rgb-a), 0.16);
}
.kb-head__text { display: flex; flex-direction: column; }
.kb-head__text b { font-size: 18px; font-weight: 700; line-height: 1.15; }
.kb-head__text small { font-size: 12px; font-weight: 400; color: #9aa6c7; }
.kb-close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: #cdd6f0;
  background: rgba(255, 255, 255, 0.08); -webkit-tap-highlight-color: transparent;
}
.kb-row {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 8px; padding: 12px; border-radius: 18px; border: 1px solid transparent; color: #fff;
  text-align: left; font: inherit; cursor: pointer; background-origin: border-box;
  -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease;
}
.kb-row:last-child { margin-bottom: 0; }
.kb-row:active { transform: scale(0.98); }
.kb-row--brand { background: var(--grad-soft); }
.kb-row--dark { background: var(--surface-2); border-color: rgba(var(--rgb-a), 0.30); }
.kb-row__icon {
  width: 40px; height: 40px; border-radius: 13px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: rgba(255, 255, 255, 0.2);
}
.kb-row--dark .kb-row__icon { background: rgba(var(--rgb-a), 0.16); color: var(--accent-light); }
.kb-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kb-row__text b { font-size: 15px; font-weight: 500; }
.kb-row__text small { font-size: 12px; font-weight: 400; opacity: 0.85; }
.kb-row--dark .kb-row__text small { color: #9aa6c7; opacity: 1; }
.kb-row__arrow { margin-left: auto; font-size: 15px; opacity: 0.85; }


/* База знаний: правки — без крестика, ровный градиент без рамки, нейтральная обводка второй строки */
.kb-sheet.modal-content { touch-action: none; }
.kb-row--brand { border: 0; padding: 13px; background: var(--grad-soft); background-origin: border-box; }
.kb-row--dark { border-color: rgba(255, 255, 255, 0.09); }

/* Маркет на главной: значок монитора в круге с градиентной подложкой и кольцом */
.home-card-market .home-market-row__media {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad-soft); background-origin: border-box;
  box-shadow: 0 0 0 3px rgba(var(--rgb-a), 0.25);
  color: #1a1d2b; font-size: 28px;
}

/* ==================== ЗАЯВКИ: вкладки + плоский список (v193) ==================== */
.requests-tabs {
  display: flex;
  gap: 2px;
  margin: 10px 0 4px;
  padding: 3px;
  background: var(--surface);
  border-radius: 14px;
  flex: 0 0 auto;
}
.requests-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #9aa0b4;
  font: inherit;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, color .2s ease;
}
.requests-tab b { font-weight: 500; font-size: 11px; opacity: .85; }
.requests-tab.is-active { background: var(--grad-soft); color: #fff; }

#requests-list:has(.request-row) { gap: 8px; }
.request-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: none;
  border: 0;
}
.request-row:active { background: var(--surface-2, var(--surface)); }
.request-row-body { flex: 1; min-width: 0; }
.request-row-top,
.request-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.request-row-org {
  min-width: 0;
  font-size: 12px;
  color: var(--accent-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-row-time { flex: none; font-size: 12px; color: #7e8291; }
.request-row-topic {
  margin: 1px 0;
  font-size: 15.5px;
  color: #dfe3f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-row-preview {
  min-width: 0;
  font-size: 13px;
  color: #8c90a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-row-prefix { color: var(--accent-light); }
.request-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: #7e8291;
}
.request-dot.request-status--new      { background: #4aa8ff; }
.request-dot.request-status--progress { background: #ff9f2e; }
.request-dot.request-status--waiting  { background: #e6c200; }
.request-dot.request-status--message  { background: #a855f7; }
.request-dot.request-status--transfer { background: #14c8be; }
.request-dot.request-status--resolved { background: #2fc760; }

/* непрочитанное: жирная тема, акцентное время, градиентный счётчик (без красного) */
.request-row.request-card--unread { box-shadow: none; }
.request-row.request-card--unread .request-row-topic { font-weight: 700; color: #fff; }
.request-row.request-card--unread .request-row-time { color: var(--accent-light); }
.request-row.request-card--unread .request-row-preview { color: #c8cbd8; font-weight: 500; }
.request-row .request-unread-badge {
  width: 10px;
  height: 10px;
  background: var(--grad-soft);
  box-shadow: none;
  animation: none;
}
.request-unread-count {
  flex: none;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--grad-soft);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Заявки: компактный поиск (на ПК выглядел слишком крупным) */
.requests-search-wrap { min-height: 0; padding: 5px 8px 5px 14px; border-radius: 16px; }
.requests-search-icon { font-size: 15px; }
.requests-search-input { font-size: 16px; padding: 6px 0; min-width: 0; }
.requests-filter-btn { width: 32px; height: 32px; font-size: 16px; }

/* Главная: кнопка «Маркет» ниже по высоте */
.home-secondary-card--bottom.home-card-market { min-height: min(10vh, 82px); padding: 12px 20px; gap: 14px; border-radius: 28px; }
.home-card-market .home-market-row__media { width: 46px; height: 46px; }
.home-card-market .home-market-row__media svg { width: 24px; height: 24px; }
.home-card-market .home-market-row__arrow { font-size: clamp(22px, 4.5vw, 30px); }

/* База знаний: строки в стиле главной — точечная сетка и крупный значок-водяной знак */
.kb-row { position: relative; overflow: hidden; }
.kb-row::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
}
.kb-row--brand::before { opacity: 0.35; }
.kb-row--dark::before { opacity: 0.14; }
.kb-row > * { position: relative; }
.kb-row > .kb-row__wm {
  position: absolute; right: 34px; bottom: -16px; font-size: 76px; line-height: 1;
  color: #fff; opacity: 0.14; pointer-events: none;
}
.kb-row--dark > .kb-row__wm { color: var(--accent-light); opacity: 0.10; }

/* ==================== СЧЕТА: плитки заведений в две колонки (v198) ==================== */
.accounts-establishment-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.accounts-establishment-list:has(.accounts-tile:only-child) { grid-template-columns: 1fr; }
.accounts-establishment-list > .accounts-placeholder { grid-column: 1 / -1; }
.accounts-tile {
  position: relative; overflow: hidden;
  min-height: 98px; padding: 14px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  background: var(--surface); border: 0; box-shadow: none;
  color: #f2f3f7; text-align: left;
}
.accounts-tile:active { transform: scale(0.98); }
.accounts-tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  opacity: 0.14;
}
.accounts-tile > * { position: relative; }
.accounts-tile > .accounts-tile__wm {
  position: absolute; right: -6px; top: -8px; font-size: 62px; line-height: 1;
  color: var(--accent-light); opacity: 0.10; pointer-events: none;
}
.accounts-tile .accounts-establishment-name { font-size: 14.5px; line-height: 1.2; font-weight: 600; word-break: break-word; }
.accounts-tile__pill {
  margin-top: 7px; font-size: 11.5px; line-height: 1.5; padding: 1px 9px; border-radius: 999px;
  background: rgba(52, 199, 120, 0.16); color: #5fdc9c;
}
.accounts-tile.is-overdue {
  background: linear-gradient(160deg, rgba(255, 77, 79, 0.22), rgba(124, 58, 237, 0.10)), var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 110, 0.35);
}
.accounts-tile.is-overdue::before { opacity: 0.2; }
.accounts-tile.is-overdue > .accounts-tile__wm { color: #ff8a8c; opacity: 0.14; }
.accounts-tile.is-overdue .accounts-establishment-name::after { content: none; }
.accounts-tile.is-overdue .accounts-tile__pill { background: rgba(255, 77, 79, 0.2); color: #ffb3b5; }

/* ==================== СЧЕТА: плитки счетов и переключатель (v199) ==================== */
.accounts-filter-row {
  gap: 2px; padding: 3px; margin-bottom: 12px;
  background: var(--surface); border-radius: 14px;
}
.accounts-filter-row .accounts-filter-btn {
  border: 0; background: transparent; border-radius: 11px;
  padding: 8px 4px; font-size: 13px; font-weight: 500; color: #9aa0b4;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.accounts-filter-row .accounts-filter-btn b { font-size: 11px; font-weight: 500; opacity: 0.85; }
.accounts-filter-row .accounts-filter-btn.is-active { background: var(--grad-soft); background-origin: border-box; color: #fff; }

.accounts-bill-plate {
  position: relative; overflow: hidden;
  border: 0; border-radius: 20px; padding: 13px 16px;
  background: var(--surface); box-shadow: none;
}
.accounts-bill-plate:active { transform: scale(0.98); box-shadow: none; border: 0; }
.accounts-bill-plate::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  opacity: 0.14;
}
.accounts-bill-plate > * { position: relative; }
.accounts-bill-plate > .accounts-bill-wm {
  position: absolute; right: 78px; top: -8px; font-size: 62px; line-height: 1;
  color: var(--accent-light); opacity: 0.08; pointer-events: none;
}
.accounts-bill-plate .accounts-bill-month { font-size: 15.5px; font-weight: 700; color: #fff; }
.accounts-bill-plate .accounts-bill-sub { margin-top: 3px; font-size: 12px; color: #8c90a0; }
.accounts-bill-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.accounts-bill-amount { font-size: 17px; font-weight: 700; color: #fff; white-space: nowrap; }
.accounts-bill-plate .accounts-bill-status { font-size: 11.5px; font-weight: 500; padding: 1px 9px; }
.accounts-bill-plate .accounts-bill-status--paid { background: rgba(52, 199, 120, 0.16); color: #5fdc9c; }
.accounts-bill-plate .accounts-bill-status--unpaid { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.accounts-bill-plate .accounts-bill-status--cancelled { background: rgba(140, 146, 160, 0.18); color: #aab0c2; }
.accounts-bill-plate.is-cancelled .accounts-bill-month,
.accounts-bill-plate.is-cancelled .accounts-bill-amount { color: #aab0c2; }
.accounts-bill-plate.is-overdue {
  background: linear-gradient(160deg, rgba(255, 77, 79, 0.20), rgba(124, 58, 237, 0.10)), var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 110, 0.35);
}
.accounts-bill-plate.is-overdue::before { opacity: 0.2; }
.accounts-bill-plate.is-overdue > .accounts-bill-wm { color: #ff8a8c; opacity: 0.12; }
.accounts-bill-plate.is-overdue .accounts-bill-status--unpaid { background: rgba(255, 77, 79, 0.2); color: #ffb3b5; }

/* ==================== ЗАЯВКИ: меню фильтра у кнопки (v201) ==================== */
.requests-search-wrap { position: relative; }
.requests-filter-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 260px; max-width: calc(100vw - 40px); max-height: 50vh; overflow-y: auto;
  padding: 6px; border-radius: 18px;
  background: var(--surface-2, #242e4d);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.requests-filter-pop[hidden] { display: none; }
.requests-filter-pop.is-open { opacity: 1; transform: none; }
.requests-filter-pop__item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 0; border-radius: 12px; background: transparent;
  color: #dfe3f2; font: inherit; font-size: 14px; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.requests-filter-pop__item + .requests-filter-pop__item { margin-top: 2px; }
.requests-filter-pop__item:active { background: rgba(255, 255, 255, 0.06); }
.requests-filter-pop__item.is-on { background: rgba(var(--rgb-a), 0.16); color: #fff; }
.requests-filter-pop__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requests-filter-pop__count { font-size: 12px; color: #7e8291; }
.requests-filter-pop__check { color: var(--accent-light); font-size: 13px; }

/* ==================== ПРОФИЛЬ: редактирование — плашки и значки (v202) ==================== */
.edit-profile-fs-label { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; margin: 22px 4px 8px; }
.edit-profile-fs-label:first-child { margin-top: 0; }
.edit-profile-group {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: 20px; padding: 0; margin-top: 0;
}
.edit-profile-group::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  opacity: 0.12;
}
.edit-profile-group > * { position: relative; }
.edit-profile-field { padding: 10px 16px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.edit-profile-field:first-child { border-top: 0; }
.edit-profile-field-label { display: block; font-size: 11.5px; color: #8e9ac0; margin-bottom: 1px; }
.edit-profile-group .edit-profile-input {
  min-height: 30px; padding: 0; border: 0; border-radius: 0; background: transparent;
  font-size: 16px; box-shadow: none;
}
.edit-profile-group .edit-profile-input:focus { border: 0; box-shadow: none; }
.edit-profile-toggle-list.edit-profile-group { padding: 0; }
.edit-profile-toggle-list .edit-profile-toggle-row { padding: 12px 16px; gap: 12px; border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.edit-profile-toggle-list .edit-profile-toggle-row:first-child { border-top: 0; }
.edit-profile-toggle-icon {
  flex: none; width: 34px; height: 34px; border-radius: 11px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.edit-profile-toggle-icon--a { background: rgba(94, 203, 250, 0.16); color: #8fd3ff; }
.edit-profile-toggle-icon--b { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.edit-profile-toggle-icon--c { background: rgba(124, 58, 237, 0.22); color: #b79cff; }
.edit-profile-toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.edit-profile-toggle-text small { margin-top: 1px; font-size: 12px; color: #8e9ac0; }
.edit-profile-toggle input:checked + .edit-profile-toggle-slider { background: var(--grad-soft); background-origin: border-box; }

/* ==================== «Ваши заведения»: плитки в две колонки (v204) ==================== */
.establishment-modal-content .establishment-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  align-content: start; flex: 1 1 auto; min-height: 0; padding-right: 0;
}
.establishment-modal-content .establishment-list:has(.establishment-item:only-child) { grid-template-columns: 1fr; }
.establishment-modal-content .establishment-list .establishment-item,
.establishment-modal-content .establishment-list .btn-RestModal {
  position: relative; overflow: hidden;
  min-height: 104px; margin-bottom: 0; padding: 13px;
  flex-direction: column; align-items: flex-start; justify-content: flex-end;
  border: 0; border-radius: 20px; box-shadow: none;
  background: var(--surface);
}
.establishment-modal-content .establishment-list .establishment-item:active,
.establishment-modal-content .establishment-list .btn-RestModal:active {
  border: 0; box-shadow: none; background: var(--surface-2);
}
.establishment-modal-content .establishment-item::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, transparent 30%, #000);
  mask-image: linear-gradient(135deg, transparent 30%, #000);
  opacity: 0.12;
}
.establishment-modal-content .establishment-item > * { position: relative; }
.establishment-modal-content .establishment-item > .establishment-item__wm {
  position: absolute; right: -6px; top: -8px; font-size: 62px; line-height: 1;
  color: var(--accent-light); opacity: 0.09; pointer-events: none;
}
.establishment-modal-content .establishment-item .establishment-item__label {
  padding-right: 0; font-size: 14.5px; line-height: 1.2; word-break: break-word;
}
.establishment-modal-content .establishment-item .establishment-item__actions {
  position: absolute; right: 10px; top: 10px; margin-left: 0;
}
.establishment-modal-content .establishment-item .establishment-item__share {
  width: 32px; height: 32px; border-radius: 11px;
}
.establishment-modal-content .establishment-item .establishment-item__share i { font-size: 13px; }

/* v205: список сотрудников — плоские строки, приглашение */
.establishment-modal-content .establishment-item .establishment-item__label{padding-right:0}
.establishment-staff-list .staff-row{display:flex;align-items:center;gap:12px;padding:12px 2px;background:none;border:none;border-radius:0;box-shadow:none;border-bottom:1px solid rgba(255,255,255,.07)}
.establishment-staff-list .staff-row:last-child{border-bottom:none}
.staff-row__ava{flex:0 0 auto;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--accent-light);background:var(--grad-soft,rgba(255,255,255,.08))}
.staff-row .establishment-staff-role{min-width:0;max-width:42%}
.staff-row .establishment-staff-role-select{background-color:transparent;border:none;padding:6px 22px 6px 6px;text-align:right}
.staff-row div.establishment-staff-role-select{justify-content:flex-end;padding:0}
.staff-row .establishment-staff-delete{margin-left:0;width:30px;height:30px;border:none;background:transparent}
.staff-invite-btn{margin-top:12px;flex-shrink:0;opacity:1;transform:none}
.staff-invite-btn i{margin-right:6px}
/* v209: кнопка «Пригласить коллегу» — без сдвига translateX от .btn-Save */
#establishment-staff-invite-btn,
#establishment-staff-invite-btn:not(:active),
#establishment-staff-invite-btn:active { transform: none; opacity: 1; margin-left: auto; margin-right: auto; width: 100%; max-width: 400px; }
#establishment-staff-invite-btn:active { transform: scale(0.98); }

/* v210: свой выбор должности */
.staff-role-btn{display:inline-flex;align-items:center;gap:6px;max-width:100%;background:transparent;border:none;padding:6px 2px;color:var(--accent-light);font:inherit;font-size:13px;font-weight:600;text-align:right;-webkit-tap-highlight-color:transparent}
.staff-role-btn span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.staff-role-btn i{font-size:10px;flex:0 0 auto}
.staff-row .establishment-staff-role{position:relative;display:flex;justify-content:flex-end}
.staff-role-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.staff-role-pop{position:fixed;left:auto;z-index:10050;width:240px}

/* v212: фото сотрудника поверх инициалов */
.staff-row__ava{position:relative;overflow:hidden}
.staff-row__ava img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}

/* v215: своё окно-уведомление вместо системного alert */
.app-popup{position:fixed;inset:0;z-index:20000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(5,7,14,.62)}
.app-popup__box{width:100%;max-width:340px;padding:20px 18px 16px;border-radius:20px;background:var(--surface-2,#242e4d);box-shadow:0 18px 44px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.07);text-align:center}
.app-popup__title{font-size:16px;font-weight:700;color:#fff;margin-bottom:8px}
.app-popup__text{font-size:14.5px;line-height:1.4;color:#dfe3f2;word-break:break-word}
.app-popup__ok{margin-top:16px;width:100%;padding:12px;border:none;border-radius:999px;background:var(--grad-primary);color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer}

/* v217: своя стрелка «назад» для десктопа */
.app-back-btn{position:fixed;top:10px;left:10px;z-index:15000;width:38px;height:38px;border-radius:50%;border:none;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);color:#fff;font-size:15px;cursor:pointer;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.app-back-btn:active{background:rgba(255,255,255,.2)}
.app-back-btn.hidden{display:none}
