/* 产品类型 */
.type-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.type-btn {
  flex: 1; padding: 12px 8px; border: 1.5px solid #ddd;
  border-radius: 10px; background: #fff; text-align: center; cursor: pointer;
}
.type-btn.active {
  border: 2px solid var(--accent, #1a1a1a);
  background: var(--accent, #1a1a1a); color: #fff;
}
.type-label { font-size: 15px; font-weight: 600; }
.type-desc { font-size: 11px; opacity: 0.7; margin-top: 2px; }

/* OCR */
.ocr-bar { margin-bottom: 10px; }
.ocr-btn {
  display: block; width: 100%; padding: 12px;
  border: 1.5px dashed var(--accent, #1a1a1a); border-radius: 10px;
  text-align: center; font-size: 14px; font-weight: 500;
  color: var(--accent, #1a1a1a); background: var(--accent-light, #f5f5f5);
  cursor: pointer;
}
.ocr-btn:active { opacity: 0.7; }
.ocr-hint { font-size: 11px; color: #aaa; text-align: center; margin-top: 4px; }
.ocr-preview {
  margin-bottom: 10px; border-radius: 10px; overflow: hidden;
  border: 1px solid #e5e7eb; background: #f9f9f9; position: relative;
}
.ocr-image { width: 100%; display: block; }
.ocr-status {
  text-align: center; font-size: 13px; color: #666;
  padding: 8px; background: rgba(255,255,255,0.9);
}
.ocr-progress-bar {
  height: 3px; background: #e5e7eb;
}
.ocr-progress-fill {
  height: 100%; width: 0%; background: var(--accent, #1a1a1a);
  transition: width 0.3s;
}

/* 检测顶部栏（拍照 + 搜索） */
.checker-top-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.checker-photo-btn {
  font-size: 22px; cursor: pointer; flex-shrink: 0;
  padding: 4px; border-radius: 8px; line-height: 1; user-select: none;
}
.checker-photo-btn:active { opacity: 0.7; }
.checker-search-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid #ddd;
  border-radius: 10px; font-size: 14px; outline: none; min-width: 0;
}
.checker-search-input:focus { border-color: var(--accent, #1a1a1a); }
.checker-search-btn {
  padding: 0 16px; background: var(--accent, #1a1a1a);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  height: 40px; flex-shrink: 0;
}
.checker-search-btn:active { opacity: 0.8; }
.checker-search-btn.loading { opacity: 0.6; cursor: wait; }
.checker-search-hint {
  font-size: 11px; color: #bbb; margin-bottom: 12px;
}

/* Bevol 查询 */
.bevol-search-bar {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.bevol-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid #ddd;
  border-radius: 10px; font-size: 14px; outline: none;
}
.bevol-input:focus { border-color: var(--accent, #1a1a1a); }
.bevol-search-btn {
  padding: 0 16px; background: var(--accent, #1a1a1a);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.bevol-search-btn:active { opacity: 0.8; }
.bevol-search-btn.loading { opacity: 0.6; cursor: wait; }

.bevol-results {
  background: #fff; border: 1.5px solid #eee;
  border-radius: 10px; margin-bottom: 12px;
  max-height: 300px; overflow-y: auto; padding: 8px;
}
.bevol-result-item {
  display: flex; gap: 12px; padding: 10px;
  border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.bevol-result-item:last-child { border-bottom: none; }
.bevol-result-item:active { background: #fafafa; }
.bevol-result-img {
  width: 50px; height: 50px; border-radius: 4px;
  background: #f9f9f9; flex-shrink: 0; object-fit: contain;
}
.bevol-result-info { flex: 1; min-width: 0; }
.bevol-result-name {
  font-size: 14px; font-weight: 600; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bevol-result-brand { font-size: 11px; color: #888; margin-top: 2px; }
.bevol-result-no { font-size: 11px; color: #aaa; margin-top: 2px; }

.selected-product {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: 10px;
}
.selected-header {
  font-size: 12px;
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.re-search-btn {
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.table-selector-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.1);
  font-size: 12px;
  color: #666;
}
.table-tab {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}
.table-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 历史记录 */
#historySection { margin-bottom: 12px; }
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; cursor: pointer; margin-bottom: 6px;
}
.history-title { font-size: 13px; font-weight: 600; color: #888; }
.history-header-right { display: flex; align-items: center; gap: 8px; }
.history-collapse-arrow { font-size: 11px; color: #bbb; }
.history-manage { font-size: 11px; color: #bbb; cursor: pointer; padding: 2px 6px; border: 1px solid #e5e5e5; border-radius: 4px; }
.history-manage:active { color: #888; }
.history-manage-menu {
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); padding: 6px 0;
  margin-bottom: 8px;
}
.history-manage-item {
  display: block; padding: 8px 14px; font-size: 13px; color: #555;
  cursor: pointer;
}
.history-manage-item:active { background: #f5f5f5; }
.history-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  margin-bottom: 6px; cursor: pointer;
}
.history-item:active { background: #fafafa; }
.history-item.active { background: #f0fdf4; border-color: #16a34a; }
.history-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-label { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { font-size: 11px; color: #aaa; margin-top: 2px; }
.history-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.history-delete {
  font-size: 15px; color: #ccc; padding: 0 4px; flex-shrink: 0;
  line-height: 1; cursor: pointer;
}
.history-delete:active { color: #999; }

/* 输入 */
.input-area {
  width: 100%; height: 200px; padding: 14px;
  border: 1.5px solid #ddd; border-radius: 10px;
  font-size: 14px; line-height: 1.6; background: #fff;
  resize: none; outline: none; font-family: inherit;
}
.input-area:focus { border-color: var(--accent, #1a1a1a); }
.input-area::placeholder { color: #bbb; }

/* 按钮 */
.analyze-btn {
  width: 100%; padding: 14px; margin-top: 12px; border: none;
  border-radius: 10px; background: var(--accent, #1a1a1a); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.analyze-btn.disabled { background: #ccc; cursor: default; }
