* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 1rem;
  background: #fafafa;
  color: #222;
  line-height: 1.5;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
h1 { margin: 0; font-size: 1.5rem; }
.actions { display: flex; align-items: center; gap: 1rem; }
button {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
button:hover { background: #f0f0f0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

#api-key-prompt {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
#api-key-prompt input { padding: 0.5rem; margin: 0 0.5rem; width: 300px; max-width: 100%; }
.hidden { display: none; }

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filters label { font-size: 0.9rem; }
.filters select, .filters input { margin-left: 0.3rem; }

.buckets { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 900px) {
  .buckets { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
}

.bucket {
  background: white;
  border-radius: 6px;
  padding: 1rem;
  border-left: 4px solid;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.bucket-green { border-left-color: #16a34a; }
.bucket-yellow { border-left-color: #ca8a04; }
.bucket-red { border-left-color: #dc2626; }
.bucket h2 { margin-top: 0; font-size: 1.1rem; }
.bucket-green h2 { color: #166534; }
.bucket-yellow h2 { color: #854d0e; }
.bucket-red h2 { color: #991b1b; }
.bucket .count {
  display: inline-block;
  background: rgba(0,0,0,0.05);
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-left: 0.3rem;
}
.bucket .hint { margin: 0.3rem 0 1rem; color: #666; font-size: 0.85rem; }

.item {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
.item:last-child { border-bottom: none; }
.item-name { font-weight: 500; }
.item-meta { color: #666; font-size: 0.8rem; margin-top: 0.2rem; }
.item-meta .kind-tag {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

#error-banner {
  background: #fee2e2;
  border: 1px solid #dc2626;
  color: #991b1b;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

#last-scan-info { color: #666; font-size: 0.85rem; }
