    /* Современный навбар */
    .modern-navbar {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.98) 100%);
      backdrop-filter: blur(20px) saturate(1.2);
      border-bottom: 1px solid rgba(255, 255, 255, 0.8);
      box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.9);
      padding: 0.75rem 1rem;
      position: sticky;
      top: 0;
      z-index: 1000;
      transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ СОВРЕМЕННОГО НАВБАРА === */
    body.dark-mode .modern-navbar {
      background: linear-gradient(135deg, rgba(20, 20, 35, 0.95) 0%, rgba(25, 25, 45, 0.98) 100%);
      border-bottom: 1px solid rgba(130, 130, 160, 0.3);
      box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(130, 130, 160, 0.2);
    }

    .navbar-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      max-width: 1400px;
      margin: 0 auto;
    }

    /* Бренд */
    .navbar-brand-modern {
      --spread: 0px;
      display: flex;
      align-items: center;
      text-decoration: none;
      color: #1e293b;
      font-weight: 700;
      font-size: 1.25rem;
      gap: 0.3rem;
      padding: 0.25rem 0.6rem;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.75);
      border: 1px solid rgba(220, 225, 240, 0.9);
      box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
      transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, color 0.25s ease;
    }

    .navbar-brand-modern:hover {
      --spread: 4px;
      color: #2563eb;
      gap: 0.55rem;
      background: rgba(255, 255, 255, 0.92);
      box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.06),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
      transform: translateY(-1px);
    }

    body.dark-mode .navbar-brand-modern {
      color: #e6e7ff;
      background: rgba(26, 28, 45, 0.6);
      border: 1px solid rgba(120, 130, 160, 0.28);
      box-shadow:
        0 1px 12px rgba(0, 0, 0, 0.35),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.04);
    }

    body.dark-mode .navbar-brand-modern:hover {
      color: #6366f1;
      background: rgba(35, 37, 60, 0.75);
      border-color: rgba(140, 150, 190, 0.35);
    }

    .brand-logo {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      background: transparent;
      border-radius: 12px;
      margin-right: 0;
      box-shadow: none;
      transition: transform 0.25s ease;
      transform: translateX(calc(var(--spread) * -1)) scale(1);
    }

    .brand-logo::after {
      content: '';
      display: block;
      width: 1px;
      height: 22px;
      margin-left: 6px;
      margin-right: 0px;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(120, 130, 160, 0.5) 50%, rgba(0, 0, 0, 0) 100%);
      opacity: 0.7;
    }

    .navbar-brand-modern:hover .brand-logo {
      transform: translateX(calc(var(--spread) * -1)) scale(1.04);
    }

    body.dark-mode .brand-logo {
      background: transparent;
      box-shadow: none;
    }

    /* hover rule removed to avoid empty ruleset */

    body.dark-mode .brand-logo::after {
      background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(180, 190, 220, 0.28) 50%, rgba(0, 0, 0, 0) 100%);
    }

    .brand-logo img {
      border-radius: 0;
      filter: none;
      width: 32px;
      height: 32px;
      object-fit: contain;
    }

    .brand-text {
      font-weight: 800;
      color: #1e293b;
      letter-spacing: 0.2px;
      transition: transform 0.25s ease, color 0.4s ease;
      transform: translateX(var(--spread));
    }

    body.dark-mode .brand-text {
      color: #e6e7ff;
    }

    /* Заголовок */
    .navbar-title-modern {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .title-text {
      font-size: 1.1rem;
      font-weight: 600;
      color: #1e293b;
      text-align: center;
      max-width: 300px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      transition: color 0.4s ease;
    }

    body.dark-mode .title-text {
      color: #e6e7ff;
    }

    /* Действия */
    .navbar-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .desktop-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .mobile-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    /* Мобильное меню: содержимое остаётся под исходными Jinja-проверками доступа. */
    .mobile-nav-menu-toggle {
      width: 44px;
      height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 4px;
      position: relative;
      padding: 0;
      border: 1px solid rgba(99, 102, 241, 0.16);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.92);
      color: #475569;
      box-shadow: 0 4px 16px rgba(30, 41, 59, 0.09);
      cursor: pointer;
      touch-action: manipulation;
      transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    }

    .mobile-nav-menu-toggle > span:not(.mobile-nav-menu-toggle-label) {
      width: 18px;
      height: 2px;
      display: block;
      border-radius: 999px;
      background: currentColor;
      transition: transform .22s ease, opacity .16s ease;
      pointer-events: none;
    }

    .mobile-nav-menu-toggle-label {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
    }

    .mobile-nav-menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(99, 102, 241, .16); }
    .mobile-nav-menu-toggle[aria-expanded="true"] { background: #eef2ff; color: #4f46e5; }
    .mobile-nav-menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .mobile-nav-menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
    .mobile-nav-menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    body.dark-mode .mobile-nav-menu-toggle {
      border-color: rgba(129, 140, 248, .22);
      background: rgba(38, 40, 61, .94);
      color: #c7d2fe;
      box-shadow: 0 5px 18px rgba(0, 0, 0, .3);
    }

    body.dark-mode .mobile-nav-menu-toggle[aria-expanded="true"] { background: #2c2f55; color: #a5b4fc; }

    .mobile-nav-menu-shell {
      position: fixed;
      z-index: 3600;
      inset: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .mobile-nav-menu-shell.is-opening,
    .mobile-nav-menu-shell.is-open,
    .mobile-nav-menu-shell.is-closing { visibility: visible; }
    .mobile-nav-menu-shell.is-opening { pointer-events: none; }
    .mobile-nav-menu-shell.is-open { pointer-events: auto; }
    .mobile-nav-menu-shell.is-closing { pointer-events: none; }
    .mobile-nav-menu-backdrop {
      position: absolute;
      inset: 0;
      padding: 0;
      border: 0;
      background: rgba(15, 23, 42, .48);
      opacity: 0;
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
      transition: opacity .22s ease;
      will-change: opacity;
    }

    .mobile-nav-menu-shell.is-open .mobile-nav-menu-backdrop { opacity: 1; }
    .mobile-nav-menu-panel {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: min(91vw, 380px);
      display: flex;
      flex-direction: column;
      padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
      border-left: 1px solid rgba(226, 232, 240, .9);
      background: rgba(248, 250, 252, .97);
      color: #172033;
      box-shadow: -24px 0 70px rgba(15, 23, 42, .22);
      transform: translate3d(105%, 0, 0);
      transition: transform .28s cubic-bezier(.22, .8, .3, 1);
      will-change: transform;
      overscroll-behavior: contain;
    }

    .mobile-nav-menu-shell.is-open .mobile-nav-menu-panel { transform: translate3d(0, 0, 0); }
    body.dark-mode .mobile-nav-menu-panel {
      border-left-color: rgba(129, 140, 170, .22);
      background: rgba(19, 21, 34, .985);
      color: #f4f5ff;
      box-shadow: -24px 0 75px rgba(0, 0, 0, .48);
    }

    .mobile-nav-menu-header { display: flex; align-items: center; gap: 12px; padding: 3px 2px 16px; border-bottom: 1px solid rgba(148, 163, 184, .18); }
    .mobile-nav-menu-user { min-width: 0; display: flex; align-items: center; flex: 1; gap: 11px; }
    .mobile-nav-menu-avatar { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 7px 18px rgba(99, 102, 241, .24); }
    .mobile-nav-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .mobile-nav-menu-avatar i { font-size: 1.15rem; }
    .mobile-nav-menu-user-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .mobile-nav-menu-user-copy small { color: #6366f1; font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
    .mobile-nav-menu-user-copy strong { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-nav-menu-user-copy > span { color: #64748b; font-size: .72rem; }
    body.dark-mode .mobile-nav-menu-user-copy small { color: #a5b4fc; }
    body.dark-mode .mobile-nav-menu-user-copy > span { color: #9ba3b8; }
    .mobile-nav-menu-close { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid rgba(148, 163, 184, .2); border-radius: 12px; background: rgba(255, 255, 255, .68); color: #64748b; cursor: pointer; }
    .mobile-nav-menu-close:hover { background: #fff; color: #1e293b; }
    body.dark-mode .mobile-nav-menu-close { border-color: rgba(148, 163, 184, .16); background: rgba(45, 48, 70, .72); color: #b6bdd0; }

    .mobile-nav-menu-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 17px 4px 10px; }
    .mobile-nav-menu-heading span { font-size: .78rem; font-weight: 750; }
    .mobile-nav-menu-heading small { color: #94a3b8; font-size: .64rem; }
    .mobile-nav-menu-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1 1 auto; align-content: start; gap: 9px; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; overscroll-behavior: contain; }

    .mobile-nav-menu-grid .mobile-action-btn {
      width: 100% !important;
      height: 66px !important;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      padding: 10px !important;
      overflow: hidden;
      border: 1px solid rgba(148, 163, 184, .18) !important;
      border-radius: 15px !important;
      background: rgba(255, 255, 255, .82) !important;
      color: #334155 !important;
      box-shadow: 0 3px 12px rgba(15, 23, 42, .055) !important;
      font-size: .78rem !important;
      font-weight: 650;
      line-height: 1.2;
      text-align: left;
      transform: none;
    }

    .mobile-nav-menu-grid .mobile-action-btn::after { content: attr(title); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: normal; }
    .mobile-nav-menu-grid .mobile-action-btn:hover { border-color: rgba(99, 102, 241, .3) !important; background: #fff !important; color: #4338ca !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99, 102, 241, .12) !important; }
    .mobile-nav-menu-grid .mobile-action-btn .btn-inner { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; background: #eef2ff; color: #4f46e5; }
    .mobile-nav-menu-grid .mobile-action-btn .btn-inner i { font-size: 1.08rem; }
    .mobile-nav-menu-grid .folder-nav-btn .btn-inner { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
    .mobile-nav-menu-grid .documents-nav-btn .btn-inner { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
    .mobile-nav-menu-grid .target-nav-btn .btn-inner { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; }
    .mobile-nav-menu-grid .skud-nav-btn .btn-inner { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
    .mobile-nav-menu-grid .ppe-nav-btn .btn-inner { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
    .mobile-nav-menu-grid .theme-toggle-btn .btn-inner { background: rgba(245, 158, 11, .14); color: #d97706; }
    .mobile-nav-menu-grid .logout-btn { grid-column: 1 / -1; color: #dc2626 !important; }
    .mobile-nav-menu-grid .logout-btn .btn-inner { background: #fef2f2; color: #dc2626; }

    body.dark-mode .mobile-nav-menu-grid .mobile-action-btn {
      border-color: rgba(129, 140, 170, .18) !important;
      background: rgba(35, 38, 56, .88) !important;
      color: #e7e9f6 !important;
      box-shadow: 0 4px 14px rgba(0, 0, 0, .2) !important;
    }
    body.dark-mode .mobile-nav-menu-grid .mobile-action-btn:hover { border-color: rgba(129, 140, 248, .35) !important; background: #292d43 !important; color: #c7d2fe !important; }
    body.dark-mode .mobile-nav-menu-grid .mobile-action-btn .btn-inner { background: #303553; color: #a5b4fc; }
    body.dark-mode .mobile-nav-menu-grid .folder-nav-btn .btn-inner { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
    body.dark-mode .mobile-nav-menu-grid .documents-nav-btn .btn-inner { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
    body.dark-mode .mobile-nav-menu-grid .target-nav-btn .btn-inner { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; }
    body.dark-mode .mobile-nav-menu-grid .skud-nav-btn .btn-inner { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
    body.dark-mode .mobile-nav-menu-grid .ppe-nav-btn .btn-inner { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
    body.dark-mode .mobile-nav-menu-grid .theme-toggle-btn .btn-inner { background: rgba(168, 85, 247, .16); color: #c084fc; }
    body.dark-mode .mobile-nav-menu-grid .logout-btn { color: #fca5a5 !important; }
    body.dark-mode .mobile-nav-menu-grid .logout-btn .btn-inner { background: rgba(239, 68, 68, .14); color: #f87171; }

    .mobile-nav-menu-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 5px 1px; border-top: 1px solid rgba(148, 163, 184, .16); color: #94a3b8; font-size: .64rem; }
    .mobile-nav-menu-footer i { color: #22c55e; font-size: .86rem; }
    body.mobile-nav-menu-open { overflow: hidden !important; }

    @media (max-width: 767px) {
      .mobile-actions .notifications-dropdown .mobile-dropdown { right: -52px !important; }
    }

    @media (max-width: 370px) {
      .mobile-nav-menu-grid { grid-template-columns: 1fr; }
      .mobile-nav-menu-grid .logout-btn { grid-column: auto; }
    }

    @media (prefers-reduced-motion: reduce) {
      .mobile-nav-menu-panel, .mobile-nav-menu-backdrop, .mobile-nav-menu-toggle > span { transition: none !important; }
    }

    /* Современные кнопки */
    .modern-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.7);
      color: #64748b;
      font-size: 1.2rem;
      text-decoration: none;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      backdrop-filter: blur(8px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .modern-btn:hover {
      background: rgba(255, 255, 255, 0.9);
      color: #2563eb;
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
    }

    .modern-btn:active {
      transform: translateY(0);
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ СОВРЕМЕННЫХ КНОПОК === */
    body.dark-mode .modern-btn {
      background: rgba(45, 45, 65, 0.7);
      color: #a8a9c7;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .modern-btn:hover {
      background: rgba(55, 55, 80, 0.9);
      color: #6366f1;
      box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    }

    /* === ВЫДЕЛЕННАЯ ЦВЕТНАЯ КНОПКА СКУД === */
    /* Класс висит и на десктопной (.modern-btn.skud-nav-btn),
       и на мобильной (.mobile-action-btn.skud-nav-btn) кнопке. */
    .skud-nav-btn {
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(129, 90, 246, 0.45) !important;
    }

    .skud-nav-btn:hover {
      background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(129, 90, 246, 0.6) !important;
    }

    .skud-nav-btn i {
      color: #ffffff !important;
    }

    body.dark-mode .skud-nav-btn {
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(129, 90, 246, 0.5) !important;
    }

    body.dark-mode .skud-nav-btn:hover {
      background: linear-gradient(135deg, #7c83ff 0%, #9d6bff 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 22px rgba(129, 90, 246, 0.7) !important;
    }

    /* === ВЫДЕЛЕННАЯ ЦВЕТНАЯ КНОПКА ФАЙЛОВОГО МЕНЕДЖЕРА (янтарный) === */
    .folder-nav-btn {
      background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(245, 130, 11, 0.45) !important;
    }
    .folder-nav-btn:hover {
      background: linear-gradient(135deg, #d97706 0%, #ea580c 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(245, 130, 11, 0.6) !important;
    }
    .folder-nav-btn i { color: #ffffff !important; }
    body.dark-mode .folder-nav-btn {
      background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(245, 130, 11, 0.5) !important;
    }
    body.dark-mode .folder-nav-btn:hover {
      background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 22px rgba(245, 130, 11, 0.7) !important;
    }

    /* === ВЫДЕЛЕННАЯ ЦВЕТНАЯ КНОПКА ДОКУМЕНТОВ (синяя) === */
    .documents-nav-btn {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(37, 99, 235, 0.45) !important;
    }
    .documents-nav-btn:hover {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6) !important;
    }
    .documents-nav-btn i { color: #ffffff !important; }
    body.dark-mode .documents-nav-btn {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(37, 99, 235, 0.5) !important;
    }
    body.dark-mode .documents-nav-btn:hover {
      background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 22px rgba(37, 99, 235, 0.7) !important;
    }

    /* === ВЫДЕЛЕННАЯ ЦВЕТНАЯ КНОПКА TARGET (розово-красный) === */
    .target-nav-btn {
      background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(244, 63, 94, 0.45) !important;
    }
    .target-nav-btn:hover {
      background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(244, 63, 94, 0.6) !important;
    }
    .target-nav-btn i { color: #ffffff !important; }
    body.dark-mode .target-nav-btn {
      background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(244, 63, 94, 0.5) !important;
    }
    body.dark-mode .target-nav-btn:hover {
      background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 22px rgba(244, 63, 94, 0.7) !important;
    }

    /* === ВЫДЕЛЕННАЯ ЦВЕТНАЯ КНОПКА СИЗ И ОПАСНЫХ ЗОН (изумрудно-зеленый) === */
    .ppe-nav-btn {
      background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(16, 185, 129, 0.45) !important;
    }
    .ppe-nav-btn:hover {
      background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6) !important;
    }
    .ppe-nav-btn i { color: #ffffff !important; }
    body.dark-mode .ppe-nav-btn {
      background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5) !important;
    }
    body.dark-mode .ppe-nav-btn:hover {
      background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 22px rgba(16, 185, 129, 0.7) !important;
    }

    /* === ВЫДЕЛЕННАЯ ЗАЛИВНАЯ КНОПКА МЕССЕНДЖЕРА (Индиго-фиолетовый градиент) === */
    .messenger-nav-btn {
      background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 255, 255, 0.25) !important;
      box-shadow: 0 3px 12px rgba(99, 102, 241, 0.45) !important;
      cursor: pointer !important;
      pointer-events: auto !important;
      z-index: 10;
    }
    .messenger-nav-btn * {
      pointer-events: none;
    }
    .messenger-nav-btn:hover {
      background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
      color: #ffffff !important;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(99, 102, 241, 0.65) !important;
    }
    .messenger-nav-btn i {
      color: #ffffff !important;
      font-size: 1.15rem;
      transition: transform 0.2s ease;
    }
    .messenger-nav-btn:hover i {
      transform: scale(1.1);
    }
    body.dark-mode .messenger-nav-btn {
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
      color: #ffffff !important;
      border: 1px solid rgba(165, 180, 252, 0.3) !important;
      box-shadow: 0 2px 14px rgba(99, 102, 241, 0.55) !important;
      cursor: pointer !important;
      pointer-events: auto !important;
    }
    body.dark-mode .messenger-nav-btn:hover {
      background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%) !important;
      color: #ffffff !important;
      box-shadow: 0 6px 24px rgba(129, 140, 248, 0.75) !important;
    }

    /* Аватарка в пункте Профиль нижнего меню */
    .modern-nav-item .nav-profile-avatar {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      display: block;
    }

    /* === КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ - SVG ANIMATION === */
    .theme-toggle-btn {
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .theme-toggle-svg {
      width: 24px;
      height: 24px;
      transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    /* Base styles (Light Mode = Sun) */
    .theme-toggle-svg .moon-mask-circle {
      transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
      transform: translateX(0);
    }

    .theme-toggle-svg .sun-core {
      transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
      transform: scale(1);
      transform-origin: center;
    }

    .theme-toggle-svg .sun-rays {
      transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease;
      transform: rotate(0) scale(1);
      transform-origin: center;
      opacity: 1;
    }

    /* Dark Mode (Moon) */
    body.dark-mode .theme-toggle-svg .moon-mask-circle {
      transform: translateX(-10px);
    }

    body.dark-mode .theme-toggle-svg .sun-core {
      transform: scale(1.75);
    }

    body.dark-mode .theme-toggle-svg .sun-rays {
      transform: rotate(-90deg) scale(0);
      opacity: 0;
    }

    /* Hover effects */
    .theme-toggle-btn:hover .theme-toggle-svg {
      transform: scale(1.1);
    }

    body.dark-mode .theme-toggle-btn:hover .theme-toggle-svg {
      transform: scale(1.1) rotate(-15deg);
    }

    /* Цвета кнопки темы */
    .theme-toggle-btn {
      background: rgba(245, 158, 11, 0.15);
      color: #f59e0b;
    }

    .theme-toggle-btn:hover {
      background: rgba(245, 158, 11, 0.25);
      color: #d97706;
    }

    body.dark-mode .theme-toggle-btn {
      background: rgba(168, 85, 247, 0.15);
      color: #a855f7;
    }

    body.dark-mode .theme-toggle-btn:hover {
      background: rgba(168, 85, 247, 0.25);
      color: #9333ea;
    }

    /* Современные мобильные кнопки */
    .mobile-action-btn {
      position: relative;
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      color: #64748b;
      font-size: 1.2rem;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
    }

    .mobile-action-btn:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-action-btn:active {
      transform: translateY(0) scale(0.98);
      transition: all 0.1s ease;
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ МОБИЛЬНЫХ КНОПОК === */
    body.dark-mode .mobile-action-btn {
      background: rgba(45, 45, 65, 0.95);
      color: #a8a9c7;
      box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
    }

    body.dark-mode .mobile-action-btn:hover {
      box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .btn-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      position: relative;
      z-index: 2;
    }

    /* Ripple эффект */
    .ripple-effect {
      position: relative;
      overflow: hidden;
    }

    .ripple-effect::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.6);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
      z-index: 1;
    }

    .ripple-effect:active::before {
      width: 300px;
      height: 300px;
    }

    /* Кнопка уведомлений */
    .notification-btn {
      color: #64748b;
      background: rgba(255, 255, 255, 0.95);
    }

    .notification-btn.has-notifications {
      color: #ef4444;
      background: rgba(239, 68, 68, 0.1);
      animation: notification-glow 2s ease-in-out infinite;
    }

    /* Иконка мессенджера с уведомлениями */
    .bi-chat-square-dots.has-notifications {
      color: #ef4444 !important;
      animation: messenger-notification-glow 2s ease-in-out infinite;
    }

    @keyframes messenger-notification-glow {

      0%,
      100% {
        color: #ef4444;
        text-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
      }

      50% {
        color: #dc2626;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
      }
    }

    @keyframes notification-glow {

      0%,
      100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
      }

      50% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
      }
    }

    /* Кнопка новостей */
    .news-btn {
      color: #f59e0b;
      background: rgba(245, 158, 11, 0.1);
    }

    .news-btn:hover {
      background: rgba(245, 158, 11, 0.15);
      color: #d97706;
    }

    /* Кнопка выхода */
    .logout-btn {
      color: #ef4444;
      background: rgba(239, 68, 68, 0.1);
    }

    .logout-btn:hover {
      background: rgba(239, 68, 68, 0.15);
      color: #dc2626;
    }

    /* Улучшенные бейджи */
    .notification-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      color: white;
      font-size: 0.7rem;
      font-weight: 700;
      min-width: 1.4rem;
      height: 1.4rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 0.3rem;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
      border: 2px solid white;
      z-index: 3;
      pointer-events: none !important;
    }

    .notification-badge.pulse {
      animation: badge-pulse 2s ease-in-out infinite;
    }

    @keyframes badge-pulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.1);
      }
    }

    /* Современные дропдауны */
    .mobile-dropdown {
      background: rgba(255, 255, 255, 0.4);
      backdrop-filter: blur(35px) saturate(1.6);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 20px;
      box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.15);
      padding: 1rem;
      min-width: 90vw;
      max-width: 95vw;
      margin-top: 0.75rem;
      animation: slideInUp 0.3s ease-out;
    }

    /* Темная тема для мобильного dropdown - используем те же цвета, что и desktop */
    body.dark-mode .mobile-dropdown {
      background: rgba(30, 41, 59, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .slide-item {
      display: flex;
      align-items: center;
      padding: 0.75rem 1rem;
      margin: 0.25rem 0;
      border-radius: 12px;
      color: #374151;
      font-weight: 500;
      transition: all 0.2s ease;
      text-decoration: none;
      animation: slideInLeft 0.3s ease-out;
    }

    .slide-item:nth-child(1) {
      animation-delay: 0.1s;
    }

    .slide-item:nth-child(2) {
      animation-delay: 0.2s;
    }

    .slide-item:nth-child(3) {
      animation-delay: 0.3s;
    }

    @keyframes slideInLeft {
      from {
        opacity: 0;
        transform: translateX(-20px);
      }

      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .slide-item:hover {
      background: rgba(37, 99, 235, 0.15);
      color: #2563eb;
      transform: translateX(8px);
    }

    body.dark-mode .slide-item {
      background: transparent;
    }

    .item-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      background: rgba(37, 99, 235, 0.1);
      border-radius: 10px;
      margin-right: 0.75rem;
      color: #2563eb;
    }

    body.dark-mode .item-icon {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
    }

    .item-content {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .item-title {
      font-weight: 600;
      font-size: 0.95rem;
      color: #1e293b;
    }

    .item-subtitle {
      font-size: 0.8rem;
      color: #334155;
      margin-top: 0.1rem;
      font-weight: 600;
    }

    /* Темная тема для текста уведомлений - используем те же цвета, что и desktop */
    body.dark-mode .item-title {
      color: #f1f5f9;
    }

    body.dark-mode .item-subtitle {
      color: #94a3b8;
      font-weight: 500;
    }

    body.dark-mode .slide-item {
      color: #f1f5f9;
      background: transparent;
    }

    body.dark-mode .slide-item:hover {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
    }

    .empty-state {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
      color: #9ca3af;
      font-style: italic;
    }

    .empty-state i {
      font-size: 1.5rem;
      margin-right: 0.5rem;
    }

    /* Кнопка уведомлений */
    .notification-btn {
      position: relative;
    }

    .notification-btn.has-notifications {
      color: #ef4444;
      background: rgba(239, 68, 68, 0.1);
    }

    .notification-btn.has-notifications:hover {
      background: rgba(239, 68, 68, 0.15);
      color: #dc2626;
    }

    /* Бейдж уведомлений */
    .notification-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      color: white;
      font-size: 0.7rem;
      font-weight: 600;
      min-width: 1.4rem;
      height: 1.4rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 0.3rem;
      box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
      border: 2px solid white;
    }

    /* Кнопка профиля */
    .profile-btn {
      overflow: hidden;
    }

    .profile-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(255, 255, 255, 0.8);
      background: #f3f6fa;
    }

    /* Кнопка выхода */
    .logout-btn {
      color: #ef4444;
      background: rgba(239, 68, 68, 0.1);
    }

    .logout-btn:hover {
      background: rgba(239, 68, 68, 0.15);
      color: #dc2626;
    }

    /* Современные дропдауны */
    .modern-dropdown {
      background: rgba(255, 255, 255, 0.4);
      backdrop-filter: blur(30px) saturate(1.5);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      padding: 0.5rem;
      min-width: 280px;
      margin-top: 0.5rem;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
    }

    /* Темная тема для dropdown */
    body.dark-mode .modern-dropdown {
      background: rgba(30, 41, 59, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode .modern-dropdown .dropdown-item {
      color: #f1f5f9;
    }

    body.dark-mode .modern-dropdown .dropdown-item:hover {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
    }

    body.dark-mode .modern-dropdown .dropdown-item i {
      color: #94a3b8;
    }

    body.dark-mode .modern-dropdown .dropdown-item:hover i {
      color: #60a5fa;
    }

    .mobile-dropdown {
      min-width: 92vw;
      max-width: 98vw;
      border-radius: 20px;
      margin-top: 0.75rem;
    }

    .modern-dropdown .dropdown-item {
      border-radius: 12px;
      padding: 0.75rem 1rem;
      margin: 0.25rem 0;
      color: #374151;
      font-weight: 500;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
    }

    .modern-dropdown .dropdown-item:hover {
      background: rgba(37, 99, 235, 0.1);
      color: #2563eb;
      transform: translateX(4px);
    }

    .modern-dropdown .dropdown-item i {
      font-size: 1.1rem;
      margin-right: 0.75rem;
      color: #6b7280;
    }

    .modern-dropdown .dropdown-item:hover i {
      color: #2563eb;
    }

    /* Адаптивность для мобильных устройств */
    @media (max-width: 767px) {
      .modern-navbar {
        padding: 0.4rem 0.5rem;
        min-height: 60px;
      }

      /* Уплотняем бренд-чип на мобильных и убираем лишний правый воздух */
      .navbar-brand-modern {
        padding: 0.2rem 0.44rem 0.2rem 0.42rem;
        gap: 0.28rem;
      }

      .brand-logo {
        margin-right: 0;
      }

      .brand-logo::after {
        display: none;
      }

      .navbar-content {
        gap: 0.25rem;
        align-items: center;
      }

      /* Логотип на мобильных */
      .brand-logo {
        width: 32px;
        height: 32px;
        margin-right: 0.2rem;
        border-radius: 10px;
      }

      .brand-text {
        display: none;
      }

      /* Заголовок на мобильных */
      .navbar-title-modern {
        flex: 1;
        min-width: 0;
      }

      .title-text {
        font-size: 0.95rem;
        font-weight: 600;
        max-width: 180px;
        color: #1e293b;
      }

      /* Кнопки на мобильных */
      .modern-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.8);
      }

      .mobile-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 14px;
      }

      /* Мобильные действия */
      .mobile-actions {
        gap: 0.5rem;
      }

      /* Бейдж уведомлений на мобильных */
      .notification-badge {
        min-width: 1.2rem;
        height: 1.2rem;
        font-size: 0.65rem;
        top: -3px;
        right: -3px;
      }

      /* Дропдаун на мобильных */
      .mobile-dropdown {
        min-width: 88vw;
        max-width: 94vw;
        border-radius: 16px;
        margin-top: 0.5rem;
        padding: 0.75rem;
      }

      .mobile-dropdown .dropdown-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
        border-radius: 10px;
      }

      /* Адаптация нижнего меню */
      .modern-nav-item {
        padding: 0.3rem 0.15rem;
      }

      .nav-icon {
        width: 28px;
        height: 28px;
      }

      .nav-icon i {
        font-size: 1.1rem;
      }

      .nav-label {
        font-size: 0.6rem;
      }

      .modern-nav-badge {
        min-width: 1.1rem;
        height: 1.1rem;
        font-size: 0.55rem;
        top: -3px;
        right: -3px;
        pointer-events: none !important;
      }
    }

    @media (max-width: 575px) {
      .modern-navbar {
        padding: 0.3rem 0.4rem;
        min-height: 56px;
      }

      .navbar-content {
        gap: 0.2rem;
      }

      .brand-logo {
        width: 28px;
        height: 28px;
        margin-right: 0.3rem;
        border-radius: 8px;
      }

      .title-text {
        font-size: 0.9rem;
        max-width: 140px;
      }

      .modern-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
      }

      .mobile-action-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 12px;
      }

      .mobile-actions {
        gap: 0.4rem;
      }

      .notification-badge {
        min-width: 1.1rem;
        height: 1.1rem;
        font-size: 0.6rem;
        top: -2px;
        right: -2px;
      }
    }

    @media (max-width: 480px) {
      .modern-navbar {
        padding: 0.25rem 0.3rem;
        min-height: 52px;
      }

      .brand-logo {
        width: 26px;
        height: 26px;
        margin-right: 0.25rem;
      }

      .title-text {
        font-size: 0.85rem;
        max-width: 120px;
      }

      .modern-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
      }

      .mobile-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
        border-radius: 10px;
      }

      .mobile-actions {
        gap: 0.3rem;
      }
    }

    /* Старые стили для совместимости */
    .navbar-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      border: 1.5px solid #e0e7ef;
      background: #f3f6fa;
    }


    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    /* --- КРИТИЧЕСКОЕ: dropdown уведомлений всегда поверх --- */
    .dropdown-menu {
      z-index: 3000 !important;
      position: absolute !important;
      overflow: visible !important;
    }

    /* Позиционирование dropdown уведомлений */
    .notifications-dropdown {
      position: relative;
    }

    .notifications-dropdown .dropdown-menu {
      position: absolute !important;
      top: 100% !important;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
      margin-top: 0.5rem;
    }

    /* Мобильная версия dropdown уведомлений */
    @media (max-width: 767px) {
      .notifications-dropdown .mobile-dropdown {
        right: -100px !important;
        left: auto !important;
        transform: none !important;
        min-width: 85vw !important;
        max-width: 90vw !important;
      }
    }

    /* --- КРИТИЧЕСКОЕ: главная панель не создает stacking context --- */
    .glass-card-main {
      overflow: visible !important;
      z-index: auto !important;
    }

    .mobile-notif-dropdown {
      transition: opacity 0.18s, transform 0.18s;
      opacity: 0;
      transform: translateY(-10px);
    }

    .mobile-notif-dropdown.show {
      opacity: 1;
      transform: translateY(0);
    }

    .scroll-to-top-btn {
      position: fixed;
      right: 2.2rem;
      bottom: 6.5rem;
      z-index: 4000;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: rgba(38, 50, 70, 0.82);
      color: #fff;
      border: none;
      box-shadow: 0 4px 24px 0 rgba(31, 38, 135, 0.18);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transform: translateY(40px) scale(0.92);
      transition: opacity .22s, transform .22s;
      font-size: 1.6rem;
    }

    .scroll-to-top-btn.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0) scale(1);
    }

    .scroll-to-top-btn:hover {
      background: linear-gradient(90deg, #2563eb 0%, #00d2ff 100%);
      color: #fff;
      transform: scale(1.08);
    }

    @media (max-width: 600px) {
      .scroll-to-top-btn {
        right: 1.1rem;
        bottom: 5.5rem;
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
      }
    }

    /* Скрываем кнопку "наверх" на страницах с деталями заявок */
    .details-page .scroll-to-top-btn {
      display: none !important;
    }


    .news-photos-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 14px;
      justify-items: center;
      align-items: center;
    }

    .news-photos-grid img {
      width: 120px;
      height: 120px;
      object-fit: cover;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
      transition: transform 0.18s, box-shadow 0.18s;
      cursor: pointer;
      background: #f8f9fa;
    }

    .news-photos-grid img:hover {
      transform: scale(1.08);
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    }

    .news-content-text {
      font-size: 1.13em;
      line-height: 1.6;
      color: #222;
      margin-bottom: 0.5em;
      word-break: break-word;
    }

    @media (max-width: 600px) {
      .news-photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 8px;
      }

      .news-photos-grid img {
        width: 90px;
        height: 90px;
        border-radius: 10px;
      }
    }

    /* === ОПТИМИЗАЦИЯ МОДАЛЬНОГО ОКНА НОВОСТЕЙ ДЛЯ МОБИЛЬНЫХ === */
    @media (max-width: 767px) {
      .news-modal-dialog {
        max-width: calc(100vw - 20px);
        margin: 10px auto;
        max-height: calc(100vh - 20px);
      }

      .news-modal-content {
        max-height: calc(100vh - 20px);
        display: flex;
        flex-direction: column;
      }

      .news-modal-header {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
      }

      .news-modal-header .modal-title {
        font-size: 1rem;
        line-height: 1.3;
      }

      .news-modal-body {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 0.75rem 1rem;
      }

      .news-modal-body .news-photos-grid {
        flex-shrink: 0;
        max-height: 140px;
        overflow: hidden;
      }

      .news-modal-body .news-photos-grid img {
        width: 70px;
        height: 70px;
      }

      .news-modal-content-outer {
        position: relative;
        flex: 1;
        min-height: 80px;
        max-height: 35vh;
        display: flex;
        flex-direction: column;
      }

      .news-modal-content-wrapper {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
      }

      .news-modal-content-wrapper::-webkit-scrollbar {
        width: 4px;
      }

      .news-modal-content-wrapper::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
      }

      .news-modal-content-wrapper.news-has-more {
        padding-bottom: 50px;
      }

      .news-more-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 0 8px;
        text-align: center;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 60%, transparent 100%);
        pointer-events: none;
      }

      .news-more-overlay a {
        pointer-events: auto;
        display: inline-block;
        padding: 8px 20px;
        background: #2563eb;
        color: #fff !important;
        border-radius: 20px;
        font-weight: 600;
        font-size: 0.95rem;
        text-decoration: none;
        box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
        transition: background 0.2s, transform 0.2s;
      }

      .news-more-overlay a:hover {
        background: #1d4ed8;
        transform: scale(1.03);
      }

      .news-modal-footer {
        flex-shrink: 0;
        padding: 0.6rem 1rem;
      }

      .news-modal-footer .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
      }
    }

    body.dark-mode .news-more-overlay {
      background: linear-gradient(to top, rgba(20, 20, 35, 0.98) 0%, rgba(25, 25, 45, 0.85) 60%, transparent 100%);
    }

    body.dark-mode .news-more-overlay a {
      background: #6366f1;
      color: #fff !important;
    }

    body.dark-mode .news-more-overlay a:hover {
      background: #4f46e5;
    }

    /* Модальное подтверждение "Прочитать всё" */
    .news-confirm-modal .modal-header .modal-title {
      font-size: 1rem;
      font-weight: 600;
    }

    .news-confirm-modal .modal-body {
      font-size: 0.9rem;
    }

    body.dark-mode .news-confirm-modal .modal-body .text-muted {
      color: rgba(230, 231, 255, 0.65) !important;
    }

    /* --- Современное нижнее мобильное меню --- */
    .modern-bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.99) 100%);
      backdrop-filter: blur(25px) saturate(1.3);
      border-top: 1px solid rgba(255, 255, 255, 0.9);
      box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.12),
        0 -2px 8px rgba(0, 0, 0, 0.08);
      padding: 0.5rem 0;
      display: none;
      animation: slideUpBottomNav 0.4s ease-out;
      transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    }

    /* Свернутое состояние нижнего меню при прокрутке вниз */
    .modern-bottom-nav.collapsed {
      padding: 0.18rem 0;
      transition: padding 0.3s ease, transform 0.3s ease;
    }

    .modern-bottom-nav.collapsed .modern-nav-item {
      padding: 0.12rem 0.1rem;
      transition: padding 0.3s ease;
    }

    .modern-bottom-nav.collapsed .nav-icon {
      margin-bottom: 0;
      transition: margin-bottom 0.3s ease;
    }

    .modern-bottom-nav.collapsed .nav-label {
      display: none;
      transition: opacity 0.2s ease;
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ НИЖНЕГО МЕНЮ === */
    body.dark-mode .modern-bottom-nav {
      background: linear-gradient(135deg, rgba(20, 20, 35, 0.98) 0%, rgba(25, 25, 45, 0.99) 100%);
      border-top: 1px solid rgba(130, 130, 160, 0.3);
      box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.4),
        0 -2px 8px rgba(0, 0, 0, 0.3);
    }

    @keyframes slideUpBottomNav {
      from {
        transform: translateY(100%);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    @media (max-width: 767px) {
      .modern-bottom-nav {
        display: block;
      }

      /* Отступ только для основного контента */
      .container-fluid {
        padding-bottom: 0rem;
      }

      /* Исключение для игровых страниц */
      .game-page-container {
        padding-bottom: 6.5rem !important;
      }

      /* Убираем отступ для навбара */
      .navbar {
        padding-bottom: 0 !important;
      }

      .glass-navbar {
        padding-bottom: 0.25rem !important;
      }

      /* Оптимизация для нового навбара */
      .modern-navbar {
        margin-bottom: 0.5rem;
      }

      /* Уменьшаем отступы контейнера на мобильных */
      .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
      }

      /* Отступ для поля ввода в мессенджере */
      .chat-input-container {
        bottom: 5rem !important;
      }

      /* === ПРЕДОТВРАЩЕНИЕ ЗУМА ПРИ ФОКУСЕ НА INPUT === */
      /* Устанавливаем минимальный размер шрифта для предотвращения зума на iOS */
      input[type="text"],
      input[type="email"],
      input[type="password"],
      input[type="tel"],
      input[type="url"],
      input[type="search"],
      input[type="number"],
      textarea,
      select {
        font-size: 16px !important;
        /* Дополнительные правила для предотвращения зума */
        transform: scale(1);
        -webkit-text-size-adjust: 100%;
      }

      /* Специально для полей ввода в формах */
      .form-control,
      .form-select {
        font-size: 16px !important;
      }

      /* Для полей в мессенджере */
      .chat-input,
      .message-input {
        font-size: 16px !important;
      }
    }

    .bottom-nav-container {
      display: flex;
      justify-content: stretch;
      align-items: center;
      width: 100%;
      padding: 0 0.5rem;
    }

    /* Современные элементы навигации */
    .modern-nav-item {
      flex: 1 1 0;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.4rem 0.2rem;
      text-decoration: none;
      color: #64748b;
      font-size: 0.7rem;
      font-weight: 500;
      border-radius: 16px;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      background: transparent;
      border: none;
      outline: none;
      overflow: hidden;
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ НАВИГАЦИОННЫХ ЭЛЕМЕНТОВ === */
    body.dark-mode .modern-nav-item {
      color: #a8a9c7;
    }

    body.dark-mode .modern-nav-item:hover {
      color: #6366f1;
    }

    body.dark-mode .modern-nav-item.active {
      color: #6366f1;
      background: rgba(99, 102, 241, 0.15);
    }

    .modern-nav-item::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
      border-radius: 16px;
      opacity: 0;
      transition: opacity 0.4s ease;
      z-index: 1;
      pointer-events: none !important;
    }

    .modern-nav-item.nav-item-chats {
      cursor: pointer !important;
      pointer-events: auto !important;
      z-index: 10;
    }

    .modern-nav-item.nav-item-chats * {
      pointer-events: none;
    }

    body.dark-mode .modern-nav-item::before {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    }

    .modern-nav-item:hover::before {
      opacity: 1;
    }

    .modern-nav-item:hover {
      color: #2563eb;
      transform: translateY(-2px);
    }

    .modern-nav-item.active {
      color: #2563eb;
      background: rgba(37, 99, 235, 0.1);
      border-radius: 16px;
      padding: 0.4rem 0.3rem;
    }

    .modern-nav-item.active::before {
      opacity: 1;
      background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    }

    /* Иконки навигации */
    .nav-icon {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      margin-bottom: 0.2rem;
      z-index: 2;
      transition: all 0.3s ease;
    }

    .modern-nav-item:hover .nav-icon {
      transform: scale(1.1);
    }

    .modern-nav-item.active .nav-icon {
      transform: scale(1.1);
    }

    .nav-icon i {
      font-size: 1.3rem;
      transition: all 0.3s ease;
    }

    /* Лейблы навигации */
    .nav-label {
      font-size: 0.65rem;
      font-weight: 600;
      line-height: 1.2;
      text-align: center;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      z-index: 2;
      position: relative;
    }

    /* Современные бейджи */
    .modern-nav-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      color: white;
      font-size: 0.6rem;
      font-weight: 700;
      min-width: 1.2rem;
      height: 1.2rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 0.2rem;
      box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
      border: 2px solid white;
      animation: badge-pulse 2s ease-in-out infinite;
    }

    @keyframes badge-pulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.1);
      }
    }

    /* Старые стили для совместимости */
    .bottom-nav-item {
      flex: 1 1 0;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.5rem 0.3rem;
      text-decoration: none;
      color: #64748b;
      font-size: 0.75rem;
      font-weight: 500;
      border-radius: 12px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      background: transparent;
      border: none;
      outline: none;
    }

    .bottom-nav-item i {
      font-size: 1.4rem;
      margin-bottom: 0.2rem;
      transition: all 0.3s ease;
    }

    .bottom-nav-item span {
      font-size: 0.7rem;
      line-height: 1.2;
      text-align: center;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .bottom-nav-item:hover {
      color: #2563eb;
      transform: translateY(-2px);
    }

    .bottom-nav-item:hover i {
      transform: scale(1.1);
    }

    .bottom-nav-item.active {
      color: #2563eb;
      background: rgba(37, 99, 235, 0.1);
      border-radius: 12px;
      padding: 0.5rem 0.5rem;
    }

    .bottom-nav-item.active i {
      transform: scale(1.1);
    }

    /* Стили для кнопки создания заявки */
    @keyframes pulse-create {
      0% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.05);
      }

      100% {
        transform: scale(1);
      }
    }

    .create-request-btn {
      color: #10b981;
      animation: pulse-create 2s ease-in-out infinite;
    }

    .create-request-btn::before {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%) !important;
    }

    .create-request-btn:hover {
      color: #059669;
      transform: translateY(-3px);
    }

    .create-request-btn:hover::before {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%) !important;
    }

    .create-request-btn .nav-icon i {
      color: #10b981;
      font-size: 1.4rem;
    }

    .create-request-btn:hover .nav-icon i {
      color: #059669;
      transform: scale(1.15);
    }

    .create-request-btn.active {
      color: #059669;
    }

    .create-request-btn.active::before {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%) !important;
    }

    .create-request-btn.active .nav-icon i {
      color: #059669;
      transform: scale(1.1);
    }

    /* === ТЕМНАЯ ТЕМА ДЛЯ КНОПКИ СОЗДАНИЯ === */
    body.dark-mode .create-request-btn {
      color: #22c55e;
    }

    body.dark-mode .create-request-btn::before {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 100%) !important;
    }

    body.dark-mode .create-request-btn:hover {
      color: #16a34a;
    }

    body.dark-mode .create-request-btn:hover::before {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.2) 100%) !important;
    }

    body.dark-mode .create-request-btn .nav-icon i {
      color: #22c55e;
    }

    body.dark-mode .create-request-btn:hover .nav-icon i {
      color: #16a34a;
    }

    body.dark-mode .create-request-btn.active {
      color: #16a34a;
    }

    body.dark-mode .create-request-btn.active::before {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.25) 100%) !important;
    }

    body.dark-mode .create-request-btn.active .nav-icon i {
      color: #16a34a;
    }

    .bottom-nav-badge {
      position: absolute;
      top: -2px;
      right: -2px;
      background: #ef4444;
      color: white;
      font-size: 0.6rem;
      font-weight: 600;
      min-width: 1.2rem;
      height: 1.2rem;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 0.2rem;
      box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }

    /* Адаптация для разных количеств элементов */
    .bottom-nav-container:has(.bottom-nav-item:nth-child(4)) {
      justify-content: space-around;
    }

    .bottom-nav-container:has(.bottom-nav-item:nth-child(5)) {
      justify-content: space-around;
    }

    .bottom-nav-container:has(.bottom-nav-item:nth-child(6)) {
      justify-content: space-around;
    }

    .bottom-nav-container:has(.bottom-nav-item:nth-child(7)) {
      justify-content: space-around;
    }

    /* Анимация появления */
    @keyframes slideUpBottomNav {
      from {
        transform: translateY(100%);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .mobile-bottom-nav {
      animation: slideUpBottomNav 0.3s ease-out;
    }

    /* === СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА НОВОСТЕЙ В ТЕМНОЙ ТЕМЕ === */
    body.dark-mode .modal-content {
      background: rgba(20, 20, 35, 0.95) !important;
      border: 1px solid rgba(130, 130, 160, 0.2) !important;
      color: #e6e7ff !important;
    }

    body.dark-mode .modal-header {
      border-bottom: 1px solid rgba(130, 130, 160, 0.2) !important;
      background: rgba(25, 25, 45, 0.8) !important;
    }

    body.dark-mode .modal-title {
      color: #e6e7ff !important;
    }

    body.dark-mode .modal-body {
      color: #e6e7ff !important;
    }

    body.dark-mode .modal-footer {
      border-top: 1px solid rgba(130, 130, 160, 0.2) !important;
      background: rgba(25, 25, 45, 0.8) !important;
    }

    body.dark-mode .btn-close {
      filter: invert(1) !important;
    }

    body.dark-mode .text-muted {
      color: rgba(230, 231, 255, 0.7) !important;
    }

    /* === СТИЛИ ДЛЯ ПЕРЕКЛЮЧАТЕЛЕЙ ТИПА ПРОПУСКА (ТРАНСПОРТ / ПЕШИЙ) === */
    .btn-group .btn-check:checked + .btn,
    .btn-group .btn-check:checked + label.btn {
      background: #2563eb !important;
      color: #ffffff !important;
      border-color: #2563eb !important;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
      font-weight: 700 !important;
    }

    .btn-group .btn-check:not(:checked) + .btn,
    .btn-group .btn-check:not(:checked) + label.btn {
      background: rgba(255, 255, 255, 0.1) !important;
      color: #4b5563 !important;
      border-color: rgba(0, 0, 0, 0.15) !important;
      font-weight: 500 !important;
    }

    html.dark-mode .btn-group .btn-check:checked + .btn,
    html.dark-mode .btn-group .btn-check:checked + label.btn,
    body.dark-mode .btn-group .btn-check:checked + .btn,
    body.dark-mode .btn-group .btn-check:checked + label.btn {
      background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
      color: #ffffff !important;
      border-color: #3b82f6 !important;
      box-shadow: 0 0 16px rgba(59, 130, 246, 0.6) !important;
      font-weight: 700 !important;
    }

    html.dark-mode .btn-group .btn-check:not(:checked) + .btn,
    html.dark-mode .btn-group .btn-check:not(:checked) + label.btn,
    body.dark-mode .btn-group .btn-check:not(:checked) + .btn,
    body.dark-mode .btn-group .btn-check:not(:checked) + label.btn {
      background: rgba(30, 30, 50, 0.8) !important;
      color: #94a3b8 !important;
      border-color: rgba(99, 102, 241, 0.25) !important;
      font-weight: 500 !important;
    }

    /* Стили для контента новости в темной теме */
    body.dark-mode .news-content-text {
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text p {
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text h1,
    body.dark-mode .news-content-text h2,
    body.dark-mode .news-content-text h3,
    body.dark-mode .news-content-text h4,
    body.dark-mode .news-content-text h5,
    body.dark-mode .news-content-text h6 {
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text a {
      color: #6366f1 !important;
    }

    body.dark-mode .news-content-text a:hover {
      color: #818cf8 !important;
    }

    body.dark-mode .news-content-text strong,
    body.dark-mode .news-content-text b {
      color: #818cf8 !important;
    }

    body.dark-mode .news-content-text ul,
    body.dark-mode .news-content-text ol {
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text li {
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text blockquote {
      border-left: 4px solid #6366f1 !important;
      background: rgba(99, 102, 241, 0.1) !important;
      color: #e6e7ff !important;
    }

    body.dark-mode .news-content-text code {
      background: rgba(45, 45, 65, 0.8) !important;
      color: #f1f5f9 !important;
      border: 1px solid rgba(130, 130, 160, 0.3) !important;
    }

    body.dark-mode .news-content-text pre {
      background: rgba(45, 45, 65, 0.8) !important;
      color: #f1f5f9 !important;
      border: 1px solid rgba(130, 130, 160, 0.3) !important;
    }

    /* Стили для сетки фото новостей */
    body.dark-mode .news-photos-grid {
      background: transparent !important;
    }

    body.dark-mode .news-photos-grid img {
      border: 2px solid rgba(130, 130, 160, 0.3) !important;
      background: rgba(45, 45, 65, 0.5) !important;
    }

    body.dark-mode .news-photos-grid img:hover {
      border-color: #6366f1 !important;
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    }

    /* Стили для кнопок модального окна новостей в темной теме */
    body.dark-mode #newsModalReadBtn {
      background: rgba(99, 102, 241, 0.8) !important;
      border: 1px solid rgba(99, 102, 241, 0.3) !important;
      color: #e6e7ff !important;
    }

    body.dark-mode #newsModalReadBtn:hover {
      background: rgba(99, 102, 241, 1) !important;
      border-color: #6366f1 !important;
      color: white !important;
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    }

    body.dark-mode #newsModalReadAllBtn {
      background: rgba(71, 85, 105, 0.6) !important;
      border: 1px solid rgba(100, 116, 139, 0.3) !important;
      color: #e6e7ff !important;
    }

    body.dark-mode #newsModalReadAllBtn:hover {
      background: rgba(100, 116, 139, 0.8) !important;
      border-color: #64748b !important;
      color: white !important;
      box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3) !important;
    }

    /* Стили для lightbox фото в темной теме */
    body.dark-mode #newsPhotoLightbox .modal-content {
      background: transparent !important;
    }

    body.dark-mode #newsLightboxImg {
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
      background: rgba(45, 45, 65, 0.9) !important;
    }


    /* Темная тема для индикатора мессенджера */
    body.dark-mode .bi-chat-square-dots.has-notifications {
      color: #f87171 !important;
      animation: messenger-notification-glow-dark 2s ease-in-out infinite;
    }

    @keyframes messenger-notification-glow-dark {

      0%,
      100% {
        color: #f87171;
        text-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
      }

      50% {
        color: #ef4444;
        text-shadow: 0 0 15px rgba(239, 68, 68, 0.7);
      }
    }

    /* Темная тема для мобильного индикатора мессенджера */
    body.dark-mode .modern-nav-item[href*="messenger"] .modern-nav-badge {
      background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
      color: white !important;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
    }
