@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
/* Единый размер и стиль шапки на всех страницах СБ */
:root{--sb-header-ink:#1a3438;--sb-header-muted:#6b8589;--sb-header-line:#deebe8;--sb-header-brand:#0d7377}
.sb-site-header,.topbar,.app-header{position:sticky!important;top:0!important;z-index:100!important;width:100%!important;margin:0!important;padding:0!important;background:rgba(255,255,255,.96)!important;border-bottom:1px solid var(--sb-header-line)!important;color:var(--sb-header-ink)!important;box-shadow:none!important;backdrop-filter:blur(14px)!important;-webkit-backdrop-filter:blur(14px)!important}
.sb-site-top,.top-inner,.app-header-inner{width:100%!important;max-width:1240px!important;min-height:64px!important;height:auto!important;margin:0 auto!important;padding:10px 24px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;box-sizing:border-box!important}
.sb-site-brand,.topbar .brand,.app-header .brand{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important;margin:0!important;text-decoration:none!important;color:var(--sb-header-ink)!important}
.sb-site-logo,.topbar .logo,.app-header .brand-logo{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;flex:0 0 42px!important;padding:0!important;margin:0!important;border:0!important;border-radius:12px!important;background:linear-gradient(135deg,#0d7377,#2ec4b6)!important;display:grid!important;place-items:center!important;color:#fff!important;font-family:Inter,Arial,sans-serif!important;font-size:17px!important;font-weight:800!important;line-height:1!important;box-shadow:none!important;transform:none!important}
.sb-site-brand-text,.topbar .brand>div:not(.logo),.app-header .brand-text{display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;line-height:1.25!important;margin:0!important}
.sb-site-brand-text strong,.topbar .brand h1,.app-header .brand-text h1{display:block!important;margin:0!important;padding:0!important;color:var(--sb-header-ink)!important;font-family:Inter,Arial,sans-serif!important;font-size:15px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:0!important;white-space:nowrap!important}
.sb-site-brand-text small,.topbar .brand p,.app-header .brand-text span{display:block!important;margin:3px 0 0!important;padding:0!important;color:var(--sb-header-muted)!important;font-family:Inter,Arial,sans-serif!important;font-size:10px!important;font-weight:500!important;line-height:1.25!important}
.sb-site-actions,.topbar .header-right,.app-header .header-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;min-width:0!important;margin:0!important;padding:0!important}
.sb-site-user,.topbar .user-chip,.app-header .user-chip{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:2px!important;min-height:36px!important;max-width:300px!important;margin:0!important;padding:5px 10px!important;border:1px solid var(--sb-header-line)!important;border-radius:9px!important;background:#f8fcfb!important;color:var(--sb-header-ink)!important;line-height:1.25!important;box-sizing:border-box!important}
.sb-site-user strong,.topbar .user-name,.app-header .user-chip-name{display:block!important;margin:0!important;color:var(--sb-header-ink)!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;font-weight:750!important;line-height:1.25!important}
.sb-site-user small,.topbar .user-meta,.app-header .user-chip-role{display:block!important;margin:0!important;color:var(--sb-header-muted)!important;font-family:Inter,Arial,sans-serif!important;font-size:9px!important;font-weight:500!important;line-height:1.25!important}
.sb-site-notice,.sb-site-manage,.sb-site-logout,.topbar .header-right>.btn,.app-header .header-actions>.btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-width:0!important;min-height:36px!important;height:36px!important;margin:0!important;padding:0 11px!important;border:1px solid var(--sb-header-line)!important;border-radius:9px!important;background:#fff!important;color:var(--sb-header-ink)!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;font-weight:700!important;line-height:1!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important;transform:none!important;cursor:pointer!important;box-sizing:border-box!important}
.sb-site-notice:hover,.sb-site-manage:hover,.sb-site-logout:hover,.topbar .header-right>.btn:hover,.app-header .header-actions>.btn:hover{border-color:#9bc9c5!important;background:#f8fcfb!important;color:var(--sb-header-brand)!important}
.sb-site-notice span,.topbar .header-right .tag,.app-header #notificationBadge{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;margin:0;padding:0 4px;border:0;border-radius:20px;background:#d94841;color:#fff;font-family:Inter,Arial,sans-serif;font-size:9px;line-height:17px;text-align:center}
.sb-site-nav,.nav{display:block!important;width:100%!important;margin:0!important;padding:0!important;border-top:1px solid #f0f4f3!important;background:transparent!important}
.sb-site-nav-inner,.nav-inner{width:100%!important;max-width:1240px!important;min-height:40px!important;height:auto!important;margin:0 auto!important;padding:0 24px!important;display:flex!important;align-items:stretch!important;gap:5px!important;overflow-x:auto!important;box-sizing:border-box!important}
.sb-site-nav a,.nav a{display:flex!important;align-items:center!important;min-height:40px!important;height:40px!important;margin:0!important;padding:0 13px!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;color:var(--sb-header-muted)!important;font-family:Inter,Arial,sans-serif!important;font-size:11px!important;font-weight:700!important;line-height:1!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important}
.sb-site-nav a:hover,.sb-site-nav a.active,.nav a:hover,.nav a.active{border-bottom:2px solid var(--sb-header-brand)!important;background:transparent!important;color:var(--sb-header-brand)!important}
.app-header .brand-logo svg{display:none!important}.app-header .brand-logo:before{content:"СБ";font-family:Inter,Arial,sans-serif;font-size:17px;font-weight:800;line-height:1;color:#fff}
@media(max-width:700px){
 .sb-site-top,.top-inner,.app-header-inner{min-height:60px!important;padding:9px 14px!important;gap:10px!important}
 .sb-site-logo,.topbar .logo,.app-header .brand-logo{width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;flex-basis:38px!important;font-size:15px!important}
 .sb-site-brand-text strong,.topbar .brand h1,.app-header .brand-text h1{font-size:13px!important}
 .sb-site-brand-text small,.topbar .brand p,.app-header .brand-text span{font-size:9px!important}
 .sb-site-actions,.topbar .header-right,.app-header .header-actions{gap:6px!important}
 .sb-site-user,.topbar .user-chip,.app-header .user-chip{max-width:190px!important;padding:5px 7px!important}
 .sb-site-user strong,.topbar .user-name,.app-header .user-chip-name{font-size:10px!important}
 .sb-site-user small,.topbar .user-meta,.app-header .user-chip-role{font-size:8px!important}
 .sb-site-notice,.sb-site-manage,.sb-site-logout,.topbar .header-right>.btn,.app-header .header-actions>.btn{min-height:32px!important;height:32px!important;padding:0 8px!important;font-size:10px!important}
 .sb-site-nav-inner,.nav-inner{min-height:38px!important;padding:0 8px!important}
 .sb-site-nav a,.nav a{min-height:38px!important;height:38px!important;padding:0 10px!important;font-size:10px!important}
}
@media(max-width:480px){
 .sb-site-top,.top-inner,.app-header-inner{flex-wrap:wrap!important;justify-content:flex-start!important}
 .sb-site-actions,.topbar .header-right,.app-header .header-actions{width:100%!important;justify-content:flex-start!important}
 .sb-site-user,.topbar .user-chip,.app-header .user-chip{max-width:100%!important;margin-right:auto!important}
 .sb-site-brand,.topbar .brand,.app-header .brand{flex:1 1 auto!important}
}


/* Финальная единая геометрия шапки для всех вариантов разметки СБ */
.sb-site-header,.topbar,.app-header,.sb-topbar{
  position:sticky!important;top:0!important;z-index:100!important;
  width:100%!important;margin:0!important;padding:0!important;
  background:rgba(255,255,255,.97)!important;border-bottom:1px solid var(--sb-header-line)!important;
  box-shadow:none!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important
}
.sb-site-top,.top-inner,.app-header-inner,.sb-top-inner{
  width:100%!important;max-width:1240px!important;min-height:74px!important;height:auto!important;
  margin:0 auto!important;padding:13px 24px!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important
}
.sb-site-brand,.topbar .brand,.app-header .brand,.sb-brand{
  display:flex!important;align-items:center!important;gap:13px!important;min-width:0!important;
  margin:0!important;text-decoration:none!important;color:var(--sb-header-ink)!important
}
.sb-site-logo,.topbar .logo,.app-header .brand-logo,.sb-logo{
  width:46px!important;height:46px!important;min-width:46px!important;max-width:46px!important;flex:0 0 46px!important;
  padding:0!important;margin:0!important;border:0!important;border-radius:13px!important;
  background:linear-gradient(135deg,#0d7377,#2ec4b6)!important;display:grid!important;place-items:center!important;
  color:#fff!important;font-family:Inter,Arial,sans-serif!important;font-size:18px!important;font-weight:800!important;
  line-height:1!important;box-shadow:none!important;transform:none!important
}
.sb-site-brand-text,.topbar .brand>div:not(.logo),.app-header .brand-text,.sb-brand-text{
  display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;
  margin:0!important;padding:0!important;line-height:1.25!important
}
.sb-site-brand-text strong,.topbar .brand h1,.app-header .brand-text h1,.sb-brand-text strong{
  display:block!important;margin:0!important;padding:0!important;color:var(--sb-header-ink)!important;
  font-family:Inter,Arial,sans-serif!important;font-size:17px!important;font-weight:800!important;
  line-height:1.2!important;letter-spacing:0!important;white-space:nowrap!important
}
.sb-site-brand-text small,.topbar .brand p,.app-header .brand-text span,.sb-brand-text small{
  display:block!important;margin:4px 0 0!important;padding:0!important;color:var(--sb-header-muted)!important;
  font-family:Inter,Arial,sans-serif!important;font-size:11px!important;font-weight:500!important;line-height:1.25!important
}
.sb-site-actions,.topbar .header-right,.app-header .header-actions,.sb-header-right{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:9px!important;
  flex-wrap:wrap!important;min-width:0!important;margin:0!important;padding:0!important
}
.sb-site-user,.topbar .user-chip,.app-header .user-chip,.sb-user-chip{
  display:flex!important;flex-direction:column!important;justify-content:center!important;gap:2px!important;
  min-height:40px!important;max-width:300px!important;margin:0!important;padding:6px 11px!important;
  border:1px solid var(--sb-header-line)!important;border-radius:10px!important;background:#f8fcfb!important;
  color:var(--sb-header-ink)!important;line-height:1.25!important;box-sizing:border-box!important
}
.sb-site-user strong,.topbar .user-name,.app-header .user-chip-name,.sb-user-name{
  display:block!important;margin:0!important;color:var(--sb-header-ink)!important;
  font-family:Inter,Arial,sans-serif!important;font-size:12px!important;font-weight:750!important;line-height:1.25!important
}
.sb-site-user small,.topbar .user-meta,.app-header .user-chip-role,.sb-user-meta{
  display:block!important;margin:0!important;color:var(--sb-header-muted)!important;
  font-family:Inter,Arial,sans-serif!important;font-size:10px!important;font-weight:500!important;line-height:1.25!important
}
.sb-site-notice,.sb-site-manage,.sb-site-logout,.topbar .header-right>.btn,.app-header .header-actions>.btn,.sb-header-btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  min-width:0!important;min-height:38px!important;height:38px!important;margin:0!important;padding:0 12px!important;
  border:1px solid var(--sb-header-line)!important;border-radius:10px!important;background:#fff!important;
  color:var(--sb-header-ink)!important;font-family:Inter,Arial,sans-serif!important;font-size:12px!important;
  font-weight:700!important;line-height:1!important;text-decoration:none!important;white-space:nowrap!important;
  box-shadow:none!important;transform:none!important;cursor:pointer!important;box-sizing:border-box!important
}
.sb-site-notice:hover,.sb-site-manage:hover,.sb-site-logout:hover,.topbar .header-right>.btn:hover,
.app-header .header-actions>.btn:hover,.sb-header-btn:hover{
  border-color:#9bc9c5!important;background:#f8fcfb!important;color:var(--sb-header-brand)!important
}
.sb-site-notice span,.topbar .header-right .tag,.app-header #notificationBadge,.sb-header-btn #notificationBadge{
  display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;margin:0;padding:0 5px;
  border:0;border-radius:20px;background:#d94841;color:#fff;font-family:Inter,Arial,sans-serif;
  font-size:10px;line-height:18px;text-align:center
}
.sb-site-nav,.nav,.sb-nav{display:block!important;width:100%!important;margin:0!important;padding:0!important;
  border-top:1px solid #edf3f1!important;background:transparent!important}
.sb-site-nav-inner,.nav-inner,.sb-nav-inner{
  width:100%!important;max-width:1240px!important;min-height:44px!important;height:auto!important;margin:0 auto!important;
  padding:0 24px!important;display:flex!important;align-items:stretch!important;gap:6px!important;
  overflow-x:auto!important;box-sizing:border-box!important
}
.sb-site-nav a,.nav a,.sb-nav a{
  display:flex!important;align-items:center!important;min-height:44px!important;height:44px!important;
  margin:0!important;padding:0 14px!important;border:0!important;border-bottom:2px solid transparent!important;
  border-radius:0!important;background:transparent!important;color:var(--sb-header-muted)!important;
  font-family:Inter,Arial,sans-serif!important;font-size:12px!important;font-weight:700!important;
  line-height:1!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important
}
.sb-site-nav a:hover,.sb-site-nav a.active,.nav a:hover,.nav a.active,.sb-nav a:hover,.sb-nav a.active{
  border-bottom:2px solid var(--sb-header-brand)!important;background:transparent!important;color:var(--sb-header-brand)!important
}
@media(max-width:700px){
 .sb-site-top,.top-inner,.app-header-inner,.sb-top-inner{min-height:66px!important;padding:10px 15px!important;gap:11px!important}
 .sb-site-logo,.topbar .logo,.app-header .brand-logo,.sb-logo{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;flex-basis:42px!important;font-size:16px!important}
 .sb-site-brand-text strong,.topbar .brand h1,.app-header .brand-text h1,.sb-brand-text strong{font-size:14px!important}
 .sb-site-brand-text small,.topbar .brand p,.app-header .brand-text span,.sb-brand-text small{font-size:10px!important}
 .sb-site-actions,.topbar .header-right,.app-header .header-actions,.sb-header-right{gap:7px!important}
 .sb-site-user,.topbar .user-chip,.app-header .user-chip,.sb-user-chip{max-width:210px!important;padding:5px 8px!important}
 .sb-site-user strong,.topbar .user-name,.app-header .user-chip-name,.sb-user-name{font-size:11px!important}
 .sb-site-user small,.topbar .user-meta,.app-header .user-chip-role,.sb-user-meta{font-size:9px!important}
 .sb-site-notice,.sb-site-manage,.sb-site-logout,.topbar .header-right>.btn,.app-header .header-actions>.btn,.sb-header-btn{min-height:34px!important;height:34px!important;padding:0 9px!important;font-size:11px!important}
 .sb-site-nav-inner,.nav-inner,.sb-nav-inner{min-height:40px!important;padding:0 9px!important}
 .sb-site-nav a,.nav a,.sb-nav a{min-height:40px!important;height:40px!important;padding:0 11px!important;font-size:11px!important}
}
@media(max-width:480px){
 .sb-site-top,.top-inner,.app-header-inner,.sb-top-inner{flex-wrap:wrap!important;justify-content:flex-start!important}
 .sb-site-actions,.topbar .header-right,.app-header .header-actions,.sb-header-right{width:100%!important;justify-content:flex-start!important}
 .sb-site-user,.topbar .user-chip,.app-header .user-chip,.sb-user-chip{max-width:100%!important;margin-right:auto!important}
 .sb-site-brand,.topbar .brand,.app-header .brand,.sb-brand{flex:1 1 auto!important}
}


/* Единая гарнитура для всей шапки и навигации на всех страницах */
.sb-site-header,.sb-site-header *,.sb-site-nav,.sb-site-nav *,
.topbar,.topbar *,.nav,.nav *,
.app-header,.app-header *,.sb-topbar,.sb-topbar *,.sb-nav,.sb-nav *{
  font-family:Inter,Arial,sans-serif!important;
}


/* Скрывать счётчик уведомлений, когда он помечен как hidden (в том числе при нуле) */
.sb-site-notice span[hidden],
.sb-header-btn #notificationBadge[hidden],
.topbar .header-right .tag[hidden],
.app-header #notificationBadge[hidden]{
  display:none!important;
}

/* Ролевые кнопки шапки: hidden должен иметь приоритет над стилями кнопок */
.sb-site-actions [hidden],
.topbar .header-right>.btn[hidden],
.app-header .header-actions>.btn[hidden],
.sb-header-btn[hidden],
.sb-site-manage[hidden]{display:none!important;}


/* Выпадающий центр уведомлений и кнопка-колокольчик */
.sb-notice-anchor{position:relative!important}
.sb-notification-trigger{position:relative!important;min-width:40px!important;width:40px!important;padding:0 8px!important;gap:0!important}
.sb-notification-trigger svg{display:block;flex:0 0 auto}
.sb-notification-trigger #sbHeaderBadge,.sb-notification-trigger #notificationBadge,.sb-notification-trigger .tag{position:absolute;top:-5px;right:-5px;min-width:17px!important;height:17px!important;padding:0 4px!important;border:2px solid #fff!important;border-radius:20px!important;background:#d94841!important;color:#fff!important;font-size:9px!important;line-height:13px!important}
.sb-notification-trigger [hidden]{display:none!important}
.sb-notification-dropdown{position:absolute;z-index:1005;top:calc(100% + 10px);right:0;width:min(390px,calc(100vw - 24px));max-height:min(570px,calc(100vh - 100px));overflow:hidden;display:flex;flex-direction:column;background:#fff;border:1px solid #dce8e7;border-radius:15px;box-shadow:0 16px 48px rgba(20,54,58,.18);color:#18343a;text-align:left}
.sb-notification-dropdown[hidden]{display:none!important}
.sb-notice-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid #edf2f2}
.sb-notice-head strong{font-size:14px;font-weight:800}
.sb-notice-count{font-size:11px;color:#71858a;white-space:nowrap}
.sb-notice-list{overflow-y:auto;min-height:60px}
.sb-notice-item{display:flex;align-items:flex-start;gap:8px;padding:12px 14px;border-bottom:1px solid #f0f4f4}
.sb-notice-item.is-unread{background:#f5fbfa}
.sb-notice-content{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;color:#18343a;text-decoration:none}
.sb-notice-content strong{font-size:12px;line-height:1.35;font-weight:800}
.sb-notice-content span{font-size:11px;line-height:1.4;color:#536a70;overflow-wrap:anywhere}
.sb-notice-content small{font-size:10px;color:#829398}
.sb-notice-mark{flex:0 0 auto;border:0;background:transparent;color:#08777b;font:700 10px Inter,Arial,sans-serif;cursor:pointer;padding:4px}
.sb-notice-mark:hover{text-decoration:underline}
.sb-notice-empty{padding:25px 16px;text-align:center;color:#71858a;font-size:12px}
.sb-notice-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;background:#fbfdfd}
.sb-notice-foot a,.sb-notice-read-all{border:0;background:none;color:#08777b;font:700 11px Inter,Arial,sans-serif;text-decoration:none;cursor:pointer;padding:4px}
.sb-notice-foot a:hover,.sb-notice-read-all:hover{text-decoration:underline}
@media(max-width:700px){.sb-notification-dropdown{right:-6px;width:min(360px,calc(100vw - 18px));max-height:calc(100vh - 85px)}}


/* Список уведомлений ограничивается высотой первых трёх карточек скриптом */
.sb-notification-dropdown{
  height:auto;
  min-height:0;
  max-height:min(570px,calc(100vh - 100px));
}
.sb-notice-list{
  flex:0 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.sb-notice-foot{flex:0 0 auto}
@media(max-width:700px){
  .sb-notification-dropdown{
    position:fixed;
    top:calc(env(safe-area-inset-top,0px) + 72px);
    right:9px;
    bottom:auto;
    left:auto;
    width:min(360px,calc(100vw - 18px));
    height:auto;
    min-height:0;
    max-height:min(390px,calc(100dvh - env(safe-area-inset-top,0px) - 92px));
  }
  .sb-notice-list{
    flex:0 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}
@media(max-width:480px){
  .sb-notification-dropdown{
    top:calc(env(safe-area-inset-top,0px) + 112px);
    right:9px;
    bottom:auto;
    width:calc(100vw - 18px);
    max-height:min(390px,calc(100dvh - env(safe-area-inset-top,0px) - 132px));
  }
}
