/* The invoice check's page (invoice-check.html, de/rechnungspruefung.html): its window (.ucw,
   uc-views.js) and the page around it. The CI is the site's: white, Geist, 0.5px hairlines,
   square corners, one orange, and orange is only ever you. */

/* ── The window: a bar, the job's own view, and what it reads and writes ── */
.ucw { display: flex; flex: 1; flex-direction: column; min-width: 0; background: var(--bg); border: 0.5px solid var(--ink); }
.ucw .bar { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 12px; height: 32px; padding: 0 10px; border-bottom: 0.5px solid var(--ink); font-size: 12px; }
.ucw .bar small { font: 9px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ucw-body { position: relative; height: clamp(340px, 33vw, 420px); overflow: hidden; }
.ucw-io { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 36px; padding: 8px 10px; border-top: 0.5px solid var(--hair-soft); font: 8.5px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ucw-io b { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 0.5px solid var(--hair-soft); font-weight: 400; color: var(--ink); white-space: nowrap; }
.ucw-io i { margin: 0 4px; font-style: normal; color: var(--ink); }
/* The buttons a call is answered with, as in the hero's third window. */
.call { display: flex; flex-wrap: wrap; gap: 6px; }
.call button { height: 28px; padding: 0 12px; border: 0.5px solid var(--hair); background: var(--bg); font-size: 11px; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.call button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
@media (hover: hover) { .call button:hover { background: var(--accent); border-color: var(--accent); } }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 0.5px solid var(--hair); font: 400 8.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.tag.ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tag.you { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.tag.off { border-color: var(--hair-soft); color: var(--muted); text-decoration: line-through; }

/* ── 01 · Invoice check: the contractor's page with a check column, and the
   items left for you, largest first ─────────────────────────────────────── */
.inv { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); height: 100%; }
.inv-doc { position: relative; padding: 14px 14px 0; overflow: hidden; background: var(--inset); border-right: 0.5px solid var(--hair-soft); }
.inv-sheet { position: relative; height: 100%; padding: 13px 14px 0; background: var(--bg); border: 0.5px solid var(--hair-soft); border-bottom: 0; font-size: 10px; line-height: 1.3; }
.inv-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 0.5px solid var(--ink); }
.inv-top b { display: block; font-weight: 500; font-size: 11px; }
.inv-top span { display: block; color: var(--muted); }
.inv-top div + div { text-align: right; }
.inv-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 76px 54px 66px 16px; gap: 8px; align-items: center; height: 27px; border-bottom: 0.5px solid var(--hair-soft); font-variant-numeric: tabular-nums; transition: background 0.3s; }
.inv-row.head { height: 23px; font: 8px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.inv-row > * { min-width: 0; white-space: nowrap; }
.inv-row .pos { font: 9px/1 var(--mono); color: var(--muted); }
.inv-row .t { overflow: hidden; text-overflow: ellipsis; }
.inv-row .n { justify-self: end; padding: 2px 3px; margin-right: -3px; border: 0.5px solid transparent; transition: border-color 0.3s, color 0.3s; }
.inv-row .mk { width: 14px; height: 14px; }
.inv-row .mk svg { display: block; width: 14px; height: 14px; overflow: visible; opacity: 0; transition: opacity 0.25s; }
.inv-row .mk path { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.inv-row .mk rect { fill: none; stroke: var(--ink); stroke-width: 1; }
.inv-row.seen .mk svg { opacity: 1; }
/* An open item: the number in question is boxed, as the check marks it on the PDF. */
.inv-row.seen.open .n.q { border-color: var(--ink); }
.inv-row.cur { background: rgb(245 78 0 / 0.07); }
.inv-row.cur .n.q { border-color: var(--accent); }
.inv-row.cut .n.q { color: var(--muted); text-decoration: line-through; }
.inv-scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); opacity: 0; pointer-events: none; }
.inv-open { display: flex; flex-direction: column; min-width: 0; }
.inv-sum { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-bottom: 0.5px solid var(--hair-soft); font-size: 12px; white-space: nowrap; }
.inv-sum b { font-weight: 500; }
.inv-sum span { color: var(--muted); font-variant-numeric: tabular-nums; }
.inv-list { flex: 1; min-height: 0; margin: 0; padding: 0; overflow: hidden; list-style: none; }
.inv-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 8px 12px; border-bottom: 0.5px solid var(--hair-soft); font-size: 11px; line-height: 1.3; opacity: 0; translate: 0 4px; transition: opacity 0.4s, translate 0.4s, background 0.3s; }
.inv-item.in { opacity: 1; translate: 0; }
.inv-item b { overflow: hidden; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.inv-item .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-item .why { grid-column: 1 / -1; color: var(--muted); }
.inv-item .call { display: none; grid-column: 1 / -1; margin-top: 5px; }
.inv-item .tag { display: none; justify-self: end; }
.inv-item.cur { background: rgb(245 78 0 / 0.07); box-shadow: inset 2px 0 var(--accent); }
.inv-item.cur .why { color: var(--ink); }
.inv-item.cur .call { display: flex; }
.inv-item.done .amt { display: none; }
.inv-item.done .tag { display: inline-flex; }
.inv-item.done .why { display: none; }
.inv-pay { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border-top: 0.5px solid var(--ink); font-size: 12px; }
.inv-pay small { display: block; font-size: 10px; color: var(--muted); }
.inv-pay strong { font-weight: 400; font-size: 15px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-pay .btn { height: 30px; padding: 0 12px; font: inherit; font-size: 11px; white-space: nowrap; }
.inv-pay .btn[hidden] { display: none; }

/* ── The invoice check's page ──────────────────────────────────────────── */
.ivp-top { padding: 152px 0 0; }
.ivp-win { margin-top: 44px; padding: clamp(12px, 3vw, 40px); background: radial-gradient(circle, rgb(140 140 140 / 0.3) 0.75px, transparent 1px) 0 0 / 14px 14px, var(--inset); }
.ivp-win .ucw-body { height: clamp(360px, 36vw, 470px); }
.ivp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 72px 0 0; }
.ivp-num b { display: block; font-weight: 400; font-size: clamp(40px, 4.6vw, 60px); line-height: 1.1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.ivp-value { display: flex; align-items: baseline; gap: 0.2em; white-space: nowrap; }
.ivp-unit { font-size: 0.7em; }
.ivp-arrow { color: var(--faint); }
.ivp-num p { max-width: 240px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.4; text-wrap: pretty; }
/* Each digit rolls inside its own line; the final figure remains in the HTML. */
.ivp-digit { display: inline-block; width: var(--digit-width); height: 1.1em; overflow: hidden; vertical-align: bottom; }
.ivp-reel, .ivp-reel > span { display: block; }
.ivp-reel > span { height: 1.1em; line-height: 1.1; }
.ivp-ask { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 88px 0 104px; }
.ivp-access { display: flex; max-width: 440px; }
.ivp-access input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 0.5px solid var(--hair); border-right: 0; border-radius: 0; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.ivp-access input::placeholder { color: var(--faint); }
.ivp-access input:focus-visible { outline-offset: -2px; }
.ivp-access .btn { flex: none; }
.ivp-access .btn:disabled { cursor: default; }
.ivp-ask .msg { min-height: 1.45em; margin-top: 10px; font-size: 12px; color: var(--accent); }
.ivp-ask .msg.ok { color: var(--ink); }
.ivp-ask .note { max-width: 440px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.ivp-ask .note a { text-decoration: none; border-bottom: 0.5px solid var(--hair); }

@media (max-width: 960px) {
  .ivp-ask { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ucw-body { height: auto; }
  .inv { grid-template-columns: 1fr; height: auto; }
  .inv-doc { height: 344px; border-right: 0; border-bottom: 0.5px solid var(--hair-soft); }
  /* The longest quantity, framed (2,418.000 m·wk), needs its 86 px; at 62 it ran over the text. */
  .inv-row { grid-template-columns: 40px minmax(0, 1fr) 86px 58px 14px; }
  .inv-row > :nth-child(4) { display: none; }
  .inv-list { min-height: 236px; }
  .ivp-top { padding-top: 112px; }
  .ivp-win .ucw-body { height: auto; }
  .ivp-nums { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
  .ivp-ask { padding: 64px 0 80px; }
}
/* The smallest phones: the item number makes way, so the description keeps some room. */
@media (max-width: 400px) {
  .inv-row:not(.boq) { grid-template-columns: minmax(0, 1fr) 86px 58px 14px; gap: 6px; }
  .inv-row:not(.boq) > :nth-child(1) { display: none; }
}
