/**
 * av-header.css — Avalist Theme header styles
 *
 * Адаптовано з avalist-header.js Web Component CSS (рядки 50-276).
 * :host -> .av-header / .av-hdr-bar, всі класи перейменовані з av-hdr-* префіксом.
 *
 * @package Avalist_Theme
 */

/* ── RESET ── */
.av-header *,
.av-header *::before,
.av-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── HEADER ── */
.av-header {
  display: block;
  font-family: 'Exo 2', sans-serif;
  position: sticky;
  top: 0;
  z-index: 9000;
}

/* ── BAR ── */
.av-hdr-bar {
  background: rgba(10, 22, 5, .98);
  border-bottom: 1px solid rgba(115, 174, 32, .14);
  display: flex;
  align-items: center;
  padding: 0 max(24px, calc((100% - 1400px) / 2));
  height: 44px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  gap: 0;
}

/* ── LOGO ── */
.av-hdr-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 4px;
}
.av-hdr-logo img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  border-radius: 50%;
  background: #1a2e10;
  border: 1px solid rgba(115, 174, 32, .28);
  padding: 2px;
  animation: av-logo-pulse 5s ease-in-out infinite;
}
@keyframes av-logo-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(115, 174, 32, .18); }
  50%       { box-shadow: 0 0 10px rgba(115, 174, 32, .42); }
}

/* ── NAV ── */
.av-hdr-nav {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.av-hdr-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

/* ── NAV ITEM ── */
.av-ni {
  position: relative;
  flex-shrink: 0;
}
.av-nb {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 9px;
  height: 44px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .42);
  text-decoration: none;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.av-nb:hover {
  color: rgba(255, 255, 255, .84);
}
.av-nb.av-active {
  color: #fff;
  border-bottom-color: #73AE20;
}
.av-ni.open > .av-nb {
  color: rgba(255, 255, 255, .84);
  border-bottom-color: rgba(115, 174, 32, .4);
}

/* ── CARET ── */
.av-caret {
  width: 10px;
  height: 10px;
  opacity: .38;
  transition: transform .2s ease, opacity .15s;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.av-ni.open > .av-nb .av-caret,
.av-ni.av-has-dd:hover > .av-nb .av-caret {
  transform: rotate(180deg);
  opacity: .7;
}

/* ── DROPDOWN ── */
.av-dd {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #162d0b;
  border: 1px solid rgba(115, 174, 32, .22);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
  z-index: 10000;
  min-width: 240px;
  padding: 8px;
  list-style: none;
  margin: 0;
  animation: avDdIn .14s ease;
}
/* Невидимий міст між кнопкою і dropdown — щоб hover не обривався */
.av-ni.av-has-dd > .av-dd::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
/* Hover/focus на desktop — головний механізм відкриття */
@media (hover: hover) and (pointer: fine) {
  .av-ni.av-has-dd:hover > .av-dd,
  .av-ni.av-has-dd:focus-within > .av-dd {
    display: block;
  }
  .av-ni.av-has-dd:hover > .av-nb,
  .av-ni.av-has-dd:focus-within > .av-nb {
    color: rgba(255, 255, 255, .88);
    border-bottom-color: rgba(115, 174, 32, .45);
  }
  .av-ni.av-has-dd:hover > .av-nb .av-caret,
  .av-ni.av-has-dd:focus-within > .av-nb .av-caret {
    transform: rotate(180deg);
    opacity: .85;
  }
}
/* Touch / mobile fallback — .open клас додає JS */
.av-ni.open > .av-dd {
  display: block;
}
@keyframes avDdIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

/* ── DROPDOWN LINKS ── */
.av-dd-link {
  display: block;
  padding: 10px 13px;
  border-radius: 5px;
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-family: 'Exo 2', sans-serif;
  text-decoration: none;
  transition: background .15s, color .15s, transform .15s, border-color .15s;
  white-space: nowrap;
  border-left: 2px solid transparent;
  position: relative;
}
.av-dd-link:hover {
  background: rgba(115, 174, 32, .14);
  color: #9fd43a;
  border-left-color: rgba(115, 174, 32, .7);
  transform: translateX(2px);
}

/* ── SEARCH ICON BUTTON + POPUP ── */
.av-hdr-search-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .42);
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
}
.av-hdr-search-btn:hover,
.av-hdr-search-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(115, 174, 32, .3);
  color: rgba(255, 255, 255, .85);
}
.av-hdr-search-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Search popup dropdown */
.av-hdr-search-wrap {
  position: relative;
  flex-shrink: 0;
}
.av-hdr-search-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #162d0b;
  border: 1px solid rgba(115, 174, 32, .25);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
  z-index: 10001;
  padding: 10px;
  animation: avDdIn .14s ease;
}
.av-hdr-search-popup[hidden] { display: none; }
.av-hdr-search-popup-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.av-hdr-search-popup-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-family: 'Exo 2', sans-serif;
  outline: none;
  transition: border-color .18s, background .18s;
}
.av-hdr-search-popup-input:focus {
  border-color: rgba(115, 174, 32, .5);
  background: rgba(255, 255, 255, .1);
}
.av-hdr-search-popup-input::placeholder {
  color: rgba(255, 255, 255, .28);
}
.av-hdr-search-popup-submit {
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(115, 174, 32, .18);
  border: 1px solid rgba(115, 174, 32, .35);
  color: #9fd43a;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.av-hdr-search-popup-submit:hover {
  background: rgba(115, 174, 32, .28);
  border-color: rgba(115, 174, 32, .55);
}
.av-hdr-search-popup-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, .28);
  margin: 6px 4px 0;
}

@media (max-width: 960px) {
  .av-hdr-search-btn { display: none; }
  .av-hdr-search-popup { display: none !important; }
}

/* ── RIGHT SIDE ── */
.av-hdr-r {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 4px;
}
.av-hdr-uname {
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
  white-space: nowrap;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color .15s ease, color .15s ease;
}
.av-hdr-uname:hover,
.av-hdr-uname:focus-visible {
  background: rgba(115, 174, 32, 0.12);
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  outline: none;
}
.av-hdr-uname:hover strong { color: #fff; }
.av-hdr-uname strong {
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  transition: color .15s ease;
}

/* ── BELL ── */
.av-hdr-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.av-hdr-bell {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: rgba(255, 255, 255, .55);
  transition: background .15s, border-color .15s, color .15s;
}
.av-hdr-bell:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(115, 174, 32, .28);
  color: rgba(255, 255, 255, .9);
}
.av-hdr-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #73AE20;
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid rgba(10, 22, 5, .98);
  line-height: 1;
}

/* ── NOTIFICATION PANEL ── */
.av-nb-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: #162d0b;
  border: 1px solid rgba(115, 174, 32, .22);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: avDdIn .14s ease;
}
.av-nb-panel[hidden] { display: none; }

/* ── TABS ── */
.av-nb-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(115, 174, 32, .15);
  flex-shrink: 0;
  padding: 0 4px 0 8px;
}
.av-nb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, .42);
  font-family: 'Exo 2', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 13px 11px;
  cursor: pointer;
  transition: color .12s, border-color .12s;
  margin-bottom: -1px;
}
.av-nb-tab:hover { color: rgba(255, 255, 255, .82); }
.av-nb-tab.is-active {
  color: #fff;
  border-bottom-color: #73AE20;
}
.av-nb-tabs .av-nb-panel-close {
  margin-left: auto;
}

/* ── PANES ── */
.av-nb-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.av-nb-pane[hidden] { display: none; }

.av-nb-panel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color .15s, background .15s, transform .15s;
}
.av-nb-panel-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  transform: scale(1.1);
}

.av-nb-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 174, 32, .3) transparent;
}

.av-nb-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 2px 6px;
  border-radius: 6px;
  transition: background .12s;
}
.av-nb-item-row:hover {
  background: rgba(115, 174, 32, .08);
}
.av-nb-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 7px 10px 11px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  text-decoration: none;
}
.av-nb-item-ico {
  width: 33px;
  height: 33px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.av-nb-item-ico.cat-docs    { background: rgba(59, 130, 246, .2); }
.av-nb-item-ico.cat-events  { background: rgba(115, 174, 32, .2); }
.av-nb-item-ico.cat-support { background: rgba(236, 72, 153, .2); }
.av-nb-item-ico.cat-system  { background: rgba(156, 163, 175, .18); }

.av-nb-item-body {
  flex: 1;
  min-width: 0;
}
.av-nb-item-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.4;
}
.av-nb-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.av-nb-item-time {
  font-size: 11px;
  color: rgba(255, 255, 255, .35);
}
.av-nb-cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid;
  line-height: 1.5;
}
.av-nb-cat-tag.cat-docs    { background: rgba(115,174,32,.12); color: #8fc832; border-color: rgba(115,174,32,.28); }
.av-nb-cat-tag.cat-events  { background: rgba(59,130,246,.12); color: #7db4f5; border-color: rgba(59,130,246,.28); }
.av-nb-cat-tag.cat-support { background: rgba(168,85,247,.12); color: #c084fc; border-color: rgba(168,85,247,.28); }
.av-nb-cat-tag.cat-system  { background: rgba(156,163,175,.10); color: rgba(255,255,255,.45); border-color: rgba(156,163,175,.2); }
.av-nb-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .2);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 7px;
  transition: color .15s, background .15s;
}
.av-nb-dismiss:hover {
  color: rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .06);
}

.av-nb-empty {
  text-align: center;
  color: rgba(255, 255, 255, .32);
  font-size: 13px;
  padding: 28px 14px;
  margin: 0;
}

.av-nb-panel-ftr {
  border-top: 1px solid rgba(115, 174, 32, .12);
  padding: 8px 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Toast feedback (збереження підписок) */
.av-nb-toast {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translate(-50%, 10px);
  background: rgba(20, 32, 14, .96);
  color: #d6f5a0;
  border: 1px solid rgba(115, 174, 32, .4);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 50;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.av-nb-toast[data-kind="error"] {
  background: rgba(45, 12, 12, .96);
  color: #ffb4b4;
  border-color: rgba(229, 72, 77, .5);
}
.av-nb-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.av-nb-clear-all,
.av-nb-go-subs {
  background: none;
  border: none;
  color: rgba(115, 174, 32, .7);
  font-size: 11px;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  padding: 2px 0;
  transition: color .15s, text-shadow .15s;
}
.av-nb-clear-all:hover,
.av-nb-go-subs:hover {
  color: #9fd43a;
  text-shadow: 0 0 10px rgba(115, 174, 32, .4);
}

/* ── SUBSCRIPTIONS TAB ── */
.av-nb-subs {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 174, 32, .3) transparent;
}
.av-nb-sub-cat {
  padding: 10px 14px 6px;
}
.av-nb-sub-cat-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(115, 174, 32, .65);
  margin-bottom: 6px;
}
/* Заголовок колонок перемикачів (🔔 / ✉) */
.av-nb-sub-header {
  display: flex;
  align-items: center;
  padding: 4px 18px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  margin-bottom: 4px;
}
.av-nb-sub-header-spacer { flex: 1; }
.av-nb-sub-header-col {
  width: 32px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .4);
}
.av-nb-sub-header-col + .av-nb-sub-header-col { margin-left: 8px; }

.av-nb-sub-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 4px;
  border-radius: 6px;
}
.av-nb-sub-row:hover { background: rgba(115, 174, 32, .06); }
.av-nb-sub-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.av-nb-sub-row-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
}
.av-nb-sub-row-desc {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  line-height: 1.45;
  margin: 0;
}

/* Email toggle — трохи відрізняється кольором slider */
.av-toggle--email input:checked + .av-toggle-slider {
  background: rgba(59, 130, 246, .6);
  border-color: rgba(59, 130, 246, .35);
}

/* Compact toggle для панелі підписок */
.av-toggle--sm {
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── TOGGLE SWITCH ── */
.av-toggle {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.av-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.av-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
}
.av-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
  transition: transform .15s;
}
.av-toggle input:checked + .av-toggle-slider {
  background: rgba(115, 174, 32, .65);
  border-color: rgba(115, 174, 32, .3);
}
.av-toggle input:checked + .av-toggle-slider::before {
  transform: translateX(14px);
  background: #fff;
}
.av-toggle input:focus-visible + .av-toggle-slider {
  box-shadow: 0 0 0 2px rgba(115, 174, 32, .45);
}

/* ── NAV SECTION DIVIDERS (Walker av-dd-hdr class) ── */
.av-dd-section-hdr {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(115, 174, 32, .6);
  text-transform: uppercase;
  list-style: none;
  pointer-events: none;
  user-select: none;
}
.av-dd-section-hdr:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid rgba(115, 174, 32, .1);
  padding-top: 12px;
}

/* ── USER DROPDOWN ── */
/* Separator between bell/search group and user */
.av-hdr-bell-wrap + .av-hdr-user,
.av-hdr-search-wrap + .av-hdr-user {
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, .07);
}

.av-hdr-user {
  position: relative;
  flex-shrink: 0;
}
.av-hdr-user-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
  padding: 3px 7px;
  border-radius: 5px;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.av-hdr-user-btn:hover,
.av-hdr-user-btn[aria-expanded="true"],
.av-hdr-user:hover .av-hdr-user-btn {
  background: rgba(115, 174, 32, .12);
  color: rgba(255, 255, 255, .8);
}
.av-hdr-user-btn:hover strong,
.av-hdr-user-btn[aria-expanded="true"] strong,
.av-hdr-user:hover strong { color: #fff; }
.av-hdr-user-btn strong {
  color: rgba(255, 255, 255, .72);
  font-weight: 600;
  transition: color .15s ease;
}
.av-hdr-user-btn .av-caret { width: 10px; height: 10px; }

/* User dropdown menu */
.av-hdr-user-dd {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #162d0b;
  border: 1px solid rgba(115, 174, 32, .22);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .55);
  z-index: 10000;
  min-width: 231px;
  padding: 6px;
  list-style: none;
  margin: 0;
  animation: avDdIn .14s ease;
  display: none;
}
/* Невидимий міст */
.av-hdr-user-dd::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0; right: 0;
  height: 8px;
}
@media (hover: hover) and (pointer: fine) {
  .av-hdr-user:hover .av-hdr-user-dd,
  .av-hdr-user:focus-within .av-hdr-user-dd {
    display: block;
  }
}
.av-hdr-user.open .av-hdr-user-dd { display: block; }

.av-hdr-user-dd-name {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(115, 174, 32, .6);
  border-bottom: 1px solid rgba(115, 174, 32, .1);
  margin-bottom: 4px;
}
.av-hdr-user-dd-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-family: 'Exo 2', sans-serif;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  border-left: 2px solid transparent;
  white-space: nowrap;
}
.av-hdr-user-dd-link:hover {
  background: rgba(115, 174, 32, .14);
  color: #9fd43a;
  border-left-color: rgba(115, 174, 32, .7);
}
.av-hdr-user-dd-link--logout {
  color: rgba(255, 120, 100, .7);
  border-top: 1px solid rgba(255, 255, 255, .07);
  margin-top: 4px;
  padding-top: 10px;
}
.av-hdr-user-dd-link--logout:hover {
  background: rgba(220, 60, 40, .1);
  color: #ff8a7a;
  border-left-color: rgba(220, 60, 40, .5);
}
.av-hdr-user-dd-link .av-ud-ico {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ── LOGIN / LOGOUT BUTTON ── */
.av-hdr-lbtn {
  padding: 5px 13px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  border: 1px solid rgba(115, 174, 32, .4);
  background: rgba(115, 174, 32, .12);
  color: #73AE20;
  font-family: 'Exo 2', sans-serif;
  transition: background .18s, border-color .18s, box-shadow .18s, color .18s, transform .18s;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.av-hdr-lbtn::after {
  content: '';
  position: absolute;
  top: -10%; left: 0;
  width: 40%; height: 120%;
  background: linear-gradient(90deg, transparent, rgba(115, 174, 32, .22), transparent);
  pointer-events: none;
  transform: translateX(-180%) skewX(-20deg);
}
.av-hdr-lbtn:hover {
  background: rgba(115, 174, 32, .2);
  border-color: rgba(115, 174, 32, .72);
  box-shadow: 0 0 14px rgba(115, 174, 32, .28);
  color: #9fd43a;
  transform: translateY(-1px);
}
.av-hdr-lbtn:hover::after {
  animation: av-btn-shimmer 0.5s ease forwards;
}

/* ── GLOBAL LOGIN MODAL ── */
.av-login-modal-open {
  overflow: hidden;
}

.av-mo {
  position: fixed;
  inset: 0;
  z-index: var(--av-z-modal, 1000);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.av-mo > .av-mb {
  margin: auto;
}

.av-mo[hidden] {
  display: none;
}

.av-mb {
  position: relative;
  width: min(420px, 100%);
  padding: 44px 48px;
  border: 1px solid var(--av-border-green, rgba(115, 174, 32, .28));
  border-radius: var(--av-radius-xl, 20px);
  background: var(--av-card, #112208);
  box-shadow: var(--av-shadow-lg, 0 24px 70px rgba(0, 0, 0, .55)), 0 0 42px rgba(115, 174, 32, .12);
  color: #fff;
  text-align: center;
  animation: avLoginIn .28s var(--av-ease, ease-out) both;
}

/* ── Login modal — стилі дзеркало `page-access-denied.php` (.ad-card) ── */
.av-mb .ad-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--av-space-lg, 18px);
}
.av-mb .ad-logo-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  padding: 5px;
  border: 1px solid var(--av-border-green, rgba(115, 174, 32, .35));
  display: block;
  margin: 0;
}
.av-mb .ad-lock {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--av-card, #0e1d09);
  border: 2px solid var(--av-border-green, rgba(115, 174, 32, .5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.av-mb .ad-shield {
  display: block;
  margin: 0 auto var(--av-space-lg, 18px);
  animation: av-pulse 3.5s ease-in-out infinite;
}
@keyframes av-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.04); opacity: 1; }
}
.av-mb .ad-eyebrow {
  font-size: var(--av-size-caption, 12px);
  font-weight: var(--av-fw-bold, 700);
  letter-spacing: var(--av-ls-eyebrow, .12em);
  text-transform: uppercase;
  color: rgba(115, 174, 32, .7);
  margin-bottom: 10px;
}
.av-mb .ad-title {
  font-size: 26px;
  font-weight: var(--av-fw-bold, 800);
  color: var(--av-text, #fff);
  margin: 0 0 var(--av-space-sm, 10px);
  letter-spacing: var(--av-ls-caption, .04em);
  text-transform: uppercase;
  line-height: 1.18;
}
.av-mb .ad-subtitle {
  font-size: var(--av-size-h4, 14px);
  color: var(--av-text-body, rgba(255, 255, 255, .72));
  line-height: var(--av-lh-loose, 1.6);
  margin: 0 0 10px;
}
.av-mb .ad-domain {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(115, 174, 32, .12);
  border: 1px solid rgba(115, 174, 32, .35);
  border-radius: var(--av-radius-xs, 6px);
  font-size: var(--av-size-h4, 14px);
  font-weight: var(--av-fw-semibold, 600);
  color: var(--av-green, #9fd43a);
  margin: 6px 0 var(--av-space-lg, 18px);
  letter-spacing: 0.04em;
}
.av-mb .ad-info {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--av-border, rgba(255, 255, 255, .1));
  border-radius: var(--av-radius-md, 12px);
  padding: var(--av-space-base, 14px) 18px;
  text-align: left;
  margin-bottom: 22px;
  width: 100%;
  box-sizing: border-box;
}
.av-mb .ad-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--av-size-h4, 14px);
  color: var(--av-text-body, rgba(255, 255, 255, .75));
  line-height: 1.55;
  margin-bottom: 9px;
}
.av-mb .ad-info-row:last-child { margin-bottom: 0; }
.av-mb .ad-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--av-green, #73AE20);
  flex-shrink: 0;
  margin-top: 7px;
}
.av-mb .ad-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  border-radius: var(--av-radius-base, 10px);
  font-size: var(--av-size-body, 15px);
  font-weight: var(--av-fw-semibold, 600);
  background: var(--av-green, #73AE20);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .18s, transform .14s;
  margin-bottom: 10px;
  box-shadow: var(--av-glow-green, 0 6px 22px rgba(115, 174, 32, .25));
  text-decoration: none;
  box-sizing: border-box;
}
.av-mb .ad-btn-primary:hover {
  background: var(--av-green-hover, #5e9a14);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.av-mb .ad-btn-ghost {
  display: block;
  width: 100%;
  padding: 11px 24px;
  border-radius: var(--av-radius-base, 10px);
  font-size: var(--av-size-h4, 14px);
  font-weight: var(--av-fw-medium, 500);
  background: rgba(255, 255, 255, .05);
  color: var(--av-text-muted, rgba(255, 255, 255, .55));
  border: 1px solid var(--av-border, rgba(255, 255, 255, .12));
  cursor: pointer;
  transition: background .18s;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  font-family: inherit;
}
.av-mb .ad-btn-ghost:hover {
  background: rgba(255, 255, 255, .09);
  color: var(--av-text-body, rgba(255, 255, 255, .85));
  text-decoration: none;
}
.av-mb .ad-divider {
  width: 100%;
  height: 1px;
  background: var(--av-border, rgba(255, 255, 255, .1));
  margin: 20px 0;
}
.av-mb .ad-contact {
  font-size: var(--av-size-small, 12px);
  color: var(--av-text-muted, rgba(255, 255, 255, .55));
  line-height: 1.7;
}
.av-mb .ad-contact a {
  color: var(--av-green, #9fd43a);
  text-decoration: none;
}
.av-mb .ad-contact a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .av-mb { padding: 32px 22px; }
  .av-mb .ad-title { font-size: 22px; }
}

@keyframes avLoginIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.av-mb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.av-mb-close:hover,
.av-mb-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  outline: none;
}

/* Legacy .av-mb-* / .av-gb стилі видалено 2026-05-26: модалка тепер
   використовує .ad-* класи (дзеркало page-access-denied.php). Див. блок
   `.av-mb .ad-*` вище. */

/* ── MOBILE BURGER ── */
.av-hdr-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0;
}
.av-hdr-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, .7);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.av-hdr-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.av-hdr-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.av-hdr-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .av-nb-panel {
    position: fixed;
    top: 57px;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0 0 10px 10px;
    max-height: 60vh;
  }

  .av-hdr-burger {
    display: flex;
  }

  .av-hdr-nav {
    display: none;
    position: absolute;
    top: 57px;
    left: 0;
    right: 0;
    background: rgba(14, 29, 7, .99);
    border-bottom: 1px solid rgba(115, 174, 32, .22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    z-index: 8999;
    padding: 8px 0;
  }
  .av-hdr-nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .av-hdr-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .av-ni {
    flex-shrink: unset;
  }

  .av-nb {
    height: auto;
    padding: 13px 22px;
    border-bottom: none;
    border-left: 2px solid transparent;
    font-size: 14px;
    justify-content: space-between;
  }
  .av-nb.av-active {
    border-bottom: none;
    border-left-color: #73AE20;
  }
  .av-ni.open > .av-nb {
    border-bottom: none;
    border-left-color: rgba(115, 174, 32, .45);
  }

  .av-dd {
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, .2);
    padding: 4px 0 4px 20px;
    min-width: unset;
    animation: none;
  }

  .av-hdr-search {
    display: none;
  }

  .av-hdr-uname {
    display: none;
  }

  .av-hdr-user {
    display: none;
  }

  .av-hdr-r {
    margin-left: auto;
  }

  .av-hdr-bell {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .av-hdr-burger {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  /* Mobile user section у burger-меню */
  .av-hdr-nav-user {
    display: block;
    border-top: 1px solid rgba(115, 174, 32, .15);
    margin-top: 4px;
    padding: 6px 0;
  }
}

/* Desktop: приховуємо мобільний блок профілю у nav */
.av-hdr-nav-user { display: none; }

@media (max-width: 640px) {
  .av-hdr-bar {
    padding: 0 12px;
  }
}
