/* ================================================================
   Shared Sidebar — Used by ERP and CRM tabs
   Left sidebar navigation with module items, badges, collapse
   ================================================================ */

.app-with-sidebar {
  display: flex; height: 100%;
}

.app-sidebar {
  width: 220px; flex-shrink: 0;
  background: rgba(0,0,0,0.15);
  border-right: 1px solid var(--app-border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.app-sidebar__header {
  padding: 16px 18px 12px;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  color: var(--app-accent);
  border-bottom: 1px solid var(--app-border);
}

.app-sidebar__group {
  padding: 8px 0;
}
.app-sidebar__group-title {
  padding: 6px 18px; font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--app-text-3);
}

.app-sidebar__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 18px; font-size: 0.85rem; color: var(--app-text-2);
  border: none; background: none; cursor: pointer; text-align: left;
  width: 100%; transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}
.app-sidebar__item:hover { background: rgba(255,255,255,0.04); color: var(--app-text-1); }
.app-sidebar__item.active {
  color: var(--app-accent); background: var(--app-accent-light);
  border-left-color: var(--app-accent);
}

.app-sidebar__badge {
  font-size: 0.68rem; font-family: var(--font-mono);
  background: rgba(255,255,255,0.08); padding: 1px 7px; border-radius: 99px;
  color: var(--app-text-3);
}
.app-sidebar__item.active .app-sidebar__badge {
  background: var(--app-accent-light); color: var(--app-accent);
}

/* Main content area next to sidebar */
.app-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  overflow: hidden;
}

/* Module content (scrollable) */
.app-module {
  flex: 1; overflow-y: auto; padding: 24px;
}

/* Toolbar above module content */
.app-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; border-bottom: 1px solid var(--app-border);
  flex-shrink: 0; gap: 12px;
}
.app-toolbar__title { font-size: 1rem; font-weight: 600; }
.app-toolbar__actions { display: flex; gap: 8px; align-items: center; }

/* Search input in toolbar */
.app-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--app-border); border-radius: var(--radius-sm);
  min-width: 200px;
}
.app-search input {
  border: none; background: none; outline: none; flex: 1;
  font-size: 0.85rem; color: var(--app-text-1);
}
.app-search__icon { color: var(--app-text-3); font-size: 0.85rem; }
