body { font-family: system-ui, sans-serif; max-width: 1200px; margin: 0 auto; padding: 1rem; }
nav { background: #2c3e50; padding: 0.5rem 1rem; margin-bottom: 1rem; }
nav a { color: white; text-decoration: none; margin-right: 1rem; }
nav a:hover { text-decoration: underline; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem; text-align: left; border-bottom: 1px solid #ddd; }
th { background: #f5f5f5; }
.flash { padding: 0.5rem; margin-bottom: 0.5rem; border-radius: 4px; }
.flash.success { background: #d4edda; color: #155724; }
.flash.error { background: #f8d7da; color: #721c24; }
button, .btn { padding: 0.4rem 0.8rem; cursor: pointer; border: none; border-radius: 4px; }
.btn-primary { background: #3498db; color: white; }
.btn-success { background: #27ae60; color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn-secondary { background: #95a5a6; color: white; }
form.inline { display: inline; }
.inline-form { display: flex; gap: 4px; align-items: center; }
.inline-form input[type="text"] { padding: 0.3rem 0.5rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
#category-filter { padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; }

/* Alpha bar */
.alpha-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.75rem; }
.alpha-btn { padding: 0.25rem 0.5rem; border: 1px solid #ddd; background: #f8f8f8; border-radius: 4px; cursor: pointer; font-size: 0.85rem; min-width: 2rem; text-align: center; }
.alpha-btn:hover { background: #e0e0e0; }
.alpha-btn.active { background: #3498db; color: white; border-color: #3498db; }

/* Vendor toolbar */
.vendor-toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.search-input { padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; flex: 1; min-width: 200px; }
.select-all-label { font-size: 0.85rem; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.vendor-count { font-size: 0.85rem; color: #888; font-weight: normal; }
.vendor-footer { font-size: 0.85rem; color: #666; margin-top: 0.5rem; }

/* Filter bar */
.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; }

/* Sortable table headers */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: #e8e8e8; }
.sort-arrow { font-size: 0.75rem; color: #999; margin-left: 4px; }

/* Field badges */
.field-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.field-title { background: #dbeafe; color: #1e40af; }
.field-color { background: #fce7f3; color: #9d174d; }
.field-type { background: #ede9fe; color: #6b21a8; }
.field-tags { background: #d1fae5; color: #065f46; }

/* Value diffs */
.old-val { color: #999; }
.new-val { color: #166534; font-weight: 600; }

/* Summary cards */
.summary-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.summary-card { flex: 1; min-width: 140px; padding: 1rem; background: #f8f8f8; border: 1px solid #ddd; border-radius: 8px; text-align: center; }
.summary-card.card-green { background: #f0fdf4; border-color: #bbf7d0; }
.summary-card.card-amber { background: #fffbeb; border-color: #fde68a; }
.summary-value { font-size: 2rem; font-weight: 800; color: #1e293b; }
.summary-label { font-size: 0.85rem; color: #64748b; margin-top: 0.25rem; }
.summary-detail { margin-top: 0.5rem; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* Status badges */
.status-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.status-active { background: #d1fae5; color: #065f46; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-archived { background: #e5e7eb; color: #374151; }

/* URL indicators */
.url-ok { color: #16a34a; font-weight: bold; text-decoration: none; }
.url-missing { color: #dc2626; font-weight: bold; }

/* Vendor URL prompt box */
.url-prompt-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.url-prompt-box strong { display: block; margin-bottom: 0.5rem; color: #92400e; font-size: 0.9rem; }
.url-prompt-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.url-prompt-row label { width: 180px; font-size: 0.85rem; font-weight: 600; color: #334155; flex-shrink: 0; }
.url-prompt-row input { flex: 1; padding: 0.3rem 0.5rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }

/* Vendor chip grid (Brain editor) */
.vendor-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.5rem; max-height: 300px; overflow-y: auto; padding: 4px; }
.vendor-chip { padding: 0.3rem 0.7rem; border: 1px solid #ddd; border-radius: 6px; background: #f8f8f8; text-decoration: none; color: #334155; font-size: 0.82rem; white-space: nowrap; transition: all 0.15s; }
.vendor-chip:hover { background: #e0e0e0; border-color: #999; }
.vendor-chip.active { background: #3498db; color: white; border-color: #3498db; }
.chip-count { font-size: 0.7rem; color: #999; margin-left: 2px; }
.vendor-chip.active .chip-count { color: rgba(255,255,255,0.7); }

/* Image review grid */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 1.5rem; }
.image-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: white; position: relative; }
.image-card-check { position: absolute; top: 8px; left: 8px; z-index: 1; }
.image-card-check input { width: 18px; height: 18px; }
.image-card-thumb { width: 100%; height: 180px; object-fit: contain; background: #f8f8f8; }
.image-card-info { padding: 8px 10px; }
.image-card-vendor { font-size: 0.75rem; color: #64748b; }
.image-card-code { font-weight: 600; font-size: 0.85rem; }
.image-card-color { font-size: 0.8rem; color: #666; }
.image-card-actions { padding: 6px 10px; border-top: 1px solid #eee; display: flex; gap: 4px; }
.btn-sm { font-size: 0.75rem; padding: 2px 8px; }

/* Confidence badges */
.confidence-badge { font-size: 0.65rem; padding: 2px 6px; border-radius: 8px; font-weight: 700; text-transform: uppercase; }
.conf-high { background: #d1fae5; color: #065f46; }
.conf-medium { background: #fef3c7; color: #92400e; }
.conf-low { background: #fee2e2; color: #991b1b; }
.conf-none { background: #e5e7eb; color: #374151; }

/* Row visibility (used by filters + pagination) */
.filter-hidden, .page-hidden { display: none; }

/* Pagination bar */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; margin-top: 0.25rem; font-size: 0.85rem; color: #666; border-top: 1px solid #eee; }
.pagination-bar select { padding: 0.25rem 0.4rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
.pagination-bar .page-nav { display: flex; gap: 2px; align-items: center; }
.pagination-bar .page-btn { padding: 0.2rem 0.5rem; border: 1px solid #ddd; border-radius: 4px; background: #f8f8f8; cursor: pointer; font-size: 0.85rem; min-width: 2rem; text-align: center; }
.pagination-bar .page-btn:hover { background: #e0e0e0; }
.pagination-bar .page-btn.active { background: #3498db; color: white; border-color: #3498db; }
.pagination-bar .page-btn:disabled { opacity: 0.4; cursor: default; }
.pagination-bar .page-info { white-space: nowrap; }
