/* ==========================================================================
   Prices Ledger (物价台账) - Commodity & Grocery Price Tracker
   Fintech Dark Terminal Aesthetic & Glassmorphism Design System
   ========================================================================== */

.prices-desk-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f1f5f9;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  padding-bottom: 30px;
}

/* 1. Header Metrics Ribbon */
.prices-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.prices-metric-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.prices-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.prices-metric-card.accent-emerald::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.prices-metric-card.accent-amber::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.prices-metric-card.accent-purple::before {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.prices-metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prices-metric-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.prices-metric-sub {
  font-size: 11px;
  color: #64748b;
}

/* 2. Radar / Staples Quick Compare Grid */
.prices-staples-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prices-staples-title {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prices-staples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.prices-staple-pill {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prices-staple-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.prices-staple-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
}

.prices-staple-detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
}

.prices-staple-price {
  font-weight: 800;
  color: #34d399;
}

.prices-staple-merchant {
  font-size: 10px;
  color: #94a3b8;
}

/* 3. Toolbar Controls */
.prices-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
}

.prices-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.prices-search-wrap {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 380px;
}

.prices-search-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px 12px 7px 32px;
  color: #f8fafc;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.prices-search-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.prices-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 13px;
  pointer-events: none;
}

.prices-select {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px 10px;
  color: #e2e8f0;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.prices-select:focus {
  border-color: #06b6d4;
}

.prices-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 7px 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prices-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}

.prices-btn.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
}

.prices-btn.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.prices-btn.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #34d399;
  color: #ffffff;
}

/* 4. Data Table */
.prices-table-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.prices-table-wrapper {
  width: 100%;
  overflow-x: auto;
  max-height: calc(100vh - 380px);
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.prices-table th {
  background: #0b1329;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  user-select: none;
}

.prices-table th:hover {
  color: #38bdf8;
}

.prices-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.prices-table tr:hover td {
  background: rgba(30, 41, 59, 0.65);
}

/* Badges */
.badge-merchant {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-landers {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-sr {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-robinsons {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-watsons {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-seveneleven {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-jollibee {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-swissdeli {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-other {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-category {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.badge-discount {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  margin-left: 4px;
}

.prices-action-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.12s;
}

.prices-action-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}

.prices-action-btn.btn-delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* Modal Form */
.prices-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(6px);
  z-index: 10600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.prices-modal-backdrop.show {
  display: flex;
}

.prices-modal-box {
  background: #0f172a;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  color: #f1f5f9;
}

.prices-modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
}

.prices-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prices-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prices-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prices-form-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.prices-form-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px 10px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
}

.prices-form-input:focus {
  border-color: #06b6d4;
}

.prices-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
}

/* ==========================================================================
   Receipt OCR & Image Upload Scanning Component
   ========================================================================== */

.prices-ocr-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(6, 182, 212, 0.4);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.prices-ocr-card:hover, .prices-ocr-card.dragover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
  transform: translateY(-1px);
}

.prices-ocr-icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: inline-block;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.prices-ocr-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.prices-ocr-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

.prices-ocr-tag {
  display: inline-block;
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 8px;
}

.prices-ocr-tag-btn {
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.prices-ocr-tag-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #f1f5f9;
  border-color: rgba(6, 182, 212, 0.5);
}

.prices-ocr-tag-btn.active {
  background: rgba(6, 182, 212, 0.22);
  color: #38bdf8;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

/* OCR Analyzing State */
.prices-ocr-analyzing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 14px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.prices-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* OCR Results Review Split Layout */
.prices-ocr-review-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .prices-ocr-review-layout {
    grid-template-columns: 1fr;
  }
}

.prices-ocr-thumb-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prices-ocr-thumb-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 6px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prices-ocr-results-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.prices-ocr-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.prices-ocr-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.prices-ocr-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
  font-size: 11px;
}

.prices-ocr-table th {
  background: #0b1329;
  color: #94a3b8;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.prices-ocr-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.prices-ocr-input-inline {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 5px 8px;
  color: #f8fafc;
  font-size: 11px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

.prices-ocr-input-inline:focus {
  border-color: #06b6d4;
  background: rgba(15, 23, 42, 0.9);
}

.prices-ocr-input-inline.edit-paid,
.prices-ocr-input-inline.edit-orig {
  min-width: 82px;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prices-ocr-input-inline.edit-qty {
  min-width: 68px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prices-ocr-input-inline.edit-cat {
  min-width: 95px;
  padding: 4px 6px;
}

.prices-ocr-input-inline.edit-name {
  min-width: 170px;
}

.prices-ocr-checkbox {
  accent-color: #06b6d4;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Comprehensive 4-Pillar Tabs Navigation & Module Styles
   ========================================================================== */

.prices-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px;
  flex-wrap: wrap;
}

.prices-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prices-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.prices-tab-btn.active {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

/* Batch Operations Bar */
.prices-batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Comparison View */
.prices-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.prices-compare-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.prices-compare-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.prices-compare-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.prices-compare-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prices-compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 12px;
}

/* Trajectory View */
.prices-trajectory-hero {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prices-trajectory-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.prices-chip-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prices-chip-btn:hover, .prices-chip-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

/* Analytics View Grid */
.prices-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .prices-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.prices-analytics-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prices-analytics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Supermarket Instant Price Checker & Deal Diagnostics (超市现场秒级比价系统)
   ========================================================================== */

/* 1. Instant Fuzzy Search Combo & Autocomplete */
.prices-search-combo-wrap {
  position: relative;
  width: 100%;
}

.prices-fuzzy-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 12px 42px 12px 16px;
  font-size: 15px;
  color: #f8fafc;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.prices-fuzzy-search-input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 8px 24px rgba(0, 0, 0, 0.5);
  background: rgba(15, 23, 42, 1);
}

.prices-search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prices-search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.prices-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  max-height: 340px;
  overflow-y: auto;
  z-index: 1050;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prices-autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.prices-autocomplete-item:hover, .prices-autocomplete-item.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.prices-autocomplete-item .item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prices-autocomplete-item .item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.prices-autocomplete-item .item-sub {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  gap: 8px;
}

.prices-autocomplete-item .item-price-tag {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #34d399;
  text-align: right;
}

/* 2. Category Filter Pills */
.prices-cat-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.prices-cat-pill-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prices-cat-pill-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.prices-cat-pill-btn.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* 3. Supermarket Shelf Deal Diagnostics Card */
.prices-shelf-checker-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.75));
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.prices-shelf-checker-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981, #ef4444);
}

.checker-input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.checker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #f8fafc;
}

.checker-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shelf-price-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.shelf-price-input-wrap .currency-prefix {
  position: absolute;
  left: 12px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 15px;
}

.shelf-price-input {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 8px;
  padding: 8px 12px 8px 30px;
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  font-family: var(--font-mono, monospace);
  width: 170px;
  transition: all 0.2s ease;
}

.shelf-price-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  background: rgba(15, 23, 42, 1);
}

.shelf-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shelf-clear-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

/* Diagnosis Banner & Price Band Visualizer */
.diagnosis-banner {
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diagnosis-banner.deal {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.diagnosis-banner.fair {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.diagnosis-banner.overpriced {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.diagnosis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.diagnosis-verdict-badge {
  font-size: 13.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.diagnosis-banner.deal .diagnosis-verdict-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.diagnosis-banner.fair .diagnosis-verdict-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.diagnosis-banner.overpriced .diagnosis-verdict-badge {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.diagnosis-advice-text {
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}

/* Visual Price Band Slider Bar */
.price-band-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.price-band-track {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.price-band-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8), 0 0 4px #fbbf24;
  z-index: 2;
  transition: left 0.3s ease;
}

.price-band-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
}

/* 4. Cross-Merchant Comparison Snapshot */
.prices-cross-merchant-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cross-merchant-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cross-merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.cross-merchant-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: all 0.15s ease;
}

.cross-merchant-card.best-deal {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.cross-merchant-card .merchant-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cross-merchant-card .merchant-price {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #34d399;
}

.cross-merchant-card .merchant-sub {
  font-size: 11px;
  color: #94a3b8;
}

