/* ------------------------------
   HEADER
--------------------------------*/

.header {
  position: relative; /* важно */
  z-index: 100;       /* важно */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--accent, #0078d7);
  color: #fff;
}

.header .logo {
  font-weight: 800;
  font-size: 18px;
}

/* ------------------------------
   NAVIGATION
--------------------------------*/
.header .nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 15px;
}

.header .nav a {
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0.95;
  transition: background-color .12s, opacity .12s;
}

.header .nav a:hover,
.header .nav a.active {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}

/* ------------------------------
   EXPORT DROPDOWN
--------------------------------*/
.export-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Кнопка Экспорт */
.export-button {
  background: #ffffff;
  color: #1f2937;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}

.export-button:hover {
  background: #f9fafb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* Меню */
.export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px); /* ← правильная позиция */
  width: 190px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 6px 0;
  margin-top: 0;

  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;

  z-index: 999;
}

/* Показываем меню при наведении */
.export-dropdown:hover .export-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Пункты меню */
.export-menu-item {
  display: block;
  padding: 10px 14px;
  color: #000000ec !important;
  text-decoration: none;
  font-size: 14px;
  transition: background .12s ease;
}

.export-menu-item:hover {
  background: #0078d7 !important;
}




/* ------------------------------
   АДАПТИВ — телефон
--------------------------------*/
@media (max-width: 768px) {

  .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    flex-wrap: nowrap;
    min-height: unset;
  }

  .header .logo,
  .header .nav,
  .header .nav a,
  .nav-dropdown,
  .nav-dropdown-btn {
    vertical-align: middle;
    line-height: 1;
  }

  .header .logo,
  .header .nav a,
  .nav-dropdown-btn {
    font-size: 12px !important;
    white-space: nowrap;
  }

  .header .nav {
    gap: 2px;
    flex-wrap: nowrap;
  }

  .header .nav a,
  .nav-dropdown-btn {
    padding: 5px 6px;
  }
}




/* ------------------------------
   NAV DROPDOWN
--------------------------------*/
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-btn {
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.95;
  transition: background-color .12s;
  user-select: none;
}

.nav-dropdown-btn.active {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  padding: 6px 0;
  z-index: 999;
}

.nav-dropdown-menu.open {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #333 !important;
  text-decoration: none;
  font-size: 14px;
  transition: background .12s;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.nav-dropdown-item:hover {
  background: #f0f6ff;
  color: #0078d7 !important;
}

.nav-dropdown-logout {
  color: #c00 !important;
}

.nav-dropdown-logout:hover {
  background: #fff0f0;
  color: #c00 !important;
}

/* ------------------------------
   OLD LOGOUT BTN
--------------------------------*/
.nav-logout-btn {
  background: none; !important;
  border: none; !important;
  color: #fff; !important;
  font-size: 15px;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.9;
  transition: background-color .12s, opacity .12s;
}

.nav-logout-btn:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}
