/* MENU-01: кнопки шапки «Аккаунт» и «Меню» и боковая панель (разметка — common/header.tpl, common/menu_panel.tpl,
   common/menu_panel_account.tpl; логика — aq/menu.js; макет M4 — ac_work/menu01).
   Кнопки шапки — как прежний бургер (46×46, скругление 10 px, фон белый 10 %, при наведении 20 %, значок 24 px), крестик панели — как
   в прежнем меню. Значок «Аккаунт» — светло-сиреневый (UI-02: токен lilac_light из brand.json — rgb(var(--brand-lilac-light)), как линейные значки
   панели) до и после входа, бургер — белый. Панель — фон подвала (#1e293b), небо — canvas StarrySky (тот же, что у подвала в режиме plain), под заголовком —
   градиентная линия; ширина на ПК — 400 px, как у прежнего меню, на телефоне — весь экран (макет). Формы — только скруглённые
   прямоугольники. Размеры — в px: у витрины html { font-size: 10px } (Bootstrap 3). Старые правила a, h2, h3, ul (Bootstrap и
   stylesheet16) сброшены через :where(), чтобы не перебивать классы блоков */

/* ---------- кнопки шапки ---------- */
.how_table_top .how_table_tr .aq-hdr-actions {
  display: table-cell;
  width: 1%;
  padding-top: 7px;
  vertical-align: top;
  text-align: right;
  white-space: nowrap;
}

.aq-hdr-actions__row {
  display: inline-flex;
  gap: 10px;
}

/* position: relative — правый верхний угол кнопки «Аккаунт» оставлен под будущую отметку уведомлений (готовый отчёт, сообщение);
   сейчас там ничего нет */
.aq-hdr-btn {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.1s ease-out;
}

.aq-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.aq-hdr-btn:focus {
  outline: none;
}

.aq-hdr-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.aq-hdr-btn__icon {
  display: block;
  width: 24px;
  height: 24px;
}

/* «бюст» — светло-сиреневый всегда: отметки о входе нет */
.aq-hdr-btn--account {
  color: rgb(var(--brand-lilac-light));
}

/* ---------- панель и затемнение ---------- */
html.aq-panel-lock,
html.aq-panel-lock body {
  overflow: hidden;
}

/* была полоса прокрутки — место под неё остаётся, страница не сдвигается */
html.aq-panel-gutter {
  scrollbar-gutter: stable;
}

.aq-panel-over {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9, 13, 24, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.aq-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1e293b;
  color: #b4bcd0;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.aq-panel.is-open {
  transform: none;
}

.aq-panel-over.is-open {
  opacity: 1;
}

.aq-panel[hidden],
.aq-panel-over[hidden],
.aq-panel__view[hidden] {
  display: none;
}

.aq-panel:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .aq-panel,
  .aq-panel-over {
    transition: none;
  }
}

.aq-panel :where(h2, h3, p, ul, li) {
  margin: 0;
  padding: 0;
}

.aq-panel :where(ul) {
  list-style: none;
}

/* Bootstrap: a:hover, a:focus — подчёркивание (вес 0,1,1): перебивается классом панели */
.aq-panel a,
.aq-panel a:hover,
.aq-panel a:focus {
  text-decoration: none;
}

.aq-panel :where(svg) {
  flex-shrink: 0;
}

.aq-panel a:focus,
.aq-panel button:focus {
  outline: none;
}

.aq-panel a:focus-visible,
.aq-panel button:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.aq-panel__sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* заголовок и крестик — высота строки 70 px, как у шапки и прежнего меню */
.aq-panel__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 12px 12px 20px;
}

.aq-panel__title {
  min-width: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.aq-panel__close {
  display: block;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  line-height: 0;
  cursor: pointer;
}

.aq-panel__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.aq-panel__close svg {
  display: block;
  width: 18px;
  height: 18px;
}

.aq-panel__line {
  position: relative;
  z-index: 1;
  flex: none;
  height: 1px;
  margin: 0 16px;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec6a8c 100%);
  opacity: 0.6;
}

.aq-panel__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---------- «Меню» ---------- */
.aq-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px 12px;
}

.aq-nav__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-nav__group ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-nav__heading {
  padding: 0 8px 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #8c95ae;
}

.aq-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px;
  border-radius: 12px;
  color: #fff;
  transition: background 0.15s ease;
}

.aq-nav__item:hover,
.aq-nav__item:focus {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.aq-nav__item.is-current {
  background: rgba(255, 255, 255, 0.06);
}

.aq-nav__icon {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.14);
  color: rgb(var(--brand-lilac-light));
}

.aq-nav__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aq-nav__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.aq-nav__desc {
  font-size: 13px;
  line-height: 1.35;
  color: #8c95ae;
}

/* карта: плашка и мелкая строка под названием */
.aq-nav__item--map {
  align-items: flex-start;
  padding: 10px 8px;
}

.aq-nav__item--map .aq-nav__text {
  align-items: flex-start;
  gap: 6px;
}

.aq-nav__badge {
  padding: 4px 10px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 8px;
  background: rgba(110, 231, 183, 0.1);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #6ee7b7;
}

.aq-nav__note {
  font-size: 12px;
  line-height: 1.3;
  color: #8c95ae;
}

.aq-nav__soon {
  flex: none;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #c9cfe0;
  white-space: nowrap;
}

.aq-nav__all {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgb(var(--brand-lilac-light));
}

.aq-nav__all:hover,
.aq-nav__all:focus {
  color: #ddd6fe;
}

.aq-nav__all.is-current {
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- «Аккаунт» ---------- */
.aq-acc {
  padding: 18px 16px 12px;
}

.aq-acc__guest {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.aq-acc__badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.14);
  color: rgb(var(--brand-lilac-light));
}

.aq-acc__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.aq-acc__lead {
  font-size: 14px;
  line-height: 1.55;
  color: #b4bcd0;
}

.aq-acc__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

/* UI-02b: блок кнопки Google — data-gsi (menu.js): wait | on | off. UI-02c: сама кнопка — общий компонент .aq-gbtn (aq/gsi_button.css) */
.aq-acc__google {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.aq-acc__google.is-busy .aq-gbtn {
  opacity: 0.6;
  pointer-events: none;
}

.aq-acc__gerror {
  font-size: 13px;
  line-height: 1.45;
  color: #fca5a5;
}

.aq-acc__gerror:empty {
  display: none;
}

.aq-acc__btn--email {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
}

.aq-acc__btn--email:hover,
.aq-acc__btn--email:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.aq-acc__register {
  display: inline-flex;
  align-self: center;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  color: #b4bcd0;
}

.aq-acc__register:hover,
.aq-acc__register:focus {
  color: #fff;
}

.aq-acc__create {
  font-weight: 600;
  color: rgb(var(--brand-lilac-light));
}

/* вошедший: аватар, имя и почта */
.aq-acc__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 0;
}

.aq-acc__avatar {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec6a8c 100%);
}

.aq-acc__avatar > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #2a3348;
  color: rgb(var(--brand-lilac-light));
}

.aq-acc__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aq-acc__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  overflow-wrap: anywhere;
}

.aq-acc__email {
  font-size: 13px;
  line-height: 1.35;
  color: #8c95ae;
  overflow-wrap: anywhere;
}

/* карточка тарифа */
.aq-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

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

.aq-plan__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.aq-plan__status {
  flex: none;
  padding: 3px 9px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 8px;
  background: rgba(110, 231, 183, 0.1);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #6ee7b7;
}

.aq-plan__left {
  font-size: 13px;
  line-height: 1.4;
  color: #b4bcd0;
}

.aq-plan__bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.aq-plan__bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec6a8c 100%);
}

.aq-plan__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #8b5cf6 0%, #ec6a8c 100%);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #fff;
}

.aq-plan__btn:hover,
.aq-plan__btn:focus {
  color: #fff;
  filter: brightness(1.08);
}

/* пункты кабинета */
.aq-acc__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}

.aq-acc__links a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
  transition: background 0.15s ease;
}

.aq-acc__links a:hover,
.aq-acc__links a:focus {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.aq-acc__links a.is-current {
  background: rgba(255, 255, 255, 0.06);
}

.aq-acc__links svg {
  color: rgb(var(--brand-lilac-light));
}

.aq-acc__links a.aq-acc__logout,
.aq-acc__links a.aq-acc__logout svg {
  color: #8c95ae;
}

/* ---------- низ: язык и валюта (общий компонент common/switchers) и маленький логотип ---------- */
.aq-panel__foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aq-panel .switchers-bottom-bar--panel {
  position: static;
  padding: 0;
  z-index: auto;
}

/* меню языка и валюты открывается вверх, над пунктами панели — фон сплошной, как в подвале */
.aq-panel .switchers-bottom-bar--panel .switcher-menu-up {
  background: #3a4152;
}

.aq-panel__brand {
  flex: none;
  line-height: 0;
  opacity: 0.75;
}

.aq-panel__brand svg {
  display: block;
  width: 88px;
  height: 20px;
}
