/* =========================================================
   ComparaCR – Estilos base
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:      #3c8878;
  --green-light:#67c7ae;
  --green-dark: #2d6960;
  --orange:     #ed732e;
  --orange-dark: #d4621f;
  --yellow:     #f5a623;
  --red:        #e03c31;
  --gray-100:   #f7f8fa;
  --gray-200:   #eaedf1;
  --gray-500:   #8a9bb0;
  --gray-700:   #4a5568;
  --gray-900:   #1a202c;
  --white:      #ffffff;
  --shadow:     0 2px 8px rgba(0,0,0,.10);
  --radius:     10px;
  --font:       'Segoe UI', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--green);
  color: var(--white);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

.tagline {
  font-size: .9rem;
  opacity: .85;
}

/* ── Page layout: sidebar + main ────────────────────────── */
.page-layout {
  display: flex;
  flex: 1;
  align-items: flex-start;
  min-height: 0;
}

/* ── Sidebar Favoritos ───────────────────────────────────── */
.sidebar-favorites {
  width: 360px;
  min-width: 300px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 0;
  position: sticky;
  top: 0;
  min-height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}

.sidebar-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.sidebar-manage {
  font-size: .78rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.sidebar-manage:hover {
  text-decoration: underline;
}

.sidebar-empty {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.5;
  padding: 16px;
}

/* ── Grupos por tienda ───────────────────────────────────── */
.fav-store-group {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 4px;
  margin-bottom: 0;
}

.fav-store-group-header {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 5px 16px;
}

/* ── Ítem de favorito ────────────────────────────────────── */
.fav-item {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--gray-100);
}

.fav-item:last-child {
  border-bottom: none;
}

.fav-item-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}

.fav-item-link:hover {
  background: var(--green-light);
}

.fav-item-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.fav-item-price {
  font-size: .82rem;
  color: var(--green-dark);
  font-weight: 700;
  margin-top: 2px;
}

.fav-refresh-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 10px 14px;
  opacity: .6;
  transition: opacity .2s, transform .3s;
  line-height: 1;
}

.fav-refresh-btn:hover {
  opacity: 1;
  transform: rotate(30deg);
}

.fav-refresh-btn:disabled {
  cursor: not-allowed;
  opacity: .4;
}

/* ── Main ────────────────────────────────────────────────── */
main {
  flex: 1;
  min-width: 0;
  padding: 36px 28px;
}

/* ── Hero / Buscador ─────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 36px;
}

.hero h1 {
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.hero p {
  color: var(--gray-700);
  margin-bottom: 28px;
  font-size: 1rem;
}

/* ── Formulario de búsqueda ──────────────────────────────── */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.search-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 860px;
}

/* El campo de búsqueda y el de excluir comparten el mismo tamaño */
.search-row input[type="text"] {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
}

/* Campo excluir: borde rojizo para diferenciarlo */
.search-row input[name="exclude"] {
  border-color: #f0a0a0;
  color: var(--gray-700);
}

.search-row input[name="exclude"]:focus {
  border-color: #e74c3c;
}

.search-row input[type="text"]:focus {
  border-color: var(--green);
}

.search-row input[name="exclude"]:focus {
  border-color: #e74c3c;
}

/* Clases heredadas — mantener compatibilidad con results.html */
.exclude-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.exclude-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}

.search-form input[type="text"] {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
}

.exclude-row input[type="text"] {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 14px 18px;
  font-size: 1rem;
  border-color: #f0a0a0;
  color: var(--gray-700);
}

.exclude-row input[type="text"]:focus {
  border-color: #e74c3c;
}

.search-form input[type="text"]:focus {
  border-color: var(--green);
}

.search-form button[type="submit"] {
  padding: 14px 28px;
  background: var(--orange);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}

.search-form button[type="submit"]:hover {
  background: var(--orange-dark);
}

/* Versión compacta (en página de resultados) */
.search-form.compact {
  align-items: flex-start;
  margin-bottom: 24px;
}

.search-form.compact .search-row {
  justify-content: flex-start;
}

.search-form.compact .exclude-row {
  justify-content: flex-start;
}

.search-form.compact input[type="text"] {
  max-width: 400px;
  padding: 10px 14px;
  font-size: .95rem;
}

.search-form.compact .exclude-row input[type="text"] {
  max-width: calc(400px + 10px + 94px); /* input compact + gap + botón compact */
  padding: 7px 12px;
  font-size: .85rem;
}

.search-form.compact button[type="submit"] {
  padding: 10px 22px;
  font-size: .95rem;
}

/* ── Selector de supermercados (dropdown) ────────────────── */
.store-selector {
  width: 100%;
  max-width: 860px;
  margin-top: 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}

.store-selector[open] {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.store-selector-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.store-selector-summary::-webkit-details-marker { display: none; }

.store-selector-summary:hover {
  background: var(--gray-100);
}

.store-selector-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: auto;
}

.store-selector-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 2px 10px;
  border-radius: 20px;
}

.store-selector-count--warn {
  color: var(--red, #c0392b);
  background: #fdecea;
}

.store-selector-arrow {
  font-size: .8rem;
  color: var(--gray-500);
  transition: transform .2s;
}

.store-selector[open] .store-selector-arrow {
  transform: rotate(180deg);
}

.store-selector-panel {
  border-top: 1.5px solid var(--gray-200);
  padding: 12px 14px 14px;
}

.store-selector-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-store-toggle {
  font-size: .78rem;
  padding: 3px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.btn-store-toggle:hover {
  border-color: var(--green);
  color: var(--green);
}

.store-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s, opacity .15s;
  min-width: 80px;
}

.store-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.store-card input[type="checkbox"] {
  display: none;
}

.store-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.store-logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
}

.store-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
}

/* Estado desactivado */
.store-card--off {
  opacity: .35;
  border-color: var(--gray-200);
}

.store-card--off:hover {
  opacity: .65;
}

/* ── Sugerencias / chips ─────────────────────────────────── */
.suggestions {
  text-align: center;
}

.suggestions p {
  color: var(--gray-500);
  margin-bottom: 12px;
  font-size: .9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .875rem;
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 500;
  transition: border-color .2s, background .2s;
}

.chip:hover {
  border-color: var(--green);
  background: var(--green-light);
}

/* ── Resultados ──────────────────────────────────────────── */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.results-meta p {
  font-size: .95rem;
  color: var(--gray-700);
}

.fav-refresh-ts {
  font-size: .75rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.fav-refresh-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 500px) {
  .fav-refresh-group {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }
}

/* ── Badge de filtrado automático por IA ────────────────── */
details.ai-exclusion-notice {
  background: #f0faf4;
  border: 1px solid #b6ddc8;
  border-radius: 8px;
  font-size: .83rem;
  color: var(--gray-700);
  margin-bottom: 12px;
}
details.ai-exclusion-notice[open] {
  border-radius: 8px;
}
.ai-exclusion-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ai-exclusion-summary::-webkit-details-marker { display: none; }
.ai-exclusion-icon {
  font-size: .95rem;
}
.ai-exclusion-label {
  font-weight: 600;
  color: var(--green-dark);
}
.ai-exclusion-count {
  color: var(--gray-500);
  font-size: .78rem;
}
.ai-toggle-arrow {
  margin-left: auto;
  font-size: .85rem;
  color: var(--gray-500);
  transition: transform .2s;
}
details.ai-exclusion-notice[open] .ai-toggle-arrow {
  transform: rotate(180deg);
}
.ai-exclusion-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 14px 10px;
  border-top: 1px solid #b6ddc8;
  flex-direction: column;
}
.ai-excluded-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
details.ai-exclusion-notice em {
  font-style: normal;
  background: #d4ede2;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--green-dark);
  font-weight: 500;
}
.ai-excluded-item {
  font-style: normal;
  background: #d4ede2;
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 500;
}
.ai-exclusion-undo {
  margin-left: auto;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ai-exclusion-undo:hover {
  text-decoration: underline;
}
/* Desktop: siempre expandido (gestionado via JS) */
@media (min-width: 640px) {
  .ai-toggle-arrow {
    display: none;
  }
  .ai-exclusion-summary {
    cursor: default;
  }
}

.link-back {
  font-size: .9rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.link-back:hover {
  text-decoration: underline;
}

/* ── Links de resultados (nueva / refinar búsqueda) ─────── */
.results-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.link-back,
.link-refine {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.link-back {
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
}

.link-back:hover {
  background: var(--green);
  color: var(--white);
  text-decoration: none;
}

.link-refine {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
}

.link-refine:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  text-decoration: none;
}

.refine-panel {
  margin-bottom: 6px;
}

.refine-panel > summary {
  list-style: none;
}

.refine-panel[open] > summary {
  display: none;
}

/* ── Filtros de resultados ───────────────────────────────── */
.results-filters-wrap {
  margin-bottom: 16px;
}

.results-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-300, #dee2e6);
  background: #fff;
  color: var(--gray-700, #495057);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: border-color .15s, color .15s;
}

.results-filters-toggle::-webkit-details-marker { display: none; }

.results-filters-toggle::after {
  content: '▾';
  font-size: .75rem;
  color: var(--gray-500);
  transition: transform .2s;
}

.results-filters-wrap[open] .results-filters-toggle::after {
  transform: rotate(-180deg);
}

.results-filters-toggle:hover {
  border-color: var(--green);
  color: var(--green);
}

.filters-active-badge {
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .75rem;
  font-weight: 600;
}

.results-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--gray-50, #f8f9fa);
  border: 1px solid var(--gray-200, #e9ecef);
  border-radius: 10px;
}

.filters-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 4px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-group-title {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-600, #6c757d);
  margin-right: 2px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-300, #dee2e6);
  background: #fff;
  color: var(--gray-700, #495057);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--green);
  color: var(--green);
}

.filter-chip--active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.filter-chip--active:hover {
  background: var(--green-dark, #1a7a4a);
  border-color: var(--green-dark, #1a7a4a);
  color: #fff;
}

.filter-clear {
  margin-left: auto;
  padding: 3px 10px;
  border: none;
  background: none;
  color: var(--gray-500);
  font-size: .82rem;
  cursor: pointer;
  text-decoration: underline;
}

.filter-clear:hover {
  color: var(--danger, #dc3545);
}

/* ── Tabla ───────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.results-table thead {
  background: var(--green);
  color: var(--white);
}

.results-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
}

/* Columna de checkbox */
.th-check,
.td-check {
  width: 36px;
  padding: 10px 8px 10px 16px !important;
  text-align: center;
}

.row-check,
#checkAll {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--green);
}

/* Fila seleccionada */
.results-table tbody tr:has(.row-check:checked) {
  background: #fff3cd !important;
  opacity: .75;
}

/* Barra de acciones flotante */
.delete-toolbar {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--gray-900);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: .9rem;
}

.delete-toolbar.visible {
  display: flex;
}

.btn-delete {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.btn-delete:hover {
  background: #b71c1c;
}

.btn-deselect {
  background: transparent;
  color: var(--gray-200);
  border: 1px solid var(--gray-500);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .88rem;
  cursor: pointer;
}

.btn-deselect:hover {
  background: rgba(255,255,255,.1);
}

.empty-after-delete {
  padding: 32px;
  text-align: center;
  color: var(--gray-700);
  font-size: 1.05rem;
}

.results-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table tbody tr:hover {
  background: var(--gray-100);
}

/* Separador entre productos distintos */
.results-table tr.separator td {
  padding: 4px 0;
  background: var(--gray-200);
}

/* Precio total */
.price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-dark);
  white-space: normal;
}

.price-main {
  display: block;
  white-space: nowrap;
}

/* Precio por unidad dentro de la celda de precio */
.price .unit-price {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}

.price .unit-price-val {
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-500);
}

.price .unit-price-label {
  font-size: .78rem;
  color: var(--gray-500);
  margin-left: 2px;
}

/* Precio por unidad (₡/100g · ₡/100ml) */
.th-unit {
  font-size: .82rem;
  white-space: nowrap;
}

.unit-price {
  white-space: nowrap;
  font-size: .88rem;
  color: var(--gray-700);
}

.unit-price-val {
  font-weight: 600;
  color: var(--gray-900);
}

.unit-price-label {
  margin-left: 3px;
  font-size: .78rem;
  color: var(--gray-500);
}

.unit-price-na {
  color: var(--gray-500);
}

/* Celda resaltada cuando tiene el mejor precio unitario */
.best-unit-cell {
  background: #e8f5ee;
}

.results-table tr.best-unit-row td {
  background: #e8f5ee;
}

.results-table tr.best-unit-row:hover td {
  background: #d4eddf;
}

.badge-best-unit {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge-variable {
  display: inline-block;
  background: #7f8c8d;
  color: var(--white);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  font-style: italic;
}

.price-variable-row td.price {
  color: var(--gray-700);
}

.badge-mock {
  display: inline-block;
  background: var(--yellow);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-live {
  display: inline-block;
  background: #27ae60;
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.legend {
  font-size: .82rem;
  color: var(--gray-700);
  margin-top: 4px;
}

/* ── Botón Ver ───────────────────────────────────────────── */
.btn-ver {
  display: inline-block;
  padding: 5px 14px;
  background: var(--green);
  color: var(--white);
  border-radius: 6px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
}

.btn-ver:hover {
  background: var(--green-dark);
}

/* ── Sin resultados ──────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 60px 20px;
}

.no-results p {
  color: var(--gray-700);
  margin-bottom: 10px;
  font-size: 1rem;
}

.btn-back {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background .2s;
}

.btn-back:hover {
  background: var(--green-dark);
}

/* ── Error ───────────────────────────────────────────────── */
.error {
  color: var(--red);
  margin-top: 12px;
  font-size: .9rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px;
  font-size: .8rem;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

/* ── Links de navegación dentro del sidebar ─────────────── */
.sidebar-mobile-links {
  display: none; /* kept for compat but replaced by sidebar-quick-links */
}

.sidebar-quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-quick-link {
  display: block;
  padding: 10px 14px;
  background: var(--green-light);
  border-radius: 8px;
  color: var(--green-dark);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: background .15s;
}

.sidebar-quick-link:hover {
  background: #c0e0cf;
}

.sidebar-quick-link--primary {
  background: var(--green);
  color: var(--white);
}

.sidebar-quick-link--primary:hover {
  background: var(--green-dark);
}

/* ── Menú del sidebar (3 filas clickeables) ─────────────── */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.sidebar-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800, #1f2937);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  transition: background .12s;
}

.sidebar-menu-row:hover {
  background: var(--green-light, #e8f5ee);
  color: var(--green-dark);
}

.sidebar-menu-row--help {
  color: var(--green-dark);
  border-top: 1px solid var(--gray-200);
  margin-top: 4px;
}

.sidebar-menu-icon {
  font-size: 1.25rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
}

.sidebar-mobile-link {
  display: block;
  padding: 9px 12px;
  background: var(--gray-100);
  border-radius: 8px;
  color: var(--green-dark);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s;
}

.sidebar-mobile-link:hover {
  background: var(--green-light);
}

.sidebar-country-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: 8px;
}

.sidebar-country-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

.sidebar-country-select {
  flex: 1;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .88rem;
  background: var(--white);
  cursor: pointer;
  outline: none;
}

.sidebar-country-select:focus {
  border-color: var(--green);
}

/* ── Hamburger button (visible solo en móvil ≤500px) ───── */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background .15s;
}
.hamburger-btn:hover,
.hamburger-btn:focus {
  background: rgba(255,255,255,.18);
  outline: none;
}

/* ── Botón cerrar sidebar ─────────────────────────────── */
.sidebar-close-btn {
  display: block;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

/* ── Overlay para el drawer de favoritos ────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  cursor: pointer;
}
.sidebar-overlay.open {
  display: block;
}

/* ── Overlay de carga al navegar a favorito ─────────────── */
.fav-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.fav-loading-overlay.active {
  display: flex;
}
.fav-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.fav-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: fav-spin .8s linear infinite;
}
@keyframes fav-spin {
  to { transform: rotate(360deg); }
}
.fav-loading-msgs {
  position: relative;
  height: 1.4em;
}
.fav-loading-msg {
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-700);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
}
/* Animaciones activas solo cuando el overlay está visible.
   Esto garantiza que reinician desde 0 en Safari al hacer display:flex. */
.fav-loading-overlay.active #favMsg1 {
  animation: fav-show-msg1 2s infinite;
}
.fav-loading-overlay.active #favMsg2 {
  animation: fav-show-msg2 2s infinite;
}
/* msg1 arranca visible de inmediato */
@keyframes fav-show-msg1 {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}
/* msg2 aparece en la segunda mitad del ciclo */
@keyframes fav-show-msg2 {
  0%   { opacity: 0; }
  50%  { opacity: 0; }
  60%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Fila de resultados clickeable ──────────────────────── */
tr.results-row {
  transition: background .12s;
}
tr.results-row[data-link]:not([data-link=""]) {
  cursor: pointer;
}
tr.results-row[data-link]:not([data-link=""]):hover td {
  background: var(--green-light) !important;
}

/* ── Desktop: selector de tiendas siempre visible ──────── */
@media (min-width: 769px) {
  .sidebar-topbar {
    display: none;
  }

  .store-selector {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
  }
  .store-selector-summary {
    display: none;
  }
  .store-selector-panel {
    border-top: none;
    padding: 4px 0 10px;
  }
}

/* ── Responsive: tablet ≤768px ───────────────────────────── */
@media (max-width: 768px) {
  .sidebar-favorites {
    display: none;
  }

  /* Mostrar hamburger en tablet también */
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Sidebar como drawer full-width en tablet */
  .sidebar-favorites {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    z-index: 250;
    transform: translateX(-110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    box-shadow: 4px 0 32px rgba(0,0,0,.25);
  }

  .sidebar-favorites.drawer-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }

  .results-meta {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  main {
    padding: 24px 16px;
  }
}

/* ── Responsive: ≤500px – modo webapp ───────────────────── */
@media (max-width: 500px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Mostrar hamburger */
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Ocultar selectores de país y Públicas del header */
  .nav-desktop-only {
    display: none !important;
  }

  /* Header en una sola línea */
  header {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
  }

  .tagline { display: none; }
  .logo img { height: 22px; }

  .header-nav {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .nav-user { display: none; }

  .nav-logout {
    font-size: .75rem;
    padding: 4px 8px;
  }

  .nav-link { font-size: .78rem; }

  .country-select {
    font-size: .78rem;
    padding: 3px 5px;
    max-width: 100px;
  }

  /* Sidebar: drawer full-width */
  .sidebar-favorites {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0;
  }

  .sidebar-favorites.drawer-open {
    transform: translateX(0);
  }

  /* Layout principal sin overflow */
  .page-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }

  main {
    padding: 14px 12px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Hero */
  .hero h1 { font-size: 1.25rem; }
  .hero p  { font-size: .88rem; margin-bottom: 18px; }

  /* Formulario: columna vertical */
  .search-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
  }

  .search-row input[type="text"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .search-form button[type="submit"] {
    width: 100%;
  }

  /* Store grid compacto */
  .store-card {
    min-width: 60px;
    padding: 7px 9px;
  }

  .store-name {
    font-size: .68rem;
    max-width: 60px;
  }

  /* Nada que ocultar en precio unitario en móvil — se muestra siempre */

  .results-table th,
  .results-table td {
    padding: 10px 8px;
    font-size: .88rem;
  }

  .th-check,
  .td-check {
    width: 28px !important;
    padding: 10px 4px 10px 8px !important;
  }

  /* Toolbar de acciones */
  .delete-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    font-size: .8rem;
    padding: 8px 10px;
  }

  .btn-save, .btn-delete, .btn-deselect {
    font-size: .78rem;
    padding: 5px 10px;
  }

  /* Chips */
  .chip {
    padding: 6px 12px;
    font-size: .82rem;
  }

  /* Table wrapper: de borde a borde */
  .table-wrapper {
    border-radius: 0;
    margin: 0 -12px;
    width: calc(100% + 24px);
  }

  /* Modal más compacto */
  .modal-box {
    padding: 20px 16px;
  }
}

/* ── Favoritos – precio en card página Favoritos ─────────── */
.saved-last-price {
  font-size: .82rem;
  color: var(--gray-700);
  margin-left: auto;
}

.saved-last-price strong {
  color: var(--green-dark);
}

.saved-unit-price {
  font-size: .8rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Botón guardar (toolbar) ─────────────────────────────── */
.btn-save {
  padding: 8px 18px;
  background: #2980b9;
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.btn-save:hover {
  background: #1f618d;
}

/* ── Modal guardar favorito ──────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  padding: 28px 32px;
  max-width: 420px;
  width: 90%;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.modal-desc {
  font-size: .88rem;
  color: var(--gray-700);
  margin: 0 0 16px;
}

.modal-label-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.modal-label-lbl {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
}

.modal-title-input {
  width: 100%;
  padding: 9px 12px;
  font-size: .95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}

.modal-title-input:focus {
  border-color: var(--green);
}

.unit-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.unit-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.unit-option.selected,
.unit-option:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.unit-option input[type="radio"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.unit-opt-label {
  flex: 1;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-900);
}

.unit-opt-example {
  font-size: .88rem;
  color: var(--green-dark);
  font-weight: 700;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-save-confirm {
  padding: 9px 22px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.btn-save-confirm:hover {
  background: var(--green-dark);
}

.btn-modal-cancel {
  padding: 9px 18px;
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}

.btn-modal-cancel:hover {
  background: var(--gray-200);
}


/* ── No disponibles ──────────────────────────────────────── */
.unavailable-section {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--gray-200);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--gray-700);
}

.unavailable-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.badge-unavailable {
  display: inline-block;
  background: var(--gray-500);
  color: var(--white);
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 3px 4px 0 0;
}

/* ── Página Mis Guardados ────────────────────────────────── */
.saved-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.saved-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
}

.saved-card-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.saved-query {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: capitalize;
}

.saved-date {
  font-size: .8rem;
  color: var(--gray-500);
}

.saved-items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.saved-items li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .83rem;
}

.saved-item-name {
  color: var(--gray-900);
  font-weight: 500;
}

.saved-item-store {
  color: var(--gray-500);
  font-size: .78rem;
}

.saved-item-store::before {
  content: "·";
  margin-right: 4px;
}

.saved-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-saved-search {
  display: inline-block;
  padding: 8px 18px;
  background: var(--green);
  color: var(--white);
  border-radius: 6px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: background .2s;
}

.btn-saved-search:hover {
  background: var(--green-dark);
}

.btn-saved-delete {
  padding: 8px 14px;
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-saved-delete:hover {
  background: var(--red);
  color: var(--white);
}

/* ── Auth (login / register) ─────────────────────────────── */
body.auth-page {
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 4px;
}

.auth-logo img {
  height: 40px;
  width: auto;
  display: inline-block;
}

.auth-tagline {
  font-size: .82rem;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.auth-error {
  background: #fde8e8;
  border: 1px solid #f5c6c6;
  color: var(--red);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .88rem;
  margin-bottom: 16px;
}

.auth-success {
  background: #e8f5e9;
  border: 1px solid #b2dfdb;
  color: #2e7d32;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .88rem;
  margin-bottom: 16px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 5px;
}

.auth-hint {
  font-weight: 400;
  color: var(--gray-500);
  font-size: .8rem;
}

.auth-field input {
  width: 100%;
  padding: 11px 14px;
  font-size: .95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: var(--green);
}

.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: background .2s;
}

.btn-auth:hover {
  background: var(--green-dark);
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: .88rem;
  color: var(--gray-700);
}

.auth-switch a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ── Header nav (usuario logueado) ───────────────────────── */

/* Selector de país en la barra de navegación */
.country-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-flag {
  font-size: 1.2rem;
  line-height: 1;
}

.country-select {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .85rem;
  cursor: pointer;
  outline: none;
  transition: background .2s;
}

.country-select option {
  background: var(--green-dark, #1a5c2e);
  color: #fff;
}

.country-select:hover,
.country-select:focus {
  background: rgba(255,255,255,.28);
}

/* Selector en el formulario de login */
.auth-select {
  width: 100%;
  padding: 11px 14px;
  font-size: .95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
  background: #fff;
  color: inherit;
  cursor: pointer;
}

.auth-select:focus {
  border-color: var(--green);
}

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  opacity: .9;
  transition: opacity .2s;
}

.nav-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.nav-user {
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout {
  padding: 6px 14px;
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.nav-logout:hover {
  background: rgba(255,255,255,.3);
}

.nav-link-admin {
  background: rgba(124,58,237,.25);
  border-radius: 6px;
  padding: 4px 10px;
}

.nav-link-admin:hover {
  background: rgba(124,58,237,.45);
  text-decoration: none !important;
}

.btn-publicas {
  background: var(--green);
  color: var(--white) !important;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  opacity: 1 !important;
  transition: background .2s;
}

.btn-publicas:hover {
  background: var(--green-dark);
  text-decoration: none !important;
}

/* ── Toggle público/privado en favoritos ─────────────────── */
.btn-saved-toggle {
  padding: 8px 14px;
  background: transparent;
  color: var(--gray-500);
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.btn-saved-toggle:hover {
  border-color: var(--gray-500);
  color: var(--gray-700);
}

.btn-public-on {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-light);
}

.btn-public-on:hover {
  background: #d0edde;
}

/* ── Modal: fila pública ─────────────────────────────────── */
.modal-public-row {
  margin: 10px 0 16px;
}

.modal-public-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}

.modal-public-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Misc ─────────────────────────────────────────────────── */
.text-muted {
  color: var(--gray-500);
}

.btn-small {
  display: inline-block;
  padding: 5px 14px;
  background: var(--green);
  color: var(--white);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}

.btn-small:hover {
  background: var(--green-dark);
}

.btn-small--outline {
  background: var(--white);
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-small--outline:hover {
  background: var(--green);
  color: var(--white);
}

/* ── Botón guardar favorito desde búsqueda pública ─────────── */
.btn-fav-copy {
  background: none;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--gray-500);
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1;
}

.btn-fav-copy:hover {
  border-color: #f5c518;
  color: #f5c518;
  background: #fffbea;
}

.btn-fav-copy--saved {
  border-color: #f5c518;
  color: #f5c518;
  background: #fffbea;
  cursor: default;
}

/* ── Flash messages ──────────────────────────────────────────── */
.flash {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.flash-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid var(--green);
}

.flash-danger {
  background: #fdecea;
  color: #c62828;
  border-left: 4px solid #e53935;
}

.flash-info {
  background: #e3f2fd;
  color: #1565c0;
  border-left: 4px solid #1976d2;
}

/* ── Badge supermercado en búsquedas públicas ─────────────── */
.badge-store-link {
  display: inline-block;
  padding: 3px 10px;
  background: var(--green);
  color: var(--white);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  margin: 2px 3px 2px 0;
  transition: background .15s;
  white-space: nowrap;
}

a.badge-store-link:hover {
  background: var(--green-dark);
}

.badge-store-nolink {
  background: var(--gray-400, #9ca3af);
  cursor: default;
}

/* ── Fila clickeable en búsquedas públicas ──────────────── */
.pub-row-link {
  cursor: pointer;
}
.pub-row-link:hover td {
  background: #f0faf4;
}

/* ── Filtro de búsquedas públicas ───────────────────────── */
.pub-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pub-filter-box {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.pub-filter-box .pub-filter-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 1rem;
  pointer-events: none;
}
.pub-filter-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid #aab;
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.pub-filter-input:focus {
  border-color: var(--green);
}
.pub-filter-count {
  font-size: .85rem;
  color: var(--gray-500);
  white-space: nowrap;
}

/* ── Tabla Búsquedas Públicas ────────────────────────────── */
.pub-table { table-layout: fixed; width: 100%; }
.pub-table th, .pub-table td { vertical-align: top; }
.pub-th-precio { width: 9rem; }
.pub-th-fav    { width: 5rem; text-align: center; }
.pub-td-name strong { display: block; font-size: .97rem; }
.pub-count-line {
  display: block;
  font-size: .78rem;
  color: var(--gray-500);
  margin-top: 3px;
}
.pub-td-product { font-size: .82rem; color: var(--gray-500); }
.pub-best-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 4px;
}
.pub-price-val {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  color: var(--green-dark);
}
.pub-store-line {
  display: block;
  margin-top: 4px;
}
.pub-store-line .badge-store-link {
  font-size: .72rem;
  padding: 2px 6px;
}
.pub-td-fav { text-align: center; vertical-align: middle; }

/* ── Tabla de Favoritos ─────────────────────────────────── */
.fav-table .fav-row-link {
  cursor: pointer;
}
.fav-table .fav-row-link:hover td {
  background: #f0faf4;
}

/* ── Anchos de columnas tabla Favoritos ─────────────────── */
.fav-table { table-layout: fixed; width: 100%; }
.fav-th-name    { width: 23%; }
.fav-th-product { width: 36%; }
.fav-th-price   { width: 29%; }
.fav-th-refresh { width: 12%; }

.fav-td-name strong {
  display: block;
}

.fav-badge-public {
  font-size: .8rem;
  margin-left: 4px;
  vertical-align: middle;
}

.fav-td-price {
  font-weight: 600;
  color: var(--green-dark);
  white-space: nowrap;
  min-width: 140px;
}

/* supermercado debajo del precio (siempre visible) */
.fav-price-store {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 3px;
  white-space: normal;
}

/* precio por unidad debajo del precio real */
.fav-unit-price {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: var(--gray-500);
  margin-top: 2px;
  white-space: nowrap;
}

/* producto debajo del nombre: solo móvil */
.fav-mobile-product {
  display: none;
}

.fav-refresh-row-btn {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--gray-500);
  transition: border-color .15s, color .15s;
  line-height: 1;
}
.fav-refresh-row-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ─ Móvil: 3 columnas Nombre | Producto | Precio ─ */
@media (max-width: 500px) {
  /* Ocultar "También en" en favoritos por tienda */
  .fav-th-store,
  .fav-td-store {
    display: none;
  }
  /* Mostrar columna Producto como 2ª columna */
  .fav-td-product {
    font-size: .72rem;
    color: var(--gray-500);
    white-space: normal;
    padding-right: 4px;
  }
  /* No mostrar el bloque producto-dentro-de-nombre (ya está en su columna) */
  .fav-mobile-product {
    display: none;
  }
  /* En móvil: precio más compacto pero con tienda visible */
  .fav-price-store {
    display: block;
  }
  .fav-td-price {
    white-space: normal;
    font-size: .85rem;
    min-width: 110px;
  }
  .fav-unit-price {
    white-space: normal;
  }
}

/* ── Búsquedas Públicas – tabla 4 columnas en móvil ─────────── */
.pub-mobile-only { display: none; }

@media (max-width: 500px) {
  .pub-th-super, .pub-th-fecha,
  .pub-td-super, .pub-td-fecha {
    display: none;
  }
  .pub-mobile-only {
    display: block;
    margin-top: 4px;
  }
  .pub-mobile-fecha {
    font-size: .72rem;
    color: var(--gray-500);
  }
  .pub-mobile-super .badge-store-link {
    font-size: .68rem;
    padding: 2px 5px;
  }
  .pub-td-ver {
    text-align: center;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  .pub-td-ver .btn-small {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
  .pub-td-ver .pub-mobile-fav {
    display: flex;
    justify-content: center;
  }
  .pub-td-precio {
    font-size: .82rem;
  }
  .pub-td-productos {
    font-size: .8rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   Panel de Administración
   ═══════════════════════════════════════════════════════════ */

body.admin-body {
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header del admin ──────────────────────────────────────── */
.admin-header {
  background: #1a202c;
  color: var(--white);
  padding: 0 28px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.admin-badge {
  background: var(--red);
  color: var(--white);
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.admin-nav-link {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
}

.admin-nav-sep {
  color: rgba(255,255,255,.2);
  padding: 0 4px;
}

.admin-nav-logout {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  transition: background .15s;
}

.admin-nav-logout:hover {
  background: rgba(255,255,255,.1);
  color: var(--white);
}

/* ── Layout ────────────────────────────────────────────────── */
.admin-layout {
  flex: 1;
  display: flex;
}

.admin-main {
  flex: 1;
  padding: 32px 36px;
  max-width: 1200px;
}

/* ── Encabezado de página ──────────────────────────────────── */
.admin-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.admin-page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
}

.admin-back {
  display: block;
  font-size: .82rem;
  color: var(--gray-500);
  text-decoration: none;
  margin-bottom: 4px;
}

.admin-back:hover {
  color: var(--green);
}

.admin-count {
  font-size: .88rem;
  color: var(--gray-500);
  margin-left: auto;
}

/* ── Tarjetas de estadísticas ─────────────────────────────── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  border-left: 4px solid var(--gray-200);
}

.admin-stat-card.admin-stat-green {
  border-left-color: var(--green);
}

.admin-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1;
}

.admin-stat-label {
  font-size: .82rem;
  color: var(--gray-500);
  margin-top: 6px;
}

/* ── Métricas de uso ───────────────────────────────────────── */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.admin-metric-box {
  background: var(--gray-50, #f9fafb);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 18px 16px;
  text-align: center;
}

.admin-metric-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.admin-metric-title {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.admin-metric-total {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1;
  margin-bottom: 8px;
}

.admin-metric-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-metric-week {
  font-size: .78rem;
  color: var(--gray-500);
}

.admin-metric-today {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green, #16a34a);
}

.admin-center {
  text-align: center;
}

/* ── Tarjetas de contenido ─────────────────────────────────── */
.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-card-header h2,
.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 16px;
}

.btn-admin-link {
  font-size: .85rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.btn-admin-link:hover {
  text-decoration: underline;
}

/* ── Layout dos columnas ──────────────────────────────────── */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .admin-two-col { grid-template-columns: 1fr; }
}

/* ── Tabla ─────────────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.admin-table thead tr {
  background: #f7f8fa;
  border-bottom: 2px solid var(--gray-200);
}

.admin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #fafbfc;
}

.admin-center { text-align: center; }

.admin-muted {
  color: var(--gray-500);
  font-size: .85rem;
}

.admin-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.admin-link:hover {
  text-decoration: underline;
}

.admin-actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Botones pequeños de tabla ────────────────────────────── */
.btn-admin-sm {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.btn-admin-sm:hover {
  background: var(--gray-200);
  border-color: var(--gray-500);
}

.btn-admin-revoke {
  color: var(--gray-500);
  border-color: var(--gray-200);
}

.btn-admin-revoke:hover {
  color: var(--gray-700);
}

.btn-admin-delete {
  color: var(--red);
  border-color: #f5c6c6;
  background: #fff5f5;
}

.btn-admin-delete:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Botón de acción principal ────────────────────────────── */
.btn-admin-action {
  padding: 9px 20px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  margin-top: 6px;
}

.btn-admin-action:hover {
  background: var(--green-dark);
}

/* ── Badges de rol y visibilidad ─────────────────────────── */
.badge-admin {
  display: inline-block;
  background: #7c3aed;
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
}

.badge-user {
  display: inline-block;
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-public {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-private {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: .8rem;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ── Formulario en tarjeta ────────────────────────────────── */
.admin-form .admin-form-row {
  margin-bottom: 14px;
}

.admin-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 5px;
}

.admin-hint {
  font-weight: 400;
  color: var(--gray-500);
  font-size: .78rem;
}

.admin-form input[type="password"],
.admin-form input[type="text"],
.admin-form input[type="email"] {
  width: 100%;
  padding: 9px 12px;
  font-size: .92rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s;
}

.admin-form input:focus {
  border-color: var(--green);
}

/* ── Error inline ─────────────────────────────────────────── */
.admin-error {
  background: #fde8e8;
  border: 1px solid #f5c6c6;
  color: var(--red);
  padding: 9px 13px;
  border-radius: 6px;
  font-size: .85rem;
  margin-bottom: 12px;
}

/* ── Definition list ─────────────────────────────────────── */
.admin-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  font-size: .88rem;
}

.admin-dl dt {
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .04em;
  padding-top: 2px;
}

.admin-dl dd {
  color: #1a202c;
  word-break: break-all;
}

.admin-dl code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .82rem;
  color: var(--gray-700);
}

/* ── Botones de ayuda ? ───────────────────────────────────── */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid var(--gray-400);
  background: transparent;
  color: var(--gray-500);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.help-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.help-btn--inline {
  margin-left: .35rem;
  vertical-align: middle;
}
.help-btn--toolbar {
  margin-left: .1rem;
  margin-right: .5rem;
}
.help-input-wrap {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: 1;
  min-width: 0;
}
.help-input-wrap input {
  flex: 1;
  min-width: 0;
}

/* ── Modal de ayuda ──────────────────────────────────────── */
.help-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.help-modal-box {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  overflow: hidden;
}
.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.1rem .75rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: .97rem;
}
.help-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
  padding: 0 .2rem;
}
.help-modal-close:hover { color: var(--gray-800); }
.help-modal-body {
  padding: .9rem 1.1rem;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin: 0;
}
.help-modal-footer {
  padding: .65rem 1.1rem .9rem;
  display: flex;
  justify-content: flex-end;
}


/* ══════════════════════════════════════════════════
   Manual de usuario
   ══════════════════════════════════════════════════ */
.manual-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.manual-header {
  text-align: center;
  margin-bottom: 40px;
}
.manual-header h1 {
  font-size: 1.8rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.manual-header p {
  color: var(--gray-700);
  font-size: 1rem;
}

/* Secciones */
.manual-section {
  margin-bottom: 44px;
}
.manual-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.manual-section-title h2 {
  font-size: 1.25rem;
  color: var(--green-dark);
  margin: 0;
}
.manual-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Tarjetas de paso */
.manual-step-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.manual-step-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.manual-step-card p {
  margin: 0 0 8px;
  line-height: 1.55;
  color: var(--gray-700);
}
.manual-step-card p:last-child { margin-bottom: 0; }

/* Ejemplos */
.manual-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.manual-example-label {
  font-size: .82rem;
  color: var(--gray-500);
  font-weight: 600;
}
.manual-example code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: .85rem;
  color: var(--green-dark);
}

/* Tips */
.manual-tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffbea;
  border: 1px solid #f5e49a;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .88rem;
  color: var(--gray-700);
  margin-top: 10px;
}
.manual-tip-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Grid de tarjetas informativas */
.manual-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.manual-cards-grid--2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.manual-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 16px;
}
.manual-info-card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.manual-info-card h3 {
  font-size: .95rem;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.manual-info-card p {
  font-size: .85rem;
  color: var(--gray-700);
  line-height: 1.5;
  margin: 0;
}

/* FAQ */
.manual-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manual-faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.manual-faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.manual-faq-item summary::-webkit-details-marker { display: none; }
.manual-faq-item summary::after {
  content: '▾';
  font-size: .9rem;
  color: var(--gray-500);
  transition: transform .2s;
}
.manual-faq-item[open] summary::after {
  transform: rotate(180deg);
}
.manual-faq-item p {
  padding: 0 18px 14px;
  margin: 0;
  color: var(--gray-700);
  font-size: .9rem;
  line-height: 1.55;
  border-top: 1px solid var(--gray-200);
  padding-top: 10px;
}

/* Footer del manual */
.manual-footer {
  text-align: center;
  margin-top: 48px;
}

@media (max-width: 500px) {
  .manual-cards-grid {
    grid-template-columns: 1fr;
  }
  .manual-header h1 { font-size: 1.4rem; }
  .manual-section-title h2 { font-size: 1.1rem; }
}

/* ── Botones Actualizar → naranja ──────────────────────────── */
#refreshAllBtn {
  background: var(--orange) !important;
  color: var(--white) !important;
  border-color: var(--orange) !important;
}

#refreshAllBtn:hover {
  background: var(--orange-dark) !important;
  border-color: var(--orange-dark) !important;
}
