.bottom-nav,
.nav-sheet {
  --bn-accent: #1fc8db;
  --bn-accent-soft: rgba(31, 200, 219, 0.14);
  --bn-bg: rgba(18, 24, 32, 0.94);
  --bn-panel: #121820;
  --bn-tile: rgba(255, 255, 255, 0.04);
  --bn-border: rgba(255, 255, 255, 0.09);
  --bn-text: #e8eef4;
  --bn-muted: #93a1b0;
  --bn-danger: #f2555a;
}

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

.bottom-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  padding: 6px;
  gap: 4px;
  border: 1px solid var(--bn-border);
  border-radius: 22px;
  background: var(--bn-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease;
  will-change: transform;
}

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

.bottom-nav__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 56px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--bn-muted);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 28px;
  border-radius: 999px;
  font-size: 18px;
  transition: background-color 0.2s ease;
}

.bottom-nav__label {
  max-width: 100%;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bottom-nav__item:active .bottom-nav__icon {
  background: var(--bn-accent-soft);
}

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

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

.bottom-nav__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bn-accent);
}

.bottom-nav__badge {
  position: absolute;
  top: -5px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid var(--bn-panel);
  border-radius: 999px;
  background: #e0353f;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: content-box;
}

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

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.nav-sheet[hidden] {
  display: none;
}

.nav-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 10, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  overflow-y: auto;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--bn-border);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bn-panel);
  color: var(--bn-text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.nav-sheet.is-open .nav-sheet__overlay {
  opacity: 1;
}

.nav-sheet.is-open .nav-sheet__panel {
  transform: translateY(0);
}

.nav-sheet__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 2px 12px;
}

.nav-sheet__grip {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.nav-sheet__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--bn-text);
  font-size: 1.05rem;
  font-weight: 700;
}

.nav-sheet__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bn-accent);
}

.nav-sheet__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--bn-border);
  border-radius: 50%;
  background: var(--bn-tile);
  color: var(--bn-muted);
  font-size: 16px;
  cursor: pointer;
}

.nav-sheet__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nav-sheet__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 6px;
  border: 1px solid var(--bn-border);
  border-radius: 16px;
  background: var(--bn-tile);
  color: var(--bn-text);
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-sheet__tile:active {
  background: var(--bn-accent-soft);
}

.nav-sheet__tile.is-active {
  border-color: var(--bn-accent);
  background: var(--bn-accent-soft);
}

.nav-sheet__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bn-accent-soft);
  color: var(--bn-accent);
  font-size: 17px;
}

.nav-sheet__label {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}

.nav-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bn-border);
}

.nav-sheet__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--bn-border);
  border-radius: 14px;
  background: var(--bn-tile);
  color: var(--bn-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.nav-sheet__row i {
  width: 18px;
  text-align: center;
}

.nav-sheet__row--switch {
  color: var(--bn-accent);
}

.nav-sheet__row--logout {
  color: var(--bn-danger);
}

.nav-sheet__tile:focus-visible,
.nav-sheet__row:focus-visible,
.nav-sheet__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bn-accent);
}

body.nav-sheet-open {
  overflow: hidden;
}

body.nav-sheet-open .notification-bell-floating {
  display: none;
}

.bottom-nav__item,
.nav-sheet__row,
.nav-sheet__close {
  min-width: 0;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
}

.nav-sheet__row {
  justify-content: flex-start;
}

.bottom-nav__item:hover,
.nav-sheet__row:hover,
.nav-sheet__close:hover {
  transform: none;
}

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

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

@media (min-width: 769px) {
  .nav-sheet {
    display: none;
  }
}

@media (max-width: 360px) {
  .bottom-nav {
    left: 8px;
    right: 8px;
  }

  .bottom-nav__label {
    font-size: 10.5px;
  }

  .nav-sheet__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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