/**
 * Wiederverwendbares Card-Listen-Layout (Vorlage: PILM Bestellungen-Liste).
 *
 * Verwendung:
 *   <div class="lc-list">
 *     <article class="lc-card">
 *       <header class="lc-card__head">
 *         <div class="lc-card__image">[img/icon]</div>
 *         <div class="lc-card__main">
 *           <div class="lc-card__title-row">[badges, name, status]</div>
 *           <h3 class="lc-card__product">[Hauptbezeichnung]</h3>
 *           <div class="lc-card__meta">[Untertitel/Tags]</div>
 *           [optional: <div class="lc-chips">…</div>]
 *         </div>
 *         <div class="lc-card__stats">[große Zahlen/Progress]</div>
 *         <div class="lc-card__actions">[Buttons]</div>
 *       </header>
 *       [optional <section class="lc-card__detail">…</section>]
 *     </article>
 *   </div>
 *
 * Responsive: 4-Spalten-Grid > Single-Column auf Mobil.
 */

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

.lc-card {
  background: white;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}
.lc-card:hover {
  border-color: var(--color-brand-primary, #6c3ce0);
  box-shadow: 0 1px 3px rgba(108,60,224,0.06);
}
.lc-card.is-expanded {
  border-color: var(--color-brand-primary, #6c3ce0);
  box-shadow: 0 2px 8px rgba(108,60,224,0.08);
}

/* HEAD-Layout: Bild · Hauptinfo · Stats · Aktionen */
.lc-card__head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 12px 14px;
  align-items: center;
}

/* Wenn keine Bild-Spalte gewünscht */
.lc-card--no-image .lc-card__head {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.lc-card__image { display: flex; align-items: center; justify-content: center; }
.lc-card__image img {
  width: 56px; height: 56px;
  object-fit: cover; border-radius: 6px;
  border: 1px solid var(--color-border, #e2e8f0);
  display: block;
}
.lc-card__image-ph {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg-subtle, #f1f5f9);
  color: var(--color-text-muted, #94a3b8);
  border-radius: 6px; border: 1px solid var(--color-border, #e2e8f0);
  font-size: 22px;
}
.lc-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c3ce0, #8b5cf6);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  text-transform: uppercase;
}

.lc-card__main { min-width: 0; }
.lc-card__title-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 3px;
}
.lc-card__id {
  font-weight: 700; font-size: 13.5px;
  color: var(--color-brand-primary, #6c3ce0);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.lc-card__id:hover { text-decoration: underline; }
.lc-card__sub-id {
  font-size: 10.5px; padding: 2px 6px; border-radius: 4px;
  background: var(--color-bg-subtle, #f1f5f9);
  color: var(--color-text-muted, #64748b);
}
.lc-card__product {
  margin: 0 0 3px 0;
  font-size: 14.5px; font-weight: 600; line-height: 1.3;
  color: var(--color-text, #0f172a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lc-card__meta {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--color-text-muted, #64748b);
  line-height: 1.3;
}
.lc-card__meta a { color: var(--color-brand-primary, #6c3ce0); text-decoration: none; font-weight: 500; }
.lc-card__meta a:hover { text-decoration: underline; }
.lc-card__sep { color: var(--color-border, #cbd5e1); }
.lc-card__code { font-size: 10.5px; padding: 1px 4px; background: rgba(0,0,0,0.04); border-radius: 3px; }

.lc-chips {
  display: flex; flex-wrap: wrap; gap: 3px;
  margin-top: 5px;
}
.lc-chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 1px 6px; border-radius: 10px;
  background: var(--color-bg-subtle, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
  font-size: 10.5px; white-space: nowrap;
}
.lc-chip__name { font-weight: 600; color: var(--color-text-secondary, #475569); }
.lc-chip__qty { color: var(--color-text-muted, #94a3b8); font-variant-numeric: tabular-nums; }

/* STATS rechts */
.lc-card__stats {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  min-width: 130px;
}
.lc-card__qty-big {
  font-size: 20px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; text-align: right;
}
.lc-card__qty-sep { color: var(--color-border, #cbd5e1); margin: 0 2px; font-weight: 400; }
.lc-card__qty-total { color: var(--color-text-muted, #94a3b8); font-weight: 500; font-size: 16px; }
.lc-card__progress {
  height: 4px; background: var(--color-bg-subtle, #f1f5f9);
  border-radius: 2px; overflow: hidden; margin-top: 5px;
}
.lc-card__progress-bar { height: 100%; transition: width .3s ease; }
.lc-card__progress-pct { font-size: 10.5px; color: var(--color-text-muted, #64748b); text-align: right; margin-top: 2px; font-variant-numeric: tabular-nums; }
.lc-card__price {
  font-size: 11.5px; color: var(--color-text-secondary, #475569);
  text-align: right; margin-top: 3px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.lc-card__price-suffix { color: var(--color-text-muted, #94a3b8); font-weight: 400; }

/* AKTIONEN */
.lc-card__actions { display: flex; align-items: center; gap: 4px; }
.lc-card__expand {
  background: transparent; border: 1px solid var(--color-border, #e2e8f0);
  width: 30px; height: 30px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  color: var(--color-text-muted, #64748b);
  transition: background .12s, color .12s, border-color .12s;
}
.lc-card__expand:hover {
  background: var(--color-bg-subtle, #f1f5f9);
  color: var(--color-brand-primary, #6c3ce0);
  border-color: var(--color-brand-primary, #6c3ce0);
}
.lc-card__expand svg { display: block; }
.lc-card.is-expanded .lc-card__expand { background: var(--color-brand-primary, #6c3ce0); color: white; border-color: var(--color-brand-primary, #6c3ce0); }
.lc-chev { display: inline-block; transition: transform .2s ease; font-size: 13px; line-height: 1; }
.lc-card.is-expanded .lc-chev { transform: rotate(180deg); }

/* DETAIL-Bereich (Aufklappbar) */
.lc-card__detail {
  border-top: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg-subtle, #f8fafc);
  padding: 14px 18px;
}
.lc-card__detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.lc-card__detail-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text-muted, #64748b); margin: 0 0 6px 0; font-weight: 600;
}
.lc-card__detail-table {
  width: 100%; border-collapse: collapse;
  background: white; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--color-border, #e2e8f0);
  font-size: 11.5px;
}
.lc-card__detail-table th, .lc-card__detail-table td {
  padding: 5px 9px; text-align: left;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.lc-card__detail-table tr:last-child td { border-bottom: none; }
.lc-card__detail-table th {
  background: var(--color-bg-subtle, #f8fafc);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-muted, #64748b); font-weight: 600;
}
.lc-card__detail-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ====== RESPONSIVE ====== */

/* Tablet */
@media (max-width: 1100px) {
  .lc-card__head {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .lc-card__stats { grid-column: 2 / 4; min-width: 0; flex-direction: row; align-items: center; gap: 12px; margin-top: 6px; }
  .lc-card__progress { flex: 1; margin-top: 0; }
  .lc-card__progress-pct, .lc-card__qty-big { text-align: left; }
  .lc-card__price { text-align: left; margin-top: 0; }
  .lc-card__qty-big { font-size: 17px; }
  .lc-card__actions { grid-column: 3; align-self: start; }
  .lc-card__detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .lc-card--no-image .lc-card__head { grid-template-columns: minmax(0,1fr) auto; }
  .lc-card--no-image .lc-card__stats { grid-column: 1 / 3; }
  .lc-card--no-image .lc-card__actions { grid-column: 2; }
}

/* Mobile */
@media (max-width: 640px) {
  .lc-card__head { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 10px; gap: 8px; }
  .lc-card__image img, .lc-card__image-ph, .lc-card__avatar { width: 42px; height: 42px; }
  .lc-card__product { white-space: normal; font-size: 13.5px; }
  .lc-card__qty-big { font-size: 15px; }
  .lc-card__detail { padding: 10px; }
  .lc-card__id { font-size: 12.5px; }
  .lc-card__expand { width: 32px; height: 32px; } /* Touch-Target */
}
