/**
 * FMS AI / SI Product Tour & Smart Reminders Styling
 * Palette: Strict Monochrome (Black & White) with Green Progress & Dark Turquoise Accent
 * Zero transparent colored tints, zero emojis, ultra-minimalist Swiss typography
 */

:root {
  --tour-primary: #111518;
  --tour-primary-hover: #22292f;
  --tour-dark-turquoise: #0a4f5c;
  --tour-text: #0f172a;
  --tour-muted: #64748b;
  --tour-subtle: #475569;
  --tour-border: #e2e8f0;
  --tour-border-strong: #cbd5e1;
  --tour-bg: #ffffff;
  --tour-progress-green: #10b981;
  --tour-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tour-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

/* 1. ПЛАВАЮЩИЙ ТРИГГЕР (СВЕРНУТЫЙ ВИДЖЕТ) */
.fms-tour-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  background: #ffffff;
  color: var(--tour-primary);
  border: 1px solid var(--tour-border);
  border-radius: 9999px;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
  font-family: var(--tour-font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  user-select: none;
}

.fms-tour-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.18), 0 0 0 1px var(--tour-primary);
}

.fms-tour-trigger-ring {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.fms-tour-trigger-ring svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fms-tour-trigger-ring circle.bg {
  stroke: #e2e8f0;
  stroke-width: 3.5;
  fill: none;
}

.fms-tour-trigger-ring circle.progress {
  stroke: var(--tour-progress-green, #10b981);
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
  transition: stroke-dashoffset 0.4s ease;
}

.fms-tour-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--tour-dark-turquoise);
  transition: transform 0.2s ease, background 0.2s ease;
}

.fms-tour-trigger:hover .fms-tour-trigger-icon {
  transform: scale(1.1);
  background: #e2e8f0;
}

.fms-tour-trigger-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.fms-tour-trigger-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.fms-tour-trigger-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.fms-tour-trigger-bell {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #111518;
  margin-left: 4px;
  vertical-align: middle;
}

/* 2. ЗАТЕМНЕНИЕ САЙТА В ПРОЗРАЧНЫЙ ТЕМНЫЙ ПРИ ОТКРЫТИИ ТУРА */
.fms-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 21, 24, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9980;
  animation: fmsBackdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* 3. РАСКРЫТОЕ ОКНО ТУРА */
.fms-tour-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 9995;
  width: min(440px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 110px));
  background: #ffffff;
  border: 1px solid var(--tour-border);
  border-radius: 20px;
  box-shadow: var(--tour-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--tour-font);
  animation: fmsTourOpen 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fmsTourOpen {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ВЕРХНЯЯ ШАПКА */
.fms-tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--tour-border);
}

.fms-tour-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fms-tour-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--tour-border);
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.fms-tour-icon-btn:hover {
  background: #111518;
  color: #ffffff;
  border-color: #111518;
}

.fms-tour-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fms-tour-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--tour-dark-turquoise);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fms-tour-header-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tour-primary);
}

.fms-tour-header-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s ease, color 0.15s ease;
}

.fms-tour-header-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 3. МИНИ-ДАШБОРД (STICKY, ЧИСТЫЙ МОНОХРОМ С ЗЕЛЕНОЙ ПОЛОСОЙ) */
.fms-tour-dashboard {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--tour-border);
}

.fms-tour-dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fms-tour-dash-label {
  font-size: 11px;
  font-weight: 750;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fms-tour-dash-percent {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--tour-progress-green, #10b981);
}

.fms-tour-dash-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.fms-tour-dash-bar-fill {
  height: 100%;
  background: var(--tour-progress-green, #10b981);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fms-tour-dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

.fms-tour-dash-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fms-tour-dash-action-btn {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fms-tour-dash-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.fms-tour-dash-sep {
  color: #cbd5e1;
  font-size: 9px;
}

/* Плашка активного напоминания в дашборде (строгий монохром) */
.fms-tour-reminder-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  border-radius: 6px;
  font-size: 11px;
  color: #111518;
}

.fms-tour-reminder-pill-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 10.5px;
  text-decoration: underline;
}

.fms-tour-reminder-pill-btn:hover {
  color: #111518;
}

/* 4. НАВИГАЦИОННЫЕ ВКЛАДКИ */
.fms-tour-nav {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--tour-border);
  background: #ffffff;
  overflow-x: auto;
  scrollbar-width: none;
}

.fms-tour-nav::-webkit-scrollbar {
  display: none;
}

.fms-tour-nav-item {
  flex: 1;
  min-width: 76px;
  padding: 9px 6px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.fms-tour-nav-item:hover {
  color: #0f172a;
}

.fms-tour-nav-item.active {
  color: var(--tour-primary);
  font-weight: 750;
  border-bottom-color: var(--tour-primary);
}

/* 5. ТЕЛО ВКЛАДОК */
.fms-tour-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #ffffff;
}

/* КАРТОЧКА ТЕКУЩЕГО ЭТАПА: ЧИСТАЯ ТИПОГРАФИКА */
.fms-tour-stage-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fms-stage-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fms-stage-badge {
  font-size: 10.5px;
  font-weight: 750;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fms-stage-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.fms-stage-section {
  display: flex;
  flex-direction: column;
}

.fms-stage-fact {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: #1e293b;
}

.fms-stage-benefit-row {
  padding: 8px 10px;
  border-left: 2px solid #111518;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fms-stage-benefit-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fms-stage-benefit-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #334155;
}

/* СТРОКА ДЕЙСТВИЯ НА СТРАНИЦЕ */
.fms-stage-spotlight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--tour-border);
  border-radius: 8px;
  background: #ffffff;
}

.fms-stage-spotlight-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fms-stage-spotlight-target-text {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.3;
}

.tour-spotlight-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: #111518;
  background: #ffffff;
  border: 1px solid var(--tour-border-strong);
  padding: 2px 6px;
  border-radius: 4px;
}

.tour-spotlight-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}

.tour-btn-spotlight {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--tour-primary);
  background: var(--tour-primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tour-btn-spotlight:hover {
  background: var(--tour-primary-hover);
}

/* КНОПКИ УПРАВЛЕНИЯ ЭТАПА */
.fms-stage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--tour-border);
}

.fms-stage-nav-btns {
  display: flex;
  gap: 6px;
}

.fms-stage-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 4px;
}

.fms-tour-subtle-link {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fms-tour-subtle-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.fms-tour-subtle-sep {
  color: #cbd5e1;
  font-size: 9px;
}

/* ОБЩИЕ КНОПКИ */
.fms-tour-btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  font-family: inherit;
}

.fms-tour-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.fms-tour-inline-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  color: var(--tour-primary);
  animation: fmsTourFadeIn 0.2s ease;
}

.fms-tour-inline-status.error {
  border-color: #ef4444;
  color: #b91c1c;
}

.fms-tour-inline-status.success {
  border-color: #10b981;
  color: #047857;
}

.fms-tour-btn-primary {
  background: var(--tour-primary);
  color: #ffffff;
}

.fms-tour-btn-primary:hover {
  background: var(--tour-primary-hover);
}

.fms-tour-btn-outline {
  background: #ffffff;
  border: 1px solid var(--tour-border);
  color: #334155;
}

.fms-tour-btn-outline:hover {
  background: #f8fafc;
  color: #0f172a;
}

.fms-tour-btn-read.is-read {
  background: var(--tour-primary);
  color: #ffffff;
  border-color: var(--tour-primary);
}

/* 6. ПАНЕЛЬ НАПОМИНАНИЙ (ВЫБОР КАНАЛОВ И ВРЕМЕНИ) */
.fms-tour-reminders-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fms-tour-remind-header {
  border-bottom: 1px solid var(--tour-border);
  padding-bottom: 8px;
}

.fms-tour-remind-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 750;
  color: #0f172a;
}

.fms-tour-remind-sub {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.fms-tour-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.fms-tour-channel-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--tour-border);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.fms-tour-channel-btn:hover {
  border-color: var(--tour-primary);
}

.fms-tour-channel-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.fms-tour-channel-btn:disabled:hover {
  border-color: var(--tour-border);
}

.fms-tour-channel-btn.active {
  border-color: var(--tour-primary);
  background: var(--tour-primary);
}

.fms-tour-channel-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.fms-tour-channel-desc {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

.fms-tour-channel-btn.active .fms-tour-channel-name {
  color: #ffffff;
}

.fms-tour-channel-btn.active .fms-tour-channel-desc {
  color: #94a3b8;
}

/* ПОЛЯ ВВОДА */
.fms-tour-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fms-tour-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fms-tour-phone-row .fms-tour-input {
  flex: 1;
}

.fms-tour-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}

.fms-tour-select,
.fms-tour-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--tour-border);
  border-radius: 6px;
  font-size: 12.5px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
}

.fms-tour-select:focus,
.fms-tour-input:focus {
  border-color: var(--tour-primary);
}

.fms-tour-hint {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* ЧИПЫ ВРЕМЕНИ И ВОПРОСОВ (МОНОХРОМ) */
.fms-tour-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fms-tour-chip {
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fms-tour-chip:hover,
.fms-tour-chip.active {
  background: var(--tour-primary);
  border-color: var(--tour-primary);
  color: #ffffff;
}

/* 7. ПРОФИЛЬ */
.fms-tour-profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fms-tour-profile-intro {
  font-size: 12px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

/* 8. ИИ-КОНСУЛЬТАНТ */
.fms-tour-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fms-tour-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
}

.fms-tour-chat-bubble {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}

.fms-tour-chat-bubble.bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  color: #0f172a;
}

.fms-tour-chat-bubble.user {
  align-self: flex-end;
  background: var(--tour-primary);
  color: #ffffff;
}

.fms-tour-chat-input-row {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--tour-border);
}

.fms-tour-chat-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--tour-border);
  border-radius: 6px;
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
}

.fms-tour-chat-input:focus {
  border-color: var(--tour-primary);
}

/* 9. ЖИВАЯ ИНТЕРАКТИВНАЯ ПОДСВЕТКА НА СТРАНИЦЕ */
@keyframes fmsGlowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5), 0 10px 30px rgba(17, 21, 24, 0.12);
    outline-color: #10b981;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.22), 0 20px 45px rgba(17, 21, 24, 0.18);
    outline-color: #34d399;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5), 0 10px 30px rgba(17, 21, 24, 0.12);
    outline-color: #10b981;
  }
}

.fms-target-highlight {
  outline: 3px solid #10b981 !important;
  outline-offset: 4px !important;
  border-radius: 18px !important;
  animation: fmsGlowPulse 2.2s ease-in-out infinite !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  z-index: 9985 !important;
  background: #ffffff !important;
}

/* 10. QR МОДАЛКА */
.fms-tour-qr-modal {
  position: absolute;
  inset: 0;
  background: rgba(17, 21, 24, 0.65);
  backdrop-filter: blur(2px);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fmsTourFadeIn 0.2s ease;
}

@keyframes fmsTourFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.fms-tour-qr-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 16px;
  width: 100%;
  max-width: 310px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--tour-border);
}

.fms-tour-qr-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.fms-tour-qr-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.fms-tour-qr-badge {
  display: inline-block;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  color: #334155;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.fms-tour-qr-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.fms-tour-qr-sub {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
  margin: 0 0 12px 0;
}

.fms-tour-qr-box {
  background: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 8px;
  padding: 8px;
  display: inline-block;
  margin-bottom: 10px;
}

.fms-tour-qr-image {
  display: block;
  width: 150px;
  height: 150px;
  image-rendering: pixelated;
  background: #ffffff;
}

.fms-tour-qr-sync-badge {
  font-size: 11px;
  color: #111518;
  background: #ffffff;
  border: 1px solid var(--tour-border);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.fms-tour-qr-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.fms-tour-qr-copied {
  font-size: 11px;
  color: #111518;
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 0;
}

.fms-tour-qr-banner {
  background: #ffffff;
  border: 1px solid var(--tour-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.fms-tour-qr-banner-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.fms-tour-qr-banner-text strong {
  font-size: 12px;
  color: #0f172a;
}

.fms-tour-qr-banner-text span {
  font-size: 11px;
  color: #64748b;
}

.fms-tour-qr-banner-btn {
  background: #ffffff;
  border: 1px solid var(--tour-border);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.fms-tour-qr-banner-btn:hover {
  background: #111518;
  color: #ffffff;
  border-color: #111518;
}

/* 11. АДАПТИВНОСТЬ НА МОБИЛЬНЫХ (< 640px) */
@media (max-width: 639px) {
  #fms-ai-tour-root.is-open-flow .fms-tour-trigger {
    visibility: hidden;
    pointer-events: none;
  }

  .fms-tour-trigger {
    bottom: 16px;
    right: 16px;
    padding: 6px 14px 6px 8px;
  }

  .fms-tour-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .fms-tour-qr-banner {
    display: none !important;
  }
}

@media (max-width: 359px) {
  #fms-ai-tour-root .fms-tour-trigger {
    visibility: hidden;
    pointer-events: none;
  }
}

/* FMS visual system and compact assistant layout. All rules stay inside the tour root. */
#fms-ai-tour-root {
  --tour-primary: #0a4f5c;
  --tour-primary-hover: #083d47;
  --tour-dark-turquoise: #0a4f5c;
  --tour-progress-green: #17a5bd;
  --tour-border: #dbe7ea;
  --tour-border-strong: #c8dadd;
  --tour-font: var(--font-sans, "Roboto", Arial, sans-serif);
  --tour-shadow: 0 18px 48px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

#fms-ai-tour-root .fms-tour-trigger {
  bottom: var(--fms-tour-trigger-bottom, 24px);
  right: max(12px, calc(env(safe-area-inset-right) + 8px));
  gap: 8px;
  min-height: 44px;
  padding: 5px 11px 5px 7px;
  border-color: #dbe7ea;
  box-shadow: 0 8px 24px rgba(10, 79, 92, 0.13), 0 0 0 1px rgba(10, 79, 92, 0.04);
  font-family: var(--font-sans, "Roboto", Arial, sans-serif);
}

#fms-ai-tour-root .fms-tour-trigger:hover {
  box-shadow: 0 12px 28px rgba(10, 79, 92, 0.18), 0 0 0 1px #0a4f5c;
}

#fms-ai-tour-root .fms-tour-trigger-ring {
  width: 30px;
  height: 30px;
}

#fms-ai-tour-root .fms-tour-trigger-icon {
  width: 20px;
  height: 20px;
  background: #eaf5f3;
}

#fms-ai-tour-root .fms-tour-trigger-title {
  font-size: 12px;
}

#fms-ai-tour-root .fms-tour-trigger-sub {
  font-size: 10.5px;
}

#fms-ai-tour-root .fms-tour-backdrop {
  background: rgba(17, 21, 24, 0.18);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

#fms-ai-tour-root .fms-tour-window {
  width: min(390px, calc(100vw - 48px));
  height: min(560px, 75vh);
  max-height: 75vh;
  bottom: 24px;
  right: 24px;
  border-radius: 18px;
  border-color: #dbe7ea;
  font-family: var(--font-sans, "Roboto", Arial, sans-serif);
}

#fms-ai-tour-root.is-open-flow .fms-tour-window {
  position: relative;
  inset: auto;
  margin: 0 24px 24px auto;
  scroll-margin-top: 12px;
}

#fms-ai-tour-root.is-open-flow .fms-tour-trigger {
  visibility: hidden;
  pointer-events: none;
}

#fms-ai-tour-root .fms-tour-header {
  min-height: 48px;
  padding: 7px 11px;
}

#fms-ai-tour-root .fms-tour-header-brand {
  min-width: 0;
  gap: 7px;
}

#fms-ai-tour-root .fms-tour-ai-badge {
  gap: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 9.5px;
}

#fms-ai-tour-root .fms-tour-header-title {
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.2;
}

#fms-ai-tour-root .fms-tour-header-actions {
  flex: 0 0 auto;
  gap: 4px;
}

#fms-ai-tour-root .fms-tour-icon-btn,
#fms-ai-tour-root .fms-tour-header-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

#fms-ai-tour-root .fms-tour-dashboard {
  padding: 8px 12px;
}

#fms-ai-tour-root .fms-tour-dash-row {
  margin-bottom: 5px;
}

#fms-ai-tour-root .fms-tour-dash-label {
  font-size: 11.5px;
  letter-spacing: 0.01em;
  text-transform: none;
}

#fms-ai-tour-root .fms-tour-dash-percent {
  font-size: 14px;
}

#fms-ai-tour-root .fms-tour-dash-bar-bg {
  height: 4px;
  margin-bottom: 6px;
}

#fms-ai-tour-root .fms-tour-dash-footer {
  gap: 6px;
  font-size: 11px;
}

#fms-ai-tour-root .fms-tour-dash-actions {
  gap: 3px;
}

#fms-ai-tour-root .fms-tour-dash-action-btn {
  padding: 3px 4px;
  font-size: 11px;
}

#fms-ai-tour-root .fms-tour-reminder-pill {
  margin-top: 6px;
  padding: 5px 8px;
}

#fms-ai-tour-root .fms-tour-nav {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) max-content;
  gap: 4px;
  overflow: visible;
  padding: 5px 9px;
}

#fms-ai-tour-root .fms-tour-nav-item {
  min-width: 0;
  min-height: 40px;
  padding: 6px 4px;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
}

#fms-ai-tour-root .fms-tour-nav-item.active {
  color: #0a4f5c;
  background: #edf7f5;
  border-bottom-color: transparent;
}

#fms-ai-tour-root .fms-tour-nav-more {
  position: relative;
  min-width: 58px;
  color: #64748b;
}

#fms-ai-tour-root .fms-tour-nav-more > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}

#fms-ai-tour-root .fms-tour-nav-more > summary::-webkit-details-marker {
  display: none;
}

#fms-ai-tour-root .fms-tour-nav-more > summary::after {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
}

#fms-ai-tour-root .fms-tour-nav-more.has-active > summary::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #17a5bd;
  content: "";
}

#fms-ai-tour-root .fms-tour-nav-more > summary:hover,
#fms-ai-tour-root .fms-tour-nav-more[open] > summary {
  color: #0a4f5c;
  background: #edf7f5;
}

#fms-ai-tour-root .fms-tour-nav-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 164px;
  padding: 4px;
  border: 1px solid #dbe7ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

#fms-ai-tour-root .fms-tour-nav-more[open] .fms-tour-nav-menu {
  display: grid;
  gap: 2px;
}

#fms-ai-tour-root .fms-tour-nav-menu .fms-tour-nav-item {
  justify-content: flex-start;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
}

#fms-ai-tour-root .fms-tour-body {
  min-height: 0;
  padding: 12px;
  overscroll-behavior: contain;
}

#fms-ai-tour-root .fms-tour-stage-card {
  gap: 10px;
}

#fms-ai-tour-root .fms-stage-title {
  font-size: 17px;
  line-height: 1.28;
}

#fms-ai-tour-root .fms-stage-fact {
  font-size: 14px;
  line-height: 1.5;
}

#fms-ai-tour-root .fms-stage-benefit-row {
  padding: 8px 10px;
  border-left-color: #17a5bd;
  background: #f7fbfa;
}

#fms-ai-tour-root .fms-stage-benefit-label {
  font-size: 11px;
}

#fms-ai-tour-root .fms-stage-benefit-text {
  font-size: 13px;
  line-height: 1.45;
}

#fms-ai-tour-root .fms-stage-spotlight-bar {
  gap: 8px;
  padding: 8px;
  border-color: #e5edef;
}

#fms-ai-tour-root .fms-stage-spotlight-target-text {
  font-size: 12px;
}

#fms-ai-tour-root .tour-btn-spotlight,
#fms-ai-tour-root .fms-tour-btn {
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

#fms-ai-tour-root .fms-stage-controls {
  position: sticky;
  bottom: -12px;
  z-index: 1;
  margin-top: 0;
  padding: 9px 0 12px;
  background: #ffffff;
}

#fms-ai-tour-root .fms-stage-nav-btns {
  gap: 5px;
}

#fms-ai-tour-root .fms-stage-quick-actions {
  gap: 6px;
  padding-top: 2px;
}

#fms-ai-tour-root .fms-tour-subtle-link {
  min-height: 36px;
  padding: 5px 6px;
  font-size: 12px;
}

#fms-ai-tour-root .fms-tour-reminders-panel,
#fms-ai-tour-root .fms-tour-profile-form {
  gap: 10px;
}

#fms-ai-tour-root .fms-tour-remind-title {
  font-size: 16px;
}

#fms-ai-tour-root .fms-tour-remind-sub,
#fms-ai-tour-root .fms-tour-profile-intro {
  font-size: 14px;
  line-height: 1.45;
}

#fms-ai-tour-root .fms-tour-channel-grid {
  gap: 7px;
}

#fms-ai-tour-root .fms-tour-channel-btn {
  min-height: 58px;
  padding: 8px 9px;
  border-radius: 9px;
}

#fms-ai-tour-root .fms-tour-channel-name {
  font-size: 13px;
}

#fms-ai-tour-root .fms-tour-channel-desc {
  font-size: 11.5px;
  line-height: 1.3;
}

#fms-ai-tour-root .fms-tour-label {
  font-size: 13px;
}

#fms-ai-tour-root .fms-tour-chat-bubble {
  font-size: 14px;
  line-height: 1.5;
}

#fms-ai-tour-root .fms-tour-select,
#fms-ai-tour-root .fms-tour-input,
#fms-ai-tour-root .fms-tour-chat-input {
  min-height: 40px;
  font: inherit;
  font-size: 14px;
}

#fms-ai-tour-root :focus-visible {
  outline: 2px solid #17a5bd;
  outline-offset: 2px;
}

@media (max-width: 639px) {
  #fms-ai-tour-root .fms-tour-trigger {
    right: max(12px, calc(env(safe-area-inset-right) + 8px));
    bottom: calc(var(--fms-tour-trigger-bottom, 16px) + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    padding: 4px;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
  }

  #fms-ai-tour-root .fms-tour-trigger-ring {
    width: 34px;
    height: 34px;
  }

  #fms-ai-tour-root .fms-tour-trigger-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #fms-ai-tour-root .fms-tour-window {
    position: relative;
    inset: auto;
    width: calc(100% - 24px);
    height: min(62dvh, 560px);
    max-height: min(72dvh, calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    margin: 0 auto 24px;
    border-radius: 16px;
    scroll-margin-top: max(12px, env(safe-area-inset-top));
  }

  #fms-ai-tour-root.is-open-flow .fms-tour-window {
    margin: 0 auto 24px;
  }

  #fms-ai-tour-root .fms-tour-header {
    min-height: 46px;
    padding: 6px 9px;
  }

  #fms-ai-tour-root .fms-tour-header-brand {
    gap: 5px;
  }

  #fms-ai-tour-root .fms-tour-ai-badge {
    gap: 2px;
    padding-inline: 5px;
    font-size: 9px;
  }

  #fms-ai-tour-root .fms-tour-header-title {
    font-size: 12px;
  }

  #fms-ai-tour-root .fms-tour-icon-btn,
  #fms-ai-tour-root .fms-tour-header-close {
    width: 32px;
    height: 32px;
  }

  #fms-ai-tour-root .fms-tour-dashboard {
    padding: 7px 10px;
  }

  #fms-ai-tour-root .fms-tour-dash-footer {
    font-size: 10.5px;
  }

  #fms-ai-tour-root .fms-tour-dash-actions {
    gap: 1px;
  }

  #fms-ai-tour-root .fms-tour-dash-action-btn {
    padding-inline: 3px;
    font-size: 10.5px;
  }

  #fms-ai-tour-root .fms-tour-dash-sep {
    font-size: 8px;
  }

  #fms-ai-tour-root .fms-tour-nav {
    padding: 4px 7px;
  }

  #fms-ai-tour-root .fms-tour-nav-item,
  #fms-ai-tour-root .fms-tour-nav-more > summary {
    min-height: 40px;
    padding: 5px 3px;
    font-size: 11.5px;
  }

  #fms-ai-tour-root .fms-tour-nav-more {
    min-width: 55px;
  }

  #fms-ai-tour-root .fms-tour-nav-more > summary {
    gap: 4px;
    padding-inline: 6px;
  }

  #fms-ai-tour-root .fms-tour-body {
    padding: 10px;
  }

  #fms-ai-tour-root .fms-tour-stage-card {
    gap: 9px;
  }

  #fms-ai-tour-root .fms-stage-title {
    font-size: 16px;
  }

  #fms-ai-tour-root .fms-stage-fact {
    font-size: 14px;
  }

  #fms-ai-tour-root .fms-stage-spotlight-bar {
    align-items: flex-start;
  }

  #fms-ai-tour-root .tour-btn-spotlight {
    min-height: 40px;
  }

  #fms-ai-tour-root .fms-stage-controls {
    bottom: -10px;
    padding: 8px 0 10px;
  }

  #fms-ai-tour-root .fms-tour-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    padding: 12px;
  }

  #fms-ai-tour-root .fms-tour-select,
  #fms-ai-tour-root .fms-tour-input,
  #fms-ai-tour-root .fms-tour-chat-input {
    min-height: 42px;
    font-size: 16px;
  }
}


/* ========================================================
   FMS ULTRA-MINIMALIST LEFT-RIGHT TOUR CARD (ZERO SCROLL)
   ======================================================== */

#fms-ai-tour-root .fms-tour-window {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 9995 !important;
  width: min(720px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  font-family: var(--font-sans, "Roboto", Arial, sans-serif) !important;
  animation: fmsTourOpen 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
}

#fms-ai-tour-root .fms-tour-window[hidden],
#fms-ai-tour-root .fms-tour-backdrop[hidden] {
  display: none !important;
}

#fms-ai-tour-root .fms-tour-window.is-closing {
  opacity: 0 !important;
  transform: scale(0.9) translateY(24px) !important;
  pointer-events: none !important;
}

#fms-ai-tour-root.is-open-flow .fms-tour-window {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  margin: 0 !important;
}

/* ШАПКА */
#fms-ai-tour-root .fms-tour-header {
  height: 40px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  background: #fafafa !important;
  border-bottom: 1px solid #ebecee !important;
}

#fms-ai-tour-root .fms-tour-header-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#fms-ai-tour-root .fms-tour-kicker {
  font-family: "Roboto Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: #71717a !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

#fms-ai-tour-root .fms-tour-sep {
  color: #d4d4d8 !important;
  font-size: 12px !important;
}

#fms-ai-tour-root .fms-tour-head-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #18181b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#fms-ai-tour-root .fms-tour-close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 18px !important;
  line-height: 1 !important;
  color: #71717a !important;
  cursor: pointer !important;
  padding: 4px !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
}

#fms-ai-tour-root .fms-tour-close-btn:hover {
  color: #18181b !important;
  background: #f4f4f5 !important;
}

/* ДВУХКОЛОНОЧНЫЙ СПЛИТ: СЛЕВА — СПРАВА */
#fms-ai-tour-root .fms-tour-split {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important;
  gap: 18px !important;
  padding: 16px 20px 14px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
}

/* ЛЕВАЯ КОЛОНКА */
#fms-ai-tour-root .fms-tour-left-col {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  gap: 10px !important;
}

#fms-ai-tour-root .fms-stage-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

#fms-ai-tour-root .fms-stage-counter {
  font-family: "Roboto Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #09090b !important;
  background: #f4f4f5 !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  border: 1px solid #e4e4e7 !important;
}

#fms-ai-tour-root .fms-stage-read-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #52525b !important;
  background: transparent !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 4px !important;
  padding: 2px 7px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#fms-ai-tour-root .fms-stage-read-btn.is-read {
  background: #09090b !important;
  color: #ffffff !important;
  border-color: #09090b !important;
}

#fms-ai-tour-root .fms-stage-read-btn.is-read .fms-stage-check {
  color: #10b981 !important;
}

#fms-ai-tour-root .fms-stage-title {
  margin: 0 !important;
  font-size: 15.5px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  color: #09090b !important;
  letter-spacing: -0.01em !important;
}

#fms-ai-tour-root .fms-stage-fact {
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: #3f3f46 !important;
}

#fms-ai-tour-root .fms-stage-spotlight-row {
  display: flex !important;
  align-items: center !important;
}

#fms-ai-tour-root .fms-tour-spotlight-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#fms-ai-tour-root .fms-tour-spotlight-btn:hover {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}



/* ПРАВАЯ КОЛОНКА */
#fms-ai-tour-root .fms-tour-right-col {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  border-left: 1px solid #e4e4e7 !important;
  padding-left: 20px !important;
  min-width: 0 !important;
  gap: 10px !important;
}

#fms-ai-tour-root .fms-right-progress-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

#fms-ai-tour-root .fms-progress-labels {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  font-size: 11px !important;
  color: #52525b !important;
}

#fms-ai-tour-root .fms-progress-percent {
  font-family: "Roboto Mono", monospace !important;
  font-weight: 700 !important;
  color: #09090b !important;
}

#fms-ai-tour-root .fms-progress-steps {
  font-size: 10px !important;
  color: #71717a !important;
}

#fms-ai-tour-root .fms-progress-track {
  height: 3px !important;
  background: #e4e4e7 !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

#fms-ai-tour-root .fms-progress-bar {
  height: 100% !important;
  background: #10b981 !important;
  transition: width 0.25s ease !important;
}

/* ЕДИНЫЙ НИЖНИЙ АКШН-БАР */
#fms-ai-tour-root .fms-tour-bottom-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 18px 12px !important;
  background: #fafafa !important;
  border-top: 1px solid #e4e4e7 !important;
  box-sizing: border-box !important;
}

#fms-ai-tour-root .fms-bottom-util-group {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#fms-ai-tour-root .fms-bottom-util-group .fms-action-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #52525b !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

#fms-ai-tour-root .fms-bottom-util-group .fms-action-button:hover {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border-color: #a1a1aa !important;
}

#fms-ai-tour-root .fms-bottom-util-group .fms-action-button.active {
  background: #09090b !important;
  color: #ffffff !important;
  border-color: #09090b !important;
}

#fms-ai-tour-root .fms-stage-nav-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

#fms-ai-tour-root .fms-nav-btn {
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 7px 16px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#fms-ai-tour-root .fms-nav-btn--prev {
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  color: #52525b !important;
}

#fms-ai-tour-root .fms-nav-btn--prev:hover {
  background: #f4f4f5 !important;
  color: #09090b !important;
}

#fms-ai-tour-root .fms-nav-btn--next {
  background: #09090b !important;
  border: 1px solid #09090b !important;
  color: #ffffff !important;
}

#fms-ai-tour-root .fms-nav-btn--next:hover {
  background: #27272a !important;
  border-color: #27272a !important;
}

/* ПАНЕЛЬ QR (С ТЕЛЕФОНА) */
#fms-ai-tour-root .fms-phone-qr-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 10px !important;
  background: #fafafa !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 8px !important;
}

#fms-ai-tour-root .fms-qr-img-wrap {
  background: #ffffff !important;
  padding: 3px !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

#fms-ai-tour-root .fms-qr-image {
  display: block !important;
  width: 86px !important;
  height: 86px !important;
}

#fms-ai-tour-root .fms-qr-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

#fms-ai-tour-root .fms-qr-hint {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  color: #52525b !important;
}

#fms-ai-tour-root .fms-btn-copy-link {
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #09090b !important;
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.15s ease !important;
}

#fms-ai-tour-root .fms-btn-copy-link:hover {
  background: #f4f4f5 !important;
  border-color: #09090b !important;
}

#fms-ai-tour-root .fms-qr-toast {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #10b981 !important;
}

/* ПАНЕЛЬ НАПОМИНАНИЙ */
#fms-ai-tour-root .fms-remind-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  background: #fafafa !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 8px !important;
}

#fms-ai-tour-root .fms-remind-channels {
  display: flex !important;
  gap: 4px !important;
}

#fms-ai-tour-root .fms-remind-channel-chip {
  flex: 1 !important;
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 4px !important;
  padding: 3px 4px !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #52525b !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.15s ease !important;
}

#fms-ai-tour-root .fms-remind-channel-chip.active {
  background: #09090b !important;
  color: #ffffff !important;
  border-color: #09090b !important;
}

#fms-ai-tour-root .fms-remind-input-wrap {
  display: flex !important;
  gap: 6px !important;
}

#fms-ai-tour-root .fms-remind-input {
  flex: 1 !important;
  font-family: "Roboto Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 8px !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #09090b !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#fms-ai-tour-root .fms-remind-input:focus {
  border-color: #09090b !important;
}

#fms-ai-tour-root .fms-remind-footer-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

#fms-ai-tour-root .fms-date-chips {
  display: flex !important;
  gap: 4px !important;
}

#fms-ai-tour-root .fms-date-chip {
  background: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 4px !important;
  padding: 3px 6px !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #52525b !important;
  cursor: pointer !important;
}

#fms-ai-tour-root .fms-date-chip.active {
  border-color: #09090b !important;
  color: #09090b !important;
  background: #f4f4f5 !important;
  font-weight: 700 !important;
}

#fms-ai-tour-root .fms-btn-schedule {
  background: transparent !important;
  border: 1px solid #d4d4d8 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-family: inherit !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #09090b !important;
  cursor: pointer !important;
}

#fms-ai-tour-root .fms-btn-schedule:hover {
  background: #f4f4f5 !important;
}

#fms-ai-tour-root .fms-tour-inline-status {
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  padding: 4px 6px !important;
  border-radius: 4px !important;
}

#fms-ai-tour-root .fms-tour-inline-status.success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
}

#fms-ai-tour-root .fms-tour-inline-status.error {
  background: #fef2f2 !important;
  color: #991b1b !important;
}

#fms-ai-tour-root .fms-remind-channels {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#fms-ai-tour-root .fms-remind-channel-chip {
  min-height: 30px !important;
  padding: 4px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

#fms-ai-tour-root .fms-remind-channel-chip:disabled {
  cursor: not-allowed !important;
  opacity: 0.5 !important;
}

#fms-ai-tour-root .fms-tour-sms-hint {
  margin-top: -2px !important;
  color: #71717a !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
}

#fms-ai-tour-root .fms-active-reminder-pill {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
  color: #166534 !important;
}

#fms-ai-tour-root .fms-btn-cancel-reminder {
  background: transparent !important;
  border: none !important;
  font-size: 11px !important;
  color: #dc2626 !important;
  cursor: pointer !important;
  padding: 0 2px !important;
}

/* МОБИЛЬНЫЙ АДАПТИВ */
@media (max-width: 679px) {
  #fms-ai-tour-root .fms-tour-window {
    width: calc(100% - 20px) !important;
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    border-radius: 14px !important;
  }
  #fms-ai-tour-root .fms-tour-split {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px 14px 14px !important;
  }
  #fms-ai-tour-root .fms-tour-right-col {
    border-left: none !important;
    border-top: 1px solid #e4e4e7 !important;
    padding-left: 0 !important;
    padding-top: 10px !important;
  }
  #fms-ai-tour-root .fms-stage-title {
    font-size: 14.5px !important;
  }
  #fms-ai-tour-root .fms-stage-fact {
    font-size: 12px !important;
  }
  #fms-ai-tour-root .fms-tour-bottom-bar {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 12px 12px !important;
  }
  #fms-ai-tour-root .fms-bottom-util-group {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
  }
  #fms-ai-tour-root .fms-bottom-util-group .fms-action-button {
    flex: 1 !important;
    justify-content: center !important;
    min-height: 40px !important;
  }
  #fms-ai-tour-root .fms-stage-nav-row {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
  }
  #fms-ai-tour-root .fms-nav-btn {
    flex: 1 !important;
    min-height: 44px !important;
  }
}
