/* ===============================
   SAKAVETS iOS DARK GLASS THEME
   =============================== */

:root {
  --ios-bg: #070b1f;
  --ios-bg-2: #10163a;
  --ios-card: rgba(255, 255, 255, 0.085);
  --ios-card-2: rgba(255, 255, 255, 0.12);
  --ios-border: rgba(255, 255, 255, 0.15);
  --ios-text: #f8fafc;
  --ios-muted: rgba(248, 250, 252, 0.68);
  --ios-blue: #4f8cff;
  --ios-purple: #9b5cff;
  --ios-pink: #d946ef;
  --ios-cyan: #22d3ee;
  --ios-radius: 24px;
  --ios-radius-sm: 16px;
  --ios-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

/* База */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ios-text) !important;
  background:
    radial-gradient(circle at 15% 10%, rgba(79, 140, 255, 0.30), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(155, 92, 255, 0.28), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.12), transparent 30%),
    linear-gradient(135deg, #050816 0%, #0b1029 42%, #11123a 100%) !important;
  background-attachment: fixed !important;
}

/* Мягкая сетка на фоне */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 80%);
}

/* Контейнеры */
.container,
.container-fluid {
  position: relative;
}

/* Текст */
h1, h2, h3, h4, h5, h6,
.fw-bold {
  color: #ffffff !important;
  letter-spacing: -0.025em;
}

p,
.text-muted,
small,
.form-text {
  color: var(--ios-muted) !important;
}

a {
  color: #93c5fd;
}

a:hover {
  color: #c4b5fd;
}

/* Navbar */
.navbar,
.sidebar,
.bg-white,
.bg-light {
  background: rgba(8, 12, 34, 0.72) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-color: var(--ios-border) !important;
}

.navbar {
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}

.navbar-brand,
.nav-link {
  color: rgba(255,255,255,.86) !important;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
}

/* Карточки */
.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.offcanvas {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  border: 1px solid var(--ios-border) !important;
  border-radius: var(--ios-radius) !important;
  box-shadow: var(--ios-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: var(--ios-text) !important;
}

.card-header,
.card-footer {
  background: rgba(255,255,255,.055) !important;
  border-color: var(--ios-border) !important;
  color: var(--ios-text) !important;
}

.shadow-sm,
.shadow {
  box-shadow: 0 22px 70px rgba(0,0,0,.28) !important;
}

.rounded-4 {
  border-radius: var(--ios-radius) !important;
}

/* Красивый hover у карточек */
.card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(147, 197, 253, .34) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,.42);
}

/* Кнопки */
.btn {
  border-radius: 16px !important;
  font-weight: 700;
  border: 0 !important;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple)) !important;
  box-shadow: 0 14px 32px rgba(79, 140, 255, .32);
  color: #fff !important;
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #14b8a6) !important;
  box-shadow: 0 14px 32px rgba(20, 184, 166, .24);
}

.btn-warning {
  background: linear-gradient(135deg, #facc15, #fb7185) !important;
  color: #111827 !important;
  box-shadow: 0 14px 32px rgba(250, 204, 21, .22);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #d946ef) !important;
  box-shadow: 0 14px 32px rgba(239, 68, 68, .24);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid var(--ios-border) !important;
  color: rgba(255,255,255,.88) !important;
  backdrop-filter: blur(14px);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover {
  background: linear-gradient(135deg, rgba(79,140,255,.32), rgba(155,92,255,.28)) !important;
  color: #fff !important;
}

/* Формы */
.form-control,
.form-select,
textarea,
input {
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus {
  background: rgba(255,255,255,.13) !important;
  border-color: rgba(147,197,253,.75) !important;
  box-shadow: 0 0 0 .25rem rgba(79,140,255,.18) !important;
  color: #fff !important;
}

.form-control::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,.48) !important;
}

label,
.form-label {
  color: rgba(255,255,255,.86) !important;
}

/* Таблицы */
.table {
  color: var(--ios-text) !important;
  border-color: var(--ios-border) !important;
}

.table th {
  color: rgba(255,255,255,.86) !important;
  background: rgba(255,255,255,.075) !important;
  border-color: var(--ios-border) !important;
}

.table td {
  color: rgba(255,255,255,.78) !important;
  border-color: rgba(255,255,255,.10) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(255,255,255,.035) !important;
}

/* Alerts */
.alert {
  border: 1px solid var(--ios-border) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff !important;
}

.alert-success {
  background: rgba(34,197,94,.16) !important;
}

.alert-warning {
  background: rgba(250,204,21,.16) !important;
}

.alert-danger {
  background: rgba(239,68,68,.16) !important;
}

.alert-info {
  background: rgba(79,140,255,.16) !important;
}

/* Badges */
.badge {
  border-radius: 999px !important;
  padding: .48em .75em;
}

.bg-primary,
.badge.bg-primary {
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple)) !important;
}

.bg-success,
.badge.bg-success {
  background: linear-gradient(135deg, #22c55e, #14b8a6) !important;
}

.bg-warning,
.badge.bg-warning {
  background: linear-gradient(135deg, #facc15, #fb7185) !important;
  color: #111827 !important;
}

.bg-secondary,
.badge.bg-secondary {
  background: rgba(255,255,255,.18) !important;
}

/* Nav pills / tabs */
.nav-pills .nav-link {
  border-radius: 16px !important;
  color: rgba(255,255,255,.72) !important;
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple)) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(79,140,255,.28);
}

/* Hero/дашборд блоки */
.dashboard-card,
.stat-card,
.quick-action,
.bots-card,
.bots-hero,
.web-card,
.web-mini,
.web-course,
.web-review {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  border: 1px solid var(--ios-border) !important;
  border-radius: var(--ios-radius) !important;
  box-shadow: var(--ios-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Dropdown */
.dropdown-menu {
  padding: 10px;
}

.dropdown-item {
  color: rgba(255,255,255,.82) !important;
  border-radius: 12px;
}

.dropdown-item:hover {
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
}

/* Модалки */
.modal-backdrop.show {
  opacity: .72;
}

/* Изображения */
.card-img-top,
img.rounded,
.rounded-top-4 {
  border-radius: 22px !important;
}

/* Progress */
.progress {
  background: rgba(255,255,255,.10) !important;
  border-radius: 999px !important;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple)) !important;
}

/* Футер */
footer,
.footer,
.site-footer,
.main-footer {
  background: rgba(8,12,34,.72) !important;
  color: rgba(255,255,255,.7) !important;
  border-top: 1px solid var(--ios-border) !important;
  backdrop-filter: blur(22px);
}

/* Улучшение читаемости некоторых bootstrap text colors */
.text-dark {
  color: #fff !important;
}

.text-primary {
  color: #93c5fd !important;
}

.text-success {
  color: #86efac !important;
}

.text-warning {
  color: #fde68a !important;
}

.text-danger {
  color: #fca5a5 !important;
}

.text-info {
  color: #67e8f9 !important;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .card,
  .modal-content,
  .web-card,
  .web-mini,
  .web-course,
  .web-review {
    border-radius: 20px !important;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ===============================
   IOS VISIBILITY FIX V2
   Fix white blocks / invisible text
   =============================== */

/* Старые белые блоки переводим в dark glass */
body [style*="background: white"],
body [style*="background-color: white"],
body [style*="background:#fff"],
body [style*="background: #fff"],
body [style*="background-color:#fff"],
body [style*="background-color: #fff"],
body [style*="background: rgb(255"],
body [style*="background-color: rgb(255"] {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
}

/* Всё внутри таких блоков тоже читаемое */
body [style*="background: white"] *,
body [style*="background-color: white"] *,
body [style*="background:#fff"] *,
body [style*="background: #fff"] *,
body [style*="background-color:#fff"] *,
body [style*="background-color: #fff"] * {
  color: #f8fafc !important;
}

/* Быстрый доступ */
.quick-action,
.quick-actions,
.quick-access,
.dashboard-quick-actions {
  color: #f8fafc !important;
}

.quick-action a,
.quick-actions a,
.quick-access a,
.dashboard-quick-actions a,
.quick-action .btn,
.quick-actions .btn,
.quick-access .btn,
.dashboard-quick-actions .btn {
  background: linear-gradient(135deg, rgba(79,140,255,.28), rgba(155,92,255,.24)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 18px !important;
  min-height: 44px;
  box-shadow: 0 14px 34px rgba(0,0,0,.20) !important;
}

.quick-action a *,
.quick-actions a *,
.quick-access a *,
.dashboard-quick-actions a *,
.quick-action .btn *,
.quick-actions .btn *,
.quick-access .btn *,
.dashboard-quick-actions .btn * {
  color: #ffffff !important;
}

/* Чат с ИИ / область сообщений */
.chat-box,
.chat-window,
.chat-history,
.chat-messages,
.messages-box,
.ai-chat,
.ai-chat-box,
.ai-response,
.ai-answer,
.yagpt-response,
.yagpt-answer,
#chat-box,
#chat-window,
#chat-history,
#chat-messages,
#messages,
#response,
#answer {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
}

.chat-box *,
.chat-window *,
.chat-history *,
.chat-messages *,
.messages-box *,
.ai-chat *,
.ai-chat-box *,
.ai-response *,
.ai-answer *,
.yagpt-response *,
.yagpt-answer *,
#chat-box *,
#chat-window *,
#chat-history *,
#chat-messages *,
#messages *,
#response *,
#answer * {
  color: #f8fafc !important;
}

/* Placeholder в textarea/input */
textarea::placeholder,
input::placeholder {
  color: rgba(226,232,240,.58) !important;
}

/* Select dropdown */
select,
.form-select {
  background-color: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
}

select option,
.form-select option {
  background: #111936 !important;
  color: #ffffff !important;
}

/* Пустой пункт в select */
select option[value=""],
.form-select option[value=""] {
  color: rgba(226,232,240,.70) !important;
}

/* Белые карточки в формах */
.card.bg-white,
.bg-white.card,
.bg-light.card,
.bg-white.rounded,
.bg-light.rounded {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
}

/* Улучшаем читаемость muted внутри тёмной темы */
.text-muted,
.small.text-muted,
p.text-muted,
div.text-muted {
  color: rgba(226,232,240,.76) !important;
}

/* Чтобы белые кнопки не слепили */
.btn-light,
.btn-white {
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.15) !important;
}

/* Белые большие панели */
.bg-white,
.bg-light {
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
}

/* Для формы /web */
.web-page .web-form input,
.web-page .web-form textarea,
.web-page .web-form select {
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}

.web-page .web-form input::placeholder,
.web-page .web-form textarea::placeholder {
  color: rgba(226,232,240,.58) !important;
}

.web-page .web-form select option {
  background: #111936 !important;
  color: #ffffff !important;
}


/* ===============================
   MODERN SITE FOOTER
   =============================== */

.modern-site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 72px;
  padding: 56px 0 22px;
  background:
    radial-gradient(circle at 15% 20%, rgba(79,140,255,.20), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(155,92,255,.24), transparent 34%),
    linear-gradient(135deg, rgba(7,11,31,.94), rgba(17,24,58,.92) 48%, rgba(39,25,82,.90));
  border-top: 1px solid rgba(255,255,255,.14);
  color: #f8fafc !important;
  box-shadow: 0 -24px 80px rgba(0,0,0,.28);
}

.modern-site-footer * {
  color: inherit;
}

.modern-footer-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}

.modern-footer-glow-1 {
  left: -120px;
  top: -110px;
  background: #4f8cff;
}

.modern-footer-glow-2 {
  right: -100px;
  bottom: -140px;
  background: #9b5cff;
}

.modern-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modern-footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4f8cff, #9b5cff);
  color: #fff !important;
  box-shadow: 0 16px 38px rgba(79,140,255,.34);
}

.modern-footer-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #fff !important;
}

.modern-footer-subtitle {
  font-size: 13px;
  color: rgba(226,232,240,.72) !important;
}

.modern-footer-text {
  max-width: 520px;
  color: rgba(226,232,240,.76) !important;
  line-height: 1.65;
  font-size: 16px;
}

.modern-footer-heading {
  color: #fff !important;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}

.modern-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-footer-links a,
.modern-footer-bottom a {
  color: rgba(226,232,240,.72) !important;
  text-decoration: none;
  transition: .18s ease;
}

.modern-footer-links a:hover,
.modern-footer-bottom a:hover {
  color: #ffffff !important;
  transform: translateX(3px);
}

.modern-footer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff !important;
  text-decoration: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: .18s ease;
}

.modern-footer-pill:hover {
  background: linear-gradient(135deg, rgba(79,140,255,.35), rgba(155,92,255,.28));
  color: #fff !important;
  transform: translateY(-2px);
}

.modern-footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-footer-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff !important;
  text-decoration: none;
  transition: .18s ease;
}

.modern-footer-contact:hover {
  background: rgba(255,255,255,.13);
  transform: translateY(-2px);
}

.modern-footer-contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(79,140,255,.95), rgba(155,92,255,.9));
  color: #fff !important;
}

.modern-footer-socials {
  display: flex;
  gap: 10px;
}

.modern-footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff !important;
  text-decoration: none;
  transition: .18s ease;
}

.modern-footer-socials a:hover {
  background: linear-gradient(135deg, #4f8cff, #9b5cff);
  transform: translateY(-2px);
}

.modern-footer-bottom {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.13);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(226,232,240,.62) !important;
  font-size: 14px;
}

.modern-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Старый футер на /web скрываем, новый оставляем */
body:has(.web-page) .web-footer {
  display: none !important;
}

body:has(.web-page) > footer.modern-site-footer {
  display: block !important;
}

@media (max-width: 768px) {
  .modern-site-footer {
    margin-top: 48px;
    padding: 40px 0 20px;
  }

  .modern-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}



/* ===============================
   NAVBAR DROPDOWN CLICK FIX
   =============================== */

.navbar,
.navbar .container,
.navbar .container-fluid,
.navbar-collapse,
.navbar-nav,
.navbar .dropdown,
.navbar .nav-item {
  overflow: visible !important;
}

.navbar {
  position: sticky !important;
  top: 0;
  z-index: 99990 !important;
}

.navbar .dropdown-menu {
  z-index: 999999 !important;
  pointer-events: auto !important;
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  top: calc(100% + 10px) !important;
  min-width: 220px !important;
  padding: 10px !important;
  border-radius: 22px !important;
  background: linear-gradient(145deg, rgba(24,31,67,.96), rgba(52,37,96,.94)) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.45) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.navbar .dropdown-menu.show {
  display: block !important;
}

.navbar .dropdown-item,
.navbar .dropdown-menu a,
.navbar .dropdown-menu button {
  pointer-events: auto !important;
  cursor: pointer !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  font-weight: 700;
  text-decoration: none !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-menu a:hover,
.navbar .dropdown-menu button:hover {
  background: linear-gradient(135deg, rgba(79,140,255,.35), rgba(155,92,255,.32)) !important;
  color: #ffffff !important;
}

/* Чтобы правое меню пользователя не перекрывалось и не уходило за экран */
.navbar .dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
  transform: none !important;
}

/* Если рядом есть декоративные элементы, они не должны блокировать клики */
.navbar::before,
.navbar::after {
  pointer-events: none !important;
}

/* ===============================
   QUICK ACTION BUTTONS FIX
   =============================== */

.btn-dark,
.btn-outline-dark,
.quick-actions .btn-dark,
.quick-actions .btn-outline-dark,
.quick-action .btn-dark,
.quick-action .btn-outline-dark,
.dashboard-quick-actions .btn-dark,
.dashboard-quick-actions .btn-outline-dark {
  background: linear-gradient(135deg, rgba(79,140,255,.30), rgba(155,92,255,.28)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.28) !important;
}

.btn-dark *,
.btn-outline-dark *,
.quick-actions .btn-dark *,
.quick-actions .btn-outline-dark *,
.quick-action .btn-dark *,
.quick-action .btn-outline-dark *,
.dashboard-quick-actions .btn-dark *,
.dashboard-quick-actions .btn-outline-dark * {
  color: #ffffff !important;
}

.btn-dark:hover,
.btn-outline-dark:hover,
.quick-actions .btn-dark:hover,
.quick-actions .btn-outline-dark:hover,
.quick-action .btn-dark:hover,
.quick-action .btn-outline-dark:hover,
.dashboard-quick-actions .btn-dark:hover,
.dashboard-quick-actions .btn-outline-dark:hover {
  background: linear-gradient(135deg, #4f8cff, #9b5cff) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Если кнопки быстрых действий имеют inline-тёмный текст */
.quick-actions a,
.quick-actions button,
.quick-action a,
.quick-action button,
.dashboard-quick-actions a,
.dashboard-quick-actions button {
  color: #ffffff !important;
}

.quick-actions a *,
.quick-actions button *,
.quick-action a *,
.quick-action button *,
.dashboard-quick-actions a *,
.dashboard-quick-actions button * {
  color: inherit !important;
}



/* ===============================
   BOTS EDITOR DARK IOS FIX V2
   =============================== */

body.sakavets-bots-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(79,140,255,.24), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(155,92,255,.26), transparent 30%),
    linear-gradient(135deg, #071026 0%, #0b1029 45%, #171044 100%) !important;
}

/* Основная область редактора */
body.sakavets-bots-page .container,
body.sakavets-bots-page .container-fluid {
  color: #f8fafc !important;
}

/* Панели, карточки, секции */
body.sakavets-bots-page .card,
body.sakavets-bots-page .bots-card,
body.sakavets-bots-page .bot-card,
body.sakavets-bots-page .bot-editor-card,
body.sakavets-bots-page .bot-builder-card,
body.sakavets-bots-page .bot-panel,
body.sakavets-bots-page .bot-section,
body.sakavets-bots-page .section-card,
body.sakavets-bots-page .share-box,
body.sakavets-bots-page .form-panel,
body.sakavets-bots-page .bg-white,
body.sakavets-bots-page .bg-light,
body.sakavets-bots-page .rounded-4,
body.sakavets-bots-page .shadow-sm {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color: #f8fafc !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.32) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* Любые белые inline-блоки внутри редактора */
body.sakavets-bots-page [style*="background: white"],
body.sakavets-bots-page [style*="background-color: white"],
body.sakavets-bots-page [style*="background:#fff"],
body.sakavets-bots-page [style*="background: #fff"],
body.sakavets-bots-page [style*="background-color:#fff"],
body.sakavets-bots-page [style*="background-color: #fff"],
body.sakavets-bots-page [style*="background: rgb(255"],
body.sakavets-bots-page [style*="background-color: rgb(255"],
body.sakavets-bots-page [style*="background:#ffffff"],
body.sakavets-bots-page [style*="background: #ffffff"] {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
}

/* Текст */
body.sakavets-bots-page h1,
body.sakavets-bots-page h2,
body.sakavets-bots-page h3,
body.sakavets-bots-page h4,
body.sakavets-bots-page h5,
body.sakavets-bots-page h6,
body.sakavets-bots-page label,
body.sakavets-bots-page .fw-bold,
body.sakavets-bots-page .fw-semibold {
  color: #ffffff !important;
}

body.sakavets-bots-page p,
body.sakavets-bots-page .text-muted,
body.sakavets-bots-page .small,
body.sakavets-bots-page .form-text {
  color: rgba(226,232,240,.78) !important;
}

/* Поля */
body.sakavets-bots-page input,
body.sakavets-bots-page textarea,
body.sakavets-bots-page select,
body.sakavets-bots-page .form-control,
body.sakavets-bots-page .form-select {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}

body.sakavets-bots-page input:focus,
body.sakavets-bots-page textarea:focus,
body.sakavets-bots-page select:focus,
body.sakavets-bots-page .form-control:focus,
body.sakavets-bots-page .form-select:focus {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(147,197,253,.78) !important;
  box-shadow: 0 0 0 .25rem rgba(79,140,255,.20) !important;
}

body.sakavets-bots-page input::placeholder,
body.sakavets-bots-page textarea::placeholder {
  color: rgba(226,232,240,.55) !important;
}

body.sakavets-bots-page select option {
  background: #111936 !important;
  color: #ffffff !important;
}

/* Нижняя панель сохранения */
body.sakavets-bots-page .sticky-bottom,
body.sakavets-bots-page .fixed-bottom,
body.sakavets-bots-page .save-panel,
body.sakavets-bots-page .actions-panel,
body.sakavets-bots-page .input-group {
  background: rgba(10,16,42,.76) !important;
  border-color: rgba(255,255,255,.14) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* Публичная ссылка */
body.sakavets-bots-page input[readonly] {
  background: rgba(255,255,255,.09) !important;
  color: rgba(248,250,252,.88) !important;
}

/* Кнопки */
body.sakavets-bots-page .btn-light,
body.sakavets-bots-page .btn-white {
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
}

/* Лого в футере */
.modern-footer-logo-img {
  overflow: hidden !important;
  padding: 0 !important;
  background: linear-gradient(135deg, #4f8cff, #9b5cff) !important;
}

.modern-footer-logo-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* ===============================
   FORCE DARK BOT EDITOR PANELS V3
   =============================== */

body.sakavets-bots-page .sak-force-dark-panel {
  background:
    radial-gradient(circle at 15% 0%, rgba(79,140,255,.18), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.34) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

body.sakavets-bots-page .sak-force-dark-panel *,
body.sakavets-bots-page .sak-force-dark-panel h1,
body.sakavets-bots-page .sak-force-dark-panel h2,
body.sakavets-bots-page .sak-force-dark-panel h3,
body.sakavets-bots-page .sak-force-dark-panel h4,
body.sakavets-bots-page .sak-force-dark-panel h5,
body.sakavets-bots-page .sak-force-dark-panel h6,
body.sakavets-bots-page .sak-force-dark-panel label,
body.sakavets-bots-page .sak-force-dark-panel strong,
body.sakavets-bots-page .sak-force-dark-panel b {
  color: #ffffff !important;
}

body.sakavets-bots-page .sak-force-dark-panel .text-muted,
body.sakavets-bots-page .sak-force-dark-panel .small,
body.sakavets-bots-page .sak-force-dark-panel .form-text,
body.sakavets-bots-page .sak-force-dark-panel p {
  color: rgba(226,232,240,.76) !important;
}

body.sakavets-bots-page .sak-force-dark-panel input,
body.sakavets-bots-page .sak-force-dark-panel textarea,
body.sakavets-bots-page .sak-force-dark-panel select,
body.sakavets-bots-page .sak-force-dark-panel .form-control,
body.sakavets-bots-page .sak-force-dark-panel .form-select {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 18px !important;
}

body.sakavets-bots-page .sak-force-dark-panel input::placeholder,
body.sakavets-bots-page .sak-force-dark-panel textarea::placeholder {
  color: rgba(226,232,240,.56) !important;
}

body.sakavets-bots-page .sak-force-dark-panel .input-group,
body.sakavets-bots-page .sak-force-dark-panel .card-header,
body.sakavets-bots-page .sak-force-dark-panel .card-footer {
  background: rgba(10,16,42,.55) !important;
  border-color: rgba(255,255,255,.14) !important;
}

/* Сам редактор чуть уже и аккуратнее */
body.sakavets-bots-page .container {
  max-width: 1240px !important;
}

/* Убираем белый низ формы сохранения */
body.sakavets-bots-page .sak-force-dark-panel .bg-white,
body.sakavets-bots-page .sak-force-dark-panel .bg-light {
  background: rgba(255,255,255,.08) !important;
}

/* Кнопка копирования ссылки */
body.sakavets-bots-page .sak-force-dark-panel .btn-light,
body.sakavets-bots-page .sak-force-dark-panel .btn-white {
  background: rgba(255,255,255,.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
}

/* Подстраховка для известных светлых классов */
body.sakavets-bots-page .bot-form-section,
body.sakavets-bots-page .bot-editor-section,
body.sakavets-bots-page .bot-section-card,
body.sakavets-bots-page .bot-public-link,
body.sakavets-bots-page .bot-settings-card,
body.sakavets-bots-page .project-bot-card,
body.sakavets-bots-page .builder-card {
  background:
    radial-gradient(circle at 15% 0%, rgba(79,140,255,.18), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.055)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.34) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}


/* ===============================
   PUBLIC CHATBOT NEON DARK STYLE
   /b/... exact dark blue-purple style
   =============================== */

body.sak-public-bot-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(37, 99, 235, .24), transparent 32%),
    radial-gradient(circle at 88% 25%, rgba(126, 58, 242, .30), transparent 34%),
    radial-gradient(circle at 55% 85%, rgba(14, 165, 233, .10), transparent 34%),
    linear-gradient(135deg, #06102a 0%, #081126 42%, #170b3d 100%) !important;
  background-attachment: fixed !important;
  color: #f8fafc !important;
}

body.sak-public-bot-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .75;
}

/* navbar */
body.sak-public-bot-page .navbar {
  background: rgba(5, 10, 32, .86) !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 14px 44px rgba(0,0,0,.28) !important;
}

body.sak-public-bot-page .navbar a,
body.sak-public-bot-page .navbar .nav-link,
body.sak-public-bot-page .navbar-brand {
  color: rgba(248,250,252,.92) !important;
}

/* Основная карточка чат-бота */
body.sak-public-bot-page .sak-neon-panel,
body.sak-public-bot-page .chatbot-card,
body.sak-public-bot-page .bot-card,
body.sak-public-bot-page .public-bot-card,
body.sak-public-bot-page .card {
  background:
    radial-gradient(circle at 50% -10%, rgba(37,99,235,.18), transparent 38%),
    linear-gradient(180deg, rgba(15,23,64,.92), rgba(5,10,32,.86)) !important;
  border: 1px solid rgba(147,197,253,.24) !important;
  color: #f8fafc !important;
  border-radius: 28px !important;
  box-shadow:
    0 0 60px rgba(37,99,235,.18),
    0 28px 90px rgba(0,0,0,.42) !important;
  backdrop-filter: blur(26px) !important;
  -webkit-backdrop-filter: blur(26px) !important;
}

/* Синяя шапка карточки */
body.sak-public-bot-page .sak-neon-panel > div:first-child,
body.sak-public-bot-page .chatbot-card > div:first-child,
body.sak-public-bot-page .bot-card > div:first-child,
body.sak-public-bot-page .public-bot-card > div:first-child,
body.sak-public-bot-page .card-header {
  background:
    radial-gradient(circle at 82% 20%, rgba(139,92,246,.38), transparent 36%),
    linear-gradient(135deg, #0066ff 0%, #1977ff 46%, #5658ff 100%) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.14) !important;
}

/* Текст */
body.sak-public-bot-page h1,
body.sak-public-bot-page h2,
body.sak-public-bot-page h3,
body.sak-public-bot-page h4,
body.sak-public-bot-page h5,
body.sak-public-bot-page h6,
body.sak-public-bot-page strong,
body.sak-public-bot-page b,
body.sak-public-bot-page label {
  color: #ffffff !important;
}

body.sak-public-bot-page p,
body.sak-public-bot-page .text-muted,
body.sak-public-bot-page .small {
  color: rgba(226,232,240,.76) !important;
}

/* Сообщения бота */
body.sak-public-bot-page .message,
body.sak-public-bot-page .bot-message,
body.sak-public-bot-page .chat-message,
body.sak-public-bot-page .bubble,
body.sak-public-bot-page [class*="message"],
body.sak-public-bot-page [class*="bubble"] {
  background: rgba(2, 6, 23, .64) !important;
  color: rgba(248,250,252,.92) !important;
  border: 1px solid rgba(147,197,253,.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.22) !important;
}

/* Кнопки меню чат-бота */
body.sak-public-bot-page .btn,
body.sak-public-bot-page button,
body.sak-public-bot-page a.btn,
body.sak-public-bot-page form button {
  border-radius: 16px !important;
  font-weight: 800 !important;
}

body.sak-public-bot-page .bot-menu-button,
body.sak-public-bot-page .menu-button,
body.sak-public-bot-page .section-button,
body.sak-public-bot-page .chatbot-button,
body.sak-public-bot-page .choice-button,
body.sak-public-bot-page .btn-light,
body.sak-public-bot-page .btn-outline-primary,
body.sak-public-bot-page .btn-outline-secondary,
body.sak-public-bot-page .sak-neon-panel a:not(.nav-link),
body.sak-public-bot-page .sak-neon-panel button {
  background: rgba(2, 6, 23, .54) !important;
  color: #2f8cff !important;
  border: 1px solid rgba(147,197,253,.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 34px rgba(0,0,0,.22) !important;
}

body.sak-public-bot-page .bot-menu-button:hover,
body.sak-public-bot-page .menu-button:hover,
body.sak-public-bot-page .section-button:hover,
body.sak-public-bot-page .chatbot-button:hover,
body.sak-public-bot-page .choice-button:hover,
body.sak-public-bot-page .sak-neon-panel a:not(.nav-link):hover,
body.sak-public-bot-page .sak-neon-panel button:hover {
  background: linear-gradient(135deg, #006bff, #1977ff) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.24) !important;
  transform: translateY(-1px);
}

/* Активная кнопка, например Заявка */
body.sak-public-bot-page .active,
body.sak-public-bot-page .btn-primary,
body.sak-public-bot-page button[type="submit"] {
  background: linear-gradient(135deg, #006bff, #1977ff 55%, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 46px rgba(0, 107, 255, .32) !important;
}

/* Поля заявки */
body.sak-public-bot-page input,
body.sak-public-bot-page textarea,
body.sak-public-bot-page select,
body.sak-public-bot-page .form-control,
body.sak-public-bot-page .form-select {
  background: rgba(2, 6, 23, .52) !important;
  color: #ffffff !important;
  border: 1px solid rgba(147,197,253,.22) !important;
  border-radius: 16px !important;
}

body.sak-public-bot-page input::placeholder,
body.sak-public-bot-page textarea::placeholder {
  color: rgba(226,232,240,.54) !important;
}

body.sak-public-bot-page select option {
  background: #0b1433 !important;
  color: #ffffff !important;
}

/* Низ карточки */
body.sak-public-bot-page .card-footer,
body.sak-public-bot-page .bot-footer,
body.sak-public-bot-page .chatbot-footer {
  background: rgba(2,6,23,.42) !important;
  color: rgba(226,232,240,.66) !important;
  border-top: 1px solid rgba(147,197,253,.14) !important;
}

/* Футер в едином стиле */
body.sak-public-bot-page .modern-site-footer {
  margin-top: 80px !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(37,99,235,.20), transparent 32%),
    radial-gradient(circle at 88% 20%, rgba(126,58,242,.22), transparent 34%),
    linear-gradient(135deg, #050b22, #081126 52%, #120933) !important;
  border-top: 1px solid rgba(147,197,253,.14) !important;
}

/* JS принудительно найденные светлые панели */
body.sak-public-bot-page .sak-public-neon-force {
  background:
    radial-gradient(circle at 50% -10%, rgba(37,99,235,.18), transparent 38%),
    linear-gradient(180deg, rgba(15,23,64,.92), rgba(5,10,32,.86)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(147,197,253,.22) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.38) !important;
}

body.sak-public-bot-page .sak-public-neon-force * {
  color: inherit;
}


/* ===============================
   PUBLIC BOT BUTTON TEXT FIX V4
   =============================== */

body.sak-public-bot-page .sak-public-choice-btn {
  background: rgba(2, 6, 23, .62) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(147, 197, 253, .28) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.24) !important;
  font-weight: 800 !important;
}

body.sak-public-bot-page .sak-public-choice-btn *,
body.sak-public-bot-page .sak-public-choice-btn i,
body.sak-public-bot-page .sak-public-choice-btn span {
  color: inherit !important;
}

body.sak-public-bot-page .sak-public-choice-btn:hover {
  background: linear-gradient(135deg, #006bff, #1977ff) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.25) !important;
}

body.sak-public-bot-page .sak-public-choice-btn.sak-public-choice-active {
  background: linear-gradient(135deg, #006bff, #1977ff 55%, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 18px 46px rgba(0, 107, 255, .34) !important;
}

/* Подстраховка: если кнопка всё равно светлая */
body.sak-public-bot-page button:not(.navbar-toggler),
body.sak-public-bot-page a.btn,
body.sak-public-bot-page .btn {
  color: #60a5fa !important;
}

body.sak-public-bot-page button.btn-primary,
body.sak-public-bot-page .btn-primary {
  color: #ffffff !important;
}


/* ===============================
   BOT UNIFIED DARK BLUE/PURPLE STYLE V5
   for /b/... and /bots/...
   =============================== */

body.sak-bot-scope {
  background:
    radial-gradient(circle at 18% 14%, rgba(37, 99, 235, .26), transparent 32%),
    radial-gradient(circle at 88% 20%, rgba(126, 58, 242, .34), transparent 36%),
    radial-gradient(circle at 50% 90%, rgba(14, 165, 233, .10), transparent 32%),
    linear-gradient(135deg, #06102a 0%, #081126 43%, #170b3d 100%) !important;
  background-attachment: fixed !important;
  color: #f8fafc !important;
}

body.sak-bot-scope::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .75;
}

/* Navbar */
body.sak-bot-scope .navbar {
  background: rgba(5, 10, 32, .88) !important;
  border-bottom: 1px solid rgba(147,197,253,.12) !important;
  box-shadow: 0 16px 46px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

/* Общие панели */
body.sak-bot-scope .card,
body.sak-bot-scope .bots-card,
body.sak-bot-scope .bot-card,
body.sak-bot-scope .public-bot-card,
body.sak-bot-scope .rounded-4,
body.sak-bot-scope .shadow-sm,
body.sak-bot-scope .bg-white,
body.sak-bot-scope .bg-light,
body.sak-bot-scope .table-responsive,
body.sak-bot-scope .sak-bot-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(37,99,235,.18), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.052)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(147,197,253,.18) !important;
  border-radius: 28px !important;
  box-shadow: 0 26px 90px rgba(0,0,0,.36) !important;
  backdrop-filter: blur(26px) !important;
  -webkit-backdrop-filter: blur(26px) !important;
}

/* Заголовочные панели */
body.sak-bot-scope .card-header,
body.sak-bot-scope .bots-hero,
body.sak-bot-scope .bot-hero,
body.sak-bot-scope .builder-hero,
body.sak-bot-scope [class*="hero"] {
  background:
    radial-gradient(circle at 84% 20%, rgba(139,92,246,.36), transparent 36%),
    linear-gradient(135deg, #0066ff 0%, #1977ff 48%, #5658ff 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.16) !important;
}

/* Текст */
body.sak-bot-scope h1,
body.sak-bot-scope h2,
body.sak-bot-scope h3,
body.sak-bot-scope h4,
body.sak-bot-scope h5,
body.sak-bot-scope h6,
body.sak-bot-scope label,
body.sak-bot-scope strong,
body.sak-bot-scope b,
body.sak-bot-scope .fw-bold,
body.sak-bot-scope .fw-semibold {
  color: #ffffff !important;
}

body.sak-bot-scope p,
body.sak-bot-scope .text-muted,
body.sak-bot-scope .small,
body.sak-bot-scope .form-text {
  color: rgba(226,232,240,.76) !important;
}

/* Поля */
body.sak-bot-scope input,
body.sak-bot-scope textarea,
body.sak-bot-scope select,
body.sak-bot-scope .form-control,
body.sak-bot-scope .form-select {
  background: rgba(2, 6, 23, .52) !important;
  color: #ffffff !important;
  border: 1px solid rgba(147,197,253,.24) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

body.sak-bot-scope input:focus,
body.sak-bot-scope textarea:focus,
body.sak-bot-scope select:focus,
body.sak-bot-scope .form-control:focus,
body.sak-bot-scope .form-select:focus {
  background: rgba(2, 6, 23, .66) !important;
  border-color: rgba(96,165,250,.85) !important;
  box-shadow: 0 0 0 .25rem rgba(37,99,235,.22) !important;
}

body.sak-bot-scope input::placeholder,
body.sak-bot-scope textarea::placeholder {
  color: rgba(226,232,240,.58) !important;
}

body.sak-bot-scope select option {
  background: #0b1433 !important;
  color: #ffffff !important;
}

/* Кнопки меню публичного бота и кнопки формы */
body.sak-bot-scope .sak-bot-choice,
body.sak-bot-scope .bot-menu-button,
body.sak-bot-scope .menu-button,
body.sak-bot-scope .section-button,
body.sak-bot-scope .chatbot-button,
body.sak-bot-scope .choice-button {
  background: rgba(2, 6, 23, .68) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(147,197,253,.30) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.24) !important;
  font-weight: 850 !important;
}

body.sak-bot-scope .sak-bot-choice *,
body.sak-bot-scope .bot-menu-button *,
body.sak-bot-scope .menu-button *,
body.sak-bot-scope .section-button *,
body.sak-bot-scope .chatbot-button *,
body.sak-bot-scope .choice-button * {
  color: inherit !important;
}

body.sak-bot-scope .sak-bot-choice:hover,
body.sak-bot-scope .bot-menu-button:hover,
body.sak-bot-scope .menu-button:hover,
body.sak-bot-scope .section-button:hover,
body.sak-bot-scope .chatbot-button:hover,
body.sak-bot-scope .choice-button:hover {
  background: linear-gradient(135deg, #006bff, #1977ff) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.24) !important;
}

body.sak-bot-scope .sak-bot-choice-active,
body.sak-bot-scope .btn-primary,
body.sak-bot-scope button[type="submit"] {
  background: linear-gradient(135deg, #006bff, #1977ff 55%, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 18px 46px rgba(0,107,255,.34) !important;
}

/* Обычные outline/light кнопки на страницах ботов */
body.sak-bot-scope .btn-light,
body.sak-bot-scope .btn-white,
body.sak-bot-scope .btn-outline-secondary,
body.sak-bot-scope .btn-outline-primary {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(147,197,253,.22) !important;
}

body.sak-bot-scope .btn-light *,
body.sak-bot-scope .btn-white *,
body.sak-bot-scope .btn-outline-secondary *,
body.sak-bot-scope .btn-outline-primary * {
  color: inherit !important;
}

/* Сообщения публичного бота */
body.sak-bot-scope .message,
body.sak-bot-scope .bot-message,
body.sak-bot-scope .chat-message,
body.sak-bot-scope .bubble,
body.sak-bot-scope [class*="message"],
body.sak-bot-scope [class*="bubble"] {
  background: rgba(2, 6, 23, .64) !important;
  color: rgba(248,250,252,.92) !important;
  border: 1px solid rgba(147,197,253,.14) !important;
}

/* Таблица заявок */
body.sak-bot-scope table,
body.sak-bot-scope .table {
  color: #f8fafc !important;
  border-color: rgba(147,197,253,.16) !important;
  background: transparent !important;
}

body.sak-bot-scope table thead th,
body.sak-bot-scope .table thead th {
  background: rgba(96,165,250,.16) !important;
  color: #ffffff !important;
  border-color: rgba(147,197,253,.18) !important;
}

body.sak-bot-scope table tbody td,
body.sak-bot-scope .table tbody td,
body.sak-bot-scope table tbody th,
body.sak-bot-scope .table tbody th {
  background: rgba(255,255,255,.055) !important;
  color: rgba(248,250,252,.92) !important;
  border-color: rgba(147,197,253,.12) !important;
}

body.sak-bot-scope table tbody tr:hover td,
body.sak-bot-scope .table tbody tr:hover td {
  background: rgba(37,99,235,.16) !important;
}

/* Если в таблице/панелях где-то остался белый inline */
body.sak-bot-scope .sak-force-bot-dark {
  background:
    radial-gradient(circle at 18% 0%, rgba(37,99,235,.18), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.052)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(147,197,253,.18) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.32) !important;
}

body.sak-bot-scope .sak-force-bot-dark * {
  color: inherit;
}

/* Нижняя панель сохранения в редакторе */
body.sak-bot-scope .sticky-bottom,
body.sak-bot-scope .fixed-bottom,
body.sak-bot-scope .save-panel,
body.sak-bot-scope .actions-panel {
  background: rgba(10,16,42,.86) !important;
  border: 1px solid rgba(147,197,253,.16) !important;
  backdrop-filter: blur(26px) !important;
  -webkit-backdrop-filter: blur(26px) !important;
}

/* Белые информационные полосы в редакторе */
body.sak-bot-scope .alert-light,
body.sak-bot-scope .alert-warning {
  background: rgba(250,204,21,.12) !important;
  color: #fff7cc !important;
  border-color: rgba(250,204,21,.22) !important;
}



/* ===============================
   MATCHMAKING AVATAR BUTTON STYLE
   =============================== */

.match-avatar-inline-btn,
.match-visible-avatar-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 46px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #4f8cff, #9b5cff) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 14px 34px rgba(79,140,255,.30) !important;
  text-align: center !important;
  user-select: none !important;
  transition: .18s ease !important;
}

.match-avatar-inline-btn:hover,
.match-visible-avatar-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 18px 42px rgba(79,140,255,.38) !important;
}

.match-avatar-inline-btn i,
.match-visible-avatar-btn i {
  color: #ffffff !important;
}

.match-avatar-inline-help,
.match-visible-avatar-help {
  margin-top: 6px !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  color: rgba(226,232,240,.58) !important;
  text-align: center !important;
}


/* ===============================
   BASE DROPDOWN WORK FIX
   =============================== */

.navbar,
.navbar .container,
.navbar .container-fluid,
.navbar-collapse,
.navbar-nav,
.navbar .dropdown {
  overflow: visible !important;
}

.navbar {
  z-index: 99999 !important;
}

.navbar .dropdown-menu {
  z-index: 1000000 !important;
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  top: calc(100% + 8px) !important;
  min-width: 210px !important;
  padding: 10px !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(15,23,64,.98), rgba(42,31,92,.97)) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.45) !important;
}

.navbar .dropdown-menu.show {
  display: block !important;
}

.navbar .dropdown-item {
  color: #ffffff !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.navbar .dropdown-item:hover {
  background: linear-gradient(135deg, #4f8cff, #9b5cff) !important;
  color: #ffffff !important;
}

