/* ==========================================================================
   FEIRA DA TIA NEZ - DESIGN SYSTEM & STYLES
   Paleta rica, acolhedora, moderna e inspirada nas feiras nordestinas e mercados públicos.
   ========================================================================== */

:root {
  --primary: #c2410c; /* Laranja Telha / Feira */
  --primary-hover: #9a3412;
  --primary-light: #fff7ed;
  --primary-border: #fed7aa;
  
  --secondary: #047857; /* Verde Ervas */
  --secondary-light: #ecfdf5;

  --accent: #f59e0b; /* Amarelo Fruta */
  
  --bg-main: #fcfaf7;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.88);
  --bg-muted: #f4efe9;
  
  --text-main: #1c1917;
  --text-muted: #78716c;
  --text-light: #a8a29e;
  
  --border-subtle: #e7e0d8;
  --border-strong: #d6ccc2;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(28, 25, 23, 0.08), 0 2px 6px -1px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(28, 25, 23, 0.12), 0 4px 12px -2px rgba(28, 25, 23, 0.06);
  --shadow-xl: 0 20px 35px -8px rgba(28, 25, 23, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-check: #16a34a; /* Verde confirmação */
  --color-check-bg: #dcfce7;
  --color-cross: #dc2626; /* Vermelho não encontrado */
  --color-cross-bg: #fee2e2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px;
  background-image: 
    radial-gradient(#eedcc9 0.75px, transparent 0.75px), 
    radial-gradient(#eedcc9 0.75px, var(--bg-main) 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
}

/* Tipografia */
h1, h2, h3, h4, .brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #292524;
  letter-spacing: -0.02em;
}

/* App Container */
.app-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
}

/* Header & Barra Superior */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: sticky;
  top: 12px;
  z-index: 90;
}

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

.brand-icon-box {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #ea580c 0%, #b45309 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.brand-text h1 {
  font-size: 1.25rem;
  line-height: 1.15;
  color: #292524;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Switcher de Membro / Celular Atual */
.member-badge-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-badge-selector:hover {
  background: #ede6dc;
}

.active-member-avatar {
  font-size: 18px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.active-member-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #44403c;
}

/* Barra de Navegação Principal */
.main-nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-muted);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-tab-btn .badge-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Banner de Notificação e Instruções do App */
.family-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.family-banner-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.family-banner-action {
  flex-shrink: 0;
}

.btn-banner-cancel-shopper {
  background: #ffffff;
  border: 1.5px solid #ef4444;
  color: #dc2626;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
}

.btn-banner-cancel-shopper:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

.family-banner-icon {
  font-size: 28px;
  line-height: 1;
}

.family-banner-content h4 {
  font-size: 0.95rem;
  color: #9a3412;
  margin-bottom: 2px;
}

.family-banner-content p {
  font-size: 0.82rem;
  color: #7c2d12;
}

/* Seletor de Família / Barra de Membros */
.members-bar-container {
  margin-bottom: 20px;
}

.section-subtitle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-subtitle-bar h3 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.members-chips-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.member-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  font-size: 0.88rem;
  font-weight: 600;
}

.member-chip.selected {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.member-chip .chip-avatar {
  font-size: 1.1rem;
}

.btn-add-member {
  border: 2px dashed var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-add-member:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Cartões de Ação Rápida */
.quick-action-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.action-card-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.action-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.action-card-btn.primary-start {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
  border: none;
}

.action-card-btn.primary-start h4, 
.action-card-btn.primary-start p {
  color: #fff;
}

.action-card-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.action-card-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.action-card-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Área de Busca e Catálogo */
.catalog-search-box {
  position: relative;
  margin-bottom: 14px;
}

.catalog-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.catalog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

/* Filtros por Categoria */
.category-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.cat-filter-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-filter-btn.active {
  background: #292524;
  color: #fff;
  border-color: #292524;
}

/* Grid de Produtos do Catálogo */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.catalog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.catalog-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  min-width: 0;
  overflow: hidden;
}

.catalog-card-icon {
  font-size: 28px;
  line-height: 1;
  background: var(--bg-muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.catalog-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #292524;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.catalog-card-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-card-btn-add {
  margin-top: 8px;
  width: 100%;
  padding: 7px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.catalog-card-btn-add:hover {
  background: var(--primary);
  color: #fff;
}

.catalog-card-btn-admin-edit {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.catalog-card-btn-admin-edit:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  transform: scale(1.1);
}

/* ==========================================================================
   LISTAS DA FAMÍLIA (CONSOLIDADA & INDIVIDUAL)
   ========================================================================== */
.list-section-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.list-header-row h2 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Divisor de Membro na Lista Consolidada */
.member-group-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 18px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

.member-group-divider:first-of-type {
  margin-top: 0;
}

.member-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Item da Lista de Feira (Cards de Itens) */
.shopping-item-row {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.shopping-item-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

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

.shopping-item-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.shopping-item-details {
  flex: 1;
}

.item-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.item-name-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: #292524;
}

.item-qty-badge {
  background: #f3f4f6;
  color: #374151;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
}

.item-notes-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

.item-photo-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: 5px;
  cursor: pointer;
  font-weight: 600;
}

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

.btn-icon-action {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  font-size: 15px;
}

.btn-icon-action:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ==========================================================================
   MODO DE COMPRAS NA FEIRA (FEIRANTE EM AÇÃO!)
   Com os quadrados de [ ✓ ] e [ ✗ ], campos de valor e placar ao vivo
   ========================================================================== */
.shopping-mode-view {
  display: none;
}

.shopping-mode-view.active {
  display: block;
}

/* Header Flutuante do Modo Compras */
.shopping-live-header {
  position: sticky;
  top: 12px;
  z-index: 95;
  background: rgba(30, 27, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.live-header-title h3 {
  color: #fff;
  font-size: 1.1rem;
}

.live-pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.grand-total-display {
  text-align: right;
}

.grand-total-display .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #a8a29e;
  letter-spacing: 0.04em;
}

.grand-total-display .val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-heading);
  line-height: 1.1;
}

/* Barra de Subtotais Individuais em Tempo Real */
.members-live-subtotals-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  scrollbar-width: none;
}

.member-subtotal-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
}

.member-subtotal-pill .pill-val {
  font-weight: 800;
  color: #fde047;
}

/* Card do Item no Modo de Compras */
.shopping-market-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.shopping-market-card.status-bought {
  border-color: #86efac;
  background: #f0fdf4;
}

.shopping-market-card.status-missed {
  border-color: #fca5a5;
  background: #fef2f2;
  opacity: 0.78;
}

.market-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.market-card-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.market-card-icon {
  font-size: 32px;
  line-height: 1;
  background: var(--bg-muted);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.market-card-info h4 {
  font-size: 1.05rem;
  line-height: 1.25;
  color: #1c1917;
}

.market-card-req-qty {
  font-size: 0.88rem;
  font-weight: 700;
  color: #b45309;
  margin-top: 2px;
}

.market-card-notes {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* SELETORES QUADRADOS [ ✓ ] e [ ✗ ] */
.verification-squares-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.square-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
}

.square-btn .icon-symbol {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.square-btn .btn-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Quadrado de Verificação: [ ✓ ] Comprado */
.square-btn.btn-check {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.square-btn.btn-check:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.square-btn.btn-check.active {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
  transform: scale(1.02);
}

/* Quadrado de Não Comprado: [ ✗ ] Falta */
.square-btn.btn-cross {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.square-btn.btn-cross:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.square-btn.btn-cross.active {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  transform: scale(1.02);
}

/* Campos de Preço e Foto no Modo Compras */
.market-card-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--bg-muted);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.price-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-prefix {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.market-price-input {
  width: 100%;
  max-width: 140px;
  padding: 8px 10px;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #1c1917;
  outline: none;
  font-family: var(--font-heading);
}

.market-price-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.2);
}

.btn-item-photo-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: #44403c;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-item-photo-action:hover {
  background: #f5f5f4;
  border-color: var(--border-strong);
}

/* Barra Inferior com Botão Finalizar Feira */
.shopping-finish-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  padding: 14px 20px;
  box-shadow: var(--shadow-xl);
  z-index: 92;
}

.finish-bar-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finish-bar-summary {
  display: flex;
  flex-direction: column;
}

.finish-bar-summary span:first-child {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.finish-bar-summary span:last-child {
  font-size: 1.25rem;
  font-weight: 800;
  color: #047857;
  font-family: var(--font-heading);
}

.btn-finish-shopping {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-finish-shopping:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22, 101, 52, 0.45);
}

/* ==========================================================================
   TELA DE HISTÓRICO & PRESTAÇÃO DE CONTAS
   ========================================================================== */
.history-view-container {
  display: none;
}

.history-view-container.active {
  display: block;
}

.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.history-date-box h4 {
  font-size: 1.1rem;
  color: #292524;
}

.history-date-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-card-grand-total {
  text-align: right;
}

.history-card-grand-total .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.history-card-grand-total .amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

/* Cartões Individuais de Prestação de Contas por Membro */
.member-receipt-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.receipt-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.receipt-member-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.receipt-member-total {
  font-weight: 800;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.receipt-items-mini-list {
  font-size: 0.82rem;
  list-style: none;
}

.receipt-items-mini-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.07);
}

.btn-share-receipt-wa {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share-receipt-wa:hover {
  background: #1ebc59;
}

/* ==========================================================================
   ESTILOS AVANÇADOS DO HISTÓRICO: ABAS, FILTROS, SELETORES E ANÁLISE DE ITENS
   ========================================================================== */

/* Abas de Modo do Histórico (Segmented Tabs) */
.history-mode-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-muted);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.history-mode-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-mode-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

.history-mode-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Barra de Filtros por Data e Busca Rápida */
.history-filters-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .history-filters-bar {
    grid-template-columns: 1fr;
  }
}

.history-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-filter-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.history-date-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.history-date-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.history-input-with-clear {
  position: relative;
  display: flex;
  align-items: center;
}

.history-text-input {
  width: 100%;
  padding: 9px 32px 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.history-text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.btn-clear-history-search {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px;
}
.btn-clear-history-search:hover {
  color: var(--text-main);
}

/* Fita de Seleção Rápida de Feiras Realizadas */
.history-quick-fairs-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.history-quick-fair-chip {
  flex: 0 0 auto;
  min-width: 170px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.history-quick-fair-chip:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.history-quick-fair-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.15);
}

.quick-fair-date {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-fair-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.quick-fair-total {
  margin-top: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
  font-family: var(--font-heading);
}

/* Botão de Toggle de Detalhes no Card da Feira */
.btn-toggle-fair-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-fair-details:hover {
  background: #e5e0d8;
  border-color: var(--border-strong);
}

/* Painel de Pesquisa de Itens */
.item-search-box-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.item-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.item-search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.item-search-main-input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  background: var(--bg-main);
}

.item-search-main-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.12);
}

.btn-clear-item-search {
  position: absolute;
  right: 12px;
  background: #e7e0d8;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-clear-item-search:hover {
  background: #d6ccc2;
  color: var(--text-main);
}

.item-suggestions-wrapper {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.item-suggestions-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.item-suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.item-suggest-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateY(-1px);
}

.item-suggest-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Painel de Análise e Estatísticas do Item */
.item-analysis-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.item-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.item-analysis-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-analysis-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.item-analysis-title h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  line-height: 1.2;
}

.item-analysis-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-badge-frequency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Grid de KPIs do Item */
.item-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .item-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.item-kpi-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
}

.item-kpi-card .kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.item-kpi-card .kpi-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.item-kpi-card.highlight .kpi-value {
  color: var(--primary);
}

/* Box de Variação de Preço */
.item-price-trend-card {
  background: linear-gradient(135deg, #fffaf5 0%, #ffffff 100%);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.price-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.price-trend-head h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.price-trend-badge.up {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.price-trend-badge.down {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.price-trend-badge.stable {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.price-extremes-row {
  display: flex;
  gap: 16px;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.price-extreme-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-extreme-item strong {
  color: var(--text-main);
}

/* Tabela e Linha do Tempo de Compras do Item */
.item-history-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.item-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.item-history-table th {
  background: var(--bg-muted);
  padding: 10px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.item-history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.item-history-table tr:last-child td {
  border-bottom: none;
}

.item-history-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* ==========================================================================
   MODAIS (NOVO ITEM, FOTO, ADICIONAR MEMBRO, DETALHES)
   ========================================================================== */
/* Trava rigorosa de rolagem de fundo quando qualquer tela/modal estiver aberta na frente */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain; /* Impede vazamento de rolagem para o fundo */
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  display: flex;
}

.modal-window {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain; /* Impede encadeamento de scroll */
  box-shadow: var(--shadow-xl);
  padding: 24px;
  position: relative;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

/* Barra de rolagem discreta e elegante dentro da janela do modal */
.modal-window::-webkit-scrollbar {
  width: 6px;
}
.modal-window::-webkit-scrollbar-track {
  background: transparent;
}
.modal-window::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.modal-window::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.92) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.15rem;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-muted);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-close-modal:hover {
  background: #e7e5e4;
  color: var(--text-main);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #44403c;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-main);
  background: #fff;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.15);
}

/* Área de Upload / Câmera de Foto */
.photo-uploader-box {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  background: var(--bg-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.photo-uploader-box:hover {
  border-color: var(--primary);
  background: #fff7ed;
}

.photo-preview-image {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary-action {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: var(--primary-hover);
}

.btn-secondary-action {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* Mensagem vazia */
.empty-state-box {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

/* Toast de Alerta */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1c1917;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   TELAS DE AUTENTICAÇÃO (LOGIN & CADASTRO)
   ========================================================================== */
.auth-wrapper-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78vh;
  padding: 20px 10px;
}

.auth-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalPop 0.25s ease-out;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #ea580c 0%, #b45309 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 30px;
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.3);
  margin-bottom: 12px;
}

.auth-card-header h2 {
  font-size: 1.45rem;
  color: #292524;
}

.auth-card-header p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
}

.auth-row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 0.82rem;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

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

.auth-nav-switcher {
  display: flex;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  gap: 4px;
  border: 1px solid var(--border-subtle);
}

.auth-nav-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: calc(var(--radius-md) - 3px);
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-nav-btn:hover {
  color: var(--text-main);
}

.auth-nav-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.auth-divider-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 16px;
  color: var(--text-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider-line::before, .auth-divider-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider-line span {
  padding: 0 12px;
}

.quick-demo-access-box {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 18px;
  text-align: center;
}

.quick-demo-access-box p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.quick-demo-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-demo-btn {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #44403c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-demo-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.quick-demo-btn.admin-highlight {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #7c3aed;
  font-weight: 700;
}

/* ==========================================================================
   TELA DE TERMO DE USO & BLINDAGEM JURÍDICA
   ========================================================================== */
.terms-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-xl);
  max-width: 780px;
  margin: 20px auto;
}

.terms-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.terms-scroll-body {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: #fafaf9;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin: 18px 0;
  font-size: 0.86rem;
  color: #374151;
  line-height: 1.68;
}

.terms-scroll-body h4 {
  font-size: 0.96rem;
  color: #111827;
  margin: 18px 0 6px;
}

.terms-scroll-body h4:first-child {
  margin-top: 0;
}

.terms-legal-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #92400e;
}

.terms-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-terms-accept {
  flex: 1;
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-terms-accept:hover {
  background: #15803d;
  box-shadow: 0 4px 12px rgba(22, 128, 61, 0.35);
}

.btn-terms-refuse {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-terms-refuse:hover {
  background: #fecaca;
}

/* ==========================================================================
   TELA DE PERFIL DO USUÁRIO
   ========================================================================== */
.profile-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.profile-header-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  position: relative;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: var(--shadow-md);
  border: 3px solid #ffffff;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-info-preview h3 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.profile-phrase-balloon {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  display: inline-block;
  margin-top: 6px;
  box-shadow: var(--shadow-sm);
}

.avatar-selector-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.avatar-choice-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.avatar-choice-btn:hover, .avatar-choice-btn.selected {
  transform: scale(1.15);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Card de Gestão e Renomeação da Família no Perfil */
.profile-family-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.profile-family-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-family-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #92400e;
}

.profile-family-code-badge {
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  color: #b45309;
  border: 1px solid #fcd34d;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  font-family: monospace;
}

.profile-family-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-family-input-group .form-input {
  background: #ffffff;
  border: 1.5px solid #fcd34d;
  font-weight: 600;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  flex: 1;
}

.profile-family-input-group .form-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.btn-rename-family {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-rename-family:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.25);
}

.btn-rename-family:active {
  transform: translateY(0);
}

.profile-family-card-help {
  font-size: 0.77rem;
  color: #78350f;
  margin-top: 8px;
  line-height: 1.45;
}


/* ==========================================================================
   PAINEL ADMINISTRADOR MASTER (EXCLUSIVO hellywladi87@gmail.com)
   ========================================================================== */
.admin-badge-crown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.btn-open-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-admin-nav:hover {
  background: #7c3aed;
  color: #ffffff;
}

.admin-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.admin-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-tab-btn.active {
  background: #7c3aed;
  color: #fff;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.admin-stat-card .val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #7c3aed;
  font-family: var(--font-heading);
}

.admin-stat-card .label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.admin-table-wrapper {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  background: #fafaf9;
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: #44403c;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: #292524;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-photo-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.admin-photo-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.admin-photo-card-body {
  padding: 8px 10px;
}

.admin-photo-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1c1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-photo-card-info {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-admin-delete-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-admin-delete-photo:hover {
  background: #b91c1c;
}

/* ==========================================================================
   GRUPOS FAMILIARES EXCLUSIVOS & FEIRANTE DESIGNADO DA VEZ
   ========================================================================== */
.family-group-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: #44403c;
  cursor: pointer;
  transition: all 0.2s ease;
}

.family-group-badge-pill:hover {
  background: #ede6dc;
  border-color: var(--primary);
}

.family-group-badge-pill .family-code-tag {
  background: #292524;
  color: #fde047;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-family: monospace;
}

/* Card Destacado: O Feirante de Hoje */
.shopper-hero-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.shopper-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.shopper-profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shopper-avatar-box {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 10px rgba(194, 65, 12, 0.2);
  border: 2px solid #ea580c;
  flex-shrink: 0;
}

.shopper-title-box h4 {
  font-size: 1.05rem;
  color: #7c2d12;
  margin-bottom: 2px;
}

.shopper-title-box p {
  font-size: 0.82rem;
  color: #9a3412;
}

.shopper-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #c2410c;
  margin-top: 4px;
  border: 1px solid #fed7aa;
}

.shopper-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-volunteer-shopper {
  background: #ffffff;
  border: 1.5px solid #ea580c;
  color: #ea580c;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-volunteer-shopper:hover {
  background: #ea580c;
  color: #ffffff;
}

.btn-start-shopping-hero {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-start-shopping-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
}

.btn-cancel-shopper-hero {
  background: #ffffff;
  border: 1.5px solid #ef4444;
  color: #dc2626;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
}

.btn-cancel-shopper-hero:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Botão WhatsApp no Hero Card do Feirante */
.btn-share-whatsapp-hero {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-share-whatsapp-hero:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.42);
}

.btn-share-whatsapp-hero:active {
  transform: translateY(0);
}

/* Botão WhatsApp estilo Pill no cabeçalho da feira consolidada */
.btn-whatsapp-pill {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-whatsapp-pill:hover {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Modal WhatsApp Helper & Preview */
.whatsapp-helper-banner {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.45;
}

.share-format-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.share-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.share-chip-label:hover {
  background: #e7e0d8;
}

.share-chip-label input[type="radio"] {
  accent-color: #25d366;
}

.whatsapp-preview-container {
  background: #efeae2;
  border: 1px solid #dad3c8;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.whatsapp-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: #4b5563;
}

.whatsapp-bubble {
  background: #ffffff;
  border-radius: 8px;
  border-top-left-radius: 2px;
  padding: 12px 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #111b21;
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.btn-whatsapp-send {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
}

.btn-whatsapp-send:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}

/* Banner de Notificação de Feira Concluída */
.fair-completed-notify-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  animation: slideDownNotify 0.35s ease-out;
}

@keyframes slideDownNotify {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notify-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.notify-banner-left h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 2px;
}

.notify-banner-left p {
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.4;
}

.notify-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-notify-pix-copy {
  background: #ffffff;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-notify-pix-copy:hover {
  background: #15803d;
  color: #ffffff;
}

.btn-notify-view-history {
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
  transition: all 0.2s ease;
}

.btn-notify-view-history:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-notify-dismiss {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #166534;
  cursor: pointer;
  padding: 4px;
}

.history-shopper-pix-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 10px 0;
}

.btn-copy-history-pix {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-copy-history-pix:hover {
  background: #15803d;
}



.btn-abort-shopping {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #b91c1c;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-abort-shopping:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-danger-action {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-danger-action:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

/* ======================================================================
   PIX do Feirante - Seção dentro do Hero Card
   ====================================================================== */

.shopper-pix-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #f97316;
}

.pix-info-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: #f1f5f9;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
  position: relative;
  overflow: hidden;
}

.pix-info-box::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 150, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.pix-icon-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pix-icon-label strong {
  font-size: 0.92rem;
  color: #38bdf8;
}

.pix-logo-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(0, 210, 150, 0.5));
  animation: pixPulse 2.5s ease-in-out infinite;
}

@keyframes pixPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

.pix-key-display-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.pix-key-value {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #22d3ee;
  letter-spacing: 0.03em;
  word-break: break-all;
  background: transparent;
}

.btn-copy-pix {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.btn-copy-pix:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5);
}

.btn-copy-pix:active {
  transform: translateY(0);
}

/* Alerta de Privacidade da Minha Lista */
.privacy-shield-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #166534;
}

.privacy-shield-banner strong {
  color: #14532d;
}

/* Opções de Família no Cadastro */
.family-choice-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.family-choice-tab-btn {
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.family-choice-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   SELETOR VISUAL DE EMOJIS DE FEIRA (ACESSIBILIDADE TOTAL)
   ========================================================================== */
.emoji-picker-wrapper {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 6px;
}

.emoji-current-selected-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  margin-bottom: 10px;
}

.emoji-display-large {
  font-size: 32px;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.emoji-display-info {
  flex: 1;
}

.emoji-display-info span:first-child {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.emoji-display-info span:last-child {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.emoji-quick-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
}

@media (max-width: 480px) {
  .emoji-quick-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.emoji-choice-btn-cell {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 22px;
  line-height: 1;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.emoji-choice-btn-cell:hover, .emoji-choice-btn-cell:active {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: scale(1.18);
}

.emoji-choice-btn-cell.selected {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgba(194, 65, 12, 0.25);
  transform: scale(1.12);
}

/* ==========================================================================
   CAMPO MANUAL DE INSERIR EMOJIS E ABAS DE CATEGORIAS
   ========================================================================== */
.emoji-manual-box {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.emoji-manual-box:focus-within {
  border-color: var(--primary);
  background: #fffdfb;
}

.emoji-manual-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  cursor: pointer;
}

.emoji-manual-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.emoji-manual-input {
  flex: 1;
  font-size: 1.25rem !important;
  padding: 7px 12px !important;
  border-radius: var(--radius-sm) !important;
  border: 1.5px solid var(--border-subtle) !important;
  background: var(--bg-muted) !important;
  transition: all 0.2s !important;
}

.emoji-manual-input:focus {
  background: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15) !important;
}

.btn-open-native-emoji {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-open-native-emoji:hover, .btn-open-native-emoji:active {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.emoji-manual-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}

.emoji-manual-hint kbd {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Abas de Categorias de Emojis */
.emoji-category-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  margin-bottom: 6px;
  scrollbar-width: thin;
}

.emoji-cat-tab-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.emoji-cat-tab-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #94a3b8;
}

.emoji-cat-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(46, 125, 50, 0.3);
}

/* Responsividade Mobile */
@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }

  
  .auth-card-box {
    padding: 22px 16px;
  }

  .shopper-hero-content {
    flex-direction: column;
    align-items: stretch;
  }

  .shopper-actions-group {
    flex-direction: column;
  }

  .btn-volunteer-shopper, .btn-start-shopping-hero, .btn-cancel-shopper-hero {
    width: 100%;
    justify-content: center;
  }

  .quick-action-cards {
    grid-template-columns: 1fr;
  }
  
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .catalog-card {
    padding: 10px;
  }

  .catalog-card-icon {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .verification-squares-group {
    grid-template-columns: 1fr 1fr;
  }
  
  .market-card-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .market-price-input {
    max-width: 100%;
  }
  
  .finish-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .finish-bar-summary {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .btn-finish-shopping {
    justify-content: center;
  }
}

/* ==========================================================================
   PWA & ATALHO MOBILE - ESTILOS
   ========================================================================== */
.btn-install-pwa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-install-pwa:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.auth-install-prompt {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  text-align: center;
}

.btn-auth-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auth-install:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

/* Modal de Instalação do App */
.pwa-install-dialog {
  text-align: center;
}

.pwa-icon-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.pwa-icon-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(194, 65, 12, 0.22);
  margin-bottom: 8px;
  object-fit: cover;
}

.pwa-app-name-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.pwa-app-name-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pwa-platform-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.pwa-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pwa-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.pwa-steps-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fcfaf7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.pwa-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #c2410c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.pwa-step-text {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.4;
}

.pwa-step-text strong {
  color: #c2410c;
}



