/**
 * taxofon.css
 * Стили приложения Таксофон: анимация сплеш-скрина, телефонная будка,
 * визуализатор голоса, карточка взаимного раскрытия и футер
 */

/* ==========================================================
   1. СТИЛЬНЫЙ СПЛЕШ-СКРИН ПРИ ПЕРВОМ ЗАПУСКЕ (SPLASH SCREEN)
   ========================================================== */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
  overflow: hidden;
}

.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
}

/* Фоновые неоновые круги */
.splash-bg-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(37, 99, 235, 0.1) 50%, transparent 70%);
  filter: blur(40px);
  animation: glow-pulse 3s infinite ease-in-out;
}

@keyframes glow-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

/* Чистый логотип без фона с оригинальной плавной анимацией */
.splash-logo-wrap {
  width: 105px;
  height: 105px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
  animation: splash-float 3s ease-in-out infinite, splash-icon-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-logo-img {
  width: 95px;
  height: 95px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 24px rgba(6, 182, 212, 0.45));
}

@keyframes splash-icon-pop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Стилизованные анимированные буквы "ТАКСОФОН" */
.splash-title {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: 8px;
}

.splash-letter {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  animation: letter-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 2px 10px rgba(6, 182, 212, 0.4));
}

@keyframes letter-reveal {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.splash-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-theme-hint-color);
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-in-up 0.8s ease 0.8s forwards;
  margin-bottom: 24px;
}

.splash-loader-bar {
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: fade-in-up 0.5s ease 1s forwards;
}

.splash-loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  border-radius: 4px;
  animation: load-strip 1.6s cubic-bezier(0.65, 0, 0.35, 1) 1.1s forwards;
}

@keyframes load-strip {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}


/* ==========================================================
   2. ШАПКА ПРИЛОЖЕНИЯ (HEADER)
   ========================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px 0;
  width: 100%;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.header-brand:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.brand-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) brightness(1.2);
  transition: transform 0.2s ease, filter 0.2s ease;
}

body.light-theme .brand-icon img {
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.45));
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .brand-text h1 {
  background: linear-gradient(135deg, #000000 0%, #007aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

body.light-theme .icon-btn {
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

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


/* ==========================================================
   3. ЭКРАНЫ ПРИЛОЖЕНИЯ
   ========================================================== */
.view-screen {
  display: none;
  flex: 1;
  width: 100%;
  flex-direction: column;
  animation: screen-fade-in 0.3s ease forwards;
  overflow-x: hidden;
}

.view-screen.active {
  display: flex;
}

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


/* ==========================================================
   4. ГЛАВНЫЙ ЭКРАН (HOME SCREEN) - ПРОФЕССИОНАЛЬНАЯ ТИПОГРАФИКА
   ========================================================== */
.booth-card {
  position: relative;
  text-align: center;
  padding: 20px 18px 16px 18px;
  margin-top: 0;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--tg-theme-secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

body.light-theme .booth-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.booth-card-art {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

.booth-card-art img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 20px rgba(6, 182, 212, 0.5)) drop-shadow(0 3px 8px rgba(37, 99, 235, 0.4));
  animation: booth-float 3.5s ease-in-out infinite alternate;
}

body.light-theme .booth-card-art img {
  filter: drop-shadow(0 4px 14px rgba(0, 122, 255, 0.22));
}

@keyframes booth-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.booth-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.booth-subtitle {
  font-size: 13px;
  color: var(--tg-theme-hint-color);
  line-height: 1.45;
  margin-bottom: 12px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.booth-status-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0;
}

.booth-status-strip .tg-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

/* Кнопка вызова */
.start-call-btn {
  padding: 13.5px 20px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.32);
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
}

body.light-theme .start-call-btn {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.22);
}

.start-call-btn:hover {
  filter: brightness(1.05);
}

.start-call-btn:active {
  transform: scale(0.98);
}

/* Карточка режима анонимности */
.pref-quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
  flex-shrink: 0;
  width: 100%;
  gap: 12px;
  box-sizing: border-box;
}

body.light-theme .pref-quick-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pref-quick-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.pref-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-link-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.light-theme .pref-icon-bubble {
  background: rgba(0, 122, 255, 0.08);
  color: #007aff;
}

.pref-quick-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.pref-quick-text .title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pref-quick-text .desc {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#quickPrefSelect {
  flex: 0 0 auto;
  max-width: 48%;
  font-size: 12.5px !important;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1c1c20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding: 7px 24px 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--tg-theme-text-color, #ffffff);
  cursor: pointer;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

#quickPrefSelect option {
  background-color: #1c1c20 !important;
  color: #ffffff !important;
  padding: 8px 12px;
}

body.light-theme #quickPrefSelect {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

body.light-theme #quickPrefSelect option {
  background-color: #ffffff !important;
  color: #000000 !important;
  padding: 8px 12px;
}

@media screen and (max-width: 360px) {
  .pref-quick-card {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .pref-quick-left {
    min-width: 0;
    flex: 1 1 auto;
  }
}


/* ==========================================================
   5. ЭКРАН ПОИСКА (SEARCHING SCREEN)
   ========================================================== */
.searching-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 30px 20px;
}

.sonar-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  pointer-events: none;
}

.sonar-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  animation: sonar-wave 2s infinite ease-out;
  pointer-events: none;
}

.sonar-circle:nth-child(2) {
  animation-delay: 0.6s;
}

.sonar-circle:nth-child(3) {
  animation-delay: 1.2s;
}

@keyframes sonar-wave {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.sonar-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
  z-index: 2;
  animation: phone-shake 1.8s infinite ease-in-out;
}

@keyframes phone-shake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-10deg); }
  20%, 40% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
}

.searching-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.searching-subtitle {
  font-size: 14px;
  color: var(--tg-theme-hint-color);
  margin-bottom: 24px;
  max-width: 280px;
}

/* Блок предложения сброса фильтра при долгом поиске */
.search-filter-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
  max-width: 310px;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: prompt-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.light-theme .search-filter-prompt {
  background: rgba(0, 122, 255, 0.05);
  border: 1px solid rgba(0, 122, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

@keyframes prompt-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-prompt-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--tg-theme-hint-color);
  text-align: center;
}

.search-prompt-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

.search-prompt-reset-btn:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(37, 99, 235, 0.35));
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.search-prompt-reset-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

body.light-theme .search-prompt-reset-btn {
  background: #007aff;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}


/* ==========================================================
   6. ЭКРАН АКТИВНОГО РАЗГОВОРА (CALL SCREEN)
   ========================================================== */
.call-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  padding: 10px 0;
}

.call-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.call-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tg-theme-secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--tg-theme-link-color);
  letter-spacing: 0.5px;
}

body.light-theme .call-timer-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.call-quality-badge {
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.call-quality-badge.quality-good {
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.call-quality-badge.quality-good .pulse-dot {
  background: var(--accent-green);
}

.call-quality-badge.quality-warning {
  color: #eab308;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.3);
}

.call-quality-badge.quality-warning .pulse-dot {
  background: #eab308;
}

.call-quality-badge.quality-bad-local {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.35);
}

.call-quality-badge.quality-bad-local .pulse-dot {
  background: #f97316;
}

.call-quality-badge.quality-bad-remote {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

.call-quality-badge.quality-bad-remote .pulse-dot {
  background: #ef4444;
}

body.light-theme .call-quality-badge.quality-good {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

body.light-theme .call-quality-badge.quality-warning {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.2);
  color: #b45309;
}

body.light-theme .call-quality-badge.quality-bad-local {
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.2);
  color: #c2410c;
}

body.light-theme .call-quality-badge.quality-bad-remote {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.2);
  color: #b91c1c;
}

/* Карточка собеседника */
.partner-card {
  position: relative;
  text-align: center;
  padding: 24px 20px;
  border-radius: var(--card-radius);
  background: var(--tg-theme-secondary-bg-color);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .partner-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.partner-avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  background: #1c1c1e;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

body.light-theme .partner-avatar {
  background: #f2f2f7;
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Пульсация звуковой волны вокруг аватарки */
.avatar-speech-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid rgba(0, 122, 255, 0.6);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  pointer-events: none;
}

.avatar-speech-pulse.active {
  opacity: 1;
  transform: scale(1.08);
  animation: speak-pulse 1s infinite alternate;
}

@keyframes speak-pulse {
  0% { transform: scale(1.04); border-color: rgba(56, 189, 248, 0.5); }
  100% { transform: scale(1.16); border-color: rgba(0, 122, 255, 0.85); }
}

.partner-name {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--tg-theme-text-color, #ffffff);
  line-height: 1.25;
  letter-spacing: -0.2px;
  word-break: break-word;
  transition: color 0.3s ease;
}

.partner-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 12px auto;
  min-height: 26px;
}

.partner-meta-row > * {
  margin: 0;
}

.partner-status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--tg-theme-hint-color, #94a3b8);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.partner-status-tag.verified {
  background: rgba(0, 136, 204, 0.15);
  border: 1px solid rgba(0, 136, 204, 0.35);
  color: #38bdf8;
}

body.light-theme .partner-status-tag {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #6c757d;
}

body.light-theme .partner-status-tag.verified {
  background: rgba(0, 136, 204, 0.12);
  border-color: rgba(0, 136, 204, 0.3);
  color: #0088cc;
}

.partner-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--tg-theme-link-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  transition: transform 0.15s ease;
}

.partner-tg-link:active {
  transform: scale(0.95);
}

/* Визуализатор звуковых волн */
.visualizer-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
  margin: 10px 0;
}

.wave-bar {
  width: 4px;
  height: 8px;
  background: var(--tg-theme-link-color);
  border-radius: 3px;
  transition: height 0.08s ease, background-color 0.2s ease;
}

/* Кнопка взаимного раскрытия */
.reveal-action-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tg-theme-secondary-bg-color);
  border: 1px dashed rgba(0, 122, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

body.light-theme .reveal-action-card {
  background: #ffffff;
  border: 1px dashed rgba(0, 122, 255, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.reveal-action-card.revealed {
  border-style: solid;
  border-color: rgba(52, 199, 89, 0.5);
  background: rgba(52, 199, 89, 0.08);
}

.reveal-text-box .title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reveal-text-box .hint {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  margin-top: 3px;
}

.reveal-btn-trigger {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: #ffffff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.reveal-btn-trigger:active {
  transform: scale(0.95);
}

/* Панель управления звонком в стиле iOS */
.call-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  margin-bottom: 12px;
}

.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  min-height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tg-theme-text-color);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.light-theme .ctrl-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ctrl-btn:active {
  transform: scale(0.95);
}

.ctrl-btn.active {
  background: rgba(255, 59, 48, 0.14);
  color: var(--accent-red);
  border-color: rgba(255, 59, 48, 0.35);
}

body.light-theme .ctrl-btn.active {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.3);
}

.ctrl-btn.next-call {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.35);
}

body.light-theme .ctrl-btn.next-call {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  color: #ffffff !important;
  border: none;
}

.ctrl-btn.hangup {
  background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.35);
}

body.light-theme .ctrl-btn.hangup {
  background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
  color: #ffffff !important;
  border: none;
}


/* ==========================================================
   7. МОДАЛЬНЫЕ ОКНА TELEGRAM
   ========================================================== */
.tg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: modal-fade-in 0.25s ease forwards;
}

.tg-modal-backdrop.active {
  display: flex;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tg-modal-sheet {
  background: var(--tg-theme-secondary-bg-color);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: sheet-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .tg-modal-backdrop {
    padding: 0;
  }
  .tg-modal-sheet {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 20px 16px max(16px, env(safe-area-inset-bottom)) 16px;
  }
}

body.light-theme .tg-modal-sheet {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
}

@keyframes sheet-slide-up {
  from { transform: translateY(40px); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-hint-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

body.light-theme .modal-close-btn {
  background: #f2f2f7;
  color: #000000;
}

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

body.light-theme .setting-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.setting-label .name {
  font-size: 15px;
  font-weight: 600;
}

.setting-label .desc {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  margin-top: 2px;
}

/* Кастомный селект с поддержкой темной и светлой тем */
.tg-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1c1c20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 30px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tg-select:focus {
  border-color: var(--tg-theme-link-color, #0a84ff);
}

.tg-select option {
  background-color: #1c1c20 !important;
  color: #ffffff !important;
  padding: 10px 14px;
}

body.light-theme .tg-select {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color-scheme: light;
}

body.light-theme .tg-select option {
  background-color: #ffffff !important;
  color: #000000 !important;
  padding: 10px 14px;
}

.settings-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .settings-profile-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-preview-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-hint-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .profile-preview-icon {
  background: #e5e5ea;
  color: #000000;
}


/* Модальное окно: собеседник отключился */
.peer-disconnected-sheet {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 22px 24px 22px;
}

.disconnect-sheet-art {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disconnect-icon-bubble {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.28));
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
  animation: disconnect-pulse 2s infinite ease-in-out;
}

body.light-theme .disconnect-icon-bubble {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.12), rgba(255, 59, 48, 0.2));
  border: 1.5px solid rgba(255, 59, 48, 0.35);
  color: #ff3b30;
  box-shadow: 0 4px 20px rgba(255, 59, 48, 0.2);
}

@keyframes disconnect-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.06); opacity: 1; }
}

.disconnect-sheet-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--tg-theme-text-color);
}

.disconnect-sheet-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--tg-theme-hint-color);
  margin-bottom: 22px;
  max-width: 300px;
}

.disconnect-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}


/* ==========================================================
   8. УВЕДОМЛЕНИЯ (TOAST)
   ========================================================== */
.tg-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 10000;
  background: rgba(22, 22, 24, 0.95);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
  text-align: center;
}

body.light-theme .tg-toast {
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tg-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   НИЖНИЙ ИНФОРМАЦИОННЫЙ БАННЕР ОШИБОК И ИНСТРУКЦИЙ (BOTTOM ERROR BANNER)
   ========================================================== */
.app-bottom-error-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 28px);
  max-width: 440px;
  background: rgba(28, 28, 30, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 59, 48, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 59, 48, 0.2);
  border-radius: 18px;
  padding: 13px 15px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.light-theme .app-bottom-error-banner {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 59, 48, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 59, 48, 0.2);
}

.app-bottom-error-banner.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.bottom-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bottom-banner-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ff453a;
}

.bottom-banner-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--tg-theme-hint-color, #8e8e93);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.bottom-banner-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--tg-theme-text-color, #ffffff);
  opacity: 0.92;
}

body.light-theme .bottom-banner-desc {
  color: #1c1c1e;
}

.bottom-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.bottom-banner-action-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bottom-banner-action-btn.retry {
  background: #2aabee;
  color: #ffffff;
}

.bottom-banner-action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tg-theme-text-color, #ffffff);
}

body.light-theme .bottom-banner-action-btn.secondary {
  background: #f2f2f7;
  color: #000000;
}



/* ==========================================================
   9. НИЖНИЙ ПОДВАЛ С ВЕРСИЕЙ ОБНОВЛЕНИЯ И ПЕРЕКЛЮЧАТЕЛЕМ ТЕМЫ
   ========================================================== */
.app-footer {
  width: 100%;
  padding-top: 14px;
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

body.light-theme .app-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.footer-brand-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-version-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tg-theme-hint-color);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-footer-sub {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  opacity: 0.75;
  letter-spacing: 0.1px;
}

.flat-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 4px 9px;
  color: var(--tg-theme-link-color);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, background 0.2s ease;
  line-height: 1;
}

body.light-theme .flat-admin-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.flat-admin-btn:active {
  transform: scale(0.92);
}


/* ==========================================================
   10. ПАНЕЛЬ АДМИНИСТРАТОРА (ADMIN DASHBOARD)
   ========================================================== */

/* Кнопка входа администратора в подвале */
.flat-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px 9px;
  color: var(--tg-theme-link-color);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: transform 0.15s ease, background 0.2s ease;
  line-height: 1;
}

body.light-theme .flat-admin-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.flat-admin-btn:active {
  transform: scale(0.92);
}

/* Модальное окно авторизации админа */
.admin-auth-sheet {
  max-width: 360px;
}

.admin-input-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--tg-theme-text-color);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease;
}

body.light-theme .admin-input-field {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #000000;
}

.admin-input-field:focus {
  border-color: var(--tg-theme-link-color);
}

.admin-error-msg {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-red);
  margin-top: 6px;
  animation: shake-error 0.3s ease;
}

@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Полноразмерное просторное окно админ-панели (адаптивно под десктоп, планшет и мобильный) */
.admin-dashboard-sheet {
  width: 95vw;
  max-width: 960px;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  border-radius: 24px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .admin-dashboard-sheet {
    width: 100%;
    max-width: 100%;
    height: 94vh;
    max-height: 94vh;
    padding: 16px 14px max(14px, env(safe-area-inset-bottom)) 14px;
    border-radius: 22px 22px 0 0;
  }
}

.admin-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .admin-top-bar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.6);
  animation: pulse-dot 2s infinite;
}

.admin-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.admin-subtitle {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  font-variant-numeric: tabular-nums;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

body.light-theme .admin-action-btn {
  background: #f2f2f7;
  color: #000000;
}

.admin-action-btn:active {
  transform: scale(0.9);
}

.admin-action-btn.logout {
  color: var(--accent-red);
}

/* Вкладки iOS Segmented Control с плавной прокруткой для любых экранов */
.admin-segmented-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

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

body.light-theme .admin-segmented-tabs {
  background: #e5e5ea;
}

.admin-tab-btn {
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.admin-tab-btn.active {
  background: var(--tg-theme-secondary-bg-color);
  color: var(--tg-theme-text-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.light-theme .admin-tab-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  background: #ff3b30;
  color: #ffffff;
}

/* Область контента вкладок */
.admin-tabs-content-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: 4px;
  min-height: 0;
}

.admin-tab-pane {
  display: none;
  flex-direction: column;
  animation: modal-fade-in 0.2s ease;
}

.admin-tab-pane.active {
  display: flex;
}

/* Сетка карточек метрик (адаптивная колоночная структура) */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.light-theme .admin-stat-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-stat-card.highlight {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

body.light-theme .admin-stat-card.highlight {
  border-color: rgba(0, 122, 255, 0.3);
  background: rgba(0, 122, 255, 0.08);
}

.admin-stat-card .val {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.admin-stat-card .lbl {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  font-weight: 600;
}

.admin-info-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.light-theme .admin-info-box {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.info-row .k {
  color: var(--tg-theme-hint-color);
}

.info-row .v {
  font-weight: 700;
}

/* Заголовки секций и списки */
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-section-header h4 {
  font-size: 13px;
  font-weight: 700;
}

.admin-section-header .badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

body.light-theme .admin-section-header .badge {
  background: #e5e5ea;
}

.admin-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: 2px;
}

.admin-empty-placeholder {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

body.light-theme .admin-empty-placeholder {
  background: #f9f9fb;
}

.admin-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

body.light-theme .admin-item-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-item-card .title {
  font-weight: 700;
}

.admin-item-card .subtitle {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
}

.admin-item-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.admin-item-tag.active {
  background: rgba(52, 199, 89, 0.15);
  color: var(--accent-green);
}

/* ==========================================================
   КАРТОЧКИ ЭФИРА (ACTIVE CALLS, QUEUE, PARTICIPANTS WITH TG LINK)
   ========================================================== */
.admin-call-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

body.light-theme .admin-call-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

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

body.light-theme .admin-call-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.admin-call-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-theme-hint-color);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.admin-call-badge-live {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-call-participants {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.admin-participant-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

body.light-theme .admin-participant-card {
  background: #f7f7f9;
  border-color: rgba(0, 0, 0, 0.06);
}

.admin-participant-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.admin-participant-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tg-theme-text-color, #ffffff);
}

body.light-theme .admin-participant-name {
  color: #000000;
}

.admin-participant-meta {
  font-size: 10.5px;
  color: var(--tg-theme-hint-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-platform-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  text-transform: uppercase;
}

.admin-platform-badge.tg {
  background: rgba(42, 171, 238, 0.2);
  color: #2aabee;
}

.admin-platform-badge.web {
  background: rgba(255, 149, 0, 0.2);
  color: #ff9500;
}

.admin-tg-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #2aabee;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tg-link-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.admin-tg-link-btn.secondary {
  background: rgba(42, 171, 238, 0.15);
  color: #2aabee !important;
  border: 1px solid rgba(42, 171, 238, 0.3);
}

.admin-vs-divider {
  font-size: 12px;
  font-weight: 800;
  color: var(--tg-theme-hint-color);
  opacity: 0.6;
  flex-shrink: 0;
  user-select: none;
}

.admin-item-tag.waiting {
  background: rgba(255, 149, 0, 0.15);
  color: var(--accent-amber);
}

/* Профессиональные карточки звонков в эфире */
.admin-call-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
}

body.light-theme .admin-call-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.admin-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  font-size: 11px;
}

body.light-theme .admin-call-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-call-room-pill {
  color: var(--tg-theme-hint-color);
  font-family: monospace;
  font-size: 11px;
}

.admin-call-timer-pill {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-call-participants {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.admin-call-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tg-theme-link-color, #2481cc);
  font-weight: 700;
  font-size: 14px;
}

.admin-participant-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  min-width: 0;
}

body.light-theme .admin-participant-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-participant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.admin-participant-name {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-participant-realname {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-platform-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-platform-badge.tg {
  background: rgba(36, 129, 204, 0.2);
  color: #2481cc;
}

.admin-platform-badge.web {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tg-theme-hint-color);
}

body.light-theme .admin-platform-badge.web {
  background: rgba(0, 0, 0, 0.08);
  color: #666;
}

.admin-tg-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2481cc;
  color: #ffffff !important;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
  margin-top: 3px;
  transition: opacity 0.15s;
}

.admin-tg-link-btn:active {
  opacity: 0.8;
}

/* Лента событий */
.admin-logs-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 48vh;
  overflow-y: auto;
}

.admin-log-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--tg-theme-link-color);
}

body.light-theme .admin-log-entry {
  background: #f2f2f7;
}

.admin-log-entry.call {
  border-left-color: var(--accent-green);
}

.admin-log-entry.reveal {
  border-left-color: var(--accent-purple);
}

.admin-log-entry.admin {
  border-left-color: var(--accent-amber);
}

.admin-log-entry.disconnect {
  border-left-color: var(--accent-red);
}

.admin-log-entry .time {
  font-size: 10px;
  color: var(--tg-theme-hint-color);
  font-family: monospace;
  flex-shrink: 0;
}

.admin-log-entry .text {
  flex: 1;
}

.admin-micro-btn {
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.admin-micro-btn:hover {
  color: var(--accent-red);
}

/* Блок управления */
.admin-control-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .admin-control-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-control-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ============================================================
   БЫСТРЫЙ ФИЛЬТР ПОИСКА (ГЛАВНЫЙ ЭКРАН)
   ============================================================ */
.filter-quick-card {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

body.light-theme .filter-quick-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.filter-quick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.filter-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--tg-theme-link-color);
  text-transform: none;
}

.filter-settings-shortcut {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tg-theme-hint-color);
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-theme .filter-settings-shortcut {
  background: #e5e5ea;
  color: #666;
}

.filter-settings-shortcut:hover {
  color: var(--tg-theme-link-color);
}

.filter-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.filter-row-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-theme-hint-color);
  white-space: nowrap;
}

.chips-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 10px;
}

body.light-theme .chips-group {
  background: #f2f2f7;
}

.chip-btn {
  padding: 5.5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip-btn.active {
  background: var(--tg-theme-button-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.35);
}

/* ============================================================
   ОНБОРДИНГ: МОДАЛЬНОЕ ОКНО ПЕРВОГО ВХОДА
   ============================================================ */
.onboarding-sheet {
  max-width: 380px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 24px 20px 20px 20px;
  text-align: center;
}

.onboarding-header {
  margin-bottom: 20px;
}

.onboarding-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}

.onboarding-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.light-theme .onboarding-lang-switch {
  background: #e5e5ea;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.onboarding-lang-btn {
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.onboarding-lang-btn:hover {
  color: var(--tg-theme-text-color);
}

.onboarding-lang-btn.active {
  background: var(--tg-theme-button-color, #007aff);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.35);
}

body.light-theme .onboarding-lang-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.onboarding-icon-bubble {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.05));
  border: 1px solid rgba(0, 122, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  color: var(--tg-theme-button-color);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.15);
}

.onboarding-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--tg-theme-text-color);
}

.onboarding-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--tg-theme-hint-color);
}

.onboarding-field {
  text-align: left;
  margin-bottom: 16px;
}

.onboarding-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--tg-theme-hint-color);
  margin-bottom: 7px;
  text-transform: uppercase;
}

.segmented-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .segmented-picker {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.segment-btn.active {
  background: var(--tg-theme-button-color);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 122, 255, 0.3);
}

.onboarding-save-btn {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
}

/* Юридическое согласие под кнопкой онбординга */
.onboarding-terms-hint {
  margin-top: 12px;
  padding: 0 4px;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.onboarding-terms-hint a {
  color: var(--tg-theme-link-color, #2481cc);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.onboarding-terms-hint a:hover {
  opacity: 0.8;
}

/* Динамический префикс @ для Telegram-полей ввода (по дефолту пустое поле) */
.tg-input-wrapper {
  position: relative;
  width: 100%;
}

.tg-input-wrapper .tg-at-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tg-theme-hint-color, #8e8e93);
  font-weight: 600;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.tg-input-wrapper input.tg-username-field {
  padding-left: 12px !important;
  transition: padding-left 0.15s ease;
}

.tg-input-wrapper:focus-within .tg-at-prefix,
.tg-input-wrapper.has-value .tg-at-prefix {
  opacity: 1;
}

.tg-input-wrapper:focus-within input.tg-username-field,
.tg-input-wrapper.has-value input.tg-username-field {
  padding-left: 28px !important;
}

/* ============================================================
   ПРЕМИУМ КАРТОЧКА РАСКРЫТОГО ПРОФИЛЯ TELEGRAM
   ============================================================ */
.partner-card.is-revealed {
  border-color: rgba(0, 122, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.12);
}

.partner-card.is-revealed .partner-avatar-wrapper {
  position: relative;
}

.partner-card.is-revealed .partner-avatar {
  border: 2.5px solid #0088cc;
  box-shadow: 0 0 16px rgba(0, 136, 204, 0.4);
}

.partner-avatar.revealed-avatar-pop {
  animation: avatarRevealPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes avatarRevealPop {
  0% {
    transform: scale(0.82) rotate(-6deg);
    opacity: 0.6;
  }
  60% {
    transform: scale(1.06) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.compact-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(0, 136, 204, 0.45);
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.15);
}

.verified-avatar-badge {
  position: absolute;
  bottom: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0088cc;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000000;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.light-theme .verified-avatar-badge {
  border-color: #ffffff;
}

.partner-revealed-action {
  margin: 0 auto 12px auto;
  display: flex;
  justify-content: center;
  animation: revealActionFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes revealActionFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tg-open-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 16px;
  border: 1px solid rgba(0, 136, 204, 0.45);
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.28), rgba(0, 122, 255, 0.12));
  color: #38bdf8;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .tg-open-profile-btn {
  background: linear-gradient(135deg, #0088cc, #0077b5);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.tg-open-profile-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.38), rgba(0, 122, 255, 0.18));
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.38);
}

.tg-open-profile-btn:active {
  transform: scale(0.96);
}

.tg-open-profile-btn .tg-plane-icon {
  fill: currentColor;
}

/* ============================================================
   КОМПАКТНЫЙ АККОРДЕОН НАСТРОЕК (РАСКРЫТИЕ И СКРЫТИЕ ПОЛЕЙ)
   ============================================================ */
.settings-compact-sheet {
  width: 94%;
  max-width: 430px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 20px 18px 24px 18px;
  border-radius: 24px;
  box-sizing: border-box;
}

body.light-theme .settings-compact-sheet {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.settings-accordions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.settings-accordion-item {
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transition: all 0.22s ease;
}

body.light-theme .settings-accordion-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.settings-accordion-item.active {
  border-color: rgba(0, 122, 255, 0.3);
}

.accordion-header-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--tg-theme-text-color);
  text-align: left;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.12);
  color: var(--tg-theme-link-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-header-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.accordion-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.accordion-summary-tag {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
}

body.light-theme .accordion-summary-tag {
  background: #f2f2f7;
}

.accordion-chevron {
  color: var(--tg-theme-hint-color);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
  color: var(--tg-theme-link-color);
}

.accordion-content {
  display: none;
  padding: 0 14px 14px 14px;
  animation: accordionFade 0.2s ease-out;
}

.settings-accordion-item.active .accordion-content {
  display: block;
}

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

/* Компактная сетка полей фильтра */
.compact-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .compact-fields-grid {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.compact-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-theme-hint-color);
  letter-spacing: 0.2px;
}

body.light-theme .compact-lbl {
  color: #55555c;
}

.compact-select {
  padding: 6px 26px 6px 10px;
  font-size: 12.5px;
  border-radius: 10px;
  box-sizing: border-box;
}

/* Компактные строки настроек с защитой от наложения и адаптивной гибкостью */
.compact-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.compact-setting-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

body.light-theme .compact-setting-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.compact-row-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.compact-row-text .name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
  line-height: 1.35;
  word-break: break-word;
}

body.light-theme .compact-row-text .name {
  color: #000000;
}

.compact-row-text .desc {
  font-size: 11.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 2px;
  line-height: 1.35;
  word-break: break-word;
}

body.light-theme .compact-row-text .desc {
  color: #6e6e73;
}

.compact-setting-row .compact-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  max-width: 155px;
}

/* Премиальный нативный свитч iOS для настроек */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-switch-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .ios-switch-slider {
  background-color: #e5e5ea;
}

.ios-switch-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-switch input:checked + .ios-switch-slider {
  background-color: #34c759;
}

.ios-switch input:checked + .ios-switch-slider::before {
  transform: translateX(18px);
}

@media (max-width: 360px) {
  .compact-setting-row {
    gap: 8px;
    padding: 10px 0;
  }
  .compact-setting-row .compact-select {
    min-width: 105px;
    max-width: 125px;
    font-size: 11.5px;
    padding: 5px 22px 5px 8px;
  }
}

/* Компактный блок профиля */
.compact-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}

body.light-theme .compact-profile-card {
  background: #f2f2f7;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.profile-preview-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0088cc;
  background: rgba(0, 136, 204, 0.1);
  padding: 3px 8px;
  border-radius: 8px;
}

/* ==========================================================
   МИНИМАЛИСТИЧНЫЙ ИНДИКАТОР ПЛАТФОРМЫ (TELEGRAM VS WEB)
   ========================================================== */
.partner-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.partner-platform-badge.tg {
  background: rgba(0, 136, 204, 0.15);
  color: #2AABEE;
  border: 1px solid rgba(42, 171, 238, 0.3);
}

.partner-platform-badge.web {
  background: rgba(255, 255, 255, 0.08);
  color: #a0a0a5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .partner-platform-badge.web {
  background: #e5e5ea;
  color: #48484a;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   СЕЛЕКТОР ПЕРИОДОВ ВРЕМЕНИ В АДМИНКЕ
   ========================================================== */
.admin-period-picker {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-period-picker::-webkit-scrollbar {
  display: none;
}

body.light-theme .admin-period-picker {
  background: #e5e5ea;
}

.admin-period-btn {
  border: none;
  background: transparent;
  color: var(--tg-theme-hint-color);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex: 1 0 auto;
  text-align: center;
}

.admin-period-btn.active {
  background: #0088cc;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 136, 204, 0.3);
}

/* ==========================================================
   АНИМИРОВАННЫЙ ВЕКТОРНЫЙ ГРАФИК
   ========================================================== */
.admin-chart-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}

body.light-theme .admin-chart-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.admin-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-chart-header h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.admin-chart-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 136, 204, 0.15);
  color: #0088cc;
}

.admin-chart-wrapper {
  position: relative;
  width: 100%;
  height: 160px;
}

.admin-svg-chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

#chartLinePath {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLine 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.chart-dot {
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
}

.chart-dot:hover {
  r: 6;
  fill: #ffffff;
}

.admin-chart-x-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px 0 4px;
  font-size: 10px;
  color: var(--tg-theme-hint-color);
}

/* Распределение аудитории */
.admin-share-bar-wrap {
  margin-top: 6px;
}

.admin-share-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.share-seg-tg {
  background: #0088cc;
  transition: width 0.6s ease;
}

.share-seg-web {
  background: #718096;
  transition: width 0.6s ease;
}

.admin-share-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.tg {
  background: #0088cc;
}

.legend-dot.web {
  background: #718096;
}

/* ==========================================================
   СПИСОК ПОЛЬЗОВАТЕЛЕЙ И МОДЕРАЦИЯ
   ========================================================== */
.admin-users-toolbar {
  margin-bottom: 6px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 6px;
  gap: 8px;
}

body.light-theme .admin-user-row {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.admin-user-row.is-banned {
  opacity: 0.65;
  border-color: rgba(255, 59, 48, 0.3);
  background: rgba(255, 59, 48, 0.05);
}

.user-left-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.user-avatar-tiny {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-meta-block {
  min-width: 0;
  line-height: 1.25;
}

.user-name-line {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-sub-line {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  margin-top: 2px;
}

.user-platform-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.user-platform-tag.tg {
  background: rgba(0, 136, 204, 0.15);
  color: #0088cc;
}

.user-platform-tag.web {
  background: rgba(255, 255, 255, 0.08);
  color: #a0a0a5;
}

.user-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ban-btn {
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ban-btn.danger {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}

.ban-btn.danger:hover {
  background: #ff3b30;
  color: #ffffff;
}

.ban-btn.restore {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.ban-btn.restore:hover {
  background: #34c759;
  color: #ffffff;
}

.ban-btn.delete-btn {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.25);
}

.ban-btn.delete-btn:hover {
  background: #ff3b30;
  color: #ffffff;
}

/* ==========================================================
   СТИЛИ ДЛЯ ЖАЛОБ И МОДЕРАЦИИ
   ========================================================== */
.admin-report-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

body.light-theme .admin-report-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.admin-report-card.pending {
  border-left: 4px solid var(--accent-amber);
}

.admin-report-card.resolved {
  border-left: 4px solid var(--accent-green);
  opacity: 0.8;
}

.admin-report-card.dismissed {
  border-left: 4px solid var(--tg-theme-hint-color);
  opacity: 0.65;
}

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.report-target-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13.5px;
  min-width: 0;
}

.report-target-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-target-user {
  font-size: 12px;
  color: var(--tg-theme-link-color);
  font-weight: 500;
}

.report-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.report-status-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.report-status-tag.pending {
  background: rgba(255, 149, 0, 0.18);
  color: #ff9500;
}

.report-status-tag.resolved {
  background: rgba(52, 199, 89, 0.18);
  color: #34c759;
}

.report-status-tag.dismissed {
  background: rgba(142, 142, 147, 0.18);
  color: #8e8e93;
}

.report-time {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  white-space: nowrap;
}

.report-reason-box {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: 10px;
  padding: 8px 10px;
}

body.light-theme .report-reason-box {
  background: rgba(255, 59, 48, 0.06);
}

.report-reason-badge {
  font-size: 12px;
  font-weight: 700;
  color: #ff3b30;
}

.report-comment-text {
  font-size: 12px;
  color: var(--tg-theme-text-color);
  margin-top: 4px;
  line-height: 1.4;
  font-style: italic;
}

.report-author-line {
  font-size: 11px;
  color: var(--tg-theme-hint-color);
}

.report-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.report-act-btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.report-act-btn.ban {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}
.report-act-btn.ban:hover {
  background: #ff3b30;
  color: #fff;
}

.report-act-btn.delete {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
}
.report-act-btn.delete:hover {
  background: #ff3b30;
  color: #fff;
}

.report-act-btn.dismiss {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-hint-color);
}
.report-act-btn.dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--tg-theme-text-color);
}

body.light-theme .report-act-btn.dismiss {
  background: #f2f2f7;
  color: #666;
}

/* Кнопка вызова модалки жалобы во время звонка */
.call-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.28);
  color: #ff3b30;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.call-report-btn:active {
  transform: scale(0.92);
  background: rgba(255, 59, 48, 0.25);
}

.report-modal-sheet {
  max-width: 440px;
}

/* ==========================================================
   11. ФИКСАЦИЯ ЭКРАНА И БЛОКИРОВКА СВАЙПОВ В СТОРОНЫ
   ========================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
  position: relative;
  overscroll-behavior-x: none !important;
  overscroll-behavior-y: none;
  touch-action: pan-y !important;
  -webkit-touch-callout: none;
}

/* Гарантируем узкую фиксированную ширину приложения по центру (до 480px) и точный отступ от системных кнопок Telegram */
.app-container {
  max-width: 480px !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  padding-top: var(--app-safe-top, 10px) !important;
  padding-bottom: max(12px, var(--app-safe-bottom, 0px), env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-viewport-safe-area-inset-bottom, 0px)) !important;
}

/* Гарантируем, что ни один внутренний блок не вызовет горизонтальный скролл */
.view-screen,
.tg-card,
.booth-card,
.call-container,
.pref-quick-card,
.filter-quick-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* Защита от авто-зума на всех мобильных экранах (только текстовые поля) */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  textarea,
  .admin-input-field {
    font-size: 16px !important;
  }
}

/* Юридические ссылки и Пользовательское соглашение */
.filter-terms-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}
body.light-theme .filter-terms-hint {
  border-top-color: rgba(0, 0, 0, 0.06);
}
.filter-terms-hint a {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-decoration: none;
  transition: color 0.2s ease;
}
.filter-terms-hint a:hover {
  color: var(--tg-theme-link-color, #2481cc);
  text-decoration: underline;
}

.footer-terms-link {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer-terms-link:hover {
  opacity: 1;
  color: var(--tg-theme-link-color, #2481cc);
  text-decoration: underline;
}

/* Современные кнопки действий в настройках (Кошелек, PWA, Соглашение) в едином iOS стиле */
.settings-action-item {
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color, #161618);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .settings-action-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.settings-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--tg-theme-text-color, #ffffff);
  text-align: left;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}

body.light-theme .settings-action-btn {
  color: #000000;
}

.settings-action-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.light-theme .settings-action-btn:hover {
  background: rgba(0, 0, 0, 0.02);
}

.settings-action-btn:active {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(0.995);
}

body.light-theme .settings-action-btn:active {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(0.995);
}

.settings-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-action-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--tg-theme-text-color, #ffffff);
}

body.light-theme .settings-action-title {
  color: #000000;
}

.action-arrow {
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.settings-action-btn:hover .action-arrow {
  opacity: 0.8;
  transform: translateX(2px);
}

/* Обратная совместимость для старых селекторов */
.settings-legal-link-box {
  border-radius: 14px;
  overflow: hidden;
  background: var(--tg-theme-secondary-bg-color, #161618);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body.light-theme .settings-legal-link-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.settings-legal-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--tg-theme-text-color, #ffffff);
  background: transparent;
  border: none;
  width: 100%;
}
body.light-theme .settings-legal-btn {
  color: #000000;
}
.settings-legal-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-legal-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* ==========================================================
   СЕРВИСНЫЕ ЭКРАНЫ: БЛОКИРОВКА (LOCKOUT) И УДАЛЕНИЕ ПРОФИЛЯ
   ========================================================== */
.lockout-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 10, 14, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lockoutFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockoutFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.lockout-card {
  width: 100%;
  max-width: 360px;
  background: var(--tg-theme-secondary-bg-color, #1c1c1e);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 28px;
  padding: 32px 24px 28px 24px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 59, 48, 0.15);
}

body.light-theme .lockout-overlay {
  background: rgba(242, 242, 247, 0.92);
}

body.light-theme .lockout-card {
  background: #ffffff;
  border-color: rgba(255, 59, 48, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1), 0 0 30px rgba(255, 59, 48, 0.1);
}

.lockout-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.12);
  border: 2px solid rgba(255, 59, 48, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.25);
}

.lockout-icon-circle.reset {
  background: rgba(255, 149, 0, 0.12);
  border-color: rgba(255, 149, 0, 0.35);
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.2);
}

.lockout-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--tg-theme-text-color, #ffffff);
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}

body.light-theme .lockout-title {
  color: #000000;
}

.lockout-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.15);
  color: #ff453a;
  border: 1px solid rgba(255, 59, 48, 0.3);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.lockout-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin: 0 0 20px 0;
}

.lockout-help-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: left;
}

body.light-theme .lockout-help-box {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.lockout-help-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #ffffff);
  margin-bottom: 3px;
}

body.light-theme .lockout-help-title {
  color: #000000;
}

.lockout-help-desc {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.lockout-support-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.lockout-sheet {
  max-width: 360px;
  text-align: center;
}

.confirm-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.12);
  border: 1.5px solid rgba(255, 59, 48, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
}

/* ==========================================================
   ДИАЛОГ ПОДТВЕРЖДЕНИЯ ДЕЙСТВИЯ (CONFIRM MODAL)
   ВСЕГДА ПОВЕРХ АДМИН-ПАНЕЛИ И ЛЮБЫХ ДРУГИХ ОКОН
   ========================================================== */
#customConfirmModal {
  z-index: 20000 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

#customConfirmModal .tg-modal-sheet {
  max-width: 360px !important;
  width: 100% !important;
  border-radius: 24px !important;
  text-align: center !important;
  margin: auto !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  transform-origin: center center !important;
  animation: confirmPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes confirmPopIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================
   НАВИГАЦИЯ В ПОДВАЛЕ (ПРО ЗАСТОСУНОК / НОВИНИ / УГОДА)
   ========================================================== */
.footer-nav-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.footer-link-dot {
  font-size: 10px;
  color: var(--tg-theme-hint-color);
  opacity: 0.45;
  user-select: none;
}

.footer-terms-link.footer-accent-link {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.footer-terms-link.footer-accent-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

body.light-theme .footer-terms-link.footer-accent-link {
  color: #007aff;
}

/* ==========================================================
   SEO CMS В ПАНЕЛИ АДМИНИСТРАТОРА (ВКЛАДКА НОВИНИ)
   ========================================================== */
.seo-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.seo-score-pill.high {
  background: rgba(52, 199, 89, 0.16);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.32);
}

.seo-score-pill.med {
  background: rgba(255, 159, 10, 0.16);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.32);
}

.seo-score-pill.low {
  background: rgba(255, 69, 58, 0.16);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.32);
}

.seo-editor-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.seo-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--tg-theme-text-color, #f1f5f9);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seo-tool-btn:hover,
.seo-tool-btn.active {
  background: rgba(39, 135, 245, 0.24);
  border-color: rgba(39, 135, 245, 0.55);
  color: #38bdf8;
}

body.light-theme .seo-tool-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

body.light-theme .seo-tool-btn.active {
  background: rgba(0, 122, 255, 0.16);
  border-color: #007aff;
  color: #007aff;
}

.seo-collapsible-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

body.light-theme .seo-collapsible-box {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.seo-box-title {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #38bdf8;
}

body.light-theme .seo-box-title {
  color: #007aff;
}

.google-serp-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(9, 13, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: Arial, sans-serif;
}

body.light-theme .google-serp-preview {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

.google-serp-preview .serp-url {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-serp-preview .serp-title {
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.light-theme .google-serp-preview .serp-title {
  color: #1a0dab;
}

.google-serp-preview .serp-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.light-theme .google-serp-preview .serp-desc {
  color: #4d5156;
}

.seo-checklist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.seo-check-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--tg-theme-hint-color);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.seo-check-chip.ok {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  border-color: rgba(52, 199, 89, 0.25);
}

.admin-news-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.light-theme .admin-news-item-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.admin-news-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.admin-news-item-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tg-theme-text-color);
  text-decoration: none;
}

.admin-news-item-title:hover {
  color: #38bdf8;
}

.admin-news-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--tg-theme-hint-color);
}

/* Кнопка установки приложения (PWA) в подвале */
.footer-install-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #30d158;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.footer-install-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

body.light-theme .footer-install-link {
  color: #16a34a;
}

/* ==========================================================
   ІНТЕГРАЦІЇ ТА МОНЕТИЗАЦІЯ В АДМІН-ПАНЕЛІ (КАРТКИ + БАНЕРИ)
   ========================================================== */
.admin-integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 580px) {
  .admin-integrations-grid {
    grid-template-columns: 1fr;
  }
}

.admin-integration-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.admin-integration-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.admin-integration-card.active-hub {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.09), rgba(255, 255, 255, 0.03));
}

body.light-theme .admin-integration-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

body.light-theme .admin-integration-card.active-hub {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), #ffffff);
  border-color: rgba(245, 158, 11, 0.38);
}

.admin-integration-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-integration-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-integration-icon.gold {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
}

.admin-integration-icon.blue {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
}

.admin-integration-icon.tg {
  background: rgba(42, 171, 238, 0.16);
  border-color: rgba(42, 171, 238, 0.35);
}

.admin-integration-icon.green {
  background: rgba(52, 199, 89, 0.16);
  border-color: rgba(52, 199, 89, 0.35);
}

.admin-integration-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--tg-theme-hint-color);
}

.admin-integration-status.on {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.admin-integration-status.off {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.admin-integration-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--tg-theme-text-color);
  letter-spacing: -0.01em;
}

.admin-integration-desc {
  font-size: 11.5px;
  color: var(--tg-theme-hint-color);
  line-height: 1.42;
  flex: 1;
}

.admin-integration-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}

.admin-integration-metrics .metric-pill {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.light-theme .admin-integration-metrics .metric-pill {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.07);
}

.admin-integration-metrics .metric-pill .lbl {
  font-size: 9.5px;
  color: var(--tg-theme-hint-color);
}

.admin-integration-metrics .metric-pill strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--tg-theme-text-color);
}

.admin-integration-metrics .metric-pill.highlight strong {
  color: #f59e0b;
}

.admin-integration-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 7px;
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
}

body.light-theme .admin-integration-footer {
  border-top-color: rgba(15, 23, 42, 0.07);
  color: #007aff;
}

.admin-integration-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px 4px;
}

.admin-back-hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
}

body.light-theme .admin-back-hub-btn {
  color: #007aff;
}

/* Карта баннерных мест */
.admin-placements-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 640px) {
  .admin-placements-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-placement-map-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 9px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-placement-map-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.07);
}

.admin-placement-map-card.has-active {
  border-color: rgba(52, 199, 89, 0.38);
  background: rgba(52, 199, 89, 0.06);
}

body.light-theme .admin-placement-map-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

.admin-placement-map-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.admin-placement-map-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-theme-text-color);
  line-height: 1.25;
}

.admin-placement-map-count {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-hint-color);
  flex-shrink: 0;
}

.admin-placement-map-card.has-active .admin-placement-map-count {
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
}

.admin-placement-map-size {
  font-size: 9.5px;
  color: #38bdf8;
  font-weight: 600;
}

/* Мультивыбор баннерных мест (чипы) */
.admin-placement-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 540px) {
  .admin-placement-chips {
    grid-template-columns: 1fr;
  }
}

.placement-chip-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.placement-chip-item:has(input:checked) {
  background: rgba(39, 135, 245, 0.16);
  border-color: rgba(39, 135, 245, 0.55);
  color: #38bdf8;
}

body.light-theme .placement-chip-item {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .placement-chip-item:has(input:checked) {
  background: rgba(0, 122, 255, 0.1);
  border-color: #007aff;
  color: #007aff;
}

.placement-chip-item input {
  accent-color: #2787f5;
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}

/* Карточка сохраненного баннера в списке */
.admin-banner-item-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.light-theme .admin-banner-item-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.09);
}

.admin-banner-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.admin-banner-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 9px;
}

body.light-theme .admin-banner-stats-strip {
  background: #f1f5f9;
}

.admin-banner-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: var(--tg-theme-hint-color);
}

.admin-banner-stat-cell strong {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--tg-theme-text-color);
}

/* ==========================================================
   РАСШИРЕННАЯ АНАЛИТИКА (УСТРОЙСТВА, ГЕОГРАФИЯ, IP, ЧАСЫ, СТРАНИЦЫ, UTM)
   ========================================================== */
.an-subnav-pills {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 6px 0 2px;
  scrollbar-width: none;
}
.an-subnav-pills::-webkit-scrollbar {
  display: none;
}

.an-subnav-pill {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tg-theme-hint-color);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}
.an-subnav-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--tg-theme-text-color);
}
.an-subnav-pill.active {
  background: linear-gradient(135deg, #2787f5, #1d6fde);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(39, 135, 245, 0.3);
}
body.light-theme .an-subnav-pill {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}
body.light-theme .an-subnav-pill.active {
  background: #007aff;
  color: #ffffff;
}

.an-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 480px) {
  .an-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .an-kpi-grid .admin-stat-card {
    padding: 8px 6px;
  }
  .an-kpi-grid .admin-stat-card .val {
    font-size: 15px;
  }
}

.an-kpi-sub {
  display: block;
  font-size: 9.5px;
  color: var(--tg-theme-hint-color);
  margin-top: 2px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--tg-theme-hint-color);
}
.an-chart-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.an-chart-legend-inline i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Двухколоночная адаптивная сетка аналитики */
.an-two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 600px) {
  .an-two-col-grid {
    grid-template-columns: 1fr;
  }
}

/* 24-часовая диаграмма активности */
.an-hourly-bars-wrap {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  height: 96px;
  padding: 12px 4px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
body.light-theme .an-hourly-bars-wrap {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.an-hour-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
  position: relative;
  cursor: pointer;
}
.an-hour-bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.an-hour-bar-fill {
  width: 100%;
  max-width: 12px;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #38bdf8, rgba(39, 135, 245, 0.45));
  transition: height 0.3s ease, background 0.2s ease;
}
.an-hour-col.is-peak .an-hour-bar-fill {
  background: linear-gradient(180deg, #f59e0b, #ea580c);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}
.an-hour-col:hover .an-hour-bar-fill {
  background: #a855f7;
}
.an-hour-lbl {
  font-size: 8.5px;
  color: var(--tg-theme-hint-color);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.an-hour-col.is-peak .an-hour-lbl {
  color: #f59e0b;
  font-weight: 800;
}

/* Полоса дней недели */
.an-weekday-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}
.an-weekday-chip {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 5px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body.light-theme .an-weekday-chip {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.06);
}
.an-weekday-chip.is-top {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.09);
}
.an-weekday-chip .wd-name {
  font-size: 10px;
  color: var(--tg-theme-hint-color);
  font-weight: 600;
}
.an-weekday-chip .wd-val {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tg-theme-text-color);
}

/* Списки с прогресс-барами (Топ страниц, Страны, Города, ОС, Браузеры, Рефереры) */
.an-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
}
.an-breakdown-list.compact {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}

.an-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .an-bar-row {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.06);
}

.an-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.an-bar-title {
  font-weight: 600;
  color: var(--tg-theme-text-color);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.an-bar-subpath {
  font-size: 10px;
  color: var(--tg-theme-hint-color);
  font-family: monospace;
}
.an-bar-stats {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--tg-theme-hint-color);
  font-variant-numeric: tabular-nums;
}
.an-bar-stats strong {
  color: var(--tg-theme-text-color);
  font-weight: 700;
}

.an-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
body.light-theme .an-bar-track {
  background: rgba(15, 23, 42, 0.08);
}
.an-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2787f5, #38bdf8);
  transition: width 0.35s ease;
}
.an-bar-fill.purple {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}
.an-bar-fill.green {
  background: linear-gradient(90deg, #10b981, #34c759);
}
.an-bar-fill.amber {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Сетка UTM-меток */
.an-utm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .an-utm-grid {
    grid-template-columns: 1fr;
  }
}
.an-utm-col-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
}
body.light-theme .an-utm-col-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.07);
}
.an-utm-col-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
  font-family: monospace;
}

/* Журнал IP-адресов (IP Inspector) */
.an-ip-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.an-ip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
}
body.light-theme .an-ip-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}
.an-ip-card.is-banned {
  border-color: rgba(255, 59, 48, 0.45);
  background: rgba(255, 59, 48, 0.06);
}

.an-ip-left {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.an-ip-top-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.an-ip-addr {
  font-family: monospace;
  font-weight: 800;
  font-size: 12px;
  color: #38bdf8;
}
.an-ip-geo {
  font-weight: 600;
  color: var(--tg-theme-text-color);
}
.an-ip-isp {
  font-size: 10px;
  color: var(--tg-theme-hint-color);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
}
body.light-theme .an-ip-isp {
  background: rgba(15, 23, 42, 0.06);
}
.an-ip-meta-line {
  font-size: 10.5px;
  color: var(--tg-theme-hint-color);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.35;
}
.an-ip-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ========================================================
   КОШЕЛЕК И БАЛАНС ЖЕТОНОВ (ТАКСОФОН WALLET & TOKENS)
   ======================================================== */
.booth-status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.booth-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 179, 0, 0.12);
  border: 1px solid rgba(255, 179, 0, 0.35);
  color: #ffb300;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(255, 179, 0, 0.1);
}

.booth-wallet-chip:hover {
  background: rgba(255, 179, 0, 0.2);
  border-color: rgba(255, 179, 0, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.2);
}

.booth-wallet-chip:active {
  transform: scale(0.96);
}

.wallet-chip-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  animation: pulseCoin 2.5s infinite ease-in-out;
}

@keyframes pulseCoin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(4deg); }
}

.wallet-chip-info {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.wallet-chip-num {
  font-size: 14px;
  font-weight: 700;
  color: #ffc107;
  letter-spacing: 0.2px;
}

.wallet-chip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
  opacity: 0.9;
}

.wallet-chip-arrow {
  opacity: 0.6;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.booth-wallet-chip:hover .wallet-chip-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Модальное окно кошелька */
.wallet-sheet {
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  background: var(--tg-theme-bg-color, #17212b);
}

@media (min-width: 600px) {
  .wallet-sheet {
    border-radius: 20px;
  }
}

.wallet-header-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 179, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

/* Карточка баланса */
.wallet-balance-card {
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.14) 0%, rgba(255, 120, 0, 0.08) 100%);
  border: 1px solid rgba(255, 179, 0, 0.3);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.wallet-balance-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 179, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wallet-balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.wallet-rate-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 179, 0, 0.2);
  color: #ffb300;
  border: 1px solid rgba(255, 179, 0, 0.3);
}

.wallet-balance-main {
  margin-bottom: 16px;
}

.wallet-balance-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-token-icon {
  font-size: 30px;
  line-height: 1;
}

.wallet-balance-val {
  font-size: 36px;
  font-weight: 800;
  color: #ffc107;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.wallet-token-suffix {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
  opacity: 0.85;
  align-self: flex-end;
  margin-bottom: 4px;
}

.wallet-usd-val {
  font-size: 14px;
  font-weight: 700;
  color: #30d158;
  margin-top: 4px;
  padding-left: 38px;
  letter-spacing: 0.2px;
}

.wallet-actions-single {
  margin-top: 14px;
}

.wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.wallet-btn.full-btn {
  width: 100%;
}

.wallet-btn.deposit-btn {
  background: linear-gradient(135deg, #30d158 0%, #24a844 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(48, 209, 88, 0.35);
}

.wallet-btn.deposit-btn:hover {
  background: linear-gradient(135deg, #34dc5e 0%, #27b64a 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(48, 209, 88, 0.45);
}

.wallet-btn.deposit-btn:active {
  transform: scale(0.98);
}

.wallet-future-teaser {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 179, 0, 0.08);
  border: 1px dashed rgba(255, 179, 0, 0.3);
}

.wallet-future-teaser .teaser-icon {
  font-size: 18px;
  line-height: 1;
}

.wallet-future-teaser .teaser-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffb300;
}

.wallet-future-teaser .teaser-sub {
  font-size: 10.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 1px;
}

.pack-uah {
  display: block;
  font-size: 11px;
  color: #30d158;
  font-weight: 600;
  margin-top: 2px;
}

.pack-badge.max {
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  color: #ffffff;
}

.wallet-btn.withdraw-btn:active {
  transform: scale(0.97);
}

/* Баннер инструкции в кошельке */
.wallet-guide-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 136, 204, 0.1);
  border: 1px solid rgba(0, 136, 204, 0.25);
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.wallet-guide-banner:hover {
  background: rgba(0, 136, 204, 0.16);
  border-color: rgba(0, 136, 204, 0.4);
  transform: translateY(-1px);
}

.wallet-guide-banner:active {
  transform: scale(0.98);
}

.wallet-guide-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 136, 204, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.wallet-guide-text {
  flex: 1;
}

.wallet-guide-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #ffffff);
  line-height: 1.25;
}

.wallet-guide-desc {
  font-size: 11.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 2px;
}

.guide-arrow {
  color: var(--tg-theme-hint-color, #8e8e93);
  flex-shrink: 0;
}

/* История операций */
.wallet-tx-history-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.wallet-tx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wallet-tx-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.wallet-tx-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-hint-color, #8e8e93);
}

.wallet-tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.wallet-tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.wallet-tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-tx-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.wallet-tx-icon-wrap.deposit, .wallet-tx-icon-wrap.bonus {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
}

.wallet-tx-icon-wrap.withdraw, .wallet-tx-icon-wrap.spend {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.wallet-tx-details {
  display: flex;
  flex-direction: column;
}

.wallet-tx-title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
}

.wallet-tx-date-text {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 2px;
}

.wallet-tx-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wallet-tx-amount {
  font-size: 14px;
  font-weight: 700;
}

.wallet-tx-amount.positive {
  color: #30d158;
}

.wallet-tx-amount.negative {
  color: #ff453a;
}

.wallet-tx-status {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 1px;
}

.wallet-tx-empty {
  text-align: center;
  padding: 24px 10px;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.wallet-tx-empty .empty-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

/* Модалки подстраниц кошелька */
.wallet-subsheet {
  max-width: 420px;
  border-radius: 20px 20px 0 0;
  background: var(--tg-theme-bg-color, #17212b);
}

@media (min-width: 600px) {
  .wallet-subsheet {
    border-radius: 20px;
  }
}

.wallet-modal-desc {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin: 6px 0 16px 0;
  line-height: 1.4;
}

/* Сетка пакетов пополнения */
.deposit-packs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.deposit-pack-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deposit-pack-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 179, 0, 0.4);
}

.deposit-pack-card.selected {
  background: rgba(255, 179, 0, 0.12);
  border-color: #ffb300;
  box-shadow: 0 0 14px rgba(255, 179, 0, 0.2);
}

.pack-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--tg-theme-text-color, #ffffff);
}

.pack-badge.hot {
  background: #ff9500;
  color: #ffffff;
}

.pack-badge.optimal {
  background: #30d158;
  color: #ffffff;
}

.pack-badge.vip {
  background: #af52de;
  color: #ffffff;
}

.pack-tokens {
  font-size: 22px;
  font-weight: 800;
  color: #ffc107;
  margin-bottom: 4px;
}

.pack-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
  opacity: 0.85;
}

/* Способы оплаты */
.deposit-methods-group {
  margin-bottom: 18px;
}

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

.deposit-method-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.deposit-method-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.deposit-method-item input[type="radio"] {
  display: none;
}

.deposit-method-item.selected {
  border-color: #0088cc;
  background: rgba(0, 136, 204, 0.12);
}

.method-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.method-icon {
  font-size: 22px;
  line-height: 1;
}

.method-info {
  display: flex;
  flex-direction: column;
}

.method-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #ffffff);
}

.method-desc {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
}

/* Модалка вывода */
.withdraw-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.25);
  margin-bottom: 16px;
  font-size: 12.5px;
}

.withdraw-label {
  color: var(--tg-theme-hint-color, #8e8e93);
}

.withdraw-amount {
  color: #30d158;
  font-weight: 600;
}

.withdraw-form-group {
  margin-bottom: 14px;
}

.withdraw-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.withdraw-input-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  pointer-events: none;
}

.withdraw-input-wrapper input {
  padding-left: 38px;
  padding-right: 60px;
}

.withdraw-max-btn {
  position: absolute;
  right: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 179, 0, 0.2);
  border: 1px solid rgba(255, 179, 0, 0.35);
  color: #ffb300;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.withdraw-max-btn:hover {
  background: rgba(255, 179, 0, 0.3);
}

.withdraw-help-text {
  display: block;
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 5px;
  line-height: 1.35;
}

/* Модалка инструкции */
.wallet-help-sheet {
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  background: var(--tg-theme-bg-color, #17212b);
}

@media (min-width: 600px) {
  .wallet-help-sheet {
    border-radius: 20px;
  }
}

.guide-rate-hero {
  text-align: center;
  padding: 18px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.16) 0%, rgba(255, 140, 0, 0.08) 100%);
  border: 1px solid rgba(255, 179, 0, 0.3);
  margin-bottom: 16px;
}

.guide-rate-coin {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
  animation: pulseCoin 2s infinite ease-in-out;
}

.guide-rate-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffc107;
  letter-spacing: 0.5px;
}

.guide-rate-subtitle {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 3px;
}

.guide-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-info-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.guide-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.guide-card-body h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #ffffff);
  margin: 0 0 3px 0;
}

.guide-card-body p {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin: 0;
  line-height: 1.4;
}

/* ========================================================
   ПОЛНАЯ АДАПТИВНОСТЬ КОШЕЛЬКА ДЛЯ СВЕТЛОЙ И ТЕМНОЙ ТЕМЫ
   ======================================================== */
.settings-wallet-subtext {
  font-size: 11.5px;
  font-weight: 600;
  color: #f59e0b; /* Сочный золотисто-янтарный в темной теме */
  letter-spacing: 0.1px;
}

body.light-theme .settings-wallet-subtext {
  color: #b45309 !important; /* Глубокий контрастный янтарь в светлой теме */
}

/* СВЕТЛАЯ ТЕМА ДЛЯ ВСЕХ ЭЛЕМЕНТОВ КОШЕЛЬКА */
body.light-theme .wallet-sheet,
body.light-theme .wallet-subsheet,
body.light-theme .wallet-help-sheet {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}

body.light-theme #walletAuthModal .tg-modal-sheet {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.light-theme .wallet-sheet .modal-title,
body.light-theme .wallet-subsheet .modal-title,
body.light-theme .wallet-help-sheet .modal-title,
body.light-theme #walletAuthModal .modal-title {
  color: #0f172a !important;
}

body.light-theme .wallet-sheet .modal-close-btn,
body.light-theme .wallet-subsheet .modal-close-btn,
body.light-theme .wallet-help-sheet .modal-close-btn,
body.light-theme #walletAuthModal .modal-close-btn {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

body.light-theme .booth-wallet-chip {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(217, 119, 6, 0.45) !important;
  color: #b45309 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12) !important;
}

body.light-theme .booth-wallet-chip .wallet-chip-num {
  color: #b45309 !important;
}

body.light-theme .booth-wallet-chip .wallet-chip-label {
  color: #0f172a !important;
}

body.light-theme .booth-wallet-chip .wallet-chip-arrow {
  color: #b45309 !important;
}

body.light-theme .wallet-balance-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.15) !important;
}

body.light-theme .wallet-balance-label {
  color: #78350f !important;
  font-weight: 700 !important;
}

body.light-theme .wallet-rate-badge {
  background: #ffffff !important;
  color: #b45309 !important;
  border: 1px solid #d97706 !important;
  font-weight: 800 !important;
}

body.light-theme .wallet-balance-val {
  color: #b45309 !important;
}

body.light-theme .wallet-token-suffix {
  color: #1e293b !important;
  font-weight: 700 !important;
}

body.light-theme .wallet-usd-val {
  color: #15803d !important;
  font-weight: 800 !important;
}

body.light-theme .wallet-future-teaser {
  background: #fffbeb !important;
  border: 1px dashed #f59e0b !important;
}

body.light-theme .wallet-future-teaser .teaser-title {
  color: #b45309 !important;
}

body.light-theme .wallet-future-teaser .teaser-sub {
  color: #475569 !important;
}

body.light-theme .wallet-guide-banner {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
}

body.light-theme .wallet-guide-title {
  color: #0369a1 !important;
}

body.light-theme .wallet-guide-desc {
  color: #475569 !important;
}

body.light-theme .wallet-guide-banner .guide-arrow {
  color: #0284c7 !important;
}

body.light-theme .wallet-tx-history-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .wallet-tx-title {
  color: #475569 !important;
  font-weight: 700 !important;
}

body.light-theme .wallet-tx-count {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

body.light-theme .wallet-tx-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .wallet-tx-title-text {
  color: #0f172a !important;
}

body.light-theme .wallet-tx-date-text {
  color: #64748b !important;
}

body.light-theme .wallet-tx-status {
  color: #64748b !important;
}

body.light-theme .wallet-tx-empty {
  color: #64748b !important;
}

body.light-theme .wallet-modal-desc {
  color: #475569 !important;
}

body.light-theme .deposit-pack-card {
  background: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
}

body.light-theme .deposit-pack-card.selected {
  background: #fffbeb !important;
  border-color: #d97706 !important;
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.25) !important;
}

body.light-theme .deposit-pack-card .pack-tokens {
  color: #b45309 !important;
}

body.light-theme .deposit-pack-card .pack-price {
  color: #0f172a !important;
  font-weight: 700 !important;
}

body.light-theme .deposit-pack-card .pack-uah {
  color: #15803d !important;
  font-weight: 700 !important;
}

body.light-theme .deposit-method-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .deposit-method-item.selected {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: #0284c7 !important;
}

body.light-theme .deposit-method-item .method-title {
  color: #0f172a !important;
}

body.light-theme .deposit-method-item .method-desc {
  color: #64748b !important;
}

body.light-theme .guide-rate-hero {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 1px solid #f59e0b !important;
}

body.light-theme .guide-rate-title {
  color: #b45309 !important;
}

body.light-theme .guide-rate-subtitle {
  color: #78350f !important;
}

body.light-theme .guide-info-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .guide-card-body h4 {
  color: #0f172a !important;
}

body.light-theme .guide-card-body p {
  color: #334155 !important;
}

/* ==========================================================
   СТИЛИ ДЛЯ ВХОДА WEB (ВХОД БЕЗ АВТОРИЗАЦИИ / GOOGLE / ЗАЖАТИЕ)
   ========================================================== */
.auth-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.auth-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--tg-theme-text-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.auth-choice-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-choice-btn.active {
  background: rgba(0, 122, 255, 0.18);
  border-color: #007aff;
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.25);
}

.auth-choice-icon {
  font-size: 15px;
  line-height: 1;
}

.google-auth-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  animation: modal-fade-in 0.2s ease forwards;
}

.google-native-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 11px 16px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
  user-select: none;
}

.google-native-btn:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.google-native-btn:active {
  transform: translateY(0);
}

.google-auth-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #f59e0b;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Кнопка с эффектом зажатия (Hold to confirm) */
.onboarding-btn-wrap {
  margin-top: 10px;
  width: 100%;
}

.hold-protect-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.hold-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  opacity: 0.85;
  transition: width 0.05s linear;
  pointer-events: none;
  z-index: 1;
}

.hold-btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.hold-protect-btn.holding {
  transform: scale(0.985);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.hold-protect-btn.success-held {
  background: #10b981 !important;
  color: #ffffff !important;
}

.hold-hint-text {
  font-size: 11.5px;
  color: var(--tg-theme-hint-color);
  text-align: center;
  margin-top: 6px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.hold-hint-text.active {
  color: #38bdf8;
  font-weight: 600;
}

/* Светлая тема для элементов авторизации Google и кнопки зажатия */
body.light-theme .auth-choice-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #334155;
}

body.light-theme .auth-choice-btn:hover {
  background: #e2e8f0;
}

body.light-theme .auth-choice-btn.active {
  background: rgba(0, 122, 255, 0.1);
  border-color: #007aff;
  color: #0284c7;
  font-weight: 700;
}

body.light-theme .google-auth-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.light-theme .google-auth-bonus-pill {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}

body.light-theme .hold-hint-text {
  color: #64748b;
}

body.light-theme .hold-hint-text.active {
  color: #0284c7;
}

/* Полное отключение модуля кошелька */
#boothWalletBtn,
#settingsWalletItem,
#walletModal,
#walletDepositModal,
#walletHelpModal,
#walletAuthModal,
#onboardingGoogleBonusPill,
.booth-wallet-chip,
.wallet-sheet,
.wallet-subsheet,
.wallet-help-sheet {
  display: none !important;
}






