/* ==========================================================================
   CartCraft - Mobile-First In-Store Shopping Checklist Styles
   Designed for fast one-handed supermarket navigation & high legibility
   ========================================================================== */

:root {
  /* Default: Crisp, Clean, High-Contrast Light Mode */
  --bg-canvas: #f4f5f8;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --primary: #059669;
  --primary-light: #ecfdf5;
  --primary-glow: rgba(5, 150, 105, 0.18);
  --primary-dark: #047857;

  --accent-gold: #d97706;
  --accent-gold-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-float: 0 12px 28px -4px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* High-Contrast Zinc/Slate Dark Mode */
  --bg-canvas: #090d16;
  --bg-card: #131b2e;
  --bg-card-subtle: #0f1626;
  --bg-input: #1b2640;
  --border-subtle: #1e293b;
  --border-card: #24324f;
  --border-hover: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #10b981;
  --primary-light: rgba(16, 185, 129, 0.15);
  --primary-glow: rgba(16, 185, 129, 0.3);
  --primary-dark: #059669;

  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 16px 36px rgba(0, 0, 0, 0.55);
}

/* Base Reset & Universal Tap Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html {
  font-size: 16px;
  background-color: var(--bg-canvas);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
  min-height: 100vh;
}

/* App Outer Shell */
.app-layout {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.5rem 0.75rem;
}

/* Sticky App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-canvas);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.list-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  max-width: 200px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.92rem;
  transition: var(--transition);
}

.list-pill-btn:hover {
  border-color: var(--primary);
}

.list-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron-down {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.remaining-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.header-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-action-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}

.header-action-btn svg {
  width: 17px;
  height: 17px;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.btn-install svg {
  width: 15px;
  height: 15px;
}

/* Store Trip Progress Bar */
.trip-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.trip-bar-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.trip-stat {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.trip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text-muted);
}

.trip-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.trip-val.price {
  color: var(--primary) !important;
}

.trip-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.trip-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
}

/* Quick Add Section */
.add-section {
  margin-bottom: 0.85rem;
}

.quick-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.8rem;
  box-shadow: var(--shadow-card);
}

.quick-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  padding: 0.4rem 0.2rem;
}

.quick-input-row input::placeholder {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.btn-add-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 8px var(--primary-glow);
  transition: var(--transition);
}

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

.btn-add-circle svg {
  width: 22px;
  height: 22px;
}

.quick-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.45rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--border-subtle);
}

.cat-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.clean-select {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.quick-modifiers {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-pill-toggle {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-pill-toggle.active {
  background: var(--accent-gold-bg);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.mini-price-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mini-price-wrap input {
  width: 48px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding-left: 2px;
}

/* Suggestion Chips */
.chips-scroll-wrap {
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 0.5rem;
}

.chips-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.suggestion-chips {
  display: flex;
  gap: 0.35rem;
  width: max-content;
}

.suggestion-chip {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.suggestion-chip:active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Filters & Search Strip */
.filters-section {
  margin-bottom: 0.85rem;
}

.search-sort-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.search-input-wrap svg {
  position: absolute;
  left: 0.75rem;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.45rem 2rem 0.45rem 2.2rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--primary);
}

.btn-clear {
  position: absolute;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.btn-icon-soft {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon-soft.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-icon-soft svg {
  width: 17px;
  height: 17px;
}

/* Category Filter Pills */
.categories-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.2rem;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.cat-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Main Checklist & In-Store Tap Optimization */
.checklist-main {
  margin-bottom: 1rem;
}

.list-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.2rem 0.4rem 0.2rem;
}

.sub-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.text-action-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.items-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Category Section Dividers (Aisles) */
.aisle-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.2rem 0.25rem 0.2rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aisle-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  margin-left: 0.4rem;
}

/* Individual Item Card — Engineered for One-Handed Store Shopping */
.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Touch Active feedback */
.item-card:active {
  transform: scale(0.985);
  background: var(--bg-card-subtle);
}

.item-card.priority-item {
  border-left: 4px solid var(--accent-gold);
}

.item-card.is-done {
  background: var(--bg-card-subtle);
  border-color: var(--border-subtle);
  opacity: 0.6;
}

.item-card.is-done .item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Big Tap Target for Checking */
.card-tap-target {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

/* Large Circular Check Button */
.check-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid var(--border-hover);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.item-card.is-done .check-circle {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 6px var(--primary-glow);
}

.check-circle svg {
  width: 15px;
  height: 15px;
  stroke: #ffffff;
  stroke-width: 3.5;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition);
}

.item-card.is-done .check-circle svg {
  opacity: 1;
  transform: scale(1);
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.item-title-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.item-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.star-badge {
  font-size: 0.85rem;
}

.item-sub-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.qty-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
}

.cat-pill {
  color: var(--text-muted);
  background: var(--bg-canvas);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.price-pill {
  color: var(--primary);
  font-weight: 700;
}

.notes-text {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.76rem;
}

/* Stepper Controls on Right */
.card-actions-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.stepper-box {
  display: flex;
  align-items: center;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-step {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-step:active {
  background: var(--border-subtle);
}

.btn-more {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

.btn-more svg {
  width: 15px;
  height: 15px;
}

/* In Basket (Completed) Accordion */
.completed-section {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.completed-accordion-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}

.completed-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.chevron-rot {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.completed-section.collapsed .chevron-rot {
  transform: rotate(-90deg);
}

.completed-section.collapsed .completed-items {
  display: none;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}

.clear-btn:active {
  background: var(--danger-bg);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-lg);
  margin-top: 0.5rem;
}

.empty-emoji {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Fixed Bottom Mobile Bar */
.app-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-card);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)) 1rem;
  z-index: 50;
  box-shadow: var(--shadow-float);
}

.bottom-bar-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.offline-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.offline-badge .dot.online {
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.offline-badge .dot.offline {
  background: var(--accent-gold);
}

.btn-copy-list {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-light);
  border: 1px solid transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.btn-copy-list:active {
  background: var(--primary);
  color: #fff;
}

.btn-copy-list svg {
  width: 14px;
  height: 14px;
}

/* Modals & Bottom Sheets */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}

.modal-sheet {
  background: var(--bg-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 600px) {
  .modal-sheet {
    border-radius: var(--radius-lg);
  }
}

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

.modal-top h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-x {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-inner {
  padding: 1rem 1.25rem 1.5rem 1.25rem;
  overflow-y: auto;
}

/* Form Styles Inside Modals */
.form-field {
  margin-bottom: 0.85rem;
}

.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.full-input, .full-select {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
}

.full-input:focus, .full-select:focus {
  border-color: var(--primary);
}

.form-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkbox-row {
  margin: 0.75rem 0 1rem 0;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-cancel {
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.btn-save {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* List Switcher */
.new-list-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.new-list-box input {
  flex: 1;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

.btn-create-list {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.lists-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.list-row.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.list-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

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

.btn-del-list {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

/* Share Options */
.share-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .share-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.share-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.85rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.share-opt-btn:hover {
  border-color: var(--primary);
}

.share-opt-btn .icon {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.share-opt-btn strong {
  font-size: 0.88rem;
}

.share-opt-btn small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.preview-box label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.preview-box textarea {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
}

/* Toast Popups */
.toast-area {
  position: fixed;
  bottom: calc(4.8rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 150;
  pointer-events: none;
  width: 92%;
  max-width: 380px;
}

.toast-msg {
  background: var(--text-primary);
  color: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-float);
  pointer-events: auto;
  animation: slideToast 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-undo-btn {
  background: transparent;
  border: none;
  color: #34d399;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  margin-left: 0.75rem;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(40px); }
  to { transform: translateY(0); }
}

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

/* Print Friendly Checklist */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .app-header, .add-section, .filters-section, .app-bottom-bar, .card-actions-right, .completed-section, .modal-overlay, .toast-area, .text-action-btn {
    display: none !important;
  }
  .app-layout {
    max-width: 100% !important;
  }
  .trip-bar {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  .item-card {
    border: 1px solid #eee !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 4px !important;
  }
  .check-circle {
    border: 2px solid #000 !important;
  }
}
