/* Styles for Scan an item, Laundry & store and Settings. Classes are prefixed c-. */

.c-mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.c-grow { flex: 1 1 220px; min-width: 0; }
.c-wide { width: 100%; }
.c-short { color: var(--warn); font-weight: 650; }

/* People list in Settings */
.c-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.c-people li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.c-people-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lk-navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex: 0 0 36px;
}
.c-people-avatar[style*="teal-100"] {
  box-shadow: 0 0 0 3px var(--lk-teal-100);
}
.c-people div {
  min-width: 0;
}
.c-people strong {
  display: block;
  overflow-wrap: anywhere;
}
.c-people .muted {
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ---------- Scan an item ---------- */

.c-scan-layout { display: grid; gap: 14px; min-width: 0; }
@media (min-width: 980px) {
  .c-scan-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .c-scan-layout .c-timeline { max-height: 200px; }
}

.c-scan-card { display: grid; gap: 14px; }
.c-scan-form { display: grid; gap: 8px; min-width: 0; }
.c-scan-label { font-size: 15px; color: var(--text); margin-bottom: 0; }
.c-scan-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.c-scan-input {
  flex: 1 1 240px;
  min-width: 0;
  width: 100%;
  min-height: 56px;
  font-size: 20px;
  font-family: var(--mono);
  padding: 10px 14px;
  border-width: 2px;
  border-color: var(--primary);
}
.c-scan-go { min-height: 56px; padding: 8px 22px; font-size: 16px; }
.c-samples { display: grid; gap: 8px; }
.c-samples .small { margin: 0; }
.c-samples .chip { font-size: 13px; }
.c-tech-line { margin: 0; }

.c-result { display: grid; gap: 12px; min-width: 0; }
.c-empty { padding: 12px 0; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }

.c-item-id { font-family: var(--mono); letter-spacing: 0.02em; }
.c-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.c-block h3 { margin-bottom: 6px; }
.c-tech-details { margin-top: 10px; }
.c-tech-details summary { cursor: pointer; font-weight: 650; color: var(--lk-teal-700); }
.c-tech-details[open] summary { margin-bottom: 8px; }
.c-tech-details .kv { margin-bottom: 0; }
.c-wash { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.c-wash .progress { flex: 1 1 160px; }

.c-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--line-strong);
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.c-timeline li { display: grid; gap: 0; line-height: 1.35; overflow-wrap: anywhere; }
.c-when { font-variant-numeric: tabular-nums; }

.c-barcode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.c-barcode .code-svg { width: 260px; max-width: 100%; height: auto; background: #fff; border-radius: 6px; padding: 6px; }

.c-notfound { border-color: rgba(243, 211, 107, .35); }
.c-notfound .form-row { margin: 8px 0 12px; }

/* Print: only the label. The area is off screen on screen; print CSS shows it alone. */
.c-print-area {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.c-label {
  width: 80mm;
  padding: 4mm;
  border: 0.3mm solid #000;
  background: #fff;
  color: #000;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}
.c-label-org { font-size: 9pt; }
.c-label-id { font-size: 18pt; font-weight: 700; font-family: monospace; margin: 2mm 0; }
.c-label-type { font-size: 10pt; margin-bottom: 2mm; }
.c-label svg { width: 70mm; height: auto; display: block; margin: 0 auto; }

/* ---------- Laundry & store ---------- */

/* ---------- Settings ---------- */

.c-settings .card { min-width: 0; }
.c-system-runs { display: grid; gap: 6px; }
.c-system-runs h2 { margin: 0; }
.c-system-runs p { margin: 0; max-width: 72ch; }
.c-ext-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin: 8px 0 12px; }
.c-tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 10px; }
.c-tech-opt {
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  padding: 14px;
  min-width: 0;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.c-tech-opt strong { font-size: 16px; }
.c-tech-opt:hover { border-color: var(--primary); }
.c-tech-opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

.c-prices { display: grid; gap: 8px; margin-top: 12px; min-width: 0; }
.c-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 170px);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  color: var(--text);
}
.c-price-name { overflow-wrap: anywhere; }
.c-price-input { display: flex; align-items: center; gap: 4px; min-width: 0; }
.c-price-input input { width: 100%; min-width: 0; }

.c-lock-row { align-items: center; }
.c-lock { width: 22px; height: 22px; color: var(--primary-dark); flex: 0 0 auto; }

/* ---------- small phones ---------- */

@media (max-width: 480px) {
  .c-price-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .c-price-input input { width: 100%; }
  .c-scan-input { font-size: 18px; }
  .c-tech-grid { grid-template-columns: minmax(0, 1fr); }
  .c-barcode .code-svg { width: 100%; }
}

@media print {
  body * { visibility: hidden !important; }
  .c-print-area,
  .c-print-area * { visibility: visible !important; }
  .c-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}
