/* Money and invoices. Colours come from pages.css. */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:8px 0 14px}
.tile{border:2px solid var(--edge);padding:8px 10px;background:var(--card)}
.tile span{display:block;color:var(--dim);font-size:14px}
.tile b{font-size:21px;overflow-wrap:anywhere}
.tile.bad b{color:var(--bad)}
.amount{float:right;font-weight:700;margin-left:10px}
main input[type=date],main input[type=tel]{font:inherit;padding:9px 10px;border:2px solid var(--edge);border-radius:0;background:var(--card);color:var(--ink);width:100%}
main button[aria-pressed=true]{background:var(--sun);font-weight:700}
.pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 12px}
.line{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr) auto;gap:6px;margin-bottom:6px;align-items:center}
.line input{margin:0;min-width:0}
.line .link{padding:4px}
.scroll{overflow-x:auto;max-width:100%}
table.sheet{width:100%;border-collapse:collapse;font-size:15px}
table.sheet th,table.sheet td{border:2px solid var(--soft);padding:5px 7px;text-align:right;vertical-align:top}
table.sheet th:first-child,table.sheet td:first-child{text-align:left}
td.low{color:var(--bad);font-weight:700}
.reminder textarea{min-height:190px}
a.go{display:inline-block;padding:9px 14px;border:2px solid var(--edge);background:var(--action);color:var(--on-action);font-weight:700;text-decoration:none}
a.go.second{background:var(--card);color:var(--ink)}
main .answer,main .barbox,main p{overflow-wrap:anywhere}
@media (max-width:560px){
  main .barbox{box-shadow:none;border-width:2px;padding:10px 8px}
  main .row.filters>button{width:auto;flex:1 1 40%;padding:8px 6px}
  .tiles{grid-template-columns:1fr 1fr;gap:8px}
  .tile b{font-size:18px}
  .line{grid-template-columns:minmax(0,.8fr) minmax(0,1.8fr) minmax(0,1.2fr) auto}
  .line input{padding:10px 6px}
  .line input:first-child{grid-column:1/-1}
}

textarea.pre-box{min-height:260px;font-size:14px}
@media print{body.print-claim header.bar,body.print-claim .filters,body.print-claim .msg,body.print-claim #app>*:not(.printing){display:none!important}
  body.print-claim .claim details{display:block}body.print-claim .claim textarea{border:0;min-height:0;height:auto}}

/* ---------------------------------------------------------------- the invoice itself: always black on white */
body.invoice{background:#e9eee9;color:#111}
.sheet-page{width:min(760px,calc(100% - 24px));margin:18px auto;padding:28px;background:#fff;color:#111;border:1px solid #999;box-shadow:none}
.sheet-page h1{font:700 24px/1.2 system-ui,sans-serif;margin:0 0 4px}
.sheet-page h2{font:700 15px system-ui,sans-serif;margin:18px 0 4px}
.sheet-page p{margin:3px 0;white-space:pre-line;overflow-wrap:anywhere}
.sheet-page a{color:#0b4f8a}
.sheet-page .dim{color:#555}
.sheet-page .top{display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between}
.sheet-page table{width:100%;border-collapse:collapse;margin-top:14px;font-size:15px}
.sheet-page th,.sheet-page td{border-bottom:1px solid #ccc;padding:6px 5px;text-align:right;vertical-align:top}
.sheet-page th:first-child,.sheet-page td:first-child{text-align:left;overflow-wrap:anywhere}
.sheet-page tfoot td{border:0;padding:3px 5px}
.sheet-page tfoot tr.grand td{border-top:2px solid #111;font-weight:700;font-size:17px}
.stamp{display:inline-block;border:2px solid #111;padding:2px 10px;font-weight:700;text-transform:uppercase}
.pay-box{display:flex;flex-wrap:wrap;gap:18px;align-items:center;margin-top:12px}
.pay-box img{width:180px;height:180px}
.invoice-tools{width:min(760px,calc(100% - 24px));margin:14px auto 0;display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between}
.invoice-tools button{background:#fff;color:#111;border:2px solid #111}
.sheet-page .terms{margin-top:16px;font-size:13px;color:#333}
.sheet-foot{margin-top:22px;border-top:1px solid #ccc;padding-top:8px;font-size:13px;color:#555}
@media (max-width:560px){.sheet-page{padding:16px 12px}.sheet-page table{font-size:13px}}
@media print{
  body.invoice{background:#fff}
  .invoice-tools,.no-print{display:none!important}
  .sheet-page{width:100%;margin:0;border:0;padding:0}
}

/* the free maker: the form uses the page colours, the sheet below is always black on white */
#after a.go{display:inline-block}
@media print{#form,#after,header.bar{display:none!important}}
