/* ==========================================================================
   LISTA DE COMPRAS BELGA - ESTILOS MÓVILES RESPONSIVE & PWA
   Paleta moderna Dark Mode, Glassmorphism, Safe Areas & Estilo Bélgica
   ========================================================================== */

:root {
  /* Design Tokens */
  --bg-main: #0B0F19;
  --bg-card: rgba(26, 34, 53, 0.75);
  --bg-card-hover: rgba(36, 48, 74, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.85);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);

  /* Belgian Supermarkets Identity Colors */
  --aldi-primary: #00205B;
  --aldi-accent: #00A3E0;
  --aldi-pill: #0284C7;
  
  --delhaize-primary: #D52B1E;
  --delhaize-accent: #EF4444;
  --delhaize-pill: #DC2626;
  
  --colruyt-primary: #FF6600;
  --colruyt-accent: #FB923C;
  --colruyt-pill: #EA580C;
  
  --carrefour-primary: #004F9F;
  --carrefour-accent: #60A5FA;
  --carrefour-pill: #2563EB;

  --accent-cyan: #38BDF8;
  --accent-indigo: #6366F1;
  --accent-gold: #F59E0B;
  --accent-emerald: #10B981;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Main Container: Mobile viewport with maximum comfort */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 640px; /* Tablet & desktop friendly constraint */
  margin: 0 auto;
  background: radial-gradient(circle at 50% 0%, #172554 0%, var(--bg-main) 65%);
  position: relative;
  padding-bottom: calc(88px + var(--safe-bottom));
}

/* ==========================================================================
   HEADER & STORE FILTER TABS
   ========================================================================== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: calc(12px + var(--safe-top));
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px 16px;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.app-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #FFFFFF, #CBD5E1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
  border: 1px solid var(--border-subtle);
}

.token-badge.clickable {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
  user-select: none;
}

.token-badge.clickable:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-cyan);
  color: #FFFFFF;
}

.token-badge.clickable:active {
  transform: scale(0.96);
}

.chevron-down {
  margin-left: 2px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.dot-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: scale(0.94);
}

.btn-pdf {
  color: var(--accent-cyan);
}

.btn-install {
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Horizontal Store Tabs */
.store-tabs-wrapper {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding: 0 12px 12px 12px;
  -webkit-overflow-scrolling: touch;
}

.store-tabs-wrapper::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.store-tabs {
  display: flex;
  gap: 6px;
  width: 100%;
}

.store-tab {
  flex: 1 1 0px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.store-tab:active {
  transform: scale(0.95);
}

.store-tab .tab-icon {
  font-size: 14px;
}

.store-tab .tab-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 440px) {
  .store-tabs-wrapper {
    padding: 0 8px 10px 8px;
  }
  .store-tabs {
    gap: 4px;
  }
  .store-tab {
    padding: 7px 6px;
    font-size: 11.5px;
    gap: 3px;
  }
  .store-tab .tab-icon {
    font-size: 13px;
  }
  .store-tab .tab-badge {
    padding: 1px 4px;
    font-size: 10px;
  }
}

/* Store Tab Active States with specific branding */
.store-tab.active {
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.store-tab[data-store="all"].active {
  background: linear-gradient(135deg, #3B82F6, #6366F1);
}

.store-tab[data-store="aldi"].active {
  background: linear-gradient(135deg, var(--aldi-primary), var(--aldi-accent));
}

.store-tab[data-store="delhaize"].active {
  background: linear-gradient(135deg, #B91C1C, var(--delhaize-primary));
}

.store-tab[data-store="colruyt"].active {
  background: linear-gradient(135deg, #C2410C, var(--colruyt-primary));
}

.store-tab[data-store="carrefour"].active {
  background: linear-gradient(135deg, #1D4ED8, #0284C7);
}

/* ==========================================================================
   QUICK ADD BAR & INPUT ROW
   ========================================================================== */

.quick-add-section {
  padding: 14px 16px 10px 16px;
}

.quick-add-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.autocomplete-container {
  flex: 1;
  position: relative;
}

.quick-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.quick-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.quick-input::placeholder {
  color: var(--text-muted);
}

.btn-add-item {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease;
}

.btn-add-item:active {
  transform: scale(0.92);
}

/* Autocomplete Dropdown List */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1E293B;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

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

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

.item-suggest-name {
  font-weight: 500;
  color: #F8FAFC;
}

.item-suggest-store {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.suggest-aldi {
  background: rgba(0, 163, 224, 0.2);
  color: #38BDF8;
}

.suggest-delhaize {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
}

.suggest-colruyt {
  background: rgba(234, 88, 12, 0.2);
  color: #FB923C;
}

.suggest-carrefour {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
}

/* Store Selector Pills & Quantity Controls */
.selectors-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.store-selector-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.pill-option {
  position: relative;
  cursor: pointer;
}

.pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: inline-block;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.pill-option input[type="radio"]:checked + span {
  color: #FFFFFF;
  font-weight: 700;
}

.pill-aldi input[type="radio"]:checked + span {
  background: var(--aldi-pill);
  border-color: var(--aldi-accent);
}

.pill-delhaize input[type="radio"]:checked + span {
  background: var(--delhaize-pill);
  border-color: var(--delhaize-accent);
}

.pill-colruyt input[type="radio"]:checked + span {
  background: var(--colruyt-pill);
  border-color: var(--colruyt-accent);
}

.pill-carrefour input[type="radio"]:checked + span {
  background: var(--carrefour-pill);
  border-color: var(--carrefour-accent);
}

.quantity-control {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 4px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-qty:active {
  background: rgba(255, 255, 255, 0.2);
}

.qty-display {
  width: 32px;
  text-align: center;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
}

/* ==========================================================================
   MAIN CONTENT & STORE GROUPS
   ========================================================================== */

.main-content {
  flex: 1;
  padding: 8px 16px 20px 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state h3 {
  font-family: var(--font-display);
  color: #FFFFFF;
  font-size: 19px;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Store Cards & Items */
.store-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.store-group-card:hover {
  border-color: var(--border-highlight);
}

.store-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
}

.store-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.avatar-aldi { background: var(--aldi-primary); color: #FFF; }
.avatar-delhaize { background: var(--delhaize-primary); color: #FFF; }
.avatar-colruyt { background: var(--colruyt-primary); color: #FFF; }
.avatar-carrefour { background: var(--carrefour-primary); color: #FFF; }

.store-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.store-count-badge {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Items List */
.items-list {
  list-style: none;
}

.shopping-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.25s ease;
  user-select: none;
}

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

.shopping-item-row:active {
  background: rgba(255, 255, 255, 0.03);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  cursor: pointer;
}

/* Custom Large Mobile Checkbox */
.item-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.item-checkbox svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-details {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-size: 15px;
  font-weight: 500;
  color: #F8FAFC;
  transition: all 0.2s ease;
}

.item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-qty-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.btn-item-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
}

.btn-item-delete:hover,
.btn-item-delete:active {
  opacity: 1;
  color: #F87171;
  background: rgba(239, 68, 68, 0.1);
}

/* Completed Item Strikethrough State */
.shopping-item-row.completed {
  background: rgba(15, 23, 42, 0.4);
}

.shopping-item-row.completed .item-checkbox {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.shopping-item-row.completed .item-checkbox svg {
  opacity: 1;
  transform: scale(1);
  stroke: #FFFFFF;
}

.shopping-item-row.completed .item-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.shopping-item-row.completed .item-qty-badge {
  opacity: 0.4;
}

/* ==========================================================================
   BOTTOM ACTION BAR (THUMB ZONE)
   ========================================================================== */

.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px calc(10px + var(--safe-bottom)) 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 150;
}

.btn-action-camera {
  flex: 2;
  height: 50px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, #6366F1, #38BDF8);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.btn-action-camera:active {
  transform: scale(0.97);
}

.camera-sparkle {
  position: absolute;
  top: 6px;
  left: 14px;
  font-size: 12px;
  animation: pulseSparkle 2s infinite ease-in-out;
}

@keyframes pulseSparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.btn-action-clear {
  flex: 1.2;
  height: 50px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-clear:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.97);
}

.btn-action-finish {
  flex: 1.2;
  height: 50px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-action-finish:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end; /* Bottom sheet on mobile */
  justify-content: center;
  z-index: 300;
  transition: opacity 0.2s ease;
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #111827;
  border: 1px solid var(--border-highlight);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + var(--safe-bottom)) 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 600px) {
  .modal-card {
    border-radius: 24px;
    padding: 24px;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Camera Preview & AI Scanning */
.camera-preview-area {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #030712;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.camera-video, .image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-placeholder {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.camera-placeholder p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* AI Scanner Animation */
.ai-scanner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.scanner-bar {
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38BDF8, transparent);
  box-shadow: 0 0 14px #38BDF8;
  animation: scanMove 1.5s infinite ease-in-out;
}

@keyframes scanMove {
  0% { transform: translateY(-40px); }
  50% { transform: translateY(40px); }
  100% { transform: translateY(-40px); }
}

.scanner-text {
  font-weight: 600;
  font-size: 14px;
  color: #38BDF8;
  font-family: var(--font-display);
}

.camera-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-camera-opt {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-photo {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-secondary-photo {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* AI Result Card */
.ai-result-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
}

.badge-ai-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.modal-input, .modal-select {
  width: 100%;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #FFFFFF;
  font-size: 14px;
  outline: none;
}

.modal-input:focus, .modal-select:focus {
  border-color: var(--accent-cyan);
}

.form-row {
  display: flex;
  gap: 10px;
}

.flex-1 { flex: 1; }
.text-center { text-align: center; }

.btn-confirm-ai {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}

/* Share Modal & PWA Guide */
.share-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.share-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.share-url-input {
  font-size: 13px;
  color: var(--accent-cyan);
}

.btn-copy {
  padding: 0 16px;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.btn-share-social.whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3B82F6;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  top: calc(20px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-weight: 600;
  z-index: 400;
  pointer-events: none;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Lists Management & History Styles */
.modal-card-large {
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-scrollable {
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 4px;
}

.lists-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.lists-nav-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lists-nav-tab.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #FFFFFF;
}

.lists-quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.btn-create-list-primary {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #0284C7, #2563EB);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease;
}

.btn-create-list-clone {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-create-list-clone:hover {
  background: rgba(245, 158, 11, 0.25);
}

.lists-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-entry-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-entry-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
}

.list-entry-card.active-list {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
}

.list-card-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.list-card-title {
  font-weight: 600;
  font-size: 15px;
  color: #F8FAFC;
}

.list-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.badge-status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.archived-entry-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archived-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archived-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #E2E8F0;
}

.archived-date {
  font-size: 12px;
  color: var(--text-muted);
}

.archived-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.btn-reuse-list {
  padding: 6px 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38BDF8;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reuse-list:hover {
  background: rgba(56, 189, 248, 0.25);
}

.history-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.clone-option-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
}

.clone-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #F8FAFC;
  cursor: pointer;
  line-height: 1.4;
}

.clone-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #F59E0B;
  margin-top: 2px;
}

.finish-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.finish-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.finish-stat-row:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.text-success { color: #10B981; }
.text-warning { color: #F59E0B; }

/* Helpers */
.hidden { display: none !important; }

/* ==========================================================================
   PRINT STYLESHEET (PDF & PAPER EXPORT)
   Optimizado para hojas limpias, 2 columnas, checklist legible a bolígrafo
   ========================================================================== */

@media print {
  body, html {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .top-bar,
  .quick-add-section,
  .bottom-action-bar,
  .modal-backdrop,
  .btn-item-delete,
  .toast-notification {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
    background: none !important;
  }

  /* Printable Header */
  .print-header {
    border-bottom: 2pt solid #000;
    padding-bottom: 8pt;
    margin-bottom: 14pt;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-title {
    font-size: 20pt;
    font-weight: bold;
    margin: 0;
  }

  .print-date {
    font-size: 10pt;
    color: #444;
  }

  /* 2-Column Grid for Supermarkets */
  .stores-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16pt !important;
  }

  .store-group-card {
    background: transparent !important;
    border: 1pt solid #CCC !important;
    border-radius: 4pt !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 12pt !important;
  }

  .store-group-header {
    background: #F1F5F9 !important;
    border-bottom: 1pt solid #CCC !important;
    padding: 6pt 10pt !important;
  }

  .store-title {
    color: #000 !important;
    font-size: 13pt !important;
  }

  .shopping-item-row {
    padding: 6pt 10pt !important;
    border-bottom: 0.5pt solid #EEE !important;
  }

  .shopping-item-row.completed {
    opacity: 0.35 !important;
  }

  .item-checkbox {
    width: 14pt !important;
    height: 14pt !important;
    border: 1.5pt solid #000 !important;
    border-radius: 2pt !important;
    background: transparent !important;
  }

  .item-checkbox svg {
    display: none !important;
  }

  .item-name {
    color: #000 !important;
    font-size: 11pt !important;
  }

  .item-qty-badge {
    background: none !important;
    border: 0.5pt solid #666 !important;
    color: #000 !important;
    font-size: 9pt !important;
    padding: 1pt 4pt !important;
  }
}
