/* 底部 Tab + PC 侧边栏 */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-height);
  background: #fff;
  border-top: 1px solid #F3F4F6;
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.tabbar-item .tab-icon {
  font-size: 20px;
  line-height: 1;
}

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

.sidebar {
  display: none;
}

.sidebar-brand {
  padding: 24px 20px 16px;
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-sm);
}

.sidebar-item.active {
  background: #FFEDD5;
  color: var(--primary-dark);
}

.sidebar-item .tab-icon {
  font-size: 18px;
}

/* Admin nav */
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #F3F4F6;
  position: sticky;
  top: 0;
  z-index: 200;
}

.admin-hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: var(--radius-md);
  background: #F9FAFB;
}

.admin-topbar-title {
  font-weight: 700;
  font-size: var(--font-lg);
}

.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}

.admin-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.admin-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(80vw, 280px);
  background: #fff;
  z-index: 310;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding: 20px 12px;
  overflow-y: auto;
}

.admin-drawer-overlay.open .admin-drawer {
  transform: translateX(0);
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--font-sm);
  min-height: 48px;
}

.admin-menu-item.active {
  background: #FFEDD5;
  color: var(--primary-dark);
}

.admin-sidebar-pc {
  display: none;
}

@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #F3F4F6;
    z-index: 100;
  }

  .app-shell {
    padding-bottom: 0;
    margin-left: var(--sidebar-width);
  }

  .page {
    max-width: 1200px;
    padding: var(--space-2xl);
  }

  .admin-topbar {
    display: none;
  }

  .admin-drawer-overlay {
    display: none !important;
  }

  .admin-sidebar-pc {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #1F2937;
    color: #fff;
    z-index: 100;
    padding: 20px 12px;
  }

  .admin-sidebar-pc .admin-brand {
    padding: 8px 16px 24px;
    font-size: var(--font-lg);
    font-weight: 700;
    color: #FED7AA;
  }

  .admin-sidebar-pc .admin-menu-item {
    color: #D1D5DB;
  }

  .admin-sidebar-pc .admin-menu-item.active {
    background: rgba(232, 131, 58, 0.25);
    color: #FED7AA;
  }

  .admin-shell {
    margin-left: var(--sidebar-width);
  }

  .modal-overlay {
    align-items: center;
  }

  .modal {
    border-radius: var(--radius-xl);
  }
}
