.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-bar-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--color-bg-white);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  border-top: 1px solid var(--color-border);
  z-index: var(--z-tab-bar);
}

.tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: var(--tab-bar-height);
  height: 100%;
  position: relative;
  transition: color 0.18s ease, transform 0.18s ease;
  color: var(--color-text-secondary);
  padding: 6px 0 4px;
  cursor: pointer;
}

.tab-bar-item.active {
  color: var(--color-primary);
}

.tab-bar-item:active {
  transform: translateY(1px);
}

.tab-bar-item-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tab-bar-item-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.tab-bar-item-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.2;
}

.tab-bar-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 10px;
  height: 10px;
  background: var(--color-badge);
  border-radius: 50%;
  border: 1px solid var(--color-bg-white);
}

.tab-bar-badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-badge);
  border-radius: 8px;
  border: 1px solid var(--color-bg-white);
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
