.bottom-nav {
  --bn-accent: #1fc8db;
  --bn-bg: rgba(20, 27, 35, 0.92);
  --bn-border: rgba(255, 255, 255, 0.1);
  --bn-active-bg: rgba(31, 200, 219, 0.14);
  --bn-icon: #a9b6c4;
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  padding: 8px;
  gap: 4px;
  border-radius: 999px;
  background: var(--bn-bg);
  border: 1px solid var(--bn-border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease;
  will-change: transform;
}

.bottom-nav.is-hidden {
  transform: translateY(calc(100% + 12px + env(safe-area-inset-bottom, 0px)));
}

.bottom-nav[data-role="staff"] {
  --bn-accent: #ff8a1f;
  --bn-active-bg: rgba(255, 138, 31, 0.15);
}

.bottom-nav__item {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 999px;
  color: var(--bn-icon);
  text-decoration: none;
  font-size: 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item:active {
  background: var(--bn-active-bg);
}

.bottom-nav__item.is-active {
  background: var(--bn-active-bg);
  color: var(--bn-accent);
}

.bottom-nav__item--logout { color: #f2555a; }

.bottom-nav__item--switch { color: var(--bn-accent); }

.bottom-nav__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 200, 219, 0.35);
}

.bottom-nav__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 26px);
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e0353f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-sizing: border-box;
}

.bottom-nav__badge[hidden] {
  display: none;
}

.bottom-nav__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bn-icon);
  box-sizing: border-box;
}

.bottom-nav__item.is-active .bottom-nav__avatar {
  border-color: var(--bn-accent);
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  body.has-bottom-nav {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 380px) {
  .bottom-nav {
    left: 8px;
    right: 8px;
    padding: 6px;
    gap: 2px;
  }

  .bottom-nav__item {
    height: 46px;
    font-size: 18px;
  }

  .bottom-nav__avatar {
    width: 30px;
    height: 30px;
  }
}

@media print {
  .bottom-nav {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav {
    transition: none;
  }
}