/* Recovery scope: retain original React navigation and page shell. */
.sidebar-nav > .sidebar-admin-links:not(:has(> a[href="/online"], > a[href="/review-replies"], > a[href="/notifications"], > a[href="/ai-replies"], > a[href="/auto-upload"], > a[href="/calltracking"])),
.sidebar-nav > .sidebar-beta-links:not(:has(> a[href="/review-replies"], > a[href="/notifications"], > a[href="/ai-replies"], > a[href="/auto-upload"], > a[href="/calltracking"])) ,
.sidebar-nav > .sidebar-section,
.account-menu a.account-menu-item:not([href="/settings"]):not([href="/billing"]),
.account-menu-support-item, .account-topbar-message-button { display: none !important; }
/* Restore only existing authorised Online/Review/Notification/AutoReply/Autoload links, preserving their original styles. */
.sidebar-nav > :is(.sidebar-admin-links, .sidebar-beta-links):has(> a[href="/online"], > a[href="/review-replies"], > a[href="/notifications"], > a[href="/ai-replies"], > a[href="/auto-upload"], > a[href="/calltracking"])
  > :not(a[href="/online"]):not(a[href="/review-replies"]):not(a[href="/notifications"]):not(a[href="/ai-replies"]):not(a[href="/auto-upload"]):not(a[href="/calltracking"]):not(.sidebar-admin-title) { display: none !important; }

/* Autoload creation/settings: two opposite actions on one row. */
.app-shell.ai-replies-page.auto-upload-page .auto-upload-expanded-settings-actions .review-replies-settings-action-buttons {
 display: flex !important; flex-direction: row !important; justify-content: space-between !important;
 align-items: center !important; width: 100% !important; gap: 12px !important;
}
.app-shell.ai-replies-page.auto-upload-page .auto-upload-expanded-settings-actions .review-replies-settings-action-buttons > button {
 width: auto !important; flex: 0 0 auto !important; margin: 0 !important;
}
.app-shell.auto-upload-page .auto-upload-profileless-name-field {
 display: grid !important; gap: 6px !important; min-width: 0 !important;
}
.app-shell.auto-upload-page .auto-upload-profileless-name-field .input {
 width: 100% !important; min-width: 0 !important;
}

/* Telegram stays gated until original history and RF processing are accepted. */
.app-shell:has(.settings-profile-grid) .settings-telegram-box { display: none !important; }

/* Profileless Autoload is a normal state: green outline, no fill. */

.app-shell.auto-upload-page .auto-upload-capability-info[aria-label="Профиль не выбран"] {
  color: #249b61 !important;
}

.app-shell.auto-upload-page .auto-upload-capability-info[aria-label="Профиль не выбран"] .auto-upload-capability-info-fill {
  fill: none;
}

/* Owner: Telegram support while Jivo is paused. Existing Settings linking stays hidden. */
.telegram-support-enabled .account-topbar .account-topbar-message-button.account-topbar-support-button { display: inline-flex !important; }
.telegram-support-enabled .account-menu .account-menu-support-item { display: flex !important; }
.telegram-support-panel {
  position: fixed;
  z-index: 10000;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  right: max(24px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  width: min(352px, calc(100vw - 24px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 96px);
  overflow-y: auto;
  padding: 24px;
  color: #1f2430;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 42px rgb(27 35 68 / 18%);
}
.telegram-support-panel h2 {
  margin: 0 28px 12px 0;
  font-size: 18px;
  line-height: 1.4;
}
.telegram-support-panel p {
  margin: 0 0 20px;
  color: #606879;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.telegram-support-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606879;
  font: inherit;
  font-size: 25px;
  cursor: pointer;
}
.telegram-support-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--cabinet-button-height, 40px);
  max-width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  text-decoration: none;
}
@media (max-width: 760px) {
  .telegram-support-panel {
    right: max(12px, env(safe-area-inset-right, 0px));
    padding: 20px;
  }
}
