/* ========= BUILD WITH AI - SINGLE PANEL ========= */

/* Toolbar: search + filter pills above grid */
.lib-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; flex-wrap: wrap;
}

/* Search */
.lib-list-search {
  width: 240px; max-width: 100%; padding: 9px 12px 9px 34px;
  border-radius: var(--radius-sm); border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.7); font-family: var(--font);
  font-size: 12.5px; color: var(--night); outline: none;
  transition: border-color 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B8B9E' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center;
}
.lib-list-search:focus { border-color: var(--sunrise); box-shadow: 0 0 0 3px rgba(255,107,44,0.06); }
.lib-list-search::placeholder { color: var(--n300); }

/* Filter pills */
.lib-filter-row {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.lib-pill {
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.6); font-family: var(--font);
  font-size: 11px; font-weight: 500; color: var(--n400);
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.lib-pill:hover { border-color: rgba(0,0,0,0.12); color: var(--n600); }
.lib-pill.active { background: var(--night); color: var(--pure); border-color: var(--night); }

/* Category groups */
.lib-cat-group { margin-bottom: 4px; }
.lib-cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 8px; cursor: pointer; user-select: none;
}
.lib-cat-icon {
  font-size: 13px; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.lib-cat-label {
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  color: var(--n400); text-transform: uppercase; letter-spacing: 0.08em;
}
.lib-cat-cnt {
  font-size: 10px; color: var(--n300); font-family: var(--font-mono);
  margin-left: auto; padding-right: 16px;
}

/* Capability rows */
.lib-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 14px; margin: 0 0 1px;
  cursor: pointer; transition: all 0.12s ease;
  border-left: 3px solid transparent; position: relative;
}
.lib-row:hover { background: rgba(0,0,0,0.02); }
.lib-row.active {
  background: rgba(255,107,44,0.04);
  border-left-color: var(--sunrise);
}
.lib-row-name {
  font-size: 13px; font-weight: 500; color: var(--n700);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-row.active .lib-row-name { color: var(--night); font-weight: 600; }
.lib-row-meta { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.lib-badge {
  font-size: 9px; padding: 2px 7px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
.lib-badge.tool-cowork { background: rgba(99,102,241,0.08); color: #6366F1; }
.lib-badge.tool-code { background: rgba(16,185,129,0.08); color: #10B981; }
.lib-badge.tool-both { background: rgba(255,107,44,0.08); color: var(--sunrise); }
.lib-badge.level-1 { background: rgba(76,175,80,0.06); color: #4CAF50; }
.lib-badge.level-2 { background: rgba(255,159,28,0.08); color: #E8930A; }
.lib-badge.level-3 { background: rgba(211,47,47,0.06); color: #d32f2f; }
.lib-row-time {
  font-size: 10px; color: var(--n300); font-family: var(--font-mono);
  white-space: nowrap;
}
.lib-row-done {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4CAF50; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(76,175,80,0.3);
}

/* Empty / placeholder */
.lib-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; color: var(--n300);
  text-align: center; padding: 40px;
}
.lib-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.lib-empty-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 16px; color: var(--n400); margin-bottom: 6px;
}
.lib-empty-text { font-size: 13px; color: var(--n300); }
