/* ============================================================
   ProjectTelemetry — Installed assets & commissioning handover
   assets/assets.css

   Scoped to .as-* / .te-*. Structure comes from change-orders.css,
   production.css and curves-dash.css; .cr-k / .cr-v / .cr-hint / .cr-encl
   are reused from correspondence.css — a warranty clock and a notice clock
   are the same shape of thing.
   ============================================================ */

/* ── The warranty clock ─────────────────────────────────── */
.as-w { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; white-space: nowrap; }
.as-w i { font-size: 13px; }
.as-w.ok    { color: var(--ink-soft); }
.as-w.soon  { color: #b45309; font-weight: 600; }
.as-w.exp   { color: #b91c1c; font-weight: 600; }
.as-w.unset { color: var(--ink-faint); font-style: italic; }

.as-clock {
  margin: 14px 0; padding: 12px 16px;
  border: 1px solid var(--bd); border-radius: 6px; background: var(--white);
}
.as-clock.soon  { border-color: #b45309; background: #fffbeb; }
.as-clock.exp   { border-color: #b91c1c; background: #fef2f2; }
.as-clock.unset { border-style: dashed; }

.as-clock-h {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-soft);
}
.as-clock-g { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: flex-end; }
.as-clock-warn {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--bd);
  font-size: 12px; color: var(--ink-faint); line-height: 1.5;
}

.as-wbox { border-left: 2px solid var(--accent); padding-left: 10px; }

/* ── Checks ─────────────────────────────────────────────── */
.as-bar { display: flex; align-items: center; gap: 8px; }
.as-bar-t { flex: 1; height: 5px; background: var(--bd); border-radius: 3px; overflow: hidden; min-width: 42px; }
.as-bar-f { height: 100%; background: var(--ink-soft); border-radius: 3px; }
.as-bar-f.pos { background: #16a34a; }
.as-bar-f.neg { background: #dc2626; }
.as-bar-n { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-fail  { color: #b91c1c; font-weight: 600; }

.as-checks { padding: 2px 0; }
.as-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 16px; border-top: 1px solid var(--bd);
}
.as-check:first-child { border-top: 0; }
.as-check.pass { background: #f6fdf8; }
.as-check.fail { background: #fef4f4; }
.as-check.na   { opacity: .68; }

.as-ck-n {
  width: 20px; flex-shrink: 0; text-align: right;
  font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; padding-top: 2px;
}
.as-ck-m { flex: 1; min-width: 0; }
.as-ck-t { font-size: 13px; color: var(--ink); line-height: 1.4; }
.as-ck-u {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px;
  background: var(--accent-bg); color: var(--accent); font-size: 10px; font-weight: 600;
}
.as-ck-v {
  margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.as-ck-note { margin-top: 3px; font-size: 12px; color: #991b1b; line-height: 1.45; }
.as-check.na .as-ck-note { color: var(--ink-soft); }
.as-ck-by   { margin-top: 3px; font-size: 10.5px; color: var(--ink-faint); }

.as-ck-btns { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.as-ck-b {
  padding: 3px 9px; border: 1px solid var(--bd); background: var(--white);
  color: var(--ink-faint); font-size: 11px; text-transform: capitalize; cursor: pointer;
}
.as-ck-b:first-child { border-radius: 4px 0 0 4px; }
.as-ck-b + .as-ck-b  { border-left: 0; }
.as-ck-b:last-of-type { border-radius: 0 4px 4px 0; }
.as-ck-b:hover { color: var(--ink); }
.as-ck-b.pass.on { background: #15803d; border-color: #15803d; color: #fff; }
.as-ck-b.fail.on { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.as-ck-b.na.on   { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }

.as-addck { padding: 10px 16px; border-top: 1px solid var(--bd); }

/* ── The refusals. These are the product. ───────────────── */
.as-block {
  margin: 0; padding: 12px 16px; border-top: 1px solid var(--bd);
  background: #fef2f2; color: #991b1b;
}
.as-block.big { margin: 14px 0; border: 1px solid #b91c1c; border-radius: 6px; }
.as-block-h {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.as-block ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
.as-block-f { margin-top: 8px; font-size: 12px; opacity: .82; }
.as-bitem { margin: 8px 0; font-size: 12.5px; }
.as-bitem strong { font-family: ui-monospace, monospace; margin-right: 6px; }
.as-bitem ul { margin-top: 2px; }

.as-ready {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-top: 1px solid var(--bd);
  background: #f6fdf8; color: #14532d; font-size: 13px;
}
.as-ready.big { margin: 14px 0; border: 1px solid #16a34a; border-radius: 6px; }
.as-ready i { font-size: 16px; }

.as-signed {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-top: 1px solid var(--bd);
  background: var(--bg2); color: var(--ink-soft); font-size: 12.5px;
}

/* ── Documents, packages, labels ────────────────────────── */
.as-dt {
  flex-shrink: 0; min-width: 118px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; color: var(--ink-faint);
}
.as-hlock { margin-left: 5px; font-size: 11px; color: var(--ink-faint); }
.as-pkgbar { margin-bottom: 12px; }

.as-qr {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px; border: 1px dashed var(--bd); border-radius: 6px;
}
.as-tok {
  display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; letter-spacing: 2px; color: var(--ink); margin-top: 2px;
}
.as-qr .cd-soft { flex: 1; min-width: 240px; font-size: 12px; line-height: 1.5; }

.as-picklist { max-height: 340px; overflow-y: auto; border: 1px solid var(--bd); border-radius: 6px; }
.as-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-top: 1px solid var(--bd); cursor: pointer; font-size: 13px;
}
.as-pick:first-child { border-top: 0; }
.as-pick:hover { background: var(--bg2); }
.as-pick-n { flex: 1; min-width: 0; }
.as-pick-w { color: #b45309; }

/* ── Checklist template editor ──────────────────────────── */
.te-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.te-n { width: 18px; text-align: right; font-size: 11px; color: var(--ink-faint); }
.te-t { flex: 1; }
.te-u { width: 72px; }
.te-rl {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--bd); border-radius: 5px; cursor: pointer;
  color: var(--ink-faint); flex-shrink: 0;
}
.te-rl input { display: none; }
.te-rl:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .as-clock-g { gap: 12px 22px; }
  .as-check { flex-wrap: wrap; }
  .as-ck-btns { margin-left: 30px; }
}
