/**
 * Зона личного кабинета на витрине (§10) — без admin-console.css.
 * Пока: вспомогательные классы для блока «Логин» в шапке; дальнейшие экраны ЛК — сюда же.
 */

.headerAuthNav {
  flex-shrink: 0;
}

.publicNav--authBar {
  flex-wrap: wrap;
  align-items: center;
}

/* Синтетический корень «Профиль»: цвет как у остальных веток — в vitrine.css (ветка верхнего уровня) */
.publicNav__authProfileRoot > .publicNav__label {
  cursor: default;
}

.siteHeaderNav--authMobile {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--hv-border, rgba(255, 255, 255, 0.12)) 100%, transparent);
}

/* ——— Личный кабинет (/account): шапка как на витрине + сетка разделов — ——— */
.accountAppRootMount,
.accountAppRoot {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.accountAppRoot > .siteHeader {
  flex-shrink: 0;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.accountAppWrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.accountPage {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.accountPage main.siteMain--account {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: 0;
}

body.accountPage main.siteMain--account > .siteMain__bound.siteMain__bound--shellGrid,
body.accountPage main.siteMain--account > .siteMain__bound.siteMain__bound--shellGrid > .grid,
body.accountPage main.siteMain--account .colMain {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  justify-content: flex-start;
  align-items: stretch;
}

body.accountPage main.siteMain--account > .wrap.siteMain__boundInner,
body.accountPage main.siteMain--account .colMain > .wrap.siteMain__boundInner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  justify-content: flex-start;
  align-items: stretch;
}

.accountApp {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* Первая колонка по ширине развёрнутого HvNavVertical (не жёсткий max 260px — иначе «липнет» легаси). */
  grid-template-columns: minmax(200px, max-content) minmax(0, 1fr);
  grid-template-rows: minmax(320px, auto);
  gap: 12px;
  box-sizing: border-box;
  align-content: start;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 981px) {
  .accountApp:has(.hvVerticalIconMenu--compact) {
    grid-template-columns: var(--hv-admin-nav-rail-width, 48px) minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .accountApp {
    grid-template-columns: 1fr;
  }
  .accountApp__nav {
    order: 2;
  }
  .accountApp__main {
    order: 1;
  }
}
.accountApp__nav {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ac-line, rgba(148, 163, 184, 0.35));
  background: color-mix(in oklab, var(--panel, #0f172a) 88%, transparent);
}
/* React: aside > div > .hvVerticalIconMenu; EJS: aside > .hvVerticalIconMenu. Цепочка flex по высоте — иначе
   .hvVerticalIconMenu__scroll не забирает свободное место и .adminNav--footer (margin-top: auto) не прижимается. */
.accountApp__nav > * {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.accountApp__nav .hvVerticalIconMenu {
  flex: 1 1 auto;
  min-height: 0;
}
.accountApp__nav:has(.hvVerticalIconMenu--compact) {
  z-index: 4;
}
.accountApp__main {
  min-width: 0;
  min-height: 0;
}

.accountPanel__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.25;
}
.accountPanel__lead {
  margin: 0 0 1rem;
  line-height: 1.45;
}
.accountPanel--settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}
.accountPanel__lead--inPanel {
  margin: 0;
}
.accountPanel__lead--settingsIntro {
  margin: 0 0 0.25rem;
}
.accountPanel__lead--profileIntro {
  margin: 0 0 0.25rem;
}

/* Профиль ЛК: факты внутри hv-panel-block */
.accountProfileFacts {
  margin: 0;
  padding: 0;
}
.accountProfileFacts__row {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--border, #334155) 55%, transparent);
  align-items: baseline;
}
.accountProfileFacts__row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.accountProfileFacts__dt {
  margin: 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted, #94a3b8);
}
.accountProfileFacts__dd {
  margin: 0;
  font-size: 0.9375rem;
  word-break: break-word;
}
.accountProfileHint {
  margin: 0.85rem 0 0;
  max-width: 40rem;
}
@media (max-width: 520px) {
  .accountProfileFacts__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
.accountSettingsHvPanel--fields .accountSettingsMessagesStack:has([data-hv-mgmt-msg-wrap]) {
  margin-bottom: 0.5rem;
}

/* Дашборд: один HvPanelMedia — блок «Область видимости» в теле */
.accountDashboardMediaPanel .accountScopeBlock__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}
.accountScopeBlock__intro {
  margin: 0 0 0.85rem;
  line-height: 1.4;
}
.accountScopeBlock__rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.accountScopeBlock__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.accountScopeBlock__rowText {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.accountScopeBlock__label {
  font-weight: 600;
  font-size: 0.9375rem;
}
.accountScopeBlock__hint {
  display: block;
}
.accountScopeBlock__value {
  flex-shrink: 0;
}
.accountScopePill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid color-mix(in oklab, var(--border, #334155) 60%, transparent);
  background: color-mix(in oklab, var(--panel, #0f172a) 55%, transparent);
  font-size: 0.875rem;
}

/* Настройки: hv-power-row на витрине (без admin-ui.css) */
.accountPage .adminLabeledPowerRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 20px;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 0;
  border: 1px solid color-mix(in oklab, var(--border, #334155) 75%, transparent);
  background: color-mix(in oklab, var(--panel2, #1e293b) 40%, transparent);
  box-sizing: border-box;
}
.accountPage .adminLabeledPowerRow__text {
  min-width: 0;
}
.accountPage .adminLabeledPowerRow__title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 4px;
}
.accountPage .adminLabeledPowerRow__text > .adminLabeledPowerRow__title:last-child {
  margin-bottom: 0;
}
.accountPage .adminLabeledPowerRow__lead {
  margin: 0;
  max-width: none;
  line-height: 1.45;
}
.accountPage .adminLabeledPowerRow__toggle {
  justify-self: end;
  align-self: center;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 520px) {
  .accountPage .adminLabeledPowerRow {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .accountPage .adminLabeledPowerRow__toggle {
    justify-self: start;
    justify-content: flex-start;
  }
}

.accountSettingsFooter {
  margin-top: 0;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}
