/* captura.css -- a ticket or an invoice as it happens (public/captura.js). app.css tokens only; the cards are the black-line
   choice cards of Servicios (.sv-opt). */
.cp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.cp.has-doc { grid-template-columns: minmax(0, 1fr) 460px; }
.cp:not(.has-doc) .cp-doc { display: none; }
.cp-doc iframe, .cp-doc img { width: 100%; height: 78vh; border: 1px solid var(--hairline); background: var(--card); display: block; object-fit: contain; }
.cp-box { background: var(--surface-2); border: 1px solid var(--hairline); padding: 14px 20px 20px; width: min(460px, 100%); box-sizing: border-box; }
.cp-h { display: flex; justify-content: space-between; font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cp-bar { height: 3px; background: var(--rule); margin: 8px 0 14px; }
.cp-bar span { display: block; height: 100%; background: var(--ink); }
.cp-q { font: 600 22px/1.2 var(--sans); margin: 0 0 4px; }
.cp-help { font-size: 13px; line-height: 1.35; color: var(--muted); margin: 0 0 12px; }
.cp-ch { display: grid; gap: 6px; }
.cp-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 14px; min-height: 44px; box-sizing: border-box; width: 100%;
  background: var(--card); border: 1px solid var(--ink); box-shadow: inset 3px 0 0 transparent; font: inherit; color: var(--ink); cursor: pointer; transition: box-shadow .12s ease; }
.cp-opt.on { box-shadow: inset 3px 0 0 var(--ink); }
@media (hover: hover) { .cp-opt:hover { box-shadow: inset 3px 0 0 var(--ink); } }
.cp-opt:active { box-shadow: inset 9px 0 0 var(--ink); }
.cp-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* a product this supplier's past bills were booked as */
.cp-opt.is-sug { position: relative; padding-right: 92px; }
.cp-opt .cp-tag { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.cp-opt b { font: 600 15px var(--sans); }
.cp-opt span { font-size: 13px; line-height: 1.3; color: var(--muted); }
.cp-in { display: block; width: 100%; box-sizing: border-box; padding: 9px 10px; min-height: 44px; font: 16px var(--sans); border: 1px solid var(--rule); background: var(--card); color: var(--ink); }
.cp-in.hand { background: var(--fill); }
/* An iPhone draws a date field wider than its box unless it is told not to (Paul, 2026-11-08: "UI broke"). */
.cp-in[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; text-align: left; }
.cp-in[type="date"]::-webkit-date-and-time-value { text-align: left; }
.cp-lab { display: grid; gap: 3px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-iva { background: var(--panel); color: var(--panel-figure); padding: 8px 12px; display: grid; gap: 6px; margin: 4px 0 6px; }
.cp-iva label { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 10px; font-size: 12px; color: var(--panel-dim); }
.cp-iva b { display: block; font: 600 14px var(--sans); color: var(--panel-figure); }
.cp-iva .cp-in { background: var(--panel-rule); border-color: var(--panel-label); color: var(--panel-figure); text-align: right; font-family: var(--mono); }
.cp-iva .cp-in.hand { background: var(--fill); color: var(--ink); }
.cp-ok { font-size: 13px; margin: 0 0 3px; color: var(--body); }
.cp-bad { font-size: 13px; margin: 0 0 3px; color: var(--alarm); }
.cp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.cp-back { border: 0; background: none; font: 14px var(--sans); color: var(--muted); cursor: pointer; padding: 12px 4px; min-height: 44px; }
.cp-main { border: 1px solid var(--ink); background: var(--ink); color: var(--panel-figure); font: 600 15px var(--sans); padding: 12px 18px; min-height: 44px; cursor: pointer; }
.cp-main[disabled] { opacity: .5; cursor: default; }
.cp-pick { position: relative; display: flex; align-items: center; justify-content: center; padding: 13px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--ink); background: var(--card); cursor: pointer; font: 600 15px var(--sans); }
.cp-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cp-shot { height: 240px; border: 1px solid var(--ink); background: var(--card); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; }
.cp-shot img { max-width: 100%; max-height: 100%; }
.cp-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: 14px; margin: 0 0 10px; }
.cp-rows dt { color: var(--muted); }
.cp-rows dd { margin: 0; }
.cp-con { font: 12px var(--mono); background: rgba(47, 82, 51, .08); padding: 6px 8px; word-break: break-word; }
/* the result: Cierre's «enviado» strip (structure.css .cm-sent.is-done) */
.cp-done { display: grid; gap: 4px; font-size: 14px; line-height: 1.35; padding: 8px 12px; border-left: 3px solid var(--done); background: var(--done-bg); color: var(--ink); }
/* «Ver la foto» under the box, on a computer */
.cp-col { display: grid; gap: 8px; align-content: start; width: min(460px, 100%); }
.cp-col .cp-box { width: 100%; }
.cp-seelink { justify-self: start; border: 0; background: none; padding: 4px 0; font: 14px var(--sans); color: var(--ink); text-decoration: underline; cursor: pointer; }
.cp-photo { border: 1px solid var(--ink); background: var(--card); }
.cp-zooms { display: flex; justify-content: flex-end; gap: 6px; padding: 6px; border-bottom: 1px solid var(--rule); }
.cp-zoom { width: 34px; height: 34px; border: 1px solid var(--ink); background: var(--card); font: 600 18px var(--sans); cursor: pointer; }
.cp-photo-in { max-height: 60vh; overflow: auto; }
.cp-photo-in img { display: block; max-width: none; }
.cp-link { color: var(--panel-dim); }
/* the alert on Inicio */
.cp-card { background: var(--card); border: 1px solid var(--hairline); padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.cp-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-card-t { font: 600 15px var(--sans); }
.cp-card a.cp-main { text-decoration: none; display: inline-block; }
.cp-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; border-top: 1px solid var(--rule); font: 14px var(--sans); color: var(--ink); cursor: pointer; }
.cp-row:hover { background: var(--surface-2); }
.cp-fig { font-family: var(--mono); text-align: right; white-space: nowrap; }
/* the invoice above the questions, on a phone only */
.cp-page { display: none; }
@media (max-width: 900px) {
  .cp.has-doc { grid-template-columns: minmax(0, 1fr); }
  .cp-doc { display: none; }
  .cp-page { display: grid; gap: 4px; margin: 0 0 14px; text-decoration: none; color: var(--muted); font-size: 12px; text-align: center; }
  .cp-page img { width: 100%; height: auto; border: 1px solid var(--hairline); background: var(--card); display: block; }
  .cp-box, .cp-col { width: 100%; }
}
