/* ============================================================================
   BLANK Sales v0.7.0 · PTAA builder — layout glue with CORE's tokens only. Raw colours only inside .pt-paper (the document itself:
   white A4 paper, ink, the red PREVIEW COPY footer), the same rule as the quote's A4 template
   ============================================================================ */
/* the tracker: Asked › With admin › Owner signs › Signed */
.pt-track { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.pt-track .pt-sep { display: inline-flex; color: var(--text-3); }
.pt-track .pt-sep svg.ic { width: 14px; height: 14px; }
/* a read-only box the height of an input (Ends, Property, Bill to, a masked value) */
.pt-ro { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-ctl); background: var(--sunken); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.pt-ro.pre { white-space: pre-line; align-items: flex-start; }
.pt-ro.masked { flex: 1 1 auto; }
/* the real file picker behind Upload signed: never seen, never a box (CORE's .field input rules would size it) */
.main input[data-pt-file] { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.pt-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--text-2); }
/* the PDF itself (step 3, the PTAA page): a page thumbnail, its name and pages, View / Download */
.pt-doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-tile); background: var(--sunken); }
.pt-thumb { width: 56px; height: 72px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 9px 8px; display: grid; align-content: start; cursor: pointer; }
.pt-mini { display: grid; gap: 5px; width: 100%; }
.pt-mini i { display: block; height: 3px; border-radius: 2px; background: var(--track); }
.pt-mini i:first-child { width: 60%; background: var(--text-3); }
.pt-doc-t { display: grid; gap: 4px; min-width: 0; }
.pt-doc-t b { font-size: 14px; overflow-wrap: anywhere; }
.pt-doc-t small { font-size: 12px; color: var(--text-3); }
.pt-doc-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 639.98px) { .pt-doc { grid-template-columns: auto minmax(0, 1fr); } .pt-doc-a { grid-column: 1 / -1; } .pt-doc-a .btn { flex: 1 1 auto; } }
/* My PTAAs: How it works, four numbered stops */
.pt-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-how-i { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-tile); background: var(--sunken); min-width: 0; }
.pt-how-i .tile-ic { background: var(--card); }
.pt-how-n { width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.pt-how-t { display: grid; min-width: 0; }
.pt-how-t b { font-size: 14px; }
.pt-how-t small { font-size: 12px; color: var(--text-3); }
@media (max-width: 1100px) { .pt-how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pt-how { grid-template-columns: minmax(0, 1fr); } }

/* the PTAA admin's page: the form and a rail (sticky from 1180 px), the decision card full width at the end */
.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.pt-main, .pt-rail { min-width: 0; }
@media (min-width: 1180px) { .pt-grid { grid-template-columns: minmax(0, 1fr) 320px; } .pt-rail { position: sticky; top: 16px; } }
.main [id^="pt-"]:focus, .main [id^="pf-"]:focus { outline: none; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-row.three { grid-template-columns: minmax(0, 1fr); } }
.field.miss input, .field.miss textarea, .field.miss select { border-color: var(--bad); }
.field.miss .pt-ro, .field.miss .pt-ic { box-shadow: inset 0 0 0 1px var(--bad); }
.field .lbl .chip { height: 20px; padding: 0 8px; }
.pt-ics { display: flex; gap: 10px; flex-wrap: wrap; }
.pt-ic { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px dashed var(--line); background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--text-1); cursor: pointer; }
.pt-ic svg.ic { width: 16px; height: 16px; }
.pt-ics.big .pt-ic { min-height: 120px; flex: 1 1 140px; justify-content: center; flex-direction: column; cursor: default; color: var(--text-2); }
.note-box.pt-prints, .note-box.pt-note, .note-box.pt-agent-note { display: flex; gap: 10px; align-items: flex-start; white-space: normal; }
.note-box.pt-prints > svg.ic, .note-box.pt-note > svg.ic, .note-box.pt-agent-note > svg.ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.pill[data-pt-gap] { background: var(--bad-bg); border-color: transparent; color: var(--bad); white-space: normal; height: auto; min-height: 32px; text-align: left; }
.pill[data-pt-gap]:hover, .pill[data-pt-gap]:focus-visible { border-color: var(--bad); color: var(--bad); }
.pill[data-pt-preset][aria-pressed="true"] { background: var(--text-1); border-color: var(--text-1); color: var(--card); }
/* utilities: one row per schedule item, Owner · Advanced · Tenant · None */
.ut-rows { display: grid; gap: 8px; }
.ut-row { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 12px; align-items: center; }
.ut-l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ut-row .seg { justify-self: start; flex-wrap: wrap; max-width: 100%; }
@media (max-width: 759.98px) { .ut-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } #pf-pt-ut > .card-head { flex-wrap: wrap; } #pf-pt-ut > .card-head .card-tools { flex: 1 1 100%; justify-content: flex-start; } }
@media (max-width: 560px) { .ut-row .seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; border-radius: 16px; } .ut-row .seg button { justify-content: center; padding: 0 4px; } }
/* the invoice: the total, its lines (bold name, grey details, a qty chip or FOC), four payments */
.inv-sum { display: grid; gap: 4px; }
.inv-lines { display: grid; }
.inv-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.inv-line:first-child { border-top: 0; }
.inv-line .k { display: grid; gap: 2px; min-width: 0; }
.inv-line .k b { font-size: 13px; overflow-wrap: anywhere; }
.inv-line .k small { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.inv-line.ed { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 72px auto auto; }
.inv-line.ed input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--text-1); width: 100%; min-width: 0; font: inherit; font-size: 13px; }
@media (max-width: 759.98px) { .inv-line.ed { grid-template-columns: minmax(0, 1fr) 72px auto auto; } .inv-line.ed input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }
.inv-pays { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inv-pays input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--text-1); font: inherit; }
.field.miss .inv-pays input { border-color: var(--bad); }
@media (max-width: 900px) { .inv-pays { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .inv-pays { grid-template-columns: minmax(0, 1fr); } }
/* phones: every tap target at least 44 px */
@media (max-width: 560px) {
  .main .inv-line.ed input, .main .inv-pays input { min-height: 44px; }
  .main .pill[data-pt-gap], .main .pill[data-pt-preset] { min-height: 44px; }
  .main .bk-fold > summary { min-height: 44px; }
  .main .pt-thumb { min-width: 44px; }
  .pt-view [data-pt-shownric] .nl { display: none; }
  .pt-view .sheet-tools [data-pt-shownric] { width: 44px; padding: 0; justify-content: center; }
}

/* the viewer (View, Preview PDF): the same line boxes as the PDF, as A4 pages (794 x 1123 px), fitted to the screen or at 100% */
.pt-view-in { max-width: 900px; margin: 0 auto; display: grid; gap: 14px; }
.pt-view[data-zoom="full"] .pt-view-in { max-width: none; }
.pt-pages { display: grid; gap: 16px; justify-items: center; }
.pt-fit { position: relative; width: 100%; max-width: 794px; overflow: hidden; }
.pt-paper { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: top left; background: #FFFFFF; color: #111111; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); font-family: 'Times New Roman', Times, serif; overflow: hidden; }
.pt-t { position: absolute; white-space: pre; line-height: 1.25; }
.pt-t.b { font-weight: 700; }
.pt-t.i { font-style: italic; }
.pt-t.bi { font-weight: 700; font-style: italic; }
.pt-t.red { color: #B3261E; }
.pt-r { position: absolute; border: 0.67px solid #595959; box-sizing: border-box; }
.pt-img { position: absolute; }

/* v0.7.0 · the admin's documents (make with the builder, or upload) and the Return sheet's ticks by tab. CORE tokens only */
.doc-pick { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-tile); background: var(--sunken); min-width: 0; }
.doc-pick-t { display: grid; gap: 2px; }
.doc-pick-t small { color: var(--text-3); font-size: 12px; }
.doc-pick .row { flex-wrap: wrap; }
.ta-list.docs > .doc-pick + .doc-pick, .ta-list.docs > .odoc + .doc-pick, .ta-list.docs > .doc-pick + .odoc { margin-top: 8px; }
.ret-grp { display: grid; gap: 6px; }
.ret-grp + .ret-grp { margin-top: 10px; }
.ret-gl { font-size: 12px; font-weight: 700; color: var(--text-3); }

/* v0.7.0 repair round 1 · the admin's Documents card on a phone: the head's chip under the title, each document on two rows (its name and
   the line under it in full, the buttons under them), so nothing breaks letter by letter or is cut to "Out …". CORE tokens only */
@media (max-width: 639.98px) {
  #pt-docs > .card-head { flex-wrap: wrap; }
  #pt-docs > .card-head > div:first-child { flex: 1 1 100%; min-width: 0; }
  #pt-docs > .card-head .card-tools { justify-content: flex-start; }
  .odoc.pt-odoc { grid-template-columns: 30px minmax(0, 1fr); row-gap: 6px; }
  .odoc.pt-odoc .od-t small { white-space: normal; overflow: visible; text-overflow: clip; }
  .odoc.pt-odoc .od-a:not(:empty) { grid-column: 2 / -1; justify-content: flex-start; }
  .odoc.pt-odoc .od-a:empty { display: none; }
}

/* v0.7.1 · the admin's review: back from the sales director (his ticks as pills that go to their card), and Sent again (what the agent did
   with each tick; a reason kept as it is reads in full). CORE tokens only */
#pt-dret .chips { flex-wrap: wrap; }
.rows.pt-reply .pref .k small.pt-why { color: var(--text-2); font-size: 13px; white-space: normal; }
