/* public/assets/layout.css */
/* =========================================================
   Layout — mobile first polish for header / drawer / search / bottom nav
   Desktop logic preserved. Mobile and Capacitor redesigned.
   ========================================================= */

:root{
  --bottom-nav-h: 78px;
  --app-vh: 100vh;

  --site-header-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --site-font: var(--site-header-font);
  --nav-drop-icon-col: 28px;
  --nav-drop-gap: 10px;
  --nav-drop-pad-x: 12px;

  --mobile-shell-radius: 24px;
  --mobile-card-radius: 22px;
  --mobile-pill-radius: 18px;

  --mobile-surface: rgba(255,255,255,.74);
  --mobile-surface-strong: rgba(255,255,255,.88);
  --mobile-surface-soft: rgba(255,255,255,.56);
  --mobile-border: rgba(181,194,222,.30);
  --mobile-border-strong: rgba(181,194,222,.42);
  --mobile-shadow:
    0 14px 38px rgba(84,105,148,.10),
    0 4px 14px rgba(84,105,148,.06);
  --mobile-shadow-strong:
    0 24px 60px rgba(84,105,148,.18),
    0 8px 20px rgba(84,105,148,.10);
  --mobile-text: #132238;
  --mobile-text-soft: rgba(19,34,56,.68);
  --mobile-primary: var(--theme-color, #ff7a18);
  --mobile-primary-soft: rgba(255,122,24,.12);
  --mobile-blue-soft: rgba(80,147,255,.12);
  --mobile-danger-soft: rgba(244,63,94,.10);
}

html, body { height: 100%; }
body { margin: 0; }

.app-shell{
  display: flex;
  flex-direction: column;
}

.app-main{
  flex: 0 0 auto;
  overflow-x: hidden;
  min-height: 0;
}

@media (min-width: 1025px){
  .app-shell{
    min-height: var(--app-vh, 100vh);
  }

  .app-main{
    flex: 1 1 auto;
  }
}

@media (max-width: 1024px){
  .has-bottom-nav .app-shell{
    padding-bottom: 0;
  }

  .has-bottom-nav .site-footer,
  .has-bottom-nav .site-footer.app-footer{
    margin-bottom: calc(var(--bottom-nav-h, 78px) + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 1025px){
  .has-bottom-nav .app-shell{
    padding-bottom: var(--bottom-nav-h, 78px);
  }
}

body.mobile-ui-lock{
  overflow: hidden;
  touch-action: none;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 200;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px calc(var(--gutter, 16px) + var(--safe-area-inset-x, 0px));
  position: relative;
  gap: 16px;
  z-index: 210;
  isolation: isolate;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 0 0 auto;
  position: relative;
}

.brand-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  flex-shrink:0;
}

.logo-img {
  height: 50px;
  flex-shrink: 0;
}

.weather-inline {
  font-size: 14px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.weather-inline .desc{ display:none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  flex-shrink: 0;
  position: relative;
  z-index: 220;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.auth-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    filter 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-header-btn--ghost {
  border: 1px solid rgba(176, 190, 214, 0.62);
  background: rgba(255, 255, 255, 0.92);
  color: #132238;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(101, 123, 170, 0.06);
}

.auth-header-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(143, 161, 194, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 20px rgba(101, 123, 170, 0.09);
}

.auth-header-btn--primary {
  border: none;
  background: linear-gradient(180deg, var(--theme-color, #0088cc), #006fa8);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 26px rgba(0, 136, 204, 0.24);
}

.auth-header-btn--primary:hover {
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 14px 28px rgba(0, 136, 204, 0.28);
}

.auth-header-btn:active {
  transform: translateY(1px);
}

.header-icon-btn,
.burger,
.open-chat-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  color: #1f2f46;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 8px 18px rgba(84,105,148,.06);
  transition:
    transform .12s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}

.header-icon-btn:hover,
.burger:hover,
.open-chat-btn:hover{
  background: rgba(255,255,255,.94);
  border-color: rgba(143,161,194,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 10px 20px rgba(84,105,148,.09);
}

.header-icon-btn:active,
.burger:active,
.open-chat-btn:active{
  transform: translateY(1px);
}

.header-icon-btn__glyph,
.search-btn__icon{
  display:inline-flex;
  width:20px;
  height:20px;
}

.header-icon-btn__glyph svg,
.search-btn__icon svg,
.bottom-nav__icon svg,
.notify-bell__icon svg,
.mobile-menu__close svg,
.mobile-user-sheet__close svg,
.mobile-nav-item__arrow svg,
.mobile-dropdown-toggle__chevron svg,
.mobile-nav-item__icon svg,
.mobile-submenu__icon svg{
  width:100%;
  height:100%;
}

.header-icon-btn{
  display: none;
}

.burger {
  display: none;
}

.desktop-chat {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 225;
}

.open-chat-btn {
  position: relative;
}

.chat-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: linear-gradient(180deg, #ff5f5f, #ff3b30);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(255,255,255,.92);
  pointer-events: none;
  z-index: 10;
}

/* ===== User dropdown ===== */
.user-dropdown {
  position: relative;
  z-index: 230;
}

.user-name {
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.82);
  border-radius: 18px;
  padding: 6px 8px 6px 6px;
  color: #17263c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 22px rgba(84,105,148,.08);
}

.user-name__avatar{
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, #ffe2c8, #f2d8ff);
  color:#10223a;
  font-size: 14px;
  font-weight: 900;
  flex: 0 0 auto;
  overflow: hidden;
}

.user-name__avatar--photo{
  background: rgba(15,23,42,.06);
}

.user-name__avatar-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-name__meta{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.user-name__label{
  font-size:11px;
  line-height:1.1;
  color: rgba(19,34,56,.52);
  font-weight:700;
}

.user-name__value{
  font-size:13px;
  line-height:1.2;
  color:#17263c;
  font-weight:800;
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.user-menu {
  display: none;
  position: absolute;
  background: rgba(255,255,255,.92);
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(66, 84, 120, 0.16);
  min-width: 240px;
  max-width: min(380px, calc(100vw - 24px));
  overflow: hidden;
  z-index: 10080;
  animation: fadeInMenu 0.18s ease-out;
  border: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}
.header-right .user-menu {
  top: calc(100% + 12px);
  right: 0;
  transform-origin: top right;
}
.user-menu.open { display: block; }

.user-menu a {
  display: block;
  padding: 12px 16px;
  color: #17263c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.15s ease, color .15s ease;
  white-space: nowrap;
}
.user-menu a:hover { background: rgba(239,244,252,.88); }
.user-menu .menu-link-danger{ color: #e11d48; }

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-caption {
  padding: 10px 16px 6px;
  color: rgba(15,23,42,.48);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.menu-sep {
  height: 1px;
  background: rgba(15,23,42,.08);
  margin: 4px 0;
}
.menu-form {
  display: block;
  margin: 0;
}
.menu-danger-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 12px 16px;
  color: #dc2626;
  font-weight: 900;
}

/* ===== Desktop main menu ===== */
.main-menu {
  display: flex;
  justify-content: center;
  gap: clamp(4px, .55vw, 10px);
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: visible;
  white-space: nowrap;
  position: relative;
  z-index: 205;
}

.main-menu > *{ flex: 0 0 auto; }

.main-menu a {
  text-decoration: none;
  color: #2f3d57;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .08s ease;
  padding: 10px 12px;
  border-radius: 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.main-menu a:hover {
  color: #1f5f9f;
  background: rgba(63, 136, 210, .08);
  text-decoration: none;
}
.main-menu a.active {
  color: #1f6fb8;
  background: linear-gradient(180deg, rgba(92,167,231,.22), rgba(92,167,231,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 6px 16px rgba(72,140,200,.12);
  border-bottom: none;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 230;
}
.nav-dropdown-toggle {
  background: none;
  border: none;
  margin: 0;
  font: inherit;
  color: #2f3d57;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  white-space: nowrap;
  line-height: 1;
}
.nav-dropdown-toggle:hover {
  color: #1f5f9f;
  background: rgba(63, 136, 210, .08);
}
.nav-dropdown-toggle.active {
  color: #1f6fb8;
  background: linear-gradient(180deg, rgba(92,167,231,.22), rgba(92,167,231,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 6px 16px rgba(72,140,200,.12);
  border-bottom: none;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(67, 86, 125, 0.14);
  overflow: hidden;
  z-index: 10070;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu a.nav-dropdown-item {
  display: grid;
  grid-template-columns: var(--nav-drop-icon-col, 28px) minmax(0, 1fr);
  gap: var(--nav-drop-gap, 10px);
  align-items: center;
  min-height: 40px;
  padding: 8px var(--nav-drop-pad-x, 12px);
  border-radius: 12px;
  color: #22334b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.nav-dropdown-menu a.nav-dropdown-item:hover { background: rgba(0, 136, 204, .08); color: #12375d; }

.nav-dropdown-menu-scroll{
  max-height: 70vh;
  overflow-y: auto;
}
.nav-dropdown-sep{
  height: 1px;
  background: #eef0f3;
  margin: 6px 0;
}

.nav-dropdown-label{
  padding: 8px 12px;
  color: rgba(15,23,42,.55);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ===== Search ===== */
.search-bar {
  padding: 12px calc(var(--gutter, 16px) + var(--safe-area-inset-x, 0px)) 14px;
  background: #fafafa;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 120;
}

.search-form {
  width: 100%;
  max-width: 1440px;
  display: grid;
  grid-template-columns: 1fr 220px 120px;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 121;
}

.search-input,
.search-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(176,190,214,.62);
  background: rgba(255,255,255,.92);
  font-size: 15px;
  color: #132238;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 8px 18px rgba(101,123,170,.06);
  position: relative;
  z-index: 122;
}
.search-input:focus,
.search-select:focus {
  border-color: var(--theme-color,#0088cc);
  outline: none;
}

.search-btn {
  border: none;
  background: linear-gradient(180deg, var(--theme-color,#0088cc), #006fa8);
  color: white;
  border-radius: 16px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 12px 26px rgba(0, 136, 204, 0.24);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
  position: relative;
  z-index: 122;
}
.search-btn:hover {
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 14px 28px rgba(0, 136, 204, 0.28);
}
.search-btn:active { transform: translateY(1px); }

/* ===== Mobile overlay & drawer ===== */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.12), rgba(255,255,255,0) 35%),
    rgba(15,23,42,.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1500;
}
.mobile-overlay.active { display: block; }

.mobile-menu {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--bottom-nav-h, 78px);
  width: min(92vw, 390px);
  height: auto;
  max-height: none;
  background: rgba(255,255,255,.84);
  box-shadow: -12px 0 40px rgba(15,23,42,.18);
  padding:
    calc(14px + env(safe-area-inset-top))
    calc(14px + env(safe-area-inset-right))
    calc(12px + env(safe-area-inset-bottom))
    14px;
  z-index: 2000;
  transform: translateX(108%);
  transition: transform .28s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-left: 1px solid rgba(181,194,222,.28);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-sizing: border-box;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu__inner{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height: 100%;
  padding-bottom: 10px;
  box-sizing: border-box;
}
.mobile-menu__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 2px 2px 0;
}
.mobile-menu__brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.mobile-menu__brand-mark{
  width:40px;
  height:40px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(181,194,222,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  overflow:hidden;
  padding: 5px;
  box-sizing: border-box;
}
.mobile-menu__brand-logo{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.mobile-menu__brand-title{
  font-size: 16px;
  font-weight: 650;
  color: var(--mobile-text);
  line-height: 1.2;
  letter-spacing: 0;
}
.mobile-menu__brand-subtitle{
  font-size: 12px;
  font-weight: 500;
  color: var(--mobile-text-soft);
  margin-top: 1px;
}
.mobile-menu__close{
  width:40px;
  height:40px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background: rgba(255,255,255,.72);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#223349;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 6px 14px rgba(84,105,148,.05);
}
.mobile-menu__close svg{ width:18px; height:18px; }

.mobile-menu__sections{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.mobile-menu__divider{
  height:1px;
  background: linear-gradient(90deg, rgba(181,194,222,0), rgba(181,194,222,.54), rgba(181,194,222,0));
  margin: 2px 4px;
}
.mobile-menu__divider--sub{
  margin: 8px 0 6px;
}

.mobile-menu__label{
  padding: 0 6px;
  color: rgba(19,34,56,.44);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.mobile-menu__label--sub{
  padding: 2px 8px 0;
}

.mobile-nav-item,
.mobile-dropdown-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:48px;
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(181,194,222,.22);
  background: rgba(255,255,255,.68);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 6px 16px rgba(84,105,148,.04);
  text-decoration:none;
  color: var(--mobile-text);
  font-family: inherit;
  transition: transform .14s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.mobile-nav-item:hover,
.mobile-dropdown-toggle:hover{
  transform: translateY(-1px);
  border-color: rgba(143,161,194,.30);
  background: rgba(255,255,255,.82);
}
.mobile-nav-item__icon{
  width:36px;
  height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:#26374f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.mobile-nav-item__icon--home{ background: rgba(84,166,255,.16); color:#2164cc; }
.mobile-nav-item__icon--news{ background: rgba(146,197,255,.16); color:#2d6fd3; }
.mobile-nav-item__icon--events{ background: rgba(255,167,71,.18); color:#cc6c16; }
.mobile-nav-item__icon--ads{ background: rgba(255,96,96,.16); color:#d13434; }
.mobile-nav-item__icon--orgs{ background: rgba(88,188,255,.15); color:#1778c7; }
.mobile-nav-item__icon--city{ background: rgba(120,160,255,.15); color:#4863ce; }
.mobile-nav-item__icon--services{ background: rgba(255,104,129,.16); color:#cf3b63; }
.mobile-nav-item__icon--contacts{ background: rgba(174,174,174,.14); color:#4b5563; }
.mobile-nav-item__icon--admin{ background: rgba(140,140,140,.14); color:#374151; }
.mobile-nav-item__icon--profile{ background: rgba(191,167,255,.20); color:#6e4dd6; }
.mobile-nav-item__icon--generic{ background: rgba(196,208,225,.22); color:#455468; }
.mobile-nav-item__icon svg{ width:18px; height:18px; }

.mobile-nav-item__content{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:0;
  flex:1 1 auto;
}
.mobile-nav-item__title{
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(19,34,56,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mobile-nav-item__subtitle{
  display: none;
}
.mobile-nav-item__arrow,
.mobile-dropdown-toggle__chevron{
  width:18px;
  height:18px;
  color: rgba(19,34,56,.42);
  flex:0 0 auto;
}

.mobile-nav-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mobile-nav-group.is-open .mobile-dropdown-toggle{
  background: rgba(255,255,255,.88);
  border-color: rgba(143,161,194,.34);
}
.mobile-nav-group.is-open .mobile-dropdown-toggle__chevron{
  transform: rotate(180deg);
}
.mobile-dropdown-toggle__chevron{
  transition: transform .18s ease;
}

.mobile-submenu {
  display: none;
  margin: 0 2px 0;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.50);
  border: 1px solid rgba(181,194,222,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.mobile-submenu.open { display: block; }

.mobile-submenu__item{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding: 7px 8px;
  border-radius: 12px;
  text-decoration:none;
  color:#18273c;
}
.mobile-submenu__item:hover{
  background: rgba(241,246,253,.86);
}
.mobile-submenu__icon{
  width:30px;
  height:30px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(196,208,225,.20);
  color:#455468;
  flex:0 0 auto;
}
.mobile-submenu__icon svg{ width:16px; height:16px; }
.mobile-submenu__title{
  font-size: 14px;
  font-weight: 550;
  line-height: 1.25;
  color: rgba(27,42,64,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.mobile-auth-links{
  margin-top: 8px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.mobile-auth-link{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:18px;
  border:1px solid rgba(181,194,222,.26);
  background: rgba(255,255,255,.74);
  color:#18273c;
  font-weight:800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 8px 20px rgba(84,105,148,.05);
}
.mobile-auth-link--accent{
  color:#fff;
  background: linear-gradient(180deg, var(--theme-color,#0088cc), #006fa8);
  border-color: transparent;
}

/* ===== Bottom nav ===== */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(74px + var(--safe-area-inset-bottom));
  padding:
    10px calc(12px + var(--safe-area-inset-right))
    calc(10px + var(--safe-area-inset-bottom))
    calc(12px + var(--safe-area-inset-left));
  background: rgba(255,255,255,.72);
  border-top: 1px solid rgba(181,194,222,.22);
  box-shadow:
    0 -12px 30px rgba(84,105,148,.08),
    0 -2px 10px rgba(84,105,148,.04);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  z-index: 10050;
}

.bottom-nav__inner{
  width: min(100%, 560px);
  margin: 0 auto;
  min-height: 64px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 24px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(181,194,222,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 10px 22px rgba(84,105,148,.06);
}

.bottom-nav__item,
.bottom-nav .user-dropdown{
  position: relative;
  min-width: 0;
}

.bottom-nav__link,
.user-menu-toggle{
  position: relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height: 52px;
  width:100%;
  padding: 6px 8px;
  text-decoration:none;
  color: rgba(19,34,56,.62);
  border-radius: 18px;
  transition:
    background .18s ease,
    color .18s ease,
    transform .12s ease,
    box-shadow .18s ease;
}

.bottom-nav__link:hover,
.user-menu-toggle:hover{
  color:#17263c;
  background: rgba(255,255,255,.55);
}

.bottom-nav__link:active,
.user-menu-toggle:active{
  transform: translateY(1px);
}

.bottom-nav__link.active,
.bottom-nav .user-dropdown.active .user-menu-toggle{
  color: var(--theme-color,#ff7a18);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 8px 18px rgba(84,105,148,.08);
}

.bottom-nav__icon{
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.bottom-nav__label{
  font-size: 12px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.bottom-nav__link.has-badge .chat-badge{
  top: 5px;
  right: 18px;
}

.bottom-nav .user-dropdown { position: relative; }

/* ===== Mobile user sheet ===== */
.bottom-nav .user-menu.mobile-user-sheet{
  display:none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(86px + var(--safe-area-inset-bottom));
  width: auto;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255,255,255,.92);
  border-radius: 28px;
  box-shadow:
    0 26px 60px rgba(66,84,120,.22),
    inset 0 1px 0 rgba(255,255,255,.90);
  overflow: hidden;
  animation: fadeUp .18s ease-out;
  z-index: 10080;
  border: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.bottom-nav .user-menu.mobile-user-sheet.open { display:block; }

.mobile-user-sheet__handle{
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148,163,184,.42);
  margin: 12px auto 6px;
}

.mobile-user-sheet__head{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 16px 14px;
  border-bottom: 1px solid rgba(226,232,240,.72);
}

.mobile-user-sheet__avatar{
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  color:#10223a;
  background: linear-gradient(135deg, #ffe2c8, #f2d8ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}

.mobile-user-sheet__meta{
  min-width:0;
  flex:1 1 auto;
}

.mobile-user-sheet__name{
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
  color:#17263c;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mobile-user-sheet__sub{
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(19,34,56,.52);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mobile-user-sheet__close{
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 15px;
  background: rgba(255,255,255,.74);
  color:#223349;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.94),
    0 8px 18px rgba(84,105,148,.05);
}

.mobile-user-sheet__section{
  padding: 10px;
}

.mobile-user-sheet__link{
  display:block;
  padding: 13px 14px;
  border-radius: 16px;
  color:#17263c;
  text-decoration:none;
  font-size: 15px;
  font-weight: 700;
}
.mobile-user-sheet__link:hover{
  background: rgba(240,245,252,.78);
}

.mobile-user-sheet__danger-btn{
  width: 100%;
  text-align: left;
  border: 0;
  background: rgba(244,63,94,.08);
  color: #dc2626;
  padding: 13px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  margin-bottom: 8px;
}

.mobile-user-sheet__footer{
  padding: 0 10px 10px;
}

.mobile-user-sheet__logout{
  display:block;
  text-align:center;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration:none;
  color:#fff !important;
  font-weight: 850;
  background: linear-gradient(180deg, #ff6b6b, #f43f5e);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 12px 24px rgba(244,63,94,.18);
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(8px) scale(.985); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

input, textarea, select { caret-color: auto; }

/* ===== Footer ===== */
.app-footer{
  margin-top: 12px;
  padding: 14px 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* ===== Responsive header ===== */
@media (max-width: 1200px){
  .main-menu a,
  .nav-dropdown-toggle{
    padding: 9px 9px;
    font-size: 14px;
  }

  .top-bar{
    gap: 12px;
  }
}

@media (max-width: 1024px) {
  .main-menu { display: none; }
  .burger { display: inline-flex; align-items:center; justify-content:center; }

  .header-right .desktop-user-dropdown { display:none !important; }
  .desktop-chat { display:none !important; }

  .header-right .open-chat-btn,
  .header-right #chatToggleBtn,
  .header-right [data-open-chat]{
    display: none !important;
  }

  .bottom-nav {
    display:flex !important;
  }

  .auth-links { display: none; }

  .header-icon-btn{ display: inline-flex; }

  .logo-img { height: 44px; }

  .top-bar{
    max-width: none;
  }

  .site-header{
    padding-top: 0;
  }

  .top-bar{
    min-height: calc(74px + var(--safe-area-inset-top, 0px));
    padding:
      calc(10px + var(--safe-area-inset-top, 0px))
      calc(14px + var(--safe-area-inset-right, 0px))
      10px
      calc(14px + var(--safe-area-inset-left, 0px));
    align-items: flex-start;
    gap: 10px;
  }

  .header-left{
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
    align-items: center;
  }

  .brand-link{
    min-width: 0;
  }

  .logo-img{
    height: 38px;
  }

  .weather-inline{
    min-width: 0;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.58);
    border: 1px solid rgba(181,194,222,.24);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.86),
      0 8px 18px rgba(84,105,148,.05);
    color: #223349;
    backdrop-filter: blur(10px) saturate(135%);
    -webkit-backdrop-filter: blur(10px) saturate(135%);
    overflow: visible;
    position: static !important;
  }

  .weather-inline .weather-widget,
  .weather-inline .weather-info,
  .weather-inline #weatherWidget{
    min-width: 0;
    position: static !important;
    overflow: visible !important;
  }

  .header-right{
    gap: 8px;
    margin-left: auto;
  }

  .header-icon-btn,
  .burger,
  .open-chat-btn{
    width: 42px;
    height: 42px;
    border-radius: 16px;
  }

  .app-footer,
  .site-footer.app-footer{
    margin-top: 8px;
    padding-bottom: 8px;
  }
}

/* ===== Mobile search ===== */
@media (max-width: 1024px) {
  .search-bar {
    display: none;
    padding:
      2px calc(14px + var(--safe-area-inset-right, 0px))
      10px
      calc(14px + var(--safe-area-inset-left, 0px));
  }

  .search-bar.is-open {
    display: flex;
    animation: mobileSearchReveal .18s ease;
  }

  .search-form{
    max-width: 100%;
    grid-template-columns: 1fr 48px;
    grid-template-areas:
      "q btn"
      "section section";
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(181,194,222,.24);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.88),
      0 12px 24px rgba(84,105,148,.06);
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
  }

  .search-input{ grid-area: q; height: 48px; }
  .search-select{ grid-area: section; height: 44px; }

  .search-input,
  .search-select{
    border-radius: 16px;
    background: rgba(255,255,255,.82);
  }

  .search-btn{
    grid-area: btn;
    height: 48px;
    width: 48px;
    padding: 0;
    border-radius: 16px;
  }

  .search-btn span:last-child{ display:none; }

  @keyframes mobileSearchReveal{
    from{ opacity:0; transform: translateY(-6px); }
    to{ opacity:1; transform: translateY(0); }
  }
}

@media (max-width: 480px){
  .top-bar{
    padding-left: calc(12px + var(--safe-area-inset-left, 0px));
    padding-right: calc(12px + var(--safe-area-inset-right, 0px));
  }

  .logo-img{
    height: 34px;
  }

  .weather-inline{
    width: auto;
    max-width: none;
    padding: 0 10px;
    font-size: 13px;
  }

  .bottom-nav{
    padding-left: calc(10px + var(--safe-area-inset-left, 0px));
    padding-right: calc(10px + var(--safe-area-inset-right, 0px));
  }

  .bottom-nav__inner{
    gap: 6px;
    padding: 5px;
    border-radius: 22px;
  }

  .bottom-nav__label{
    font-size: 11px;
  }

  .mobile-menu{
    width: min(94vw, 390px);
    bottom: var(--bottom-nav-h, 78px);
    height: auto;
    max-height: none;
    padding-left: 12px;
  }

  .mobile-menu__brand-title{
    font-size: 17px;
  }

  .mobile-nav-item,
  .mobile-dropdown-toggle{
    min-height: 64px;
    padding: 11px 12px;
    border-radius: 20px;
  }

  .mobile-nav-item__icon{
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .mobile-nav-item__title{
    font-size: 17px;
  }

  .mobile-nav-item__subtitle{
    font-size: 12px;
  }

  .bottom-nav .user-menu.mobile-user-sheet{
    left: 8px;
    right: 8px;
    bottom: calc(82px + var(--safe-area-inset-bottom));
    border-radius: 24px;
  }

  .mobile-user-sheet__head{
    padding: 10px 14px 12px;
  }

  .mobile-user-sheet__avatar{
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 17px;
  }
}

/* ===== Force LIGHT everywhere ===== */
:root{ color-scheme: light; }
html{ background: var(--bg, #fff); }
body{
  background: var(--bg, #fff);
  color: var(--text, #0f172a);
}

@media (prefers-color-scheme: dark){
  :root{ color-scheme: light; }
  html{ background: var(--bg, #fff) !important; }
  body{ background: var(--bg, #fff) !important; color: var(--text, #0f172a) !important; }
}

/* =========================================================
   GLOBAL SITE BACKGROUND
   ========================================================= */

html,
body{
  min-height: 100%;
}

html{
  background: #f3f5fb;
}

body.site-bg{
  position: relative;
  background: #f3f5fb;
  color: var(--text, #0f172a);
  overflow-x: hidden;
}

body.site-bg::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,
      rgba(243,245,251,.94) 0%,
      rgba(243,245,251,.16) 12%,
      rgba(243,245,251,0) 22%,
      rgba(243,245,251,0) 78%,
      rgba(243,245,251,.16) 88%,
      rgba(243,245,251,.94) 100%
    ),
    url('/assets/bg-1920.webp?v=1');
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, 100% auto;
  background-color: #f3f5fb;
}

body.site-bg::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.18) 0%, rgba(255,255,255,.08) 18%, rgba(255,255,255,0) 42%),
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.02) 18%, rgba(255,255,255,0) 30%, rgba(243,245,251,.10) 100%);
}

body.site-bg > :not(#chatOverlay):not(#kwModal):not(#glightbox-body):not(.glightbox-container):not(#kzmGlobalLightbox){
  position: relative;
  z-index: 1;
}

/* GLightbox: контейнер — прямой child body, fixed поверх UI (см. news, org, board) */
body.site-bg > #glightbox-body.glightbox-container,
body.site-bg > .glightbox-container{
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
}

/* Kinoplan widget: вне .app-shell, поверх всего UI */
body.site-bg > #kwModal.kw-modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
}

body.site-bg .app-shell{
  position: relative;
  background: transparent;
  z-index: 1;
}

body.site-bg .app-shell::before{
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 190px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 82%, rgba(255,255,255,.76) 0, rgba(255,255,255,.36) 10%, rgba(255,255,255,0) 23%),
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.16) 0, rgba(255,255,255,.06) 10%, rgba(255,255,255,0) 24%),
    radial-gradient(circle at 52% 16%, rgba(255,255,255,.14) 0, rgba(255,255,255,.05) 10%, rgba(255,255,255,0) 24%),
    radial-gradient(circle at 78% 12%, rgba(255,255,255,.14) 0, rgba(255,255,255,.05) 10%, rgba(255,255,255,0) 24%),
    radial-gradient(circle at 92% 78%, rgba(255,255,255,.64) 0, rgba(255,255,255,.28) 10%, rgba(255,255,255,0) 22%),
    linear-gradient(180deg, rgba(236,242,255,.18) 0%, rgba(236,242,255,.08) 42%, rgba(236,242,255,0) 100%);
  filter: blur(8px);
}

/* header and search as part of scene */
body.site-bg .site-header{
  background: rgba(255,255,255,.04) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(4px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(4px) saturate(115%) !important;
}

body.site-bg .site-header::before,
body.site-bg .site-header::after{
  display: none !important;
}

body.site-bg .top-bar{
  background: transparent !important;
}

body.site-bg .search-bar{
  background: transparent !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-bottom: 0 !important;
}

body.site-bg .search-form{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.site-bg .search-input,
body.site-bg .search-select{
  min-height: 46px;
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(188,204,229,.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 2px 8px rgba(101,123,170,.025) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

body.site-bg .search-input::placeholder{
  color: rgba(15,23,42,.36);
}

body.site-bg .search-input:focus,
body.site-bg .search-select:focus{
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(59,130,246,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 4px 12px rgba(59,130,246,.05) !important;
  outline: none;
}

body.site-bg .search-btn{
  min-height: 46px;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 8px 18px rgba(0,136,204,.14);
}
body.site-bg .search-btn:hover{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 10px 22px rgba(0,136,204,.18);
}

/* header buttons */
body.site-bg .open-chat-btn,
body.site-bg .header-icon-btn,
body.site-bg .burger{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(188,204,229,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 2px 6px rgba(101,123,170,.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.site-bg .open-chat-btn:hover,
body.site-bg .header-icon-btn:hover,
body.site-bg .burger:hover{
  background: rgba(255,255,255,.16);
}

body.site-bg .auth-header-btn--ghost{
  background: rgba(255,255,255,.10);
  border-color: rgba(188,204,229,.18);
  color: #1b2a40;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 2px 6px rgba(101,123,170,.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.site-bg .auth-header-btn--ghost:hover{
  background: rgba(255,255,255,.18);
  border-color: rgba(188,204,229,.28);
}

/* desktop nav */
body.site-bg .main-menu a,
body.site-bg .nav-dropdown-toggle{
  border-radius: 14px;
}
body.site-bg .main-menu a:hover,
body.site-bg .nav-dropdown-toggle:hover{
  background: rgba(255,255,255,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
body.site-bg .main-menu a.active,
body.site-bg .nav-dropdown-toggle.active{
  background: rgba(255,255,255,.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 4px 12px rgba(72,140,200,.05) !important;
}

/* floating menus */
body.site-bg .user-menu,
body.site-bg .nav-dropdown-menu{
  background: rgba(255,255,255,.86);
  border-color: rgba(181,194,222,.22);
  box-shadow:
    0 18px 40px rgba(101,123,170,.10),
    inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}
body.site-bg .user-menu a:hover,
body.site-bg .nav-dropdown-menu a:hover{
  background: rgba(238,244,252,.70);
  text-decoration: none;
}

/* layout base */
body.site-bg .app-main{
  background: transparent !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.site-bg .container{
  background: transparent !important;
  margin-top: 0 !important;
}

body.site-bg .site-footer{
  background: rgba(255,255,255,.52);
  border-top: 1px solid rgba(181,194,222,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.site-bg .mobile-menu{
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

body.site-bg .bottom-nav{
  background: rgba(255,255,255,.64);
  border-top: 1px solid rgba(181,194,222,.18);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

@media (min-width: 1025px){
  .mobile-menu,
  .mobile-overlay,
  .bottom-nav{
    display: none !important;
  }
}

/* responsive backgrounds */
@media (max-width: 1366px){
  body.site-bg::before{
    background-image:
      linear-gradient(to right,
        rgba(243,245,251,.94) 0%,
        rgba(243,245,251,.18) 11%,
        rgba(243,245,251,0) 21%,
        rgba(243,245,251,0) 79%,
        rgba(243,245,251,.18) 89%,
        rgba(243,245,251,.94) 100%
      ),
      url('/assets/bg-1280.webp?v=1');
    background-position: center top, center top;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, 100% auto;
    background-color: #f3f5fb;
  }
}

@media (min-width: 1921px){
  body.site-bg::before{
    background-image:
      linear-gradient(to right,
        rgba(243,245,251,.93) 0%,
        rgba(243,245,251,.15) 14%,
        rgba(243,245,251,0) 23%,
        rgba(243,245,251,0) 77%,
        rgba(243,245,251,.15) 86%,
        rgba(243,245,251,.93) 100%
      ),
      url('/assets/bg-2560.webp?v=1');
    background-position: center top, center top;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, 100% auto;
    background-color: #f3f5fb;
  }
}

@media (max-width: 1024px){
  body.site-bg::before{
    background-image:
      linear-gradient(180deg, rgba(247,249,255,.80) 0%, rgba(244,247,252,.88) 20%, rgba(242,245,250,.96) 100%),
      url('/assets/bg-1280.webp?v=1');
    background-position: center top, center top;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, 100% auto;
    background-color: #f3f5fb;
  }

  body.site-bg::after{
    display: none;
  }

  body.site-bg .app-shell::before{
    height: 150px;
    background:
      radial-gradient(circle at 12% 86%, rgba(255,255,255,.66) 0, rgba(255,255,255,.30) 10%, rgba(255,255,255,0) 24%),
      radial-gradient(circle at 88% 18%, rgba(255,255,255,.16) 0, rgba(255,255,255,.06) 10%, rgba(255,255,255,0) 24%),
      linear-gradient(180deg, rgba(236,242,255,.16) 0%, rgba(236,242,255,.08) 48%, rgba(236,242,255,0) 100%);
    filter: blur(7px);
  }

  body.site-bg .site-header{
    background: rgba(255,255,255,.03) !important;
    backdrop-filter: blur(3px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(3px) saturate(110%) !important;
  }

  body.site-bg .search-bar{
    padding-top: 6px;
    padding-bottom: 8px;
  }

  body.site-bg .search-input,
  body.site-bg .search-select{
    min-height: 44px;
    background: rgba(255,255,255,.20) !important;
    border: 1px solid rgba(188,204,229,.16) !important;
  }

  body.site-bg .header-icon-btn,
  body.site-bg .burger{
    background: rgba(255,255,255,.16) !important;
    border: 1px solid rgba(188,204,229,.14) !important;
  }
}

/* header overlays must be above search */
.site-header .user-notifications,
.site-header .notification-bell,
.site-header .notifications-dropdown,
.site-header [data-notifications],
.site-header #notificationBell,
.site-header #notificationsBell,
.site-header #notificationsToggle{
  position: relative;
  z-index: 240 !important;
}

.site-header .notifications-menu,
.site-header .notifications-panel,
.site-header .notifications-popup,
.site-header .notifications-dropdown-menu,
.site-header [data-notifications-menu]{
  position: absolute !important;
  z-index: 10090 !important;
}

.site-header + .search-bar,
.site-header .search-bar{
  position: relative;
  z-index: 120;
}

/* pseudo elements should not catch clicks */
.site-header::before,
.site-header::after,
.site-header *::before,
.site-header *::after{
  pointer-events: none;
}

/* but real interactive nodes should */
.site-header a,
.site-header button,
.site-header input,
.site-header select,
.site-header textarea,
.site-header .user-name,
.site-header .open-chat-btn,
.site-header #chatToggleBtn,
.site-header [data-open-chat]{
  pointer-events: auto;
}

/* bottom nav above all content */
@media (max-width: 1024px){
  .bottom-nav{
    display: flex !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050 !important;
  }
}

/* ===== Final polish ===== */
body.site-bg .site-header{
  background: rgba(255,255,255,.035) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(3px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(3px) saturate(108%) !important;
}

body.site-bg .top-bar{
  padding-top: 10px;
  padding-bottom: 10px;
}

body.site-bg .main-menu a,
body.site-bg .nav-dropdown-toggle{
  transition:
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .08s ease;
}

body.site-bg .main-menu a:hover,
body.site-bg .nav-dropdown-toggle:hover{
  background: rgba(255,255,255,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

body.site-bg .main-menu a.active,
body.site-bg .nav-dropdown-toggle.active{
  background: rgba(255,255,255,.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 4px 12px rgba(72,140,200,.05) !important;
}

body.site-bg .open-chat-btn,
body.site-bg .header-icon-btn,
body.site-bg .burger{
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(190,204,228,.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 2px 6px rgba(90,120,170,.025) !important;
}

body.site-bg .open-chat-btn:hover,
body.site-bg .header-icon-btn:hover,
body.site-bg .burger:hover{
  background: rgba(255,255,255,.16) !important;
}

body.site-bg .search-bar{
  padding-top: 6px !important;
  padding-bottom: 10px !important;
}

body.site-bg .search-form{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(190,204,228,.10) !important;
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 4px 14px rgba(88,112,160,.025) !important;
  backdrop-filter: blur(4px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(4px) saturate(112%) !important;
}

body.site-bg .search-input,
body.site-bg .search-select{
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(190,204,228,.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 2px 6px rgba(88,112,160,.02) !important;
}

body.site-bg .search-input::placeholder{
  color: rgba(15,23,42,.34);
}

body.site-bg .search-input:focus,
body.site-bg .search-select:focus{
  background: rgba(255,255,255,.20) !important;
  border-color: rgba(59,130,246,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 0 0 3px rgba(59,130,246,.05) !important;
}

body.site-bg .search-btn{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 8px 18px rgba(0,136,204,.12) !important;
}

body.site-bg .search-btn:hover{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 10px 22px rgba(0,136,204,.15) !important;
}

body.site-bg .user-menu,
body.site-bg .nav-dropdown-menu{
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(190,204,228,.16) !important;
  box-shadow:
    0 18px 38px rgba(88,112,160,.09),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  backdrop-filter: blur(12px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(145%) !important;
}

body.site-bg .user-menu a:hover,
body.site-bg .nav-dropdown-menu a:hover{
  background: rgba(240,245,252,.72) !important;
  text-decoration: none;
}

@media (max-width: 1024px){
  body.site-bg .site-header{
    background: rgba(255,255,255,.03) !important;
    backdrop-filter: blur(2px) saturate(105%) !important;
    -webkit-backdrop-filter: blur(2px) saturate(105%) !important;
  }

  body.site-bg .top-bar{
    padding-top: calc(8px + var(--safe-area-inset-top, 0px));
    padding-bottom: 8px;
  }

  body.site-bg .search-form{
    border-radius: 18px;
  }

  body.site-bg .weather-inline{
    background: rgba(255,255,255,.22) !important;
  }
}

/* Native webview: menu panel sits above bottom nav */
@media (max-width: 1024px){
  .is-native .mobile-menu{
    bottom: var(--bottom-nav-h, 78px);
    height: auto;
    max-height: none;
  }
}

/* =========================================================
   HEADER / SEARCH REFINEMENT
   Keeps the header integrated with the background scene.
   ========================================================= */

body.site-bg .site-header{
  background: rgba(255,255,255,.64) !important;
  border-bottom: 0 !important;
  box-shadow: 0 10px 28px rgba(73,102,148,.045) !important;
  backdrop-filter: blur(16px) saturate(132%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(132%) !important;
}

body.site-bg .top-bar{
  padding-top: 9px;
  padding-bottom: 9px;
}

body.site-bg .main-menu a,
body.site-bg .nav-dropdown-toggle{
  color: #21344e;
  font-weight: 760;
  letter-spacing: 0;
}

body.site-bg .main-menu a.active,
body.site-bg .nav-dropdown-toggle.active{
  background: rgba(255,255,255,.42) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 6px 16px rgba(73,102,148,.06) !important;
}

body.site-bg .main-menu a:hover,
body.site-bg .nav-dropdown-toggle:hover{
  background: rgba(255,255,255,.28) !important;
}

body.site-bg .open-chat-btn,
body.site-bg .header-icon-btn,
body.site-bg .burger,
body.site-bg .user-name{
  background: rgba(255,255,255,.26) !important;
  border-color: rgba(185,202,228,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 6px 16px rgba(73,102,148,.045) !important;
}

body.site-bg .open-chat-btn:hover,
body.site-bg .header-icon-btn:hover,
body.site-bg .burger:hover,
body.site-bg .user-name:hover{
  background: rgba(255,255,255,.36) !important;
}

body.site-bg .search-bar{
  padding-top: 7px !important;
  padding-bottom: 10px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.28)) !important;
  border-top: 0 !important;
  box-shadow: 0 12px 30px rgba(73,102,148,.035) !important;
  backdrop-filter: blur(14px) saturate(128%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(128%) !important;
}

body.site-bg .search-input,
body.site-bg .search-select{
  background: rgba(255,255,255,.46) !important;
  border-color: rgba(185,202,228,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 6px 16px rgba(73,102,148,.04) !important;
}

body.site-bg .search-input:focus,
body.site-bg .search-select:focus{
  background: rgba(255,255,255,.62) !important;
  border-color: rgba(52,117,185,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 0 0 3px rgba(52,117,185,.055) !important;
}

body.site-bg .search-btn{
  background: linear-gradient(180deg, #0788c8, #0576ad);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 10px 22px rgba(5,118,173,.17) !important;
}

@media (max-width: 1024px){
  body.site-bg .site-header{
    background: rgba(255,255,255,.72) !important;
    backdrop-filter: blur(18px) saturate(132%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(132%) !important;
  }

  body.site-bg .top-bar{
    padding-top: calc(9px + var(--safe-area-inset-top, 0px));
  }

  body.site-bg .search-form{
    background: rgba(255,255,255,.48) !important;
    border-color: rgba(185,202,228,.26) !important;
  }
}

/* Softer header-to-page transition: keep search embedded in the scene */
body.site-bg .site-header{
  background:
    linear-gradient(180deg,
      rgba(244,248,255,.70) 0%,
      rgba(230,240,255,.46) 56%,
      rgba(230,240,255,.18) 100%) !important;
  box-shadow: none !important;
}

body.site-bg .search-bar{
  background:
    linear-gradient(180deg,
      rgba(238,246,255,.34) 0%,
      rgba(238,246,255,.16) 58%,
      rgba(238,246,255,0) 100%) !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

body.site-bg .search-bar::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238,246,255,.16), rgba(238,246,255,0));
}

body.site-bg .search-form{
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 1024px){
  body.site-bg .site-header{
    background:
      linear-gradient(180deg,
        rgba(244,248,255,.76) 0%,
        rgba(230,240,255,.50) 62%,
        rgba(230,240,255,.18) 100%) !important;
  }
}

/* Final veil tuning: less blue panel, more natural page blend */
body.site-bg .site-header{
  background:
    linear-gradient(180deg,
      rgba(248,251,255,.58) 0%,
      rgba(235,244,255,.34) 54%,
      rgba(235,244,255,.08) 100%) !important;
  backdrop-filter: blur(12px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(118%) !important;
}

body.site-bg .top-bar{
  padding-top: 8px;
  padding-bottom: 8px;
}

body.site-bg .search-bar{
  padding-top: 5px !important;
  padding-bottom: 12px !important;
  background:
    linear-gradient(180deg,
      rgba(244,249,255,.20) 0%,
      rgba(244,249,255,.08) 60%,
      rgba(244,249,255,0) 100%) !important;
  backdrop-filter: blur(8px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
}

body.site-bg .search-bar::after{
  bottom: -22px;
  height: 22px;
  background: linear-gradient(180deg, rgba(244,249,255,.10), rgba(244,249,255,0));
}

body.site-bg .search-input,
body.site-bg .search-select{
  background: rgba(255,255,255,.38) !important;
  border-color: rgba(176,195,224,.23) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 5px 14px rgba(73,102,148,.028) !important;
}

body.site-bg .search-input:focus,
body.site-bg .search-select:focus{
  background: rgba(255,255,255,.55) !important;
}

body.site-bg .main-menu a.active,
body.site-bg .nav-dropdown-toggle.active,
body.site-bg .open-chat-btn,
body.site-bg .header-icon-btn,
body.site-bg .burger,
body.site-bg .user-name{
  background-color: rgba(255,255,255,.22) !important;
  border-color: rgba(176,195,224,.18) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 5px 14px rgba(73,102,148,.032) !important;
}

@media (max-width: 1024px){
  body.site-bg .site-header{
    background:
      linear-gradient(180deg,
        rgba(248,251,255,.70) 0%,
        rgba(235,244,255,.40) 62%,
        rgba(235,244,255,.10) 100%) !important;
  }

  body.site-bg .top-bar{
    padding-top: calc(8px + var(--safe-area-inset-top, 0px));
    padding-bottom: 8px;
  }
}

/* =========================================================
   Header and navigation polish
   ========================================================= */

body.site-bg .site-header{
  color: #1d304a;
}

body.site-bg .top-bar{
  min-height: 66px;
  gap: 14px;
}

body.site-bg .main-menu{
  gap: 6px;
}

body.site-bg .main-menu a,
body.site-bg .nav-dropdown-toggle{
  min-height: 40px;
  padding: 0 11px;
  border-radius: 13px;
  color: #1e314b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

body.site-bg .main-menu a:hover,
body.site-bg .nav-dropdown-toggle:hover{
  color: #12375d;
  background: rgba(255,255,255,.34) !important;
}

body.site-bg .main-menu a.active,
body.site-bg .nav-dropdown-toggle.active{
  color: #12375d;
  background: rgba(255,255,255,.48) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.36),
    0 7px 16px rgba(73,102,148,.05) !important;
}

body.site-bg .nav-dropdown-toggle span[aria-hidden="true"]{
  margin-left: 3px;
  font-size: 10px;
  opacity: .72;
  transform: translateY(1px);
}

body.site-bg .nav-dropdown-menu{
  min-width: 258px;
  padding: 8px;
  border: 1px solid rgba(176,195,224,.24) !important;
  border-radius: 18px;
  background: rgba(255,255,255,.90) !important;
  box-shadow:
    0 20px 44px rgba(49,70,104,.13),
    inset 0 1px 0 rgba(255,255,255,.56) !important;
  backdrop-filter: blur(18px) saturate(142%);
  -webkit-backdrop-filter: blur(18px) saturate(142%);
}

body.site-bg .nav-dropdown-menu a{
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 12px;
  color: #22334b;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: 0;
}

body.site-bg .nav-dropdown-menu a:hover{
  color: #12375d;
  background: rgba(0,136,204,.08) !important;
}

body.site-bg .nav-dropdown-label{
  padding: 8px 10px 6px;
  color: rgba(15,23,42,.52);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.site-bg .nav-dropdown-sep{
  margin: 6px 4px;
  background: rgba(176,195,224,.22);
}

body.site-bg .weather-inline{
  color: #1e314b;
  font-size: 14px;
  font-weight: 620;
  letter-spacing: 0;
}

body.site-bg .open-chat-btn,
body.site-bg .header-icon-btn,
body.site-bg .burger,
body.site-bg .notify-bell{
  color: #1e314b;
  background: rgba(255,255,255,.28) !important;
  border-color: rgba(176,195,224,.20) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 6px 14px rgba(73,102,148,.035) !important;
}

body.site-bg .open-chat-btn:hover,
body.site-bg .header-icon-btn:hover,
body.site-bg .burger:hover,
body.site-bg .notify-bell:hover,
body.site-bg .notify-bell[aria-expanded="true"]{
  background: rgba(255,255,255,.42) !important;
  border-color: rgba(126,156,198,.26) !important;
}

body.site-bg .user-name{
  gap: 9px;
  color: #1e314b;
}

body.site-bg .user-name__label{
  color: rgba(30,49,75,.62);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
}

body.site-bg .user-name__value{
  color: #1d304a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

body.site-bg .user-menu{
  padding: 8px;
  border-color: rgba(176,195,224,.24);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow:
    0 20px 44px rgba(49,70,104,.13),
    inset 0 1px 0 rgba(255,255,255,.56);
  backdrop-filter: blur(18px) saturate(142%);
  -webkit-backdrop-filter: blur(18px) saturate(142%);
}

body.site-bg .user-menu a,
body.site-bg .menu-danger-btn{
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: 0;
}

body.site-bg .menu-caption{
  padding: 8px 10px 6px;
  color: rgba(15,23,42,.52);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
}

body.site-bg .menu-sep{
  margin: 6px 4px;
}

@media (max-width: 1240px){
  body.site-bg .main-menu a,
  body.site-bg .nav-dropdown-toggle{
    padding: 0 9px;
    font-size: 13px;
  }
}

/* =========================================================
   Header menu: smooth font + aligned dropdown items
   ========================================================= */

.site-header,
.site-header .main-menu,
.site-header .nav-dropdown-menu{
  font-family: var(--site-header-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.main-menu a,
.nav-dropdown-toggle{
  font-weight: 600;
  letter-spacing: -.015em;
}

.nav-dropdown-menu{
  padding: 8px;
  min-width: 248px;
}

.nav-dropdown-item__icon{
  width: var(--nav-drop-icon-col);
  height: var(--nav-drop-icon-col);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-dropdown-item__text{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-label{
  padding: 10px var(--nav-drop-pad-x) 5px;
  padding-left: calc(var(--nav-drop-pad-x) + var(--nav-drop-icon-col) + var(--nav-drop-gap));
  color: rgba(15, 23, 42, .52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.nav-dropdown-label:first-child{
  padding-top: 4px;
}

.nav-dropdown-sep{
  height: 1px;
  margin: 6px var(--nav-drop-pad-x);
  background: rgba(176, 195, 224, .24);
}

body.site-bg .main-menu a,
body.site-bg .nav-dropdown-toggle{
  font-family: var(--site-header-font);
  font-weight: 600;
  letter-spacing: -.015em;
}

body.site-bg .nav-dropdown-menu{
  padding: 8px;
  min-width: 258px;
}

body.site-bg .nav-dropdown-menu a.nav-dropdown-item{
  display: grid;
  grid-template-columns: var(--nav-drop-icon-col) minmax(0, 1fr);
  gap: var(--nav-drop-gap);
  align-items: center;
  min-height: 40px;
  padding: 8px var(--nav-drop-pad-x);
  border-radius: 12px;
  color: #22334b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}

body.site-bg .nav-dropdown-menu a.nav-dropdown-item:hover{
  color: #12375d;
  background: rgba(0, 136, 204, .08) !important;
}

body.site-bg .nav-dropdown-label{
  padding: 10px var(--nav-drop-pad-x) 5px;
  padding-left: calc(var(--nav-drop-pad-x) + var(--nav-drop-icon-col) + var(--nav-drop-gap));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

body.site-bg .nav-dropdown-sep{
  margin: 6px var(--nav-drop-pad-x);
}
