/* ==========================================================================
   Babyuitzet Mobiele Webapp Styles
   ========================================================================== */

:root {
  --bg-main: #FDFBF7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F6F3ED;
  --bg-input: #F0EBE1;

  --color-primary: #D97757;       /* Warm terracotta / koraal */
  --color-primary-light: #F8ECE7;
  --color-primary-hover: #C56345;
  
  --color-accent: #6BA292;        /* Salie groen */
  --color-accent-light: #EBF4F1;
  
  --color-pastel-yellow: #F6D884;
  --color-pastel-blue: #A2C8DB;
  
  --color-text-main: #2C302E;
  --color-text-muted: #7A827D;
  --color-text-dim: #A9B0AA;

  --border-color: #E8E2D7;
  --border-radius-sm: 10px;
  --border-radius-md: 16px;
  --border-radius-lg: 22px;
  --border-radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(44, 48, 46, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 48, 46, 0.07);
  --shadow-lg: 0 10px 28px rgba(44, 48, 46, 0.11);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-main);
  color: var(--color-text-main);
  font-family: var(--font-family);
  touch-action: manipulation;
  overflow-x: hidden;
}

/* ==========================================================================
   PINCODE VERGRENDELSCHERM
   ========================================================================== */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, #FDF8F5 0%, #F5EFEB 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  z-index: 10000;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

.pin-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 12px;
}

.pin-icon-wrap {
  width: 72px;
  height: 72px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  animation: pulse-gentle 3s ease-in-out infinite;
}

@keyframes pulse-gentle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pin-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 12px;
}

/* Naam selectie (Kelly / Tobie) */
.pin-name-section {
  width: 100%;
  max-width: 290px;
  margin-bottom: 12px;
  text-align: center;
}

.pin-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.user-select-group {
  display: flex;
  gap: 12px;
  width: 100%;
}

.user-select-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-select-btn .user-avatar {
  font-size: 20px;
}

.user-select-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.2);
  transform: scale(1.02);
}

.pin-prompt-wrap {
  margin: 4px 0 2px;
}

.pin-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 280px;
}

.pin-subtitle strong {
  color: var(--color-primary);
}

/* Pincode bolletjes */
.pin-dots-container {
  display: flex;
  gap: 16px;
  margin: 16px 0 8px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.filled {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(217, 119, 87, 0.45);
}

.pin-dot.error {
  background: #E63946;
  border-color: #E63946;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.45);
}

.pin-error-msg {
  height: 22px;
  font-size: 13px;
  font-weight: 600;
  color: #E63946;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pin-error-msg.visible {
  opacity: 1;
}

/* Shake animatie bij fout */
.shake {
  animation: shake-anim 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake-anim {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* Pincode Keypad */
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 12px;
}

.key-btn {
  aspect-ratio: 1;
  max-height: 74px;
  border: none;
  border-radius: 50%;
  background: white;
  color: var(--color-text-main);
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.key-btn:active {
  transform: scale(0.92);
  background: var(--bg-input);
  box-shadow: none;
}

.key-btn.action-btn {
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  box-shadow: none;
  color: var(--color-text-muted);
}

.key-btn.action-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

/* Pincode onthouden vinkje */
.remember-pin-wrap {
  margin: 10px 0 16px;
  display: flex;
  justify-content: center;
}

.remember-pin-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: white;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.remember-pin-label:active {
  transform: scale(0.97);
  background: var(--bg-subtle);
}

.remember-pin-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.remember-check-indicator {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.remember-check-indicator svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.2s ease;
}

.remember-pin-label input[type="checkbox"]:checked + .remember-check-indicator {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.05);
}

.remember-pin-label input[type="checkbox"]:checked + .remember-check-indicator svg {
  stroke-dashoffset: 0;
}

.remember-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
}

.pin-hint {
  font-size: 12px;
  color: var(--color-text-dim);
  text-align: center;
}

/* ==========================================================================
   HOOFDAPPLICATIE
   ========================================================================== */
.app-container {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--safe-bottom) + 80px);
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: calc(var(--safe-top) + 12px) 16px 12px;
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 28px;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text-main);
  line-height: 1.1;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #E22718; /* Babypark rood tint */
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.header-sub-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.active-user-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
}

.live-sync-badge {
  font-size: 11px;
  font-weight: 600;
  background: #E8F5E9;
  color: #2E7D32;
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* Notificatie Banner */
.notification-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1px solid #FDE68A;
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  animation: slide-down-banner 0.3s ease;
}

.notification-banner.visible {
  display: flex;
}

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

.notif-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.notif-bell-icon {
  font-size: 20px;
}

.notif-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  display: block;
}

.notif-text p {
  font-size: 11px;
  color: #B45309;
  margin: 0;
}

.notif-enable-btn {
  background: #D97706;
  color: white;
  border: none;
  border-radius: var(--border-radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.notif-enable-btn:active {
  background: #B45309;
}

.notif-close-btn {
  background: transparent;
  border: none;
  color: #92400E;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

/* Toast Meldingen Container */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 10005;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: white;
  color: var(--color-text-main);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-item.leaving {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-15px) scale(0.95); }
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--bg-subtle);
}

/* Voortgangsbalk */
.progress-card {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

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

.progress-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
}

.progress-stats {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), #F4A261, var(--color-accent));
  border-radius: var(--border-radius-full);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Zoekbalk */
.search-container {
  position: relative;
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 38px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--color-text-muted);
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear-btn.visible {
  display: flex;
}

/* Horizontale Categorie Chips */
.category-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-chips-row::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--border-radius-full);
  background: white;
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-main);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.cat-chip.active {
  background: var(--color-text-main);
  color: white;
  border-color: var(--color-text-main);
  transform: scale(1.02);
}

.cat-chip:active {
  transform: scale(0.95);
}

/* Filter status tabs (Alles, Nog te doen, Klaar) */
.filter-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-radius: var(--border-radius-sm);
  padding: 3px;
  margin: 14px 16px 0;
  gap: 4px;
}

.filter-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.filter-tab.active {
  background: white;
  color: var(--color-text-main);
  box-shadow: var(--shadow-sm);
}

.filter-tab.shop-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.shop-badge {
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--border-radius-full);
  min-width: 18px;
  text-align: center;
}

.filter-tab.shop-tab.active .shop-badge {
  background: var(--color-primary);
  color: white;
}

/* ==========================================================================
   CATEGORIE KAARTEN & ITEMS
   ========================================================================== */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
  border-bottom: 1px solid var(--border-color);
}

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

.category-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-subtle);
  border-radius: 14px;
}

/* Bovenste actiebalk voor artikel toevoegen */
.top-action-bar {
  padding: 10px 16px 4px;
}

.top-add-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #FAF4EB 0%, #F5ECE0 100%);
  border: 1.5px dashed var(--color-primary);
  border-radius: var(--border-radius-md);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-add-btn:active {
  transform: scale(0.98);
  background: var(--color-primary-light);
}

.category-title-text {
  flex: 1;
}

.cat-title-with-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-title-text h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.2;
}

.cat-edit-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  opacity: 0.6;
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-edit-btn:hover, .cat-edit-btn:active {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.05);
}

.category-title-text p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.category-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-counter-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  background: var(--bg-subtle);
  color: var(--color-text-muted);
  transition: all 0.25s ease;
}

.category-counter-pill.completed {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.chevron-icon {
  font-size: 14px;
  color: var(--color-text-dim);
  transition: transform 0.3s ease;
}

.category-card.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

.category-card.collapsed .category-body {
  display: none;
}

/* Category Body */
.category-body {
  padding: 8px 12px 14px;
}

.subcategory-section {
  margin-top: 10px;
}

.subcategory-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-text-muted);
  padding: 8px 6px 4px;
  margin-bottom: 4px;
}

/* Items container */
.items-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Enkel Item */
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  background: var(--bg-main);
  border: 1px solid rgba(232, 226, 215, 0.6);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 52px;
}

.item-row:active {
  transform: scale(0.985);
  background: #F2EDE4;
}

/* Checkbox */
.custom-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-checkbox svg {
  width: 15px;
  height: 15px;
  stroke: white;
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.25s ease;
}

.item-row.checked .custom-checkbox {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.05);
}

.item-row.checked .custom-checkbox svg {
  stroke-dashoffset: 0;
}

/* Item Content */
.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

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

.item-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-main);
  line-height: 1.35;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.item-row.checked .item-label {
  text-decoration: line-through;
  color: var(--color-text-dim);
}

.item-checked-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #407B64;
  margin-top: 1px;
}

.item-checked-meta strong {
  color: #2D6A4F;
  font-weight: 700;
}

.item-checked-meta .meta-dot {
  opacity: 0.4;
  font-size: 8px;
}

.item-checked-meta .meta-time {
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 500;
}

.item-badge-optional {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--border-radius-full);
  background: #FEF3C7;
  color: #92400E;
  flex-shrink: 0;
}

.item-actions-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Edit potloodje bij elk artikel */
.item-edit-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.item-row:hover .item-edit-btn,
.item-edit-btn:active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-color);
  transform: scale(1.1);
}

/* Winkelmandje knopje naast potloodje */
.item-shop-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.item-row:hover .item-shop-btn,
.item-shop-btn:active {
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-color);
  transform: scale(1.1);
}

.item-shop-btn.active {
  opacity: 1;
  background: #FEF3C7;
  border-color: #F59E0B;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
  transform: scale(1.05);
}

/* ==========================================================================
   SHOPPING VIEW (WINKELLIJSTJE WEERGAVE)
   ========================================================================== */
.shopping-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 4px;
}

.shop-header-card {
  background: linear-gradient(135deg, #FFFDF8 0%, #FAF4EA 100%);
  border: 1px solid #EFE4D2;
  border-radius: var(--border-radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.shop-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.shop-header-icon {
  font-size: 26px;
}

.shop-header-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.2;
}

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

.shop-quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.shop-action-btn {
  flex: 1;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shop-action-btn:active {
  background: var(--bg-subtle);
  transform: scale(0.97);
}

.shop-action-btn.danger {
  color: #DC2626;
  border-color: #FCA5A5;
  background: #FFF5F5;
}

.shop-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-item-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.shop-item-card.bought {
  background: rgba(246, 243, 237, 0.7);
  opacity: 0.85;
}

.shop-item-card.bought .shop-item-name {
  text-decoration: line-through;
  color: var(--color-text-dim);
}

.shop-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-item-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-primary);
}

.shop-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
}

.shop-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.shop-remove-btn:active {
  background: #FEE2E2;
  color: #DC2626;
}

.shop-empty-card {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px dashed var(--border-color);
}

.shop-empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
}

.shop-empty-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 6px;
}

.shop-empty-card p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 320px;
  margin: 0 auto;
}

.shop-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  padding: 4px 6px;
  margin-bottom: 8px;
}

.shop-notes-section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.shop-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-note-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(232, 226, 215, 0.7);
  transition: all 0.2s ease;
}

.shop-note-row.done {
  opacity: 0.6;
  background: #FAFAF8;
}

.shop-note-row.done .shop-note-text {
  text-decoration: line-through;
  color: var(--color-text-dim);
}

.shop-note-check-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-note-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-note-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  line-height: 1.35;
}

.shop-note-meta {
  font-size: 11px;
  color: var(--color-text-muted);
}


/* Tekstlink knop (zoals '+ Nieuwe categorie') */
.text-link-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.text-link-btn:active {
  background: var(--color-primary-light);
}

/* Nieuwe categorie formulier in modal */
.new-cat-fields-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  animation: slide-down-banner 0.25s ease;
}

/* Delete knop in modal */
.modal-delete-btn {
  padding: 14px;
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.modal-delete-btn:active {
  background: #F87171;
  color: white;
}

/* ==========================================================================
   AFGEVINKTE SECTIE ONDERIN DE CATEGORIE
   ========================================================================== */
.completed-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.completed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  cursor: pointer;
  user-select: none;
}

.completed-section-header span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.completed-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.completed-items-list .item-row {
  background: rgba(246, 243, 237, 0.6);
  border-color: transparent;
  opacity: 0.85;
}

/* Zwevend feestelijk icoontje bij klik */
.floating-celebration {
  position: fixed;
  pointer-events: none;
  font-size: 24px;
  z-index: 10001;
  animation: float-up-fade 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes float-up-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.6);
  }
  50% {
    transform: translate(-50%, -35px) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70px) scale(1);
  }
}

/* Knoppen onderaan */
.bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-top: 10px;
}

.add-custom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: white;
  border: 1px dashed var(--color-primary);
  border-radius: var(--border-radius-md);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-custom-btn:active {
  background: var(--color-primary-light);
  transform: scale(0.98);
}

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

.secondary-btn {
  flex: 1;
  padding: 11px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.secondary-btn:active {
  background: var(--bg-subtle);
  transform: scale(0.98);
}

/* Modal Popup (bv voor item toevoegen of bevestiging) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 540px;
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(var(--safe-bottom) + 24px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-main);
}

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

.modal-field {
  margin-bottom: 14px;
}

.modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.modal-field input, .modal-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text-main);
  background: var(--bg-main);
  outline: none;
}

.modal-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease;
}

.modal-submit-btn:active {
  background: var(--color-primary-hover);
}

/* Responsive desktop tweak */
@media (min-width: 600px) {
  .modal-sheet {
    border-radius: var(--border-radius-lg);
    margin: auto 16px;
    transform: scale(0.92);
  }
  .modal-overlay.active .modal-sheet {
    transform: scale(1);
  }
}
