/* ==============================================================================
   so-compras - Shopping List Design System & Spreadsheet Theme
   ============================================================================== */

/* ------------------------------------------------------------------------------
   Design System Tokens (Light Theme Default)
   ------------------------------------------------------------------------------ */
:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-table-header: #f8fafc;
  --bg-table-row: #ffffff;
  --bg-table-hover: #f1f5f9;
  --bg-input: #ffffff;

  --border-grid: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-emerald: #059669;
  --accent-emerald-bg: #ecfdf5;
  --accent-amber: #d97706;
  --accent-amber-bg: #fffbeb;
  --accent-rose: #e11d48;
  --accent-rose-bg: #fef2f2;
  --accent-cyan: #0284c7;

  --row-completed: #f8fafc;
  --text-completed: #94a3b8;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ------------------------------------------------------------------------------
   Dark Theme Overrides
   ------------------------------------------------------------------------------ */
[data-theme="dark"] {
  --bg-page: #090d16;
  --bg-surface: #0f172a;
  --bg-subtle: #141e33;
  --bg-table-header: #131d31;
  --bg-table-row: #0f172a;
  --bg-table-hover: #1a2744;
  --bg-input: #10192d;

  --border-grid: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.16);
  --border-focus: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-rose: #f43f5e;
  --accent-rose-bg: rgba(244, 63, 94, 0.12);

  --row-completed: #0c1220;
  --text-completed: #525e75;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------------------
   Reset & Base Styles
   ------------------------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ------------------------------------------------------------------------------
   App Layout
   ------------------------------------------------------------------------------ */
.app-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ------------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------------ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  gap: 0.75rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #3730a3 100%);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Live Sync Indicator */
.sync-indicator-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  transition: background-color var(--transition-fast);
}

.sync-indicator-wrap.syncing .sync-dot {
  background-color: var(--accent-amber);
  animation: pulse-dot 1s infinite alternate;
}

.sync-indicator-wrap.error .sync-dot {
  background-color: var(--accent-rose);
}

@keyframes pulse-dot {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-grid);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

/* Reset All Button */
.btn-action-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #b45309;
  background: var(--accent-amber-bg);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .btn-action-warning {
  color: #fbbf24;
}

.btn-action-warning:hover {
  background: rgba(217, 119, 6, 0.22);
  border-color: #d97706;
  transform: translateY(-1px);
}

.btn-action-warning:active {
  transform: translateY(0);
}

/* ------------------------------------------------------------------------------
   Toolbar: Search & Store Filter Chips
   ------------------------------------------------------------------------------ */
/* Quick Add Card at the top */
.quick-add-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
}

.quick-add-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.quick-add-store-wrap {
  flex: 0 0 170px;
  min-width: 140px;
}

.quick-add-product-wrap {
  flex: 1 1 240px;
}

/* Store Sections Stack */
.store-sections-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-section-card {
  margin-bottom: 0;
  transition: all var(--transition-fast);
}

.store-section-card.is-collapsed {
  border-color: var(--border-grid);
}

.store-card-header {
  background: var(--bg-subtle);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--transition-fast);
}

.store-card-header:hover {
  background: var(--border-grid);
}

.store-card-header.is-collapsed {
  border-bottom: none;
}

.store-icon {
  font-size: 1.1rem;
}

.store-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-chips-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-toggle-all:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.inline-store-add-row {
  background: var(--bg-subtle) !important;
}

.btn-store-inline-add {
  padding: 0.35rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toolbar-search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.55rem 2rem 0.55rem 2.25rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Horizontal Store Filter Chips */
.store-chips-scroll {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-grid);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  user-select: none;
}

.store-chip:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.store-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.store-chip-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}

.store-chip.active .store-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ------------------------------------------------------------------------------
   Cards & Table Layout
   ------------------------------------------------------------------------------ */
.items-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-grid);
}

.card-title-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
}

.count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.count-badge-active {
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-primary);
}

.count-badge-done {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
}

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

/* Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.shopping-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.shopping-table th {
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-table-header);
  border-bottom: 1px solid var(--border-grid);
  user-select: none;
}

.shopping-table td {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-grid);
  vertical-align: middle;
}

.shopping-table tbody tr {
  background: var(--bg-table-row);
  transition: background-color var(--transition-fast);
}

.shopping-table tbody tr:hover {
  background: var(--bg-table-hover);
}

/* Column Widths & Alignments */
.col-handle {
  width: 36px;
  text-align: center;
  color: var(--text-muted);
}

.col-checkbox {
  width: 44px;
  text-align: center;
}

.col-produto {
  min-width: 220px;
}

.col-loja {
  width: 170px;
}

.col-completed-at {
  width: 130px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.col-actions {
  width: 50px;
  text-align: center;
}

/* ------------------------------------------------------------------------------
   Drag Handle & Single-click Checkbox
   ------------------------------------------------------------------------------ */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1.05rem;
  user-select: none;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
  display: inline-block;
  padding: 0.2rem;
}

.drag-handle:hover {
  opacity: 1;
  color: var(--text-primary);
}

.drag-handle:active {
  cursor: grabbing;
}

/* Custom Checkbox Button */
.custom-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
  color: transparent;
}

.custom-checkbox:hover {
  border-color: var(--accent-emerald);
  transform: scale(1.08);
}

.custom-checkbox.checked {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #ffffff;
}

.custom-checkbox.checked svg {
  transform: scale(1);
}

.custom-checkbox svg {
  transition: transform var(--transition-fast);
  transform: scale(0.6);
}

/* Product Text & Store Badge */
.produto-name {
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.2rem 0;
  word-break: break-word;
}

.produto-name:hover {
  color: var(--accent-primary);
}

/* Store Badge */
.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-grid);
}

/* Action Icon Buttons inside Row */
.row-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.row-action-btn:hover {
  color: var(--accent-rose);
  background: var(--accent-rose-bg);
}

/* ------------------------------------------------------------------------------
   Add New Item Inline Row (tfoot)
   ------------------------------------------------------------------------------ */
.add-item-row {
  background: var(--bg-subtle) !important;
  border-top: 2px solid var(--border-grid);
}

.add-plus-icon {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.checkbox-placeholder {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.95rem;
}

.inline-input, .inline-select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.inline-input:focus, .inline-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.store-combobox {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.custom-store-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-cancel-custom {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
}

.btn-cancel-custom:hover {
  color: var(--accent-rose);
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-add:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------------------
   Completed Items Section (Itens Concluídos)
   ------------------------------------------------------------------------------ */
.completed-items-card {
  margin-top: 0.5rem;
  border-color: var(--border-grid);
}

.completed-header {
  background: var(--bg-subtle);
}

.collapse-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.collapse-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  display: inline-block;
}

.collapse-arrow.collapsed {
  transform: rotate(-90deg);
}

.btn-text-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-text-danger:hover {
  color: var(--accent-rose);
  background: var(--accent-rose-bg);
}

/* Completed Row Styling */
.completed-table tbody tr {
  background: var(--row-completed);
}

.completed-table .produto-name {
  text-decoration: line-through;
  color: var(--text-completed);
}

.completed-table .store-pill {
  opacity: 0.6;
}

/* ------------------------------------------------------------------------------
   Empty States
   ------------------------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.empty-state-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.empty-state-small {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------------------
   Modal Dialog
   ------------------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-grid);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-grid);
}

.btn-secondary {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-grid);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-primary {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  border: 1px solid transparent;
  color: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-primary.btn-danger {
  background: var(--accent-rose);
}

.btn-primary.btn-danger:hover {
  background: #be123c;
}

/* ------------------------------------------------------------------------------
   Toast Notification
   ------------------------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-fade 0.25s ease;
}

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

/* ------------------------------------------------------------------------------
   Mobile Responsiveness (Touch-First & Fluid)
   ------------------------------------------------------------------------------ */
@media (max-width: 640px) {
  .app-layout {
    padding: 0.75rem 0.5rem 4rem 0.5rem;
    gap: 0.75rem;
  }

  .app-header {
    padding: 0.6rem 0.75rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .btn-label {
    display: none;
  }

  .btn-action-warning {
    padding: 0.45rem;
    border-radius: var(--radius-sm);
  }

  .col-handle {
    width: 28px;
  }

  .col-checkbox {
    width: 44px;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }

  .col-loja {
    width: 100px;
  }

  .col-completed-at {
    display: none;
  }

  .shopping-table th, .shopping-table td {
    padding: 0.6rem 0.45rem;
  }

  .store-pill {
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .custom-checkbox {
    width: 28px;
    height: 28px;
  }

  .card-hint {
    display: none;
  }
}
