/* ==========================================================================
   layout.css — оболочка приложения: сайдбар, топбар, рабочая область
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 78% -8%, #f4f8ff 0%, rgba(244, 248, 255, 0) 60%),
    linear-gradient(180deg, #eaf1fa 0%, #e6eef8 100%);
}

/* ==========================================================================
   Сайдбар
   ========================================================================== */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0 12px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 66px;
  padding: 0 6px;
  flex: none;
}

.sidebar__logo {
  width: 26px;
  height: 26px;
  flex: none;
}

.sidebar__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sidebar__name b {
  color: var(--brand);
  font-weight: 700;
}

/* --- навигация --- */
.nav { display: flex; flex-direction: column; gap: 2px; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}

.nav__item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav__item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* раздел ещё не свёрстан */
.nav__item--soon {
  color: var(--text-3);
  cursor: default;
}
.nav__item--soon:hover { background: none; color: var(--text-3); }

.nav__item.is-active .icon { stroke-width: 1.9; }

/* --- селектор страны --- */
.country {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 44px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(16, 30, 54, .04);
  transition: border-color .14s ease;
}
.country:hover { border-color: #cddbec; }

.country__globe {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}
.country__globe .icon { width: 14px; height: 14px; }

.country__chevron {
  margin-left: auto;
  color: var(--text-3);
}

/* --- нижний блок --- */
.sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 22px;
  flex: none;
}

.nav__badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.sidebar__divider {
  height: 1px;
  margin: 12px 4px;
  background: var(--border);
}

/* --- аккаунт --- */
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}

.account__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.account__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.account__role {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.25;
}

.account__chevron,
.account__more {
  color: var(--text-3);
  padding: 2px;
  border-radius: 6px;
}
.account__chevron { margin-left: auto; }
.account__chevron:hover,
.account__more:hover { background: var(--surface-2); color: var(--text-2); }

/* ==========================================================================
   Рабочая область
   ========================================================================== */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 22px 26px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 66px;
  flex: none;
}

.topbar__spacer { flex: 1; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 4px 12px -8px rgba(16, 30, 54, .3);
  transition: color .14s ease, transform .14s ease;
}
.icon-btn:hover { color: var(--brand); transform: translateY(-1px); }

.topbar__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-btn);
}

/* Заголовок страницы (на Главной не используется, нужен остальным разделам) */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head__sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text-2);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-top: 4px;
}

.page-head__actions .btn { height: 40px; padding: 0 18px; }
