/* ─────────────────────────────────────────────
   workivo · каркас: шапка, контейнеры, футер,
   мобильная навигация
   ───────────────────────────────────────────── */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }
.container-wide { max-width: 1320px; }

.page { padding: 34px 0 90px; min-height: 60vh; }
.page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 3.6vw, 36px); }
.page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.section { margin-top: 72px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section__title { font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.035em; }
.section__sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ─────────────── шапка ─────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--normal), box-shadow var(--normal), background var(--normal);
}
.header.is-stuck { border-color: var(--line); box-shadow: 0 1px 0 rgba(14, 20, 32, .02); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 26px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.045em; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 800;
  box-shadow: var(--shadow-accent);
  transition: transform var(--normal);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.logo__dot { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 13px; border-radius: var(--r-full);
  font-size: 14.5px; font-weight: 500; color: var(--muted);
  transition: all var(--fast);
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.is-active { color: var(--ink); font-weight: 600; background: var(--bg-soft); }

.header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* колокольчик и меню пользователя */
.bell { position: relative; }
.bell__dot {
  position: absolute; top: 6px; right: 7px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--surface);
  animation: pop .3s var(--ease);
}
@keyframes pop { from { transform: scale(0); } }

.pop {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 120;
  animation: popIn .22s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.pop__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.pop__title { font-weight: 700; font-size: 15px; }
.pop__list { max-height: 380px; overflow: auto; }
.pop__item {
  display: flex; gap: 11px; padding: 13px 16px; cursor: pointer;
  border-bottom: 1px solid var(--line-2);
  transition: background var(--fast);
}
.pop__item:hover { background: var(--surface-2); }
.pop__item.is-unread { background: #f5f9ff; }
.pop__item:last-child { border-bottom: 0; }
.pop__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.pop__foot { padding: 10px 16px; border-top: 1px solid var(--line-2); }

.menu { position: relative; }
.menu__btn {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; transition: all var(--fast);
}
.menu__btn:hover { border-color: #d3d9e4; box-shadow: var(--shadow-sm); }
.menu__name { font-size: 14px; font-weight: 600; max-width: 130px; }
.menu-pop { width: 260px; padding: 8px; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: var(--r-sm);
  background: transparent; text-align: left; font-size: 14.5px; color: var(--ink);
  cursor: pointer; transition: background var(--fast);
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }
.menu-pop__head { padding: 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }

.burger { display: none; }

/* ─────────────── футер ─────────────── */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 54px 0 40px; margin-top: 60px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer__col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer__col a { display: block; padding: 5px 0; color: var(--muted); font-size: 14.5px; transition: color var(--fast); cursor: pointer; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 13.5px;
}

/* ─────────────── мобильная навигация ─────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav__grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: var(--r-sm);
  font-size: 10.5px; font-weight: 600; color: var(--muted-2);
  transition: color var(--fast);
  position: relative;
}
.bottom-nav a.is-active { color: var(--accent); }
.bottom-nav a .nav-badge {
  position: absolute; top: 2px; right: 50%; transform: translateX(16px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 10px; line-height: 16px;
}

/* мобильное меню-шторка */
.sheet {
  position: fixed; inset: 0; z-index: 140;
  display: flex; align-items: flex-end;
}
.sheet__panel {
  position: relative; width: 100%;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  animation: sheetIn .3s var(--ease);
  max-height: 84vh; overflow: auto;
}
@keyframes sheetIn { from { transform: translateY(100%); } }
.sheet__grabber { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 8px auto 16px; }
.sheet__item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 8px; border-bottom: 1px solid var(--line-2);
  font-size: 16px; font-weight: 500; cursor: pointer;
}
.sheet__item:last-child { border-bottom: 0; }

/* ─────────────── адаптив ─────────────── */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .container { padding: 0 16px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .header__actions .btn-desktop { display: none; }
  .menu__name { display: none; }
  .menu__btn { padding: 4px; border: 0; }
  body { padding-bottom: 72px; }
  .bottom-nav { display: block; }
  .page { padding: 22px 0 40px; }
  .section { margin-top: 52px; }
  .footer { margin-bottom: 0; padding: 40px 0 30px; }
  .pop { position: fixed; top: auto; bottom: 78px; left: 12px; right: 12px; width: auto; }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .modal { padding: 20px; border-radius: var(--r-lg); }
  .toasts { left: 12px; right: 12px; bottom: 84px; }
  .toast { min-width: 0; max-width: none; }
}
