/* Панель открыта из хаба ReignVoIP Projects (Telegram): html.in-hub, см. js/hub.js */
.hub-back { display: none; }
.in-hub .hub-back {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  height: 34px; padding: 0 10px 0 6px; margin-right: 8px;
  border: 1px solid rgba(212, 175, 55, 0.28); border-radius: 999px;
  background: rgba(212, 175, 55, 0.08); color: #e7c96a;
  font: 600 13px/1 Manrope, Inter, system-ui, sans-serif; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.in-hub .hub-back svg { width: 18px; height: 18px; }
.in-hub .hub-back:active { transform: scale(.97); }
.in-hub .hub-back-login { margin: 18px auto 0; }
/* браузерные уведомления в Telegram не работают — колокольчик не показываем */
.in-hub #inbox-notify-toggle { display: none; }

/* ---- Телефон в хабе: шапка без лишнего, разделы — полосой снизу (как PNL в хабе) ---- */
@media (max-width: 1160px) {
  html.in-hub #app-screen .logo,
  html.in-hub #app-screen .mobile-nav-toggle { display: none; }
  html.in-hub #app-screen .header-left { gap: 8px; min-width: 0; }
  html.in-hub #app-screen .brand-chip { min-width: 0; }
  html.in-hub .bp-logo span { display: none; }
  html.in-hub .bp-header { gap: 8px; }

  html.in-hub #app-screen .mobile-nav-menu {
    display: flex; flex-direction: row; gap: 0;
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 190;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(11, 12, 14, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(229, 172, 69, 0.22); border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  }
  html.in-hub #app-screen .mobile-nav-menu .tab {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 2px; border-radius: 10px; font-size: 10.5px; font-weight: 600; line-height: 1.1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent;
  }
  html.in-hub #app-screen .mobile-nav-menu .tab.perm-hidden { display: none; }
  html.in-hub #app-screen .mobile-nav-menu .tab::before {
    content: ""; width: 22px; height: 22px; flex: none; background: currentColor;
    -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
  }
  html.in-hub #app-screen .mobile-nav-menu .tab[data-tab="accounts"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.2-3.6 4.3-5.5 8-5.5s6.8 1.9 8 5.5'/%3E%3C/svg%3E"); }
  html.in-hub #app-screen .mobile-nav-menu .tab[data-tab="inbox"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
  html.in-hub #app-screen .mobile-nav-menu .tab[data-tab="groups"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='3.2'/%3E%3Cpath d='M3 19c.8-3 3.2-4.6 6-4.6s5.2 1.6 6 4.6'/%3E%3Cpath d='M15.5 6a3 3 0 0 1 0 6M17.5 14.8c1.7.6 2.9 2 3.5 4.2'/%3E%3C/svg%3E"); }
  html.in-hub #app-screen .mobile-nav-menu .tab[data-tab="broadcast"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M21 3 10 14M21 3l-7 18-4-7-7-4z'/%3E%3C/svg%3E"); }
  html.in-hub #app-screen .mobile-nav-menu .tab[data-tab="monitoring"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-7 4 14 3-7h4'/%3E%3C/svg%3E"); }

  /* место под нижнюю полосу */
  html.in-hub #app-screen .content { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html.in-hub body.inbox-view #app-screen .content { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* в открытом чате полосы нет — снизу поле ввода */
  html.in-hub body.inbox-view.ib-in-chat #app-screen .content { padding-bottom: 0; }
  html.in-hub body.inbox-view.ib-in-chat #app-screen .mobile-nav-menu { display: none; }
}

/* свайп вправо = «назад»: стрелка у левого края */
.hub-swipe {
  position: fixed; left: 0; top: 50%; z-index: 1000; pointer-events: none;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20, 21, 24, 0.92); color: #a1a6af; border: 1px solid rgba(229, 172, 69, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); opacity: 0; transform: translate(-44px, -50%) scale(0.7);
}
.hub-swipe svg { width: 22px; height: 22px; }
.hub-swipe.ready { background: #f4bf5c; color: #111; border-color: #f4bf5c; }
/* свайп вбок не должен уводить браузер «назад» по истории — «назад» делаем сами */
html.in-hub, html.in-hub body { overscroll-behavior-x: none; }
