/* =============================================================
   LEGO Collection Manager — lego-collection.css  v0.3.1
   UI volledig herontworpen op basis van React SetCard + Collection.jsx
   ============================================================= */

/* --- Design Tokens --- */
:root {
  --lcm-yellow:       #f5c400;
  --lcm-yellow-dark:  #d4a707;
  --lcm-blue:         #0195FE;
  --lcm-blue-dark:    #0077cc;
  --lcm-red:          #ef4444;
  --lcm-green:        #10b981;

  --lcm-bg:           #f3f4f6;
  --lcm-card:         #ffffff;
  --lcm-border:       #e5e7eb;
  --lcm-border-light: rgba(0,0,0,.06);
  --lcm-text:         #111827;
  --lcm-muted:        #6b7280;
  --lcm-subtle:       #9ca3af;

  --lcm-radius:       16px;
  --lcm-radius-sm:    8px;
  --lcm-radius-xs:    6px;
  --lcm-shadow:       0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --lcm-shadow-hover: 0 8px 32px rgba(0,0,0,.13);
  --lcm-shadow-modal: 0 24px 64px rgba(0,0,0,.22);

  --lcm-transition:   all .25s cubic-bezier(.4,0,.2,1);
}

/* ---------------------------------------------------------------
   RESET & BASE
   --------------------------------------------------------------- */
.lcm-app * { box-sizing: border-box; margin: 0; padding: 0; }
.lcm-app { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; color: var(--lcm-text); background: var(--lcm-bg); min-height: 60vh; }
.lcm-app img { max-width: 100%; height: auto; display: block; }
.lcm-app button { cursor: pointer; font: inherit; border: none; }
.lcm-app button:not(.lcm-btn):not(.lcm-stat-btn) { background: none; }
.lcm-app input, .lcm-app select, .lcm-app textarea { font: inherit; }

/* ---------------------------------------------------------------
   VERSION BADGE
   --------------------------------------------------------------- */
.lcm-version-badge {
  position: fixed; top: 12px; left: 12px; z-index: 99999;
  background: rgba(20,20,20,.92); color: #fff;
  padding: 7px 12px; border-radius: var(--lcm-radius-xs);
  font-size: 11px; line-height: 1.5; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */
.lcm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--lcm-radius-sm);
  font-size: .875rem; font-weight: 600; line-height: 1.2;
  transition: var(--lcm-transition); white-space: nowrap;
}
.lcm-btn-primary {
  background: var(--lcm-yellow); color: #111;
  box-shadow: 0 2px 8px rgba(245,196,0,.3);
}
.lcm-btn-primary:hover { background: var(--lcm-yellow-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,196,0,.4); }
.lcm-btn-outline { background: var(--lcm-card); color: var(--lcm-text); border: 1.5px solid var(--lcm-border); }
.lcm-btn-outline:hover { border-color: var(--lcm-muted); background: var(--lcm-bg); }
.lcm-btn-ghost { background: transparent; color: var(--lcm-muted); }
.lcm-btn-ghost:hover { background: var(--lcm-bg); color: var(--lcm-text); }
.lcm-btn-danger { background: var(--lcm-red); color: #fff; }
.lcm-btn-danger:hover { background: #dc2626; }
.lcm-btn-sm { padding: 6px 12px; font-size: .8rem; }

/* ---------------------------------------------------------------
   HEADER
   --------------------------------------------------------------- */
.lcm-header {
  background: var(--lcm-card); border-bottom: 1px solid var(--lcm-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.lcm-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lcm-brand { display: flex; align-items: center; gap: 12px; }
.lcm-brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--lcm-yellow); color: #111;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; letter-spacing: -1px;
  box-shadow: 0 2px 8px rgba(245,196,0,.35);
}
.lcm-brand-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.5px; }
.lcm-brand-sub { font-size: .75rem; color: var(--lcm-muted); margin-top: 1px; }
.lcm-header-actions { display: flex; align-items: center; gap: 10px; }
.lcm-partner-label { display: none; }
@media(min-width: 640px) { .lcm-partner-label { display: inline; font-size: .8rem; } }

/* ---------------------------------------------------------------
   STATS BAR
   --------------------------------------------------------------- */
.lcm-stats {
  max-width: 1280px; margin: 24px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media(max-width: 900px) { .lcm-stats { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 500px) { .lcm-stats { grid-template-columns: 1fr 1fr; gap: 10px; } }

.lcm-stat-card {
  background: var(--lcm-card); border: 1px solid var(--lcm-border);
  border-radius: var(--lcm-radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--lcm-shadow);
}
.lcm-stat-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.lcm-stat-icon svg { width: 22px; height: 22px; }
.lcm-stat-icon--green { background: #d1fae5; color: #059669; }
.lcm-stat-icon--pink  { background: #fce7f3; color: #db2777; }
.lcm-stat-icon--blue  { background: #dbeafe; color: #2563eb; }
.lcm-stat-icon--yellow { background: #fef9c3; color: #b45309; }
.lcm-stat-label { font-size: .65rem; font-weight: 700; letter-spacing: .08em; color: var(--lcm-muted); text-transform: uppercase; }
.lcm-stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; margin-top: 2px; }
.lcm-stat-sub { font-size: .75rem; color: var(--lcm-muted); margin-top: 2px; }

/* ---------------------------------------------------------------
   FILTERS
   --------------------------------------------------------------- */
.lcm-filters {
  max-width: 1280px; margin: 20px auto 0; padding: 0 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.lcm-search-wrap {
  flex: 1 1 280px; position: relative; min-width: 200px;
}
.lcm-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--lcm-muted); pointer-events: none;
}
.lcm-search-input {
  width: 100%; padding: 10px 14px 10px 44px !important;
  background: var(--lcm-card); border: 1.5px solid var(--lcm-border);
  border-radius: var(--lcm-radius-sm); font-size: .875rem;
  transition: var(--lcm-transition); color: var(--lcm-text);
  line-height: 1.5; height: auto;
}
.lcm-search-input:focus { outline: none; border-color: var(--lcm-blue); box-shadow: 0 0 0 3px rgba(1,149,254,.15); }
.lcm-select-wrap { flex: 0 0 auto; }
.lcm-select {
  padding: 10px 34px 10px 14px !important; appearance: none; -webkit-appearance: none;
  background: var(--lcm-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--lcm-border); border-radius: var(--lcm-radius-sm);
  font-size: .875rem; cursor: pointer; transition: var(--lcm-transition); color: var(--lcm-text);
  line-height: 1.5 !important; height: auto !important; min-height: 40px;
}
.lcm-select:focus { outline: none; border-color: var(--lcm-blue); box-shadow: 0 0 0 3px rgba(1,149,254,.15); }
.lcm-export-btn { font-size: .8rem; padding: 10px 14px; }

/* ---------------------------------------------------------------
   GRID
   --------------------------------------------------------------- */
.lcm-grid {
  max-width: 1280px; margin: 24px auto 48px; padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media(max-width: 1024px) { .lcm-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 600px)  { .lcm-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   CARD
   --------------------------------------------------------------- */
.lcm-card {
  background: var(--lcm-card); border-radius: var(--lcm-radius);
  border: 1px solid var(--lcm-border-light); box-shadow: var(--lcm-shadow);
  overflow: visible; transition: var(--lcm-transition); position: relative;
  cursor: pointer;
}
.lcm-card:hover { box-shadow: var(--lcm-shadow-hover); transform: translateY(-2px); }

/* Image */
.lcm-card-img {
  position: relative; aspect-ratio: 4/3;
  background: #f9fafb; overflow: hidden;
  border-radius: var(--lcm-radius) var(--lcm-radius) 0 0;
}
.lcm-card-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 8px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.lcm-card:hover .lcm-card-img img { transform: scale(1.05); }
.lcm-card-img-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--lcm-subtle); gap: 8px; font-size: .75rem; font-weight: 500;
}
.lcm-card-img-placeholder svg { width: 40px; height: 40px; opacity: .4; }
.lcm-card-img--wishlist img { opacity: .6; }

/* Badges */
.lcm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; border: 1.5px solid transparent;
}
.lcm-badge--bezit      { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.lcm-badge--sealed     { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.lcm-badge--compleet   { background: #ccfbf1; color: #0f766e; border-color: #99f6e4; }
.lcm-badge--incompleet { background: #fed7aa; color: #9a3412; border-color: #fdba74; }
.lcm-badge--gebouwd    { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.lcm-badge--verkocht   { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.lcm-badge--wishlist   { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }

.lcm-card-status { position: absolute; top: 12px; left: 12px; }
.lcm-card-qty {
  position: absolute; top: 12px; right: 44px;
  background: rgba(0,0,0,.75); color: #fff; border-radius: 999px;
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
}

/* Menu button */
.lcm-card-menu-btn {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--lcm-transition); color: var(--lcm-text);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.lcm-card:hover .lcm-card-menu-btn { opacity: 1; }
.lcm-card-menu-btn:hover { background: #fff; }

/* Dropdown */
.lcm-dropdown {
  position: absolute; top: 46px; right: 8px; z-index: 9999;
  background: var(--lcm-card); border: 1px solid var(--lcm-border);
  border-radius: var(--lcm-radius-sm); box-shadow: var(--lcm-shadow-hover);
  min-width: 170px; overflow: hidden; display: none;
}
.lcm-dropdown.is-open { display: block; }
/* Kaart met open dropdown boven sibling-cards plaatsen */
.lcm-card:has(.lcm-dropdown.is-open) { z-index: 100; }
.lcm-card.lcm-card--dd-open { z-index: 100; }
.lcm-dropdown-item {
  width: 100%; text-align: left; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--lcm-text); transition: background .15s;
}
.lcm-dropdown-item:hover { background: var(--lcm-bg); }
.lcm-dropdown-item--danger { color: var(--lcm-red); }
.lcm-dropdown-item--danger:hover { background: #fef2f2; }
.lcm-dropdown-sep { height: 1px; background: var(--lcm-border); margin: 2px 0; }

/* Card body */
.lcm-card-body { padding: 16px; }
.lcm-card-meta { font-size: .72rem; font-weight: 700; color: var(--lcm-muted); letter-spacing: .04em; margin-bottom: 3px; }
.lcm-card-title { font-size: .9rem; font-weight: 700; line-height: 1.35; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcm-card-theme { font-size: .75rem; color: var(--lcm-muted); }

.lcm-card-footer { padding: 12px 16px; border-top: 1px solid var(--lcm-border-light); }
.lcm-card-pieces { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--lcm-muted); margin-bottom: 8px; }
.lcm-card-pieces svg { width: 12px; height: 12px; }
.lcm-card-prices { display: flex; flex-direction: column; gap: 2px; }
.lcm-card-price-row { font-size: .75rem; color: var(--lcm-muted); }
.lcm-card-price-row strong { color: var(--lcm-text); }
.lcm-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.lcm-card-stars { display: flex; gap: 2px; }
.lcm-card-stars .star { font-size: .75rem; color: #d1d5db; }
.lcm-card-stars .star.on { color: var(--lcm-yellow); }

/* ---------------------------------------------------------------
   LOADER
   --------------------------------------------------------------- */
.lcm-loader {
  max-width: 1280px; margin: 60px auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: center;
}
.lcm-spinner {
  width: 36px; height: 36px; border: 3px solid var(--lcm-border);
  border-top-color: var(--lcm-yellow); border-radius: 50%;
  animation: lcm-spin .7s linear infinite;
}
@keyframes lcm-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------------- */
.lcm-empty {
  max-width: 1280px; margin: 0 auto; padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center;
}
.lcm-empty svg { width: 64px; height: 64px; color: var(--lcm-border); }
.lcm-empty p { color: var(--lcm-muted); font-size: .95rem; }

/* ---------------------------------------------------------------
   MODAL
   --------------------------------------------------------------- */
.lcm-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: lcm-fade-in .2s ease;
}
@keyframes lcm-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lcm-modal {
  background: var(--lcm-card); border-radius: var(--lcm-radius);
  box-shadow: var(--lcm-shadow-modal); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; animation: lcm-slide-up .25s cubic-bezier(.4,0,.2,1);
}
.lcm-modal--sm { max-width: 420px; }
@keyframes lcm-slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.lcm-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--lcm-border);
}
.lcm-modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.lcm-modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--lcm-muted); }
.lcm-modal-close:hover { background: var(--lcm-bg); color: var(--lcm-text); }

.lcm-modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.lcm-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px 22px; border-top: 1px solid var(--lcm-border);
}

/* ---------------------------------------------------------------
   FORM FIELDS
   --------------------------------------------------------------- */
.lcm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width: 480px) { .lcm-form-row { grid-template-columns: 1fr; } }

.lcm-field { display: flex; flex-direction: column; gap: 6px; }
.lcm-field--full { grid-column: 1 / -1; }
.lcm-field label { font-size: .8rem; font-weight: 600; color: var(--lcm-text); }
.lcm-required { color: var(--lcm-red); }
.lcm-field input,
.lcm-field select,
.lcm-field textarea {
  padding: 9px 12px; border: 1.5px solid var(--lcm-border);
  border-radius: var(--lcm-radius-xs); font-size: .875rem;
  transition: var(--lcm-transition); background: var(--lcm-card); color: var(--lcm-text);
}
.lcm-field input:focus,
.lcm-field select:focus,
.lcm-field textarea:focus {
  outline: none; border-color: var(--lcm-blue);
  box-shadow: 0 0 0 3px rgba(1,149,254,.15);
}
.lcm-field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.lcm-field textarea { resize: vertical; min-height: 72px; }
.lcm-input-group { display: flex; gap: 8px; }
.lcm-input-group input { flex: 1; }

/* Stars */
.lcm-stars { display: flex; gap: 4px; }
.lcm-star { font-size: 1.4rem; color: #d1d5db; transition: color .15s; }
.lcm-star.active,
.lcm-star:hover ~ .lcm-star { color: #d1d5db; }
.lcm-stars:hover .lcm-star { color: var(--lcm-yellow); }
.lcm-star:hover ~ .lcm-star { color: #d1d5db; }

.lcm-muted { color: var(--lcm-muted); font-size: .875rem; }

/* ---------------------------------------------------------------
   SHARE POPUP
   --------------------------------------------------------------- */
/* Share popup — als modal gecentreerd, gebruikt lcm-modal stijlen */
.lcm-share-overlay {
  /* lcm-modal-overlay zorgt al voor centering + overlay */
}
.lcm-share-modal {
  max-width: 320px !important;
}
.lcm-share-body {
  padding: 8px 12px 16px !important;
  gap: 2px !important;
}
.lcm-share-sep {
  height: 1px;
  background: var(--lcm-border);
  margin: 6px 0;
}
.lcm-share-option {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 11px 12px; border-radius: var(--lcm-radius-xs);
  font-size: .925rem; font-weight: 500; color: var(--lcm-text);
  transition: background .12s; text-align: left;
  background: none !important; border: none !important;
  cursor: pointer; font: inherit;
}
.lcm-share-option:hover { background: var(--lcm-bg) !important; }

.lcm-share-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.lcm-share-icon--whatsapp { background: #dcfce7; color: #16a34a; }
.lcm-share-icon--telegram  { background: #e0f2fe; color: #0284c7; }
.lcm-share-icon--mail      { background: #dbeafe; color: #2563eb; }
.lcm-share-icon--copy      { background: #f3f4f6; color: #6b7280; }

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
/* ===============================================================
   MOBIEL — volledig responsive  v0.3.9
   =============================================================== */

/* Tablet: 641–1024px */
@media(max-width: 1024px) {
  .lcm-header-inner { padding: 12px 20px; }
  .lcm-stats, .lcm-filters, .lcm-grid { padding: 0 20px; }
}

/* Mobiel: ≤640px */
@media(max-width: 640px) {

  /* ── Header ── */
  .lcm-header-inner {
    padding: 10px 14px;
    gap: 8px;
  }
  .lcm-brand-logo { width: 36px; height: 36px; font-size: .95rem; border-radius: 10px; }
  .lcm-brand-title { font-size: 1rem; }
  .lcm-brand-sub   { display: none; }
  .lcm-header-actions { gap: 6px; }
  /* Partner-label verbergen op mobiel */
  .lcm-partner-label { display: none !important; }
  /* Knoppen kleiner op mobiel */
  .lcm-btn { padding: 8px 12px; font-size: .8rem; gap: 4px; }
  .lcm-btn svg { width: 14px; height: 14px; }
  /* Uitlog-knop: enkel icoon */
  .lcm-logout-btn span { display: none; }

  /* ── Stats balk ── */
  .lcm-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px;
    margin-top: 14px;
  }
  .lcm-stat-card { padding: 14px 12px; gap: 10px; }
  .lcm-stat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .lcm-stat-icon svg { width: 18px; height: 18px; }
  .lcm-stat-value { font-size: 1.3rem; }
  .lcm-stat-label { font-size: .6rem; }
  .lcm-stat-sub   { font-size: .68rem; }

  /* ── Filters ── */
  .lcm-filters {
    padding: 0 14px;
    margin-top: 12px;
    gap: 8px;
    flex-direction: column;
  }
  .lcm-search-wrap { flex: none; width: 100%; min-width: unset; }
  .lcm-select-wrap { width: 100%; }
  .lcm-select      { width: 100%; }
  /* Filter-rij: thema + status naast elkaar, CSV rechts */
  .lcm-filters-row {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .lcm-export-btn  { align-self: flex-end; white-space: nowrap; }

  /* ── Grid: altijd 1 kolom op mobiel ── */
  .lcm-grid {
    grid-template-columns: 1fr;
    padding: 0 14px;
    margin-top: 14px;
    gap: 12px;
    margin-bottom: 32px;
  }

  /* ── Kaart: horizontaal layout op mobiel ── */
  .lcm-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto auto;
    border-radius: 14px;
  }
  .lcm-card-img {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: unset;
    height: 100%;
    min-height: 110px;
    border-radius: 14px 0 0 14px;
  }
  .lcm-card-img { border-radius: 14px 0 0 14px; overflow: hidden; }
  .lcm-card-img img { border-radius: 14px 0 0 14px; }
  .lcm-card-body  { grid-column: 2; grid-row: 1; padding: 12px 12px 6px; }
  .lcm-card-footer { grid-column: 2; grid-row: 2; padding: 0 12px 12px; border-top: none; }
  .lcm-card-title  { font-size: .85rem; -webkit-line-clamp: 2; }
  .lcm-card-meta   { font-size: .68rem; }
  .lcm-card-theme  { font-size: .7rem; }
  .lcm-card-pieces { font-size: .72rem; margin-bottom: 4px; }
  .lcm-card-price-row { font-size: .72rem; }
  /* Badge positie aanpassen voor horizontale kaart */
  .lcm-card-status { top: 8px; left: 8px; }
  .lcm-card-qty    { top: 8px; right: 36px; }
  .lcm-card-menu-btn { top: 6px; right: 6px; width: 28px; height: 28px; opacity: 1; }
  .lcm-sell-tag    { font-size: .65rem; }

  /* ── Dropdown menu ── */
  .lcm-dropdown { top: 38px; }

  /* ── Modal: bottom-sheet op mobiel ── */
  .lcm-modal-overlay {
    padding: 0;
    align-items: flex-end;
    background: rgba(0,0,0,.5);
  }
  .lcm-modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    width: 100%;
    max-width: 100%;
  }
  .lcm-modal--sm {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
  }
  .lcm-modal-header { padding: 12px 16px 10px; }
  .lcm-modal-header h2 { font-size: .92rem; }
  .lcm-modal-body   { padding: 0 16px 6px; gap: 10px; }
  .lcm-modal-footer { padding: 10px 16px 18px; }
  .lcm-field        { gap: 3px; }
  .lcm-field label  { font-size: .72rem; }
  .lcm-field input, .lcm-field select, .lcm-field textarea { padding: 7px 10px; font-size: 16px; }
  .lcm-field textarea { min-height: 50px; }
  /* Pull-indicator bovenaan modal */
  .lcm-modal::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    margin: 10px auto -6px;
  }

  /* ── Form rijen: altijd gestapeld op mobiel ── */
  .lcm-form-row { grid-template-columns: 1fr; }

  /* ── Leeg scherm ── */
  .lcm-empty { padding: 40px 20px; }
  .lcm-empty svg { width: 48px; height: 48px; }

  /* ── Share popup: altijd gecentreerd ── */

  /* ── Loader ── */
  .lcm-loader { margin: 40px auto; }
}

/* Klein mobiel: ≤380px */
@media(max-width: 380px) {
  .lcm-card { grid-template-columns: 100px 1fr; }
  .lcm-card-img { min-height: 95px; }
  .lcm-stat-value { font-size: 1.15rem; }
}

/* ---------------------------------------------------------------
   AUTOFILL SUGGESTIES  v0.3.1
   --------------------------------------------------------------- */
.lcm-autocomplete-wrap {
  position: relative;
  width: 100%;
}
.lcm-autocomplete-wrap input {
  width: 100%;
}

.lcm-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 400;
  background: var(--lcm-card);
  border: 1.5px solid var(--lcm-border);
  border-radius: var(--lcm-radius-sm);
  box-shadow: var(--lcm-shadow-hover);
  max-height: 420px;
  overflow-y: auto;
  min-width: 340px;
}
.lcm-suggestions.is-open { display: block; }

.lcm-suggestion-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid var(--lcm-border-light);
  border: 2px solid transparent;
  border-bottom: 1px solid var(--lcm-border-light);
  margin: 4px 6px;
  border-radius: var(--lcm-radius-xs);
}
.lcm-suggestion-item:last-child { border-bottom: 2px solid transparent; }
.lcm-suggestion-item:hover,
.lcm-suggestion-item.is-focused { background: var(--lcm-bg); }

/* Groene rand = nog NIET in verzameling */
.lcm-suggestion-item--new {
  border: 2px solid #10b981 !important;
}
.lcm-suggestion-item--new:hover { background: #f0fdf4; }

/* Rode rand = al IN verzameling */
.lcm-suggestion-item--owned {
  border: 2px solid #ef4444 !important;
}
.lcm-suggestion-item--owned:hover { background: #fef2f2; }

.lcm-suggestion-thumb {
  width: 96px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  background: #f3f4f6;
  flex-shrink: 0;
}
.lcm-suggestion-thumb-placeholder {
  width: 96px;
  height: 72px;
  background: #f3f4f6;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--lcm-subtle);
}

.lcm-suggestion-info { flex: 1; min-width: 0; }
.lcm-suggestion-name {
  font-size: .92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--lcm-text);
}
.lcm-suggestion-meta {
  font-size: .78rem;
  color: var(--lcm-muted);
  margin-top: 3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcm-suggestion-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lcm-suggestion-badge--new   { background: #d1fae5; color: #065f46; }
.lcm-suggestion-badge--owned { background: #fee2e2; color: #991b1b; }

.lcm-suggestion-loading,
.lcm-suggestion-empty {
  padding: 14px 16px;
  font-size: .82rem;
  color: var(--lcm-muted);
  text-align: center;
}

/* ---------------------------------------------------------------
   IMPORT RESULTAAT  v0.3.2
   --------------------------------------------------------------- */
.lcm-import-result {
  margin-top: 4px;
  border-radius: var(--lcm-radius-xs);
  overflow: hidden;
}
.lcm-import-success {
  padding: 12px 14px;
  background: #d1fae5;
  color: #065f46;
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--lcm-radius-xs);
}
.lcm-import-error {
  padding: 12px 14px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .875rem;
  margin-top: 6px;
  border-radius: var(--lcm-radius-xs);
}
.lcm-import-details {
  margin-top: 8px;
  font-size: .8rem;
  color: var(--lcm-muted);
}
.lcm-import-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
  color: var(--lcm-text);
}
.lcm-import-details ul {
  margin: 6px 0 0 16px;
  line-height: 1.8;
}

/* ---------------------------------------------------------------
   VERKOOP UI  v0.3.2
   --------------------------------------------------------------- */
.lcm-sell-info {
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: var(--lcm-radius-xs);
  font-size: .82rem;
  color: var(--lcm-muted);
  transition: background .2s, color .2s;
}
.lcm-sell-profit--pos {
  background: #d1fae5;
  color: #065f46;
}
.lcm-sell-profit--neg {
  background: #fee2e2;
  color: #991b1b;
}
.lcm-sell-tag {
  font-size: .7rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #4b5563;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
}

/* Bestandsinput styling */
.lcm-field input[type="file"] {
  padding: 6px 8px;
  font-size: .8rem;
  cursor: pointer;
}

/* ===============================================================
   AUTH — LOGIN / REGISTRATIE / WACHTWOORD-RESET  v0.3.4
   =============================================================== */
.lcm-auth {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5c400 0%, #ffe566 35%, #f3f4f6 65%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Hero */
.lcm-auth-hero {
  text-align: center;
  margin-bottom: 28px;
}
.lcm-auth-logo {
  width: 64px; height: 64px;
  background: #111827;
  color: #f5c400;
  border-radius: 18px;
  font-size: 1.8rem;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.lcm-auth-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -.5px;
  color: #111827;
  margin-bottom: 4px;
}
.lcm-auth-sub {
  font-size: .9rem;
  color: #4b5563;
}

/* Card */
.lcm-auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

/* Tabs */
.lcm-auth-tabs {
  display: flex;
  border-bottom: 2px solid #f3f4f6;
}
.lcm-auth-tab {
  flex: 1;
  padding: 14px 8px;
  font-size: .8rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.lcm-auth-tab:hover { color: #111827; }
.lcm-auth-tab.is-active {
  color: #111827;
  border-bottom-color: #f5c400;
}

/* Panels */
.lcm-auth-panel {
  display: none;
  padding: 28px 28px 24px;
  flex-direction: column;
  gap: 16px;
}
.lcm-auth-panel.is-active { display: flex; }

/* Messages */
.lcm-auth-msg {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
}
.lcm-auth-msg.is-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.lcm-auth-msg.is-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.lcm-auth-desc {
  font-size: .875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Wachtwoord toggle */
.lcm-pw-wrap {
  position: relative;
  display: flex;
}
.lcm-pw-wrap input {
  flex: 1;
  padding-right: 44px !important;
}
.lcm-pw-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: #9ca3af; cursor: pointer;
  display: flex; align-items: center;
  padding: 4px;
  transition: color .15s;
}
.lcm-pw-toggle:hover { color: #374151; }

/* Wachtwoord sterkte */
.lcm-pw-strength {
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 6px;
  overflow: hidden;
  transition: all .3s;
}
.lcm-pw-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .3s, background .3s;
}
.lcm-pw-strength[data-score="1"]::after { width: 25%; background: #ef4444; }
.lcm-pw-strength[data-score="2"]::after { width: 50%; background: #f97316; }
.lcm-pw-strength[data-score="3"]::after { width: 75%; background: #eab308; }
.lcm-pw-strength[data-score="4"]::after { width: 100%; background: #22c55e; }

/* Checkbox "Onthoud mij" */
.lcm-auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: #4b5563;
  cursor: pointer;
}
.lcm-auth-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #f5c400;
  cursor: pointer;
}

/* Field hint */
.lcm-field-hint {
  font-size: .72rem;
  color: #9ca3af;
  margin-top: 3px;
}

/* Footer */
.lcm-auth-footer {
  margin-top: 24px;
  font-size: .75rem;
  color: #6b7280;
  text-align: center;
}

/* Uitlog-knop in header */
.lcm-logout-btn {
  font-size: .75rem;
  color: #6b7280;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s;
}
.lcm-logout-btn:hover { background: #f3f4f6; color: #111827; }

@media(max-width: 480px) {
  .lcm-auth-card { border-radius: 16px; }
  .lcm-auth-panel { padding: 20px 18px 18px; }
  .lcm-auth-tab { font-size: .72rem; padding: 12px 4px; }
}

/* ===============================================================
   PUBLIEK PROFIEL  v0.3.5
   =============================================================== */
.lcm-profiel {
  max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px;
}
.lcm-profiel-header {
  display: flex; align-items: center; gap: 20px; margin-bottom: 28px;
}
.lcm-profiel-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--lcm-yellow); object-fit: cover;
}
.lcm-profiel-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 2px; }
.lcm-profiel-sub  { font-size: .85rem; color: var(--lcm-muted); }

.lcm-profiel-stats {
  display: flex; gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.lcm-profiel-stat {
  background: var(--lcm-card); border: 1px solid var(--lcm-border);
  border-radius: var(--lcm-radius); padding: 16px 28px; text-align: center;
  box-shadow: var(--lcm-shadow);
}
.lcm-profiel-stat-val { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.5px; }
.lcm-profiel-stat-lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lcm-muted); margin-top: 2px; display: block; }

.lcm-profiel-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.lcm-profiel-filter {
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--lcm-border); background: var(--lcm-card);
  color: var(--lcm-muted); cursor: pointer; transition: var(--lcm-transition);
}
.lcm-profiel-filter:hover { border-color: var(--lcm-muted); color: var(--lcm-text); }
.lcm-profiel-filter.is-active { background: var(--lcm-yellow); border-color: var(--lcm-yellow); color: #111; }

.lcm-profiel-share { margin-top: 40px; text-align: center; }

/* ===============================================================
   STATISTIEKEN  v0.3.5
   =============================================================== */
.lcm-stats-page { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }
.lcm-stats-page .lcm-stats { display: grid !important; margin: 0 0 32px; }

.lcm-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media(max-width: 768px) { .lcm-charts-grid { grid-template-columns: 1fr; } }

.lcm-chart-card {
  background: var(--lcm-card); border: 1px solid var(--lcm-border);
  border-radius: var(--lcm-radius); padding: 24px;
  box-shadow: var(--lcm-shadow);
}
.lcm-chart-card--wide { grid-column: 1 / -1; }
.lcm-chart-title { font-size: .95rem; font-weight: 700; margin-bottom: 16px; }
.lcm-chart-wrap  { height: 260px; position: relative; }
.lcm-chart-wrap--doughnut { height: 240px; }

/* ===============================================================
   ADMIN PAGINA  v0.3.5
   =============================================================== */
.lcm-admin-wrap h1 { font-size: 1.4rem; margin-bottom: 4px; }

/* ===============================================================
   AUTH — MOBIEL  v0.3.9
   =============================================================== */
@media(max-width: 480px) {
  .lcm-auth {
    padding: 24px 12px 40px;
    min-height: 100svh; /* safe area op iPhone */
    justify-content: flex-start;
    padding-top: max(24px, env(safe-area-inset-top));
  }
  .lcm-auth-logo  { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 14px; }
  .lcm-auth-title { font-size: 1.5rem; }
  .lcm-auth-sub   { font-size: .82rem; }
  .lcm-auth-card  { border-radius: 16px; }
  .lcm-auth-tab   { font-size: .72rem; padding: 11px 4px; }
  .lcm-auth-panel { padding: 18px 16px 16px; gap: 14px; }
  .lcm-field input,
  .lcm-field select { font-size: 16px; } /* voorkomt zoom op iOS */
}

/* ===============================================================
   GLOBAAL MOBIEL — veilige gebieden (notch/home-indicator)
   =============================================================== */
@supports (padding: max(0px)) {
  .lcm-header {
    padding-top: env(safe-area-inset-top);
  }
  .lcm-modal-footer {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }
}

/* ── Stats: filter-indicator  v0.4.0 ── */
.lcm-stat-filtered {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #f5c400;
  color: #111;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Animatie bij stats-update */
.lcm-stat-value {
  transition: opacity .2s;
}
.lcm-stat-updating { opacity: .4; }

/* Header knoppen: alle zelfde formaat */
.lcm-header-actions .lcm-btn {
  height: 38px;
}
@media(max-width: 640px) {
  .lcm-header-actions .lcm-btn {
    height: 36px;
    padding: 6px 10px;
  }
}

/* ===============================================================
   STAT-KNOPPEN — snelfilter  v0.4.1
   =============================================================== */

/* Stats-balk: 5 kolommen voor de extra "Alle sets" knop */
.lcm-stats {
  grid-template-columns: repeat(5, 1fr) !important;
}
@media(max-width: 1100px) { .lcm-stats { grid-template-columns: repeat(3, 1fr) !important; } }
@media(max-width: 640px)  { .lcm-stats { grid-template-columns: 1fr 1fr !important; } }

.lcm-stat-btn {
  cursor: pointer;
  border: 2px solid transparent;
  text-align: left;
  transition: var(--lcm-transition);
  position: relative;
  user-select: none;
  /* Overschrijf button-reset */
  font: inherit;
  width: 100%;
}

.lcm-stat-btn:hover {
  border-color: var(--lcm-yellow);
  transform: translateY(-2px);
  box-shadow: var(--lcm-shadow-hover);
}

/* Actieve staat */
.lcm-stat-btn[aria-pressed="true"] {
  border-color: var(--lcm-yellow);
  background: linear-gradient(135deg, #fffde7 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(245,196,0,.25);
}

/* Vinkje rechtsonder */
.lcm-stat-check {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--lcm-yellow-dark);
  opacity: 0;
  transition: opacity .15s;
}
.lcm-stat-btn[aria-pressed="true"] .lcm-stat-check { opacity: 1; }

/* Grijs icoon voor "Alle sets" */
.lcm-stat-icon--gray { background: #f3f4f6; color: #6b7280; }

/* Tooltip-hint onder knoppen */
.lcm-stat-btn::after {
  content: 'klik om te filteren';
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  color: var(--lcm-muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.lcm-stat-btn:hover::after { opacity: 1; }
.lcm-stat-btn[aria-pressed="true"]::after { content: 'klik om te resetten'; opacity: 0; }
.lcm-stat-btn[aria-pressed="true"]:hover::after { opacity: 1; }

/* Extra ruimte onder stats voor tooltip */
#lcmStats { padding-bottom: 8px; }

/* ── Wishlist prijs badge ── */
.lcm-wishlist-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 700;
  color: #9d174d;
}
.lcm-wishlist-price::before {
  content: '♥';
  font-size: .65rem;
}

/* ═══════════════════════════════════════════════════════
   INVENTORY MODAL  (v0.5.0)
   ═══════════════════════════════════════════════════════ */

/* Modal groter dan standaard */
.lcm-modal--lg {
  max-width: 740px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

/* Tab-balk */
.lcm-inv-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--lcm-border, #e5e7eb);
  background: var(--lcm-surface, #fff);
  flex-shrink: 0;
}

.lcm-inv-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--lcm-muted, #6b7280);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.lcm-inv-tab:hover   { color: var(--lcm-primary, #2563eb); }
.lcm-inv-tab.is-active {
  color: var(--lcm-primary, #2563eb);
  border-bottom-color: var(--lcm-primary, #2563eb);
}

.lcm-inv-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--lcm-primary-light, #dbeafe);
  color: var(--lcm-primary, #2563eb);
  border-radius: 9px;
}

/* Scrollbaar body */
.lcm-inv-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  min-height: 0;
}

/* Loader */
.lcm-inv-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 0;
  color: var(--lcm-muted, #6b7280);
  font-size: .9rem;
}

/* Spinner (hergebruik bestaande .lcm-spinner als die bestaat, anders zelf) */
.lcm-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--lcm-border, #e5e7eb);
  border-top-color: var(--lcm-primary, #2563eb);
  border-radius: 50%;
  animation: lcm-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes lcm-spin { to { transform: rotate(360deg); } }

/* Error state */
.lcm-inv-error {
  padding: 16px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-size: .875rem;
  line-height: 1.5;
}

/* Lege staat */
.lcm-inv-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--lcm-muted, #6b7280);
  font-size: .875rem;
}

/* Sectie-label (voor spare-onderdelen) */
.lcm-inv-section-title {
  grid-column: 1 / -1;
  padding: 12px 0 6px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--lcm-muted, #6b7280);
  border-top: 1px solid var(--lcm-border, #e5e7eb);
  margin-top: 8px;
}

/* ── Onderdelen-grid ──────────────────────────────────── */
/* Exact 3 kolommen, zoals screenshot */
.lcm-inv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Elke kaart: witte achtergrond, lichte rand, subtiele schaduw */
.lcm-inv-card {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e9ebee;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  min-width: 0;
  overflow: hidden;
}

/* Afbeelding-blok: grijze achtergrond links, vast formaat */
.lcm-inv-img-wrap {
  width: 72px;
  min-width: 72px;
  height: 72px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px 0 0 10px;
}

.lcm-inv-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.lcm-inv-img-placeholder {
  width: 32px;
  height: 32px;
  color: #c4c9d4;
}

/* Tekst-blok rechts */
.lcm-inv-card-body {
  min-width: 0;
  padding: 8px 10px;
  flex: 1;
}

.lcm-inv-card-name {
  font-size: .78rem;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}

.lcm-inv-card-meta {
  font-size: .72rem;
  color: #6b7280;
  margin: 0;
}

.lcm-inv-spare {
  display: inline-block;
  padding: 1px 5px;
  font-size: .65rem;
  background: #fef9c3;
  color: #854d0e;
  border-radius: 4px;
  font-weight: 500;
}

/* ── Minifiguren-grid ─────────────────────────────────── */
/* Figuren: ook 3 kolommen, kaartje met afbeelding boven tekst */
.lcm-inv-fig-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px 12px;
  gap: 8px;
  background: #fff;
  border: 1px solid #e9ebee;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  min-width: 0;
}

.lcm-inv-fig-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.lcm-inv-fig-img-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  color: #c4c9d4;
}

.lcm-inv-fig-name {
  font-size: .78rem;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.lcm-inv-fig-qty {
  font-size: .75rem;
  color: #6b7280;
  margin: 0;
  font-weight: 600;
}

/* Sectie-scheider (spare) */
.lcm-inv-section-title {
  grid-column: 1 / -1;
  padding: 12px 0 4px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  border-top: 1px solid #e9ebee;
  margin-top: 4px;
}

/* ── Mobiel: 2 kolommen ──────────────────────────────── */
@media (max-width: 540px) {
  .lcm-inv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lcm-inv-img-wrap { width: 60px; min-width: 60px; height: 60px; }
  .lcm-inv-img      { width: 46px; height: 46px; }
  .lcm-inv-tabs     { padding: 0 12px; }
  .lcm-inv-body     { padding: 12px 14px 16px; }
}

/* ═══════════════════════════════════════════════════════
   KLIKBARE INVENTORY KAARTEN + PART-SETS MODAL  (v0.5.1)
   ═══════════════════════════════════════════════════════ */

/* Klikbare kaart — gedeeld door parts en figs */
.lcm-inv-card--btn {
  cursor: pointer;
  border: none;
  text-align: left;
  width: 100%;
  transition: background .13s, box-shadow .13s, transform .1s;
  position: relative;
}
.lcm-inv-card--btn:hover {
  background: #f0f4ff;
  box-shadow: 0 2px 8px rgba(37,99,235,.12);
  transform: translateY(-1px);
}
.lcm-inv-card--btn:active { transform: translateY(0); }

/* Pijltje rechts op part-kaarten */
.lcm-inv-card-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #c4c9d4;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color .13s, right .13s;
}
.lcm-inv-card--btn:hover .lcm-inv-card-arrow { color: #2563eb; right: 6px; }

/* Pijltje op minifig-kaarten (rechtsboven) */
.lcm-inv-fig-arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #c4c9d4;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color .13s;
}
.lcm-inv-card--btn:hover .lcm-inv-fig-arrow { color: #2563eb; }

/* Minifig-kaart als button */
.lcm-inv-fig-card.lcm-inv-card--btn { position: relative; }

/* ── Part-Sets Sub-Modal ─────────────────────────────── */
/* Overlay met iets donkerder backdrop dan de parent modal */
.lcm-modal-overlay--sub {
  z-index: 10002; /* boven de inventory modal (10001) */
}

.lcm-modal--md {
  max-width: 520px;
  width: 94vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

/* Header met terug-knop + titel + sluiten */
.lcm-partsets-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.lcm-partsets-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 6px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--lcm-primary, #2563eb);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .13s;
}
.lcm-partsets-back:hover { background: #dbeafe; }

.lcm-partsets-title-wrap {
  flex: 1;
  min-width: 0;
}
.lcm-partsets-title-wrap h2 {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Scrollbaar body */
.lcm-partsets-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 18px;
  min-height: 0;
}

/* Teller */
.lcm-partsets-count {
  font-size: .8rem;
  color: var(--lcm-muted, #6b7280);
  margin: 0 0 10px;
}

/* Lijst met set-rijen */
.lcm-partsets-list { display: flex; flex-direction: column; gap: 8px; }

.lcm-ps-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e9ebee;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  text-decoration: none;
  color: inherit;
  transition: background .12s, box-shadow .12s, transform .1s;
}
.lcm-ps-row:hover {
  background: #f0f4ff;
  box-shadow: 0 3px 10px rgba(37,99,235,.11);
  transform: translateY(-1px);
}
.lcm-ps-row:active { transform: none; }

.lcm-ps-img-wrap {
  width: 64px;
  min-width: 64px;
  height: 64px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.lcm-ps-img { width: 56px; height: 56px; object-fit: contain; }
.lcm-ps-img-placeholder { color: #c4c9d4; }

.lcm-ps-body { flex: 1; min-width: 0; }
.lcm-ps-name {
  font-size: .88rem;
  font-weight: 600;
  color: #1a1d23;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 3px;
}
.lcm-ps-meta {
  font-size: .75rem;
  color: #6b7280;
  margin: 0;
}

.lcm-ps-ext {
  color: #9ca3af;
  flex-shrink: 0;
  transition: color .12s;
}
.lcm-ps-row:hover .lcm-ps-ext { color: #2563eb; }

/* Zorg dat de inventory modal z-index lager ligt */
#lcmInventoryModal { z-index: 10001; }

/* Mobiel */
@media (max-width: 480px) {
  .lcm-partsets-back span { display: none; }
  .lcm-partsets-body { padding: 10px 12px 14px; }
  .lcm-ps-img-wrap { width: 52px; min-width: 52px; height: 52px; }
  .lcm-ps-img { width: 44px; height: 44px; }
}

/* ── Meer laden knop (part-sets) ─────────────────────── */
.lcm-ps-loadmore {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  background: #fff;
  border: 1px dashed #c4c9d4;
  border-radius: 10px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--lcm-primary, #2563eb);
  cursor: pointer;
  transition: background .13s, border-color .13s;
}
.lcm-ps-loadmore:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
}
.lcm-ps-loadmore:disabled { color: #9ca3af; cursor: default; }

/* ---------------------------------------------------------------
   STATUS PICKER MODAL
   --------------------------------------------------------------- */
.lcm-status-picker-body {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 24px !important;
}

.lcm-status-pick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border-radius: var(--lcm-radius);
  border: 2px solid var(--lcm-border) !important;
  background: var(--lcm-bg) !important;
  cursor: pointer;
  transition: var(--lcm-transition);
  text-align: center;
}

.lcm-status-pick-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--lcm-shadow-hover);
}

.lcm-status-pick-btn--bezit {
  color: #059669;
}
.lcm-status-pick-btn--bezit:hover {
  border-color: #059669 !important;
  background: #f0fdf4 !important;
}

.lcm-status-pick-btn--wishlist {
  color: #db2777;
}
.lcm-status-pick-btn--wishlist:hover {
  border-color: #db2777 !important;
  background: #fdf2f8 !important;
}

.lcm-spb-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lcm-text);
  line-height: 1.2;
}

.lcm-spb-sub {
  font-size: .75rem;
  color: var(--lcm-muted);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .lcm-status-picker-body { flex-direction: column; }
  .lcm-status-pick-btn { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 16px; }
}

/* ---------------------------------------------------------------
   USER MENU DROPDOWN
   --------------------------------------------------------------- */
.lcm-user-menu {
  position: relative;
}

.lcm-user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--lcm-radius-sm);
  background: var(--lcm-card) !important;
  border: 1.5px solid var(--lcm-border) !important;
  cursor: pointer;
  transition: var(--lcm-transition);
  font-size: .85rem;
  font-weight: 600;
  color: var(--lcm-text);
}
.lcm-user-menu-btn:hover {
  border-color: var(--lcm-yellow) !important;
  background: #fffde7 !important;
}

.lcm-user-avatar {
  width: 28px; height: 28px;
  background: var(--lcm-yellow);
  color: #111;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800;
  flex-shrink: 0;
}

.lcm-user-name {
  display: none;
}
@media(min-width: 640px) {
  .lcm-user-name { display: inline; }
}

.lcm-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--lcm-card);
  border: 1.5px solid var(--lcm-border);
  border-radius: var(--lcm-radius-sm);
  box-shadow: var(--lcm-shadow-hover);
  z-index: 500;
  overflow: hidden;
}
.lcm-user-dropdown.is-open { display: block; }

.lcm-user-dropdown-header {
  padding: 12px 16px 10px;
}
.lcm-user-dropdown-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--lcm-text);
}
.lcm-user-dropdown-email {
  font-size: .75rem;
  color: var(--lcm-muted);
  margin-top: 2px;
}

.lcm-user-dropdown-sep {
  height: 1px;
  background: var(--lcm-border);
  margin: 2px 0;
}

.lcm-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: .875rem;
  color: var(--lcm-text);
  text-decoration: none;
  background: none !important;
  border: none !important;
  cursor: pointer;
  transition: background .12s;
  font: inherit;
  text-align: left;
}
.lcm-user-dropdown-item:hover {
  background: var(--lcm-bg) !important;
}
.lcm-user-dropdown-item em {
  font-style: normal;
  color: var(--lcm-muted);
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.lcm-user-dropdown-item--danger {
  color: var(--lcm-red);
}
.lcm-user-dropdown-item--danger:hover {
  background: #fef2f2 !important;
}

/* ---------------------------------------------------------------
   BIJLAGE MODAL
   --------------------------------------------------------------- */
.lcm-attach-hint {
  font-size: .85rem;
  color: var(--lcm-muted);
  margin-bottom: 16px;
}

.lcm-attach-dropzone {
  border: 2px dashed var(--lcm-border);
  border-radius: var(--lcm-radius-sm);
  padding: 28px 20px;
  text-align: center;
  color: var(--lcm-muted);
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lcm-attach-dropzone.is-over {
  border-color: var(--lcm-yellow);
  background: #fffde7;
}
.lcm-attach-dropzone svg { opacity: .4; }

.lcm-attach-browse {
  color: var(--lcm-blue);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}

.lcm-attach-types {
  font-size: .75rem;
  color: var(--lcm-subtle, #9ca3af);
}

.lcm-attach-preview {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--lcm-bg);
  border-radius: var(--lcm-radius-xs, 6px);
  border: 1px solid var(--lcm-border);
}
.lcm-attach-preview img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: 6px;
}
.lcm-attach-preview svg { opacity: .5; flex-shrink: 0; }
.lcm-attach-fname {
  font-size: .82rem;
  color: var(--lcm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lcm-attach-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lcm-attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--lcm-bg);
  border-radius: var(--lcm-radius-xs, 6px);
  border: 1px solid var(--lcm-border);
  font-size: .82rem;
}
.lcm-attach-item svg { opacity: .5; flex-shrink: 0; }
.lcm-attach-link {
  flex: 1;
  color: var(--lcm-blue);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lcm-attach-link:hover { text-decoration: underline; }
.lcm-attach-del {
  margin-left: auto;
  font-size: .7rem;
  color: var(--lcm-muted);
  padding: 2px 6px;
  border-radius: 4px;
  background: none !important;
  border: none !important;
  cursor: pointer;
  transition: color .12s;
  flex-shrink: 0;
}
.lcm-attach-del:hover { color: var(--lcm-red); }
.lcm-attach-loading {
  font-size: .8rem;
  color: var(--lcm-muted);
  text-align: center;
  padding: 8px 0;
}

/* ═══════════════════════════════════════════════════
   DETAIL POPUP
   ═══════════════════════════════════════════════════ */
.lcm-modal--detail {
  max-width: 460px; overflow: hidden; padding: 0; position: relative;
}
.lcm-detail-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  background: rgba(0,0,0,.45); color: #fff;
  border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.lcm-detail-close:hover { background: rgba(0,0,0,.65); }
.lcm-detail-img-wrap {
  width: 100%; aspect-ratio: 16/9;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
}
.lcm-detail-content { padding: 18px 22px 22px; }
.lcm-detail-badge { margin-bottom: 8px; }
.lcm-detail-name { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.lcm-detail-stars { margin-bottom: 12px; }
.lcm-detail-table {
  border: 1px solid var(--lcm-border); border-radius: var(--lcm-radius-sm);
  overflow: hidden; margin-bottom: 12px;
}
.lcm-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 13px; font-size: .84rem;
  border-bottom: 1px solid var(--lcm-border);
}
.lcm-detail-row:last-child { border-bottom: none; }
.lcm-detail-key { color: var(--lcm-muted); }
.lcm-detail-val { font-weight: 600; }
.lcm-detail-notes {
  background: var(--lcm-bg); border-radius: var(--lcm-radius-sm);
  padding: 10px 13px; font-size: .84rem; line-height: 1.55;
  margin-bottom: 14px; color: var(--lcm-text);
  border: 1px solid var(--lcm-border);
}
.lcm-detail-actions { display: flex; gap: 8px; }
.lcm-detail-actions .lcm-btn { flex: 1; justify-content: center; }
@media(max-width: 600px) {
  .lcm-modal--detail { max-width: 100%; }
  .lcm-detail-content { padding: 14px 16px 18px; }
  .lcm-detail-name { font-size: .95rem; }
}
