.app-shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.75rem;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.app-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--glass-2); }
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-hi);
  position: relative;
}
.hamburger-btn span::before, .hamburger-btn span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text-hi);
}
.hamburger-btn span::before { top: -6px; }
.hamburger-btn span::after { top: 6px; }

.search-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  width: 280px;
  max-width: 100%;
  transition: border-color 0.2s, background 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--glass-border-strong);
  background: var(--glass-2);
}
.search-wrap svg { flex-shrink: 0; opacity: 0.6; }
.search-input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-hi);
}
.search-input::placeholder { color: var(--text-lo); }

/* Body: sidebar + main */
.body-shell {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-lo);
  padding: 0 0.6rem 0.75rem;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.add-category-btn {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.6rem;
  border-radius: var(--r-sm);
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
}
.add-category-btn:hover { background: var(--glass-2); color: var(--text-hi); }
.add-category-btn .plus-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Main panel */
.main-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.75rem 2rem 1rem;
  flex-shrink: 0;
}

.category-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  border: none;
  background: none;
  color: var(--text-hi);
  min-width: 0;
}

.category-heading-input {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  background: var(--glass-2);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--r-sm);
  color: var(--text-hi);
  padding: 0.1rem 0.5rem;
  width: 100%;
  max-width: 420px;
}

/* Plus button that adds a new item to the currently open list */
.add-item-plus-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass-2);
  border: 1px solid var(--glass-border-strong);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-hi);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.add-item-plus-btn:hover { background: var(--accent-1); color: #0a0a0e; }
.add-item-plus-btn:active { transform: scale(0.92); }

.item-count-pill {
  font-size: 0.85rem;
  color: var(--text-lo);
  font-weight: 500;
  margin-left: auto;
}

.item-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 2rem 2rem;
}

/* Product grid: each item renders as a card instead of a stacked list row */
.item-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* Mobile-only quick list switcher, hidden on desktop */
.mobile-category-switch { display: none; }
