/* Единая двухрядная шапка: специфичность перекрывает старые стили отдельных разделов. */
html body.site-shell .main-header { background:#fff; border-bottom:1px solid #e2eaf5; padding:0; }
html body.site-shell .main-header *,html body.site-shell .main-header *::before,html body.site-shell .main-header *::after { box-sizing:border-box; }
html body.site-shell .main-header .hp-masthead { display:none; border:0; background:#fff; }
html body.site-shell .main-header .site-nav-motto { display:none; }
.mobile-nav-info { display:flex; flex-direction:column; gap:5px; padding:14px; border-top:1px solid #e5edf7; }
.mobile-nav-info a { padding:7px 10px; color:#49617e; font-size:15px; text-decoration:none; border-radius:6px; }
.mobile-nav-info .mobile-nav-info__place { background:#0aa357; color:#fff; text-align:center; margin-top:7px; padding:10px; }
@media (min-width:1001px) {
 html body.site-shell .main-header .hp-masthead { display:block; border-bottom:1px solid #edf2f8; }
 html body.site-shell .main-header .hp-masthead__inner { display:grid; grid-template-columns:175px auto minmax(130px,1fr) auto 220px; align-items:center; gap:15px; width:95%; max-width:var(--site-max-width,1560px)!important; min-height:64px; padding:0; margin:0 auto; box-sizing:border-box; }
 html body.site-shell .main-header .hp-masthead__brand { grid-column:1; grid-row:1; margin:0; }
 html body.site-shell .main-header .hp-masthead__brand img { display:block; width:175px; height:auto; }
 html body.site-shell .main-header .hp-masthead__links { grid-column:2; grid-row:1; display:flex; gap:14px; margin:0; white-space:nowrap; }
 html body.site-shell .main-header .hp-masthead__links a { font:500 15px 'Segoe UI',sans-serif; color:#244363; padding:0; text-decoration:none; }
 html body.site-shell .main-header .hp-masthead__links a:hover { color:#0877ed; }
 html body.site-shell .main-header .hp-masthead__search { grid-column:3; grid-row:1; display:flex; align-items:center; gap:8px; height:36px; min-width:0; padding:0 11px; margin:0; border:1px solid #e0eaf7; border-radius:6px; background:#f5f9ff; color:#7791b1; }
 html body.site-shell .main-header .hp-masthead__search input { width:100%; min-width:0; border:0; outline:none; background:transparent; font:15px 'Segoe UI',sans-serif; color:#314f70; }
 html body.site-shell .main-header .hp-masthead__search input::placeholder { color:#92a2b9; }
 html body.site-shell .main-header .hp-masthead__search > i { font-size:15px; }
 html body.site-shell .main-header .hp-masthead__search button { display:none; }
 html body.site-shell .main-header .hp-masthead__actions { grid-column:4; grid-row:1; padding:0; margin:0; }
 html body.site-shell .main-header .hp-masthead__place { display:flex; align-items:center; justify-content:center; min-height:36px; padding:0 14px; background:linear-gradient(110deg,#0ba35c,#239b40); border:0; border-radius:6px; color:#fff; font:600 15px 'Segoe UI',sans-serif; text-decoration:none; white-space:nowrap; }
 html body.site-shell .main-header .hp-masthead__place:hover { background:#078d48; }
 html body.site-shell .main-header .header-inner { position:relative; display:flex; align-items:center; gap:0; width:95%; max-width:var(--site-max-width,1560px)!important; min-height:44px; padding:0; margin:0 auto; }
 html body.site-shell .main-header .header-inner > .brand,html body.site-shell .main-header .header-inner > .mobile-nav-toggle { display:none; }
 /* 220px: «Вход» + «Регистрация» при 13–14px не влезали в прежние 155px и наезжали на «Разместить компанию» */
 html body.site-shell .main-header .header-inner > .header-ctrls { position:absolute; right:0; top:-64px; height:64px; width:220px; display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:0; margin:0; }
 html body.site-shell .main-header .header-ctrls .hdr-search { display:none; }
 html body.site-shell .main-header .header-ctrls .hdr-link { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:8px 11px; margin:0; border:0; border-radius:5px; font:500 14px 'Segoe UI',sans-serif; color:#0574ed; text-decoration:none; background:transparent; white-space:nowrap; }
 html body.site-shell .main-header .hdr-link[data-action='openLoginModal'] i { font-size:17px; margin-right:7px; }
 html body.site-shell .main-header .hdr-link[data-action='openRegisterModal'] { border:1px solid #3690ff; padding:8px 13px; font-size:15px; }
 html body.site-shell .main-header .hdr-link:hover { background:#f1f7ff; }
 html body.site-shell .main-header .main-nav { display:flex; align-items:center; gap:16px; margin:0; }
 html body.site-shell .main-header .main-nav a.main-nav__link { display:inline-flex; align-items:center; gap:8px; padding:12px 13px; min-height:44px; border:0; border-radius:0; font:500 14px 'Segoe UI',sans-serif; line-height:1.3; color:#637c9a; background:none; box-shadow:none; }
 html body.site-shell .main-header .main-nav a.main-nav__link:hover,html body.site-shell .main-header .main-nav a.main-nav__link.is-open,html body.site-shell .main-header .main-nav a.main-nav__link.is-active { color:#0878ef; background:linear-gradient(0deg,#f0f7ff,#fff); }
 html body.site-shell .main-header .main-nav a.main-nav__link::after { bottom:0; height:2px; background:#0878ef; }
 html body.site-shell .main-header .main-nav .main-nav__item::after { content:none; }
 html body.site-shell .main-header .main-nav__icon { width:20px; height:20px; display:inline-grid; place-items:center; border-radius:5px; background:#edf4fa; color:#728daa; font-size:14px; }
 html body.site-shell .main-header .main-nav a.main-nav__link.is-active .main-nav__icon { color:#149c57; background:#e8f7ed; }
 html body.site-shell .main-header .main-nav__caret { font-size:12px; margin-left:0; }
 html body.site-shell .main-header .flex-spacer { display:none; }
 html body.site-shell .main-header .site-nav-motto { display:flex; align-items:center; gap:10px; margin-left:auto; color:#8596af; font:15px 'Segoe UI',sans-serif; text-align:right; line-height:1.45; }
 html body.site-shell .main-header .site-nav-motto i { color:#39b66a; font-size:24px; }
}
@media (min-width:1001px) and (max-width:1150px) {
 html body.site-shell .main-header .hp-masthead__inner { grid-template-columns:160px auto minmax(120px,1fr) auto 200px; gap:10px; }
 html body.site-shell .main-header .hp-masthead__brand img { width:160px; }
 html body.site-shell .main-header .hp-masthead__links { gap:10px; }
 html body.site-shell .main-header .hp-masthead__links a { font-size:14px; }
 html body.site-shell .main-header .hp-masthead__place { font-size:14px; padding:0 10px; }
 html body.site-shell .main-header .header-inner > .header-ctrls { width:200px; gap:7px; }
 html body.site-shell .main-header .main-nav { gap:5px; }
}
@media (max-width:1000px) {
 html body.site-shell .main-header .header-inner { width:100%; max-width:none!important; padding:0 14px; min-height:64px; }
 html body.site-shell .main-header .header-inner > .header-ctrls { position:static; display:flex; width:auto; height:auto; margin:0; }
 html body.site-shell .main-header .header-ctrls .hdr-search { display:block; }
 html body.site-shell .main-header .header-inner > .mobile-nav-toggle { display:inline-flex; }
 html body.site-shell .main-header .header-inner > .brand { display:inline-flex; }
 html body.site-shell .main-header .header-inner > .brand img { height:32px; width:auto; max-height:32px!important; }
}

/* ===== Меню пользователя в шапке — в стиле кабинета (account-redesign.css).
   Старые правила лежат в top-header.css и account.css, поэтому тот же префикс
   html body.site-shell, что и у остальной единой шапки. ===== */
html body.site-shell .hdr-user { position:relative; display:inline-flex; }
html body.site-shell .hdr-ava-btn { position:relative; display:inline-flex; align-items:center; gap:6px; width:auto; height:36px; padding:0 4px 0 0; border:0; border-radius:999px; background:transparent; box-shadow:none; cursor:pointer; }
html body.site-shell .hdr-ava-btn:hover .hdr-ava-initial,html body.site-shell .hdr-ava-btn[aria-expanded="true"] .hdr-ava-initial { background:linear-gradient(130deg,#cfe3ff,#bcd6ff); }
html body.site-shell .hdr-ava-btn:hover .hdr-ava-caret,html body.site-shell .hdr-ava-btn[aria-expanded="true"] .hdr-ava-caret { color:#0878ff; }
html body.site-shell .hdr-ava-btn:focus-visible { outline:2px solid #0878ff55; outline-offset:2px; }
html body.site-shell .hdr-ava-img,html body.site-shell .hdr-ava-initial { flex:none; width:36px; height:36px; border-radius:50%; }
html body.site-shell .hdr-ava-img { object-fit:cover; box-shadow:0 0 0 2px #fff,0 0 0 3px #dce8fa; }
html body.site-shell .hdr-ava-initial { display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(130deg,#d9e9ff,#cbdfff); color:#087aff; font:700 16px 'Segoe UI',sans-serif; transition:background .15s; }
html body.site-shell .hdr-ava-caret { font-size:13px; color:#728daa; transition:transform .15s,color .15s; }
html body.site-shell .hdr-ava-btn[aria-expanded="true"] .hdr-ava-caret { transform:rotate(180deg); }
html body.site-shell .hdr-ava-dot { position:absolute; top:0; left:26px; right:auto; width:9px; height:9px; border-radius:50%; background:#ef4444; box-shadow:0 0 0 2px #fff; }

html body.site-shell .hdr-menu { position:absolute; right:0; top:calc(100% + 10px); width:272px; min-width:0; padding:8px; border:1px solid #e0eaf6; border-radius:14px; background:#fff; box-shadow:0 14px 40px #24436618,0 2px 8px #24436610; z-index:1000; font-family:'Segoe UI',sans-serif; }
html body.site-shell .hdr-menu[hidden] { display:none!important; }
html body.site-shell .hdr-menu::before { content:''; position:absolute; right:14px; top:-7px; width:12px; height:12px; background:#fff; border-left:1px solid #e0eaf6; border-top:1px solid #e0eaf6; transform:rotate(45deg); }

html body.site-shell .hdr-menu-head { display:flex; flex-direction:row; align-items:center; gap:12px; margin:0 0 6px; padding:10px 10px 12px; border:0; border-bottom:1px solid #edf2f8; }
html body.site-shell .hdr-menu-ava { flex:none; width:40px; height:40px; }
html body.site-shell .hdr-menu-photo,html body.site-shell .hdr-menu-initial { width:40px; height:40px; border-radius:50%; }
html body.site-shell .hdr-menu-photo { object-fit:cover; display:block; }
html body.site-shell .hdr-menu-initial { display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(130deg,#d9e9ff,#cbdfff); color:#087aff; font-weight:700; font-size:18px; }
html body.site-shell .hdr-menu-who { min-width:0; display:flex; flex-direction:column; gap:2px; }
html body.site-shell .hdr-menu-name { font-size:15px; font-weight:650; color:#112540; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html body.site-shell .hdr-menu-email { font-size:15px; color:#7b8eaa; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html body.site-shell .hdr-menu-role { align-self:flex-start; margin-top:3px; padding:2px 8px; border-radius:999px; background:#e8f7ed; color:#149c57; font-size:14px; font-weight:600; line-height:1.5; }

html body.site-shell .hdr-admin-btn { display:flex; align-items:center; gap:10px; margin:2px 2px 6px; padding:9px 12px; border:1px solid #267aff; border-radius:9px; background:linear-gradient(110deg,#2686ff,#1459ff); color:#fff; font-size:14px; font-weight:600; text-decoration:none; box-shadow:0 4px 12px #1868ff26; }
html body.site-shell .hdr-admin-btn:hover { background:#0f5cf0; color:#fff; border-color:#0f5cf0; }
html body.site-shell .hdr-admin-btn > i:first-child { font-size:16px; }
html body.site-shell .hdr-admin-arrow { margin-left:auto; font-size:15px; opacity:.85; }

html body.site-shell .hdr-menu-section { padding:8px 10px 3px; font-size:14px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:#7a8daa; }
html body.site-shell .hdr-sep { height:1px; margin:6px 2px; background:#edf2f8; }
html body.site-shell .hdr-menu-list { display:flex; flex-direction:column; gap:1px; padding:0; }
html body.site-shell .hdr-menu-item { display:flex; align-items:center; justify-content:flex-start; gap:10px; padding:8px 10px; border-radius:9px; color:#506483; font-size:14.5px; font-weight:500; line-height:1.3; text-decoration:none; transition:background .12s,color .12s; }
html body.site-shell .hdr-menu-item:hover { background:#f0f6ff; color:#0672ff; }
html body.site-shell .hdr-menu-item.active { background:linear-gradient(110deg,#e5efff,#dbe9ff); color:#0672ff; }
html body.site-shell .hdr-menu-item.active .hdr-menu-text { font-weight:650; }
html body.site-shell .hdr-menu-icon { flex:none; width:28px; height:28px; display:inline-grid; place-items:center; border-radius:8px; background:#edf4fa; color:#728daa; font-size:15px; transition:background .12s,color .12s; }
html body.site-shell .hdr-menu-item:hover .hdr-menu-icon,html body.site-shell .hdr-menu-item.active .hdr-menu-icon { background:#dbe9ff; color:#087bff; }
html body.site-shell .hdr-menu-text { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html body.site-shell .hdr-menu-meta { flex:none; font-size:15px; font-weight:600; color:#7b8eaa; white-space:nowrap; }
html body.site-shell .hdr-menu-item.active .hdr-menu-meta,html body.site-shell .hdr-menu-item:hover .hdr-menu-meta { color:#0672ff; }
html body.site-shell .hdr-menu-badge { flex:none; display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; width:auto; margin:0; padding:0 6px; border-radius:999px; background:#ef4444; color:#fff; font-size:14px; font-weight:700; line-height:1; box-shadow:none; }

html body.site-shell .hdr-menu-logout { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin:6px 0 0; padding:9px 12px; border:1px solid #f3d6d6; border-radius:9px; background:#fff; color:#c9302c; font-size:14px; font-weight:600; cursor:pointer; transition:background .12s,border-color .12s; }
html body.site-shell .hdr-menu-logout:hover { background:#fff2f2; border-color:#eeb9b9; }
html body.site-shell .hdr-menu-logout i { font-size:15px; }

@media (max-width:1000px) {
 html body.site-shell .hdr-ava-btn { padding:0; gap:0; }
 html body.site-shell .hdr-ava-caret { display:none; }
 html body.site-shell .hdr-menu { position:fixed; left:14px; right:14px; top:72px; width:auto; max-height:calc(100vh - 86px); overflow-y:auto; }
 html body.site-shell .hdr-menu::before { display:none; }
}
