/* ── TEMPLATES (js/templates.js) — in the Projects look he asked for ────────────
   ⚠ Every rule is under #view-templates, .tp-ov (the order and the New box, which hang
   off <body>) or .tp-paper (the quote, which is also printed in a frame of its own).
   ⚠ Colours are the app's own names, so dark mode follows; only the quote is white on
   purpose — it is a sheet of paper that goes to the customer. */

#view-templates, .tp-ov { --tp-wash: var(--field, #f3f3f1); --tp-blue: #2f64c9; --tp-blue-bg: rgba(47,100,201,.12); }

/* the three sections, lent to the panel beside the rail by topbar.js */
#tpTree { display: flex; gap: 22px; margin: 4px 0 18px; }

/* ── the list ── */
#view-templates .tp-lhd { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
/* a technician's check-in at the computer (templates.js, tpCheckinBar) */
#view-templates .tp-ci { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r-card); background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
#view-templates .tp-ci small { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
#view-templates .tp-ci.ok { background: var(--good-bg); color: var(--good); }
#view-templates .tp-ci.ok a { color: var(--good); }
#view-templates .tp-search { height: 34px; width: 240px; border: 0; border-radius: var(--r-card); background: var(--field); padding: 0 12px 0 32px; font-size: 14px; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' stroke='%239b9a94' stroke-width='1.6'%3E%3Ccircle cx='5.5' cy='5.5' r='4.2'/%3E%3Cpath d='M8.8 8.8 12 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center; }
#view-templates .tp-search:focus { outline: none; background-color: var(--field-h); }
#view-templates .tp-count { color: var(--ink-faint); font-size: 13px; }
#view-templates .tp-empty { color: var(--ink-faint); padding: 26px 0; }
#view-templates table.tp-pl { width: 100%; border-collapse: collapse; }
#view-templates table.tp-pl th { font-size: 13px; font-weight: 500; color: var(--ink-faint); text-align: left; padding: 0 10px 8px 0; border-bottom: 1.5px solid var(--ink); }
#view-templates table.tp-pl td { height: 40px; padding: 0 10px 0 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; white-space: nowrap; }
#view-templates table.tp-pl tr.g td { height: auto; border-bottom: 0; padding: 24px 0 8px; font-weight: 600; cursor: pointer; }
#view-templates table.tp-pl tr.g:nth-child(2) td { padding-top: 14px; }
#view-templates table.tp-pl tr.g td i { font-style: normal; color: var(--ink-faint); font-weight: 500; margin-left: 6px; }
#view-templates table.tp-pl tr.g .chev { display: inline-block; width: 14px; color: var(--ink-faint); transition: transform .15s var(--ease-out, ease); }
#view-templates table.tp-pl tr.g.shut .chev { transform: rotate(-90deg); }
#view-templates table.tp-pl tr.r { cursor: pointer; }
#view-templates table.tp-pl tr.r:hover td { background: var(--paper); }
#view-templates .nm { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
#view-templates .nm::before { content: ""; flex: none; width: 3px; height: 18px; border-radius: 2px; background: var(--rule); }
#view-templates tr.mine .nm::before { background: var(--accent); }
#view-templates .nm small { font-weight: 400; color: var(--ink-faint); font-size: 14px; }
#view-templates .num { text-align: right; }
#view-templates .frac { color: var(--ink-faint); font-size: 13px; }

/* shared little parts */
#view-templates .faint, .tp-ov .faint { color: var(--ink-faint); }
.tp-pill { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--tp-wash); color: var(--ink-soft); white-space: nowrap; }
.tp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tp-pill.s-making { background: var(--tp-blue-bg); color: var(--tp-blue); }
.tp-pill.s-made { background: var(--accent-soft); color: var(--accent); }
.tp-pill.s-quoted { background: var(--warn-bg); color: var(--warn); }
.tp-pill.s-approved { background: var(--good-bg); color: var(--good); }
.tp-pill.s-delivered { color: var(--ink-faint); }
.tp-av { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 5px; color: var(--on-accent, #fff); font-size: 11px; font-weight: 600; }
.tp-who { display: inline-flex; align-items: center; gap: 7px; }
.tp-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--good-bg); color: var(--good); }
.tp-x { background: none; border: 0; color: var(--ink-faint); font-size: 16px; padding: 0 4px; cursor: pointer; }
.tp-x:hover { color: var(--accent); }
.tp-x.big { font-size: 22px; margin-left: 6px; }
.tp-lnk { background: none; border: 0; padding: 0; color: var(--accent); font-size: 14px; font-weight: 500; cursor: pointer; }
/* THE BUTTON FAMILY at Templates' own sizes (restyle, 21 Oct 2026): .tp-go the main red, .tp-ghost the outline,
   + .tp-ok pale green (a step marked done), + .tp-neu grey (print), + .tp-del red edge (delete) */
.tp-go { height: 30px; border: 1.5px solid transparent; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff); font-size: 13px; font-weight: 600; padding: 0 14px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .16s cubic-bezier(.23,1,.32,1); }
.tp-go.wide { margin-left: auto; height: 34px; padding: 0 20px; border-radius: 999px; }
.tp-ghost { height: 30px; border: 1.5px solid var(--bt-edge); border-radius: 999px; background: transparent; font-size: 13px; font-weight: 600; padding: 0 14px; color: var(--ink); white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .16s cubic-bezier(.23,1,.32,1); }
.tp-go.tp-ok { background: var(--bt-ok); color: var(--bt-ok-ink); }
.tp-ghost.tp-neu { background: var(--bt-neu); border-color: transparent; }
.tp-ghost.tp-del { color: var(--bt-del-ink); border-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .tp-go:hover { background: var(--bt-main-h); }
  .tp-go.tp-ok:hover { background: var(--bt-ok-h); }
  .tp-ghost:hover { background: var(--bt-line-h); border-color: var(--ink); }
  .tp-ghost.tp-neu:hover { background: var(--bt-neu-h); border-color: transparent; }
  .tp-ghost.tp-del:hover { background: var(--bt-del-wash); border-color: var(--accent); }
}
.tp-go:active { background: var(--bt-main-p); transform: scale(.97); }
.tp-go.tp-ok:active { background: var(--bt-ok-p); }
.tp-ghost:active { background: var(--bt-line-p); transform: scale(.97); }
.tp-ghost.tp-neu:active { background: var(--bt-neu-p); }
.tp-ghost.tp-del:active { background: var(--bt-del-wash-p); }
.tp-go:disabled, .tp-ghost:disabled { background: var(--bt-off-bg); color: var(--bt-off-ink); border-color: transparent; cursor: not-allowed; transform: none; }
.tp-inl { height: 30px; border: 1px solid var(--rule); border-radius: 7px; padding: 0 10px; font-size: 14px; width: 170px; background: var(--surface); color: var(--ink); }
.tp-segs { display: inline-flex; border: 1px solid var(--rule); border-radius: 7px; overflow: hidden; }
.tp-segs button { border: 0; background: var(--surface); height: 30px; padding: 0 12px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.tp-segs button + button { border-left: 1px solid var(--rule); }
.tp-segs button.on { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* ── the library and the prices ── */
#view-templates .tp-cell, .tp-ov .tp-cell { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 7px; width: 100%; font-size: 14px; color: var(--ink); font-family: inherit; }
#view-templates .tp-cell:hover, .tp-ov .tp-cell:hover { border-color: var(--rule); }
#view-templates .tp-cell:focus, .tp-ov .tp-cell:focus { outline: none; border-color: var(--ink-faint); background: var(--surface); }
#view-templates .tp-cell.n { text-align: right; width: 74px; }
#view-templates table.tp-lib { width: 100%; border-collapse: collapse; }
#view-templates table.tp-lib th { font-size: 13px; font-weight: 500; color: var(--ink-faint); text-align: left; padding: 0 8px 8px 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
#view-templates table.tp-lib th.srt { cursor: pointer; user-select: none; }
#view-templates table.tp-lib th.srt:hover, #view-templates table.tp-lib th.srt.on { color: var(--ink); }
#view-templates table.tp-lib th .arr { display: inline-block; width: 12px; margin-left: 3px; font-size: 12px; }
#view-templates table.tp-lib td { padding: 3px 8px 3px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; height: 40px; }
#view-templates table.tp-lib td.w .tp-cell { min-width: 280px; }
#view-templates table.tp-lib td.w2 .tp-cell { min-width: 200px; }
#view-templates .tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 36px 56px; }
#view-templates .tp-blk h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
#view-templates .tp-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
#view-templates .tp-kv .tp-cell { width: 140px; text-align: right; }
#view-templates .tp-kv .tp-cell.w { width: 230px; text-align: left; }
#view-templates .tp-kv .calc { color: var(--ink-faint); font-size: 13px; min-width: 90px; text-align: right; }

/* ── one order: a Projects item ── */
.tp-ov { position: fixed; inset: 0; background: var(--bt-veil); display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px; z-index: 1000; overflow: auto; font-family: 'Inter', sans-serif; color: var(--ink); }
.tp-item { background: var(--surface); border-radius: 16px; width: min(1060px, 100%); box-shadow: var(--bt-pop-shadow); overflow: hidden; }
.tp-itabs { display: flex; align-items: center; gap: 4px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--rule); height: 52px; }
.tp-itabs .t { border: 0; background: none; height: 52px; padding: 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-faint); border-bottom: 2px solid transparent; cursor: pointer; }
.tp-itabs .t.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tp-itabs .sp, .tp-ov .sp { flex: 1; }
.tp-ibody { padding: 28px 34px 34px; }
.tp-ititle { font-size: 28px; font-weight: 600; letter-spacing: -.015em; margin: 0; font-family: 'Inter', sans-serif; }
.tp-isub { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
.tp-props { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 22px 0 30px; padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 40px; }
.tp-prop { display: flex; flex-wrap: wrap; align-items: center; min-height: 38px; font-size: 15px; min-width: 0; }
.tp-prop > label { width: 110px; flex: none; font-size: 14px; color: var(--ink-faint); }
.tp-ov .tp-cell.big { font-size: 15px; width: 260px; margin-left: -8px; }
.tp-disc { width: 34px; border: 1px solid var(--rule); border-radius: 4px; text-align: right; background: var(--surface); color: var(--ink); }
.tp-chipr { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-pchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 7px; border: 1px solid var(--rule); background: var(--surface); font-size: 14px; color: var(--ink); cursor: pointer; }
.tp-pchip.off { padding-left: 10px; color: var(--ink-faint); border-style: dashed; }
.tp-pchip.set { border-color: var(--ink); font-weight: 600; }
.tp-pchip .tp-av { width: 20px; height: 20px; }
.tp-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.tp-sec i { font-style: normal; font-weight: 500; color: var(--ink-faint); font-size: 14px; }
.tp-bar { height: 2px; background: var(--rule); position: relative; margin-bottom: 2px; }
.tp-bar.ink { height: 1.5px; background: var(--ink); }
.tp-bar b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--good); }
.tp-row { display: flex; align-items: center; gap: 14px; min-height: 46px; border-bottom: 1px solid var(--rule-soft); font-size: 15px; }
.tp-row .grow { flex: 1; min-width: 0; }
.tp-row .meta { color: var(--ink-faint); font-size: 14px; white-space: nowrap; }
.tp-row .meta.strong { color: var(--ink); font-weight: 600; min-width: 70px; text-align: right; }
.tp-row.done .grow { color: var(--ink-faint); text-decoration: line-through; }
.tp-row.next .grow { font-weight: 600; }
/* ⚠ THE STEP THAT IS NEXT CARRIES ITS OWN BUTTONS (PO box, Approved, Said no). In a narrow panel they dropped off the right
   edge and were cut. The row now wraps: the controls go onto a line of their own. */
.tp-row.next { flex-wrap: wrap; row-gap: 6px; padding: 6px 0; }
.tp-row.next .grow { flex: 1 1 110px; }
/* the next step shows who as the avatar alone — its name is the same one the step names, and it is what pushed the buttons onto a second line */
.tp-row.next .tp-who .meta { display: none; }
.tp-row.next .tp-inl { flex: 1 1 110px; width: auto; min-width: 100px; max-width: 200px; }
.tp-cb { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--ink-faint); flex: none; display: grid; place-items: center; background: var(--surface); }
.tp-cb.on { background: var(--good); border-color: var(--good); }
.tp-cb.on::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-accent, #fff); border-bottom: 2px solid var(--on-accent, #fff); transform: rotate(-45deg) translate(1px, -1px); }
.tp-proc { border-bottom: 1px solid var(--rule-soft); }
.tp-proc .tp-row { border-bottom: 0; cursor: pointer; }
.tp-proc .chev { width: 14px; color: var(--ink-faint); font-size: 12px; transition: transform .15s var(--ease-out, ease); }
.tp-proc.open .chev { transform: rotate(90deg); }
.tp-c { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 6px; font-size: 14px; width: 90px; color: var(--ink); }
.tp-c:hover { border-color: var(--rule); }
.tp-c:focus { outline: none; border-color: var(--ink-faint); background: var(--surface); }
.tp-c.q { width: 56px; text-align: right; }
.tp-pdet { padding: 4px 0 16px 28px; font-size: 14px; }
.tp-pdet .made { color: var(--ink-soft); }
.tp-pic { display: block; max-width: 100%; max-height: 180px; margin-top: 10px; border-radius: 8px; background: #2c2c2c; }
/* the fill-in: three quiet rows, no panel */
.tp-fillin { margin-top: 4px; }
.tp-flab { font-size: 12px; font-weight: 600; color: var(--ink-faint); margin: 12px 0 7px; }
.tp-fillin .tp-flab:first-child { margin-top: 2px; }
.tp-lyr { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; color: var(--ink-soft); }
.tp-thk { height: 30px; border: 1px solid var(--rule); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 0 6px; font-size: 14px; }
.tp-addly { font-size: 13px; }
/* names in one column, boxes in the next — every box on the same line down */
.tp-accgrid { display: grid; grid-template-columns: max-content max-content 1fr; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--ink-soft); }
.tp-fillin .tp-vac { margin-top: 12px; }
/* the − value + control: one rounded box, the value can still be typed */
.tp-stp { display: inline-flex; align-items: stretch; height: 30px; border: 1px solid var(--rule); border-radius: 7px; background: var(--surface); overflow: hidden; vertical-align: middle; }
.tp-stp:focus-within { border-color: var(--ink-faint); }
.tp-stp button { width: 26px; border: 0; background: none; color: var(--ink-soft); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.tp-stp button:hover { background: var(--field); color: var(--ink); }
.tp-stp button:active { background: var(--field-h); }
.tp-stp input { width: 34px; border: 0; background: none; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; font-variant-numeric: tabular-nums; }
.tp-stp input:focus { outline: none; }
.tp-stp.w input { width: 42px; }
.tp-row .tp-stp { margin-left: 4px; }
/* the photos, under the Steps */
.tp-phsec { margin-top: 34px; }
.tp-phsec .tp-sec .tp-lnk, .tp-phhead .tp-lnk { font-size: 13px; margin-left: 12px; font-weight: 500; }
.tp-phgroup { margin-top: 14px; }
.tp-phhead { display: flex; align-items: center; font-size: 14px; color: var(--ink-soft); }
.tp-empty.sm { padding: 12px 0; font-size: 13px; }
.tp-phsec .tp-photos { gap: 8px; }
.tp-phsec .tp-ph, .tp-phsec .tp-phimg { width: 92px; } .tp-phsec .tp-phimg { height: 92px; }
.tp-lnk.tp-file { position: relative; overflow: hidden; cursor: pointer; }
.tp-tcount { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-faint); background: var(--tp-wash); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.tp-phcount { font-size: 13px; }
.tp-ck { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; margin-right: 12px; color: var(--ink); }
.tp-file { position: relative; overflow: hidden; }
.tp-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tp-price { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tp-price input { width: 110px; height: 30px; border: 1px solid var(--rule); border-radius: 7px; padding: 0 8px; text-align: right; font-weight: 600; background: var(--surface); color: var(--ink); }
.tp-price input:disabled { border-color: transparent; background: none; }
.tp-how { color: var(--ink-faint); font-size: 13px; margin-top: 6px; }
.tp-how b { color: var(--ink-soft); font-weight: 600; }
.tp-addp { position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; color: var(--ink-faint); }
.tp-addp input { border: 0; background: none; font-size: 15px; flex: 1; padding: 6px 0; color: var(--ink); }
.tp-addp input:focus { outline: none; }
.tp-sugg { position: absolute; left: 18px; top: 44px; width: 520px; max-width: calc(100% - 18px); background: var(--surface); border: 1px solid var(--rule); border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 5; max-height: 300px; overflow: auto; padding: 4px; }
.tp-sugg.static { position: static; width: 100%; max-width: none; margin: 6px 0 4px; box-shadow: none; }
.tp-sugg button { display: flex; width: 100%; align-items: baseline; gap: 8px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--ink); cursor: pointer; }
.tp-sugg button small { color: var(--ink-faint); }
.tp-sugg button.hi, .tp-sugg button:hover { background: var(--tp-wash); }
.tp-sugg .new { border-top: 1px solid var(--rule-soft); margin-top: 4px; color: var(--accent); font-weight: 600; }
.tp-newproc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 14px 28px; font-size: 14px; }
.tp-newproc > span { color: var(--ink-faint); }
.tp-cols2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; }
.tp-qwrap { background: var(--ground); padding: 24px; border-radius: 9px; overflow: auto; }

/* ── the New box ── */
/* the small boxes (New order, Technician, Match the sheet's customers): the family's pop-up, a 24 title on top,
   a quiet round X, the buttons in a white foot under a line */
.tp-nb { background: var(--surface); border-radius: 16px; width: min(620px, 100%); box-shadow: var(--bt-pop-shadow); margin-top: 30px; }
.tp-nbtop { display: flex; align-items: flex-start; gap: 16px; padding: 24px 16px 14px 24px; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.tp-nbx { margin: -4px 0 0 auto; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 14px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
@media (hover: hover) and (pointer: fine) { .tp-nbx:hover { background: var(--bt-neu); color: var(--ink); } }
.tp-nbx:active { background: var(--bt-neu-p); color: var(--ink); }
.tp-nbbody { padding: 4px 24px 24px; position: relative; }
.tp-nbname { width: 100%; border: 0; background: none; font-size: 23px; font-weight: 600; letter-spacing: -.015em; padding: 2px 0; color: var(--ink); font-family: inherit; }
.tp-nbname::placeholder { color: var(--mute, var(--ink-faint)); font-weight: 500; }
.tp-nbdesc { width: 100%; border: 0; background: none; font-size: 15px; margin-top: 8px; padding: 2px 0; color: var(--ink); font-family: inherit; }
.tp-nbdesc::placeholder { color: var(--ink-faint); }
.tp-nbname:focus, .tp-nbdesc:focus { outline: none; }
.tp-nbchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tp-nbchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.tp-nbchip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tp-nbchip.set { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.tp-nbchip.open { background: var(--tp-wash); }
.tp-nbpane { margin-top: 12px; border: 1px solid var(--rule); border-radius: 9px; padding: 12px 14px; background: var(--paper); display: flex; flex-wrap: wrap; gap: 6px; }
.tp-nbfoot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--rule); padding: 16px 24px; background: var(--surface); border-radius: 0 0 16px 16px; position: relative; }
.tp-menu { position: absolute; bottom: 52px; left: 18px; width: 420px; background: var(--surface); border: 1px solid var(--rule); border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.12); max-height: 280px; overflow: auto; padding: 4px; z-index: 6; }
.tp-menu button { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--ink); cursor: pointer; }
.tp-menu button:hover { background: var(--tp-wash); }
.tp-menu button small { color: var(--ink-faint); margin-left: 6px; }

/* ── the board — Projects' own: pale columns, white cards with a coloured edge ── */
#view-templates .tp-lhd .sp { flex: 1; }
.tp-vsw { display: inline-flex; background: var(--tp-wash); border-radius: 8px; padding: 3px; }
.tp-vsw button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.tp-vsw button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
/* ⚠ ALL SIX FIT ON A LAPTOP — at 214px each the board scrolled sideways and Order in and
   Delivered fell half off the edge. The page is let out of the narrow reading width for it. */
#view-templates.wrap { max-width: none; }
#view-templates .tp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
#view-templates .tp-bfoot .faint { white-space: nowrap; }
/* ⚠ NOT THE PAGE'S COLOUR — "the kanban background shouldnt be the same color as the apps
   background". The columns are the app's field grey, a step darker than the page, so they read
   as lanes and the white cards stand off them. */
#view-templates .tp-bcol { background: var(--field); border: 1px solid transparent; border-radius: 11px; padding: 10px 8px 8px; min-height: 180px; transition: background .12s, border-color .12s; }
#view-templates .tp-bcol.can { border-color: var(--ink-faint); border-style: dashed; }
#view-templates .tp-bcol.drop { background: var(--accent-soft); border-color: var(--accent); }
#view-templates .tp-bhead { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; font-size: 14px; }
#view-templates .tp-bhead i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
#view-templates .tp-bhead b { font-weight: 600; flex: 1; }
#view-templates .tp-bhead span { color: var(--ink-faint); font-size: 13px; }
#view-templates .tp-bcards { display: flex; flex-direction: column; gap: 8px; }
#view-templates .tp-bnone { color: var(--ink-faint); font-size: 13px; padding: 4px 6px; }
#view-templates .tp-bcard { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 9px; padding: 9px 10px 8px 13px; box-shadow: 0 1px 2px rgba(20,18,16,.05); cursor: pointer; font-size: 13px; overflow: hidden; }
#view-templates .tp-bcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--rule); }
#view-templates .tp-bcard.mine::before { background: var(--accent); }
#view-templates .tp-bcard:hover { border-color: var(--ink-faint); }
#view-templates .tp-bcard[draggable="true"] { cursor: grab; }
#view-templates .tp-bcover { margin: -9px -10px 8px -13px; height: 104px; background: var(--field); border-bottom: 1px solid var(--rule); }
#view-templates .tp-bcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
#view-templates .tp-bname { font-size: 14px; font-weight: 600; color: var(--ink); }
#view-templates .tp-bstyle { color: var(--ink-soft); margin-top: 1px; }
#view-templates .tp-bproc { color: var(--ink-faint); margin-top: 5px; }
#view-templates .tp-bfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 8px; }
#view-templates .tp-bfoot .tp-who { font-size: 13px; color: var(--ink-soft); }
#view-templates .tp-bfoot .tp-av { width: 20px; height: 20px; }
#view-templates .tp-badd { display: block; width: 100%; margin-top: 8px; height: 34px; border: 1px dashed var(--rule); border-radius: 8px; background: none; color: var(--ink-faint); font-size: 13px; text-align: left; padding: 0 10px; cursor: pointer; }
#view-templates .tp-badd:hover { color: var(--ink); border-color: var(--ink-faint); }
#view-templates .tp-bcancel { margin-top: 10px; font-size: 13px; }

/* ── the photos of a template ── */
.tp-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 12px; }
.tp-ph { position: relative; margin: 0; width: 104px; }
.tp-phimg { display: block; width: 104px; height: 104px; padding: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--field); cursor: zoom-in; }
.tp-phimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-ph figcaption { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.tp-phx { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(24,24,22,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.tp-phadd { display: flex; flex-direction: column; gap: 6px; }
.tp-lb { position: fixed; inset: 0; z-index: 1200; background: rgba(12,12,11,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 20px 70px; }
.tp-lb > img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.tp-lbbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: #eee; font-size: 14px; font-family: 'Inter', sans-serif; }
.tp-lbbar .sp { flex: 1; }
.tp-lbbar button, .tp-lbbar a { height: 34px; min-width: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: none; color: #fff; font-size: 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* the Library's gallery of everything made */
#view-templates table.tp-lib tr.open { cursor: pointer; }
#view-templates table.tp-lib tr.open:hover td { background: var(--paper); }
#view-templates td.tp-made { white-space: nowrap; width: 76px; }
#view-templates td.tp-made b { font-weight: 600; display: inline-block; min-width: 22px; text-align: right; vertical-align: middle; }
#view-templates .tp-lthumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 8px; background: var(--field); }
.tp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 16px; }
.tp-card { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); font-size: 14px; }
.tp-cardimg { display: block; aspect-ratio: 1 / 1; border-radius: 9px; overflow: hidden; background: var(--field); border: 1px solid var(--rule); margin-bottom: 6px; }
.tp-cardimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease-out, ease); }
.tp-card:hover .tp-cardimg img { transform: scale(1.03); }
.tp-cardimg .none { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 13px; }
.tp-card b { font-weight: 600; }
.tp-card span:not(.tp-cardimg):not(.none) { color: var(--ink-soft); }
.tp-card small { color: var(--ink-faint); font-size: 12px; }

/* ── on a phone: one column, the order fills the screen ── */
@media (max-width: 760px) {
  #view-templates table.tp-pl th:nth-child(n+3), #view-templates table.tp-pl td:nth-child(n+3):not([colspan]) { display: none; }
  #view-templates .nm { max-width: 72vw; flex-wrap: wrap; white-space: normal; }
  #view-templates .tp-search { width: auto; flex: 1; min-width: 0; }
  #view-templates .tp-lhd { flex-wrap: wrap; }
  /* one column at a time, swiped sideways like any phone board */
  #view-templates .tp-board { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; }
  #view-templates .tp-bcol { scroll-snap-align: start; }
  .tp-ov { padding: 0; }
  .tp-item { width: 100%; min-height: 100vh; border-radius: 0; }
  /* on an office phone a small box stays a box in the middle (restyle); the big order stays the whole screen */
  .tp-ov:has(> .tp-nb) { padding: 12px; align-items: center; }
  .tp-nb { margin-top: 0; border-radius: 16px; }
  .tp-ibody { padding: 18px 16px 40px; }
  .tp-ititle { font-size: 22px; }
  .tp-props, .tp-cols2 { grid-template-columns: 1fr; gap: 4px; }
  .tp-cols2 { gap: 26px; }
  .tp-prop > label { width: 92px; }
  .tp-ov .tp-cell.big { width: 100%; }
  .tp-row { flex-wrap: wrap; gap: 8px 12px; }
  .tp-pdet { padding-left: 0; }
  .tp-stp { height: 38px; } .tp-stp button { width: 36px; font-size: 18px; }
  .tp-inl { width: 100%; }
  .tp-ph, .tp-phimg { width: 30vw; } .tp-phimg { height: 30vw; }
  .tp-phadd { flex-direction: row; flex-wrap: wrap; }
  .tp-phadd .tp-file { height: 40px; }
  .tp-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #view-templates table.tp-lib th:nth-child(n+4), #view-templates table.tp-lib td:nth-child(n+4) { display: none; }
  #view-templates table.tp-lib td.w .tp-cell { min-width: 0; }
}

/* ── the quote: a white sheet whatever the theme ── */
.tp-paper { width: 794px; margin: 0 auto; background: #fff; color: #111; font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, Georgia, serif; font-size: 13px; padding: 56px 60px; box-shadow: 0 2px 16px rgba(0,0,0,.12); }
.tp-paper .lh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px solid #111; padding-bottom: 6px; }
.tp-paper .lh img { width: 250px; margin-top: 22px; }
.tp-paper .lh .adr { font-size: 12px; line-height: 1.35; }
.tp-paper .lh .adr b { display: block; text-align: center; font-size: 13px; margin-bottom: 10px; }
.tp-paper h4 { text-align: center; margin: 10px 0; font-size: 13px; }
.tp-paper .to { display: flex; justify-content: space-between; border-bottom: 1.5px solid #111; padding-bottom: 4px; margin-bottom: 12px; }
.tp-paper table { border-collapse: collapse; width: 100%; }
.tp-paper .items th, .tp-paper .items td { border: 1px solid #111; padding: 4px 6px; }
.tp-paper .items th { font-weight: 400; }
.tp-paper .r { text-align: right; } .tp-paper .c { text-align: center; }
.tp-paper .sum td { border: 1px solid #111; padding: 6px; }
.tp-paper .draw { background: #2c2c2c; min-height: 120px; margin: 8px 0 26px; display: flex; align-items: center; justify-content: center; color: #999; font-style: italic; }
.tp-paper .draw img { max-width: 100%; max-height: 320px; display: block; }
.tp-paper .terms td { padding: 1px 4px; vertical-align: top; }
.tp-paper .sig { display: flex; justify-content: space-between; margin-top: 22px; text-align: center; }
.tp-paper .sig div { width: 30%; }

/* ── the customer picker — "hook to actual customers … search while type", 28 Sep 2026 ── */
.tp-cpw { position: relative; display: inline-block; }
.tp-cpw .tp-sugg { left: -8px; top: calc(100% + 4px); width: 380px; max-width: 86vw; }
.tp-sugg button small { font-style: italic; }
.tp-cpmore { padding: 7px 10px; font-size: 13px; color: var(--ink-faint); }
.tp-unl { margin-left: 10px; font-size: 13px; color: var(--ink-faint); white-space: nowrap; }
.tp-lhd .tp-lnk { font-size: 13px; }
/* matching the sheet's names: one row each — the name and its count, then the guesses and a search */
.tp-lkbody { max-height: min(70vh, 640px); overflow: auto; padding-top: 6px; }
.tp-lkrow { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.tp-lkrow:last-child { border-bottom: 0; }
.tp-lkname { display: flex; align-items: baseline; gap: 10px; font-size: 15px; margin-bottom: 8px; }
.tp-lkname .faint { font-size: 13px; }
.tp-lkpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tp-lkpick .tp-pchip { padding: 0 10px; }
.tp-lkpick .tp-cell { width: 220px; }
.tp-sugg button small.tw { font-style: normal; margin-left: auto; font-size: 12px; }
.tp-lkpick .tp-pchip small { margin-left: 8px; font-size: 12px; }
/* lists that sit in the page (not floating) under "Add a process" and the matching list's searches */
.tp-addp { flex-wrap: wrap; }
.tp-addp .tp-sugg.static { flex-basis: 100%; margin: 0 0 10px; }
.tp-lkpick .tp-cpw { flex: 1 1 220px; }
.tp-lkpick .tp-cpw .tp-sugg.static { margin: 6px 0 2px; }
.tp-segs button.no { color: var(--ink-faint); opacity: .55; }

/* ── the mould on the schedule (28 Sep 2026): the day on the order, in the New box, on the card ── */
.tp-ov .tp-sched { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 0 14px; margin-bottom: 18px; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.tp-ov .tp-dayok { background: var(--good-soft, #e5f3ec); color: var(--good, #1f7a54); font-weight: 600; font-size: 13px; padding: 3px 9px; border-radius: 6px; }
.tp-ov .tp-daywait { background: var(--warn-soft, #fbf1dd); color: var(--warn, #b77a14); font-weight: 600; font-size: 13px; padding: 3px 9px; border-radius: 6px; }
.tp-ov .tp-warn { color: var(--accent); font-size: 13px; flex-basis: 100%; }
.tp-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tp-sched .tp-days { flex-basis: 100%; }
.tp-days .tp-dayin { width: 150px; padding: 0 8px; font-family: inherit; }
.tp-nblab { font-size: 12px; font-weight: 600; color: var(--ink-faint); margin: 16px 0 8px; }
#view-templates .tp-bday { font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--warn, #b77a14); }
#view-templates .tp-bday.ok { color: var(--good, #1f7a54); }
/* on the technician's job screen */
.tv-tpl { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 12px 0 4px; background: var(--paper); }
.tv-tpl .l { font-size: 12px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.tv-tplrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule-soft); }
.tv-tplrow:first-child { border-top: 0; }
.tv-tplrow > div { flex: 1; min-width: 0; }
.tv-tplrow b { display: block; font-size: 14px; }
.tv-tplrow small { display: block; color: var(--ink-soft); font-size: 12px; }
.tv-tplrow button { border: 1px solid var(--rule); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; }

/* the process name on an order row is editable in place */
#view-templates .tp-row .tp-pname, .tp-ov .tp-row .tp-pname { width: auto; min-width: 140px; max-width: 60%; font-size: 16px; font-weight: 500; padding: 3px 6px; margin-left: -6px; }

/* ── the technician's mould job: one finish (5 Oct 2026) ── */
.tpj .saved-note { font-size: 13px; color: var(--ink-faint); margin: 0 0 10px; }
.tpj-oh { font-size: 13px; font-weight: 600; color: var(--ink-faint); margin: 14px 2px 8px; }
.tpj-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.tpj-hd { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.tpj-hd b { flex: 1; font-size: 15px; font-weight: 600; }
.tpj-hd small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-faint); }
.tpj-hd .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); display: grid; place-items: center; font-size: 14px; color: #fff; flex: none; }
.tpj-card.ok .ck { background: var(--good); border-color: var(--good); }
.tpj-hd .chev { color: var(--ink-faint); }
.tpj-in { padding: 2px 12px 14px; border-top: 1px solid var(--rule-soft); }
.tpj-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpj-slot { position: relative; aspect-ratio: 4/3; border: 1.5px dashed var(--rule); border-radius: 9px; background: var(--field); color: var(--ink-soft); font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; cursor: pointer; }
.tpj-slot .pl { font-size: 20px; line-height: 1; }
.tpj-slot input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tpj-slot.has { border: 1px solid var(--rule); background: #000; cursor: default; }
.tpj-img { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
.tpj-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpj-img span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 0; text-align: center; }
.tpj-x { position: absolute; right: 4px; top: 4px; min-width: 26px; height: 26px; border-radius: 13px; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 15px; line-height: 1; padding: 0 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpj-x.tpj-re { font-size: 11px; }
.tpj-x input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; }
.tpj-foot { margin-top: 18px; display: grid; gap: 10px; }
.tpj-cnt { font-size: 13px; color: var(--ink-soft); text-align: center; }
.tpj-miss { margin: 0; padding: 0; list-style: none; }
.tpj-miss li { padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.tpj-miss li span { display: block; color: var(--ink-soft); font-size: 13px; }

/* ═════ THE FIVE STEPS, EVERY SIZE ITS OWN, COST, QUOTES BY PERIOD — 6 Oct 2026 (templates.js, "THE NEW FLOW") ═════ */
/* the card's two halves: sizes measured while designing, pieces made while making */
#view-templates .tp-bprog { margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
#view-templates .tp-bprog i { display: block; height: 4px; border-radius: 3px; background: var(--rule-soft); margin-top: 4px; overflow: hidden; }
#view-templates .tp-bprog b { display: block; height: 100%; background: var(--good); }
/* why it is free */
.tp-foc { display: flex; align-items: flex-start; gap: 12px; background: var(--info-bg, #e6eef7); border-radius: 9px; padding: 9px 12px; margin: -6px 0 18px; font-size: 14px; }
.tp-foc b { color: var(--tp-blue); font-size: 13px; white-space: nowrap; padding-top: 6px; }
.tp-foc span { padding-top: 6px; color: var(--ink); }
.tp-foc textarea { flex: 1; min-height: 34px; border: 1px solid var(--rule); border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); resize: vertical; }
/* the processes: one quiet line each, the sizes under it, one line per size */
.tp-cols2.f2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 34px; }
.tp-proc2 { border-bottom: 1px solid var(--rule-soft); }
.tp-proc2 > .tp-row { border-bottom: 0; cursor: pointer; }
.tp-proc2 .chev { width: 14px; color: var(--ink-faint); font-size: 12px; }
.tp-p2n { display: flex; align-items: baseline; gap: 8px; }
.tp-p2n b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-p2n .faint { font-size: 13px; white-space: nowrap; }
.tp-szt { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 12px; }
.tp-szt th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-faint); padding: 6px 10px 5px 0; border-bottom: 1px solid var(--rule); }
.tp-szt td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; vertical-align: middle; }
.tp-szt .num { text-align: right; }
.tp-szt tr.ed { cursor: pointer; }
.tp-szt tr.ed:hover td, .tp-szt tr.on td { background: var(--paper); }
.tp-szt tr.tp-szedrow td { white-space: normal; background: var(--paper); padding: 4px 12px 14px; }
.tp-szt tfoot td { font-weight: 600; border-bottom: 0; }
.tp-szt .tp-stp { vertical-align: middle; }
.tp-szp { width: 110px; text-align: right; }
.tp-mk0 { color: var(--ink-faint); }
.tp-mk1 { color: var(--warn); font-weight: 600; }
.tp-mk2 { color: var(--good); font-weight: 600; }
.tp-szed1 { display: flex; gap: 22px; flex-wrap: wrap; }
.tp-szed1 label { display: block; }
.tp-szed1 .tp-flab { display: block; }
.tp-szname { width: 110px; font-weight: 600; }
.tp-szdrop { display: block; margin-top: 10px; color: var(--ink-faint); font-size: 13px; }
.tp-szadd { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; font-size: 13px; }
.tp-szadd input { width: 210px; }
/* the cost to make — her costing sheet's own line */
.tp-cost { background: var(--tp-wash); border-radius: 10px; padding: 14px 16px; margin-top: 20px; }
.tp-cost h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.tp-kpi { display: flex; gap: 22px; flex-wrap: wrap; margin: 4px 0; }
.tp-kpi > div { font-size: 12px; color: var(--ink-faint); }
.tp-kpi b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.tp-kpi .g b, .tp-szt .g, .tp-sum .g b { color: var(--good); }
.tp-kpi b.neg, .tp-sum b.neg { color: var(--accent); }
.tp-costt { margin-top: 10px; }
.tp-costt td, .tp-costt th { background: transparent !important; }
/* a step's own small line, and Customer OK's day */
.tp-stsub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-faint); text-decoration: none; }
.tp-okday { padding: 6px 0 14px 32px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-soft); border-bottom: 1px solid var(--rule-soft); }
.tp-okday .tp-lnk { justify-self: start; font-size: 13px; }
.tp-okday.tp-no .tp-inl { width: 100%; max-width: 360px; }
.tp-quiet { border: 0; background: transparent; color: var(--ink-soft); font-size: 13px; padding: 0 4px; height: 30px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.tp-quiet:hover { color: var(--ink); }
.tp-acts { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tpj-slot .opt { font-size: 11px; color: var(--ink-faint); }
/* quotes by period */
#view-templates .tp-sum { display: flex; gap: 26px; flex-wrap: wrap; background: var(--tp-wash); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
#view-templates .tp-sum > div { font-size: 12px; color: var(--ink-faint); }
#view-templates .tp-sum b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 2px; }
#view-templates .tp-lhd .btn-line { white-space: nowrap; }
#view-templates .tp-qs { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
#view-templates .tp-qgrp { font-size: 13px; font-weight: 600; color: var(--ink-faint); margin: 14px 2px 6px; }
#view-templates .tp-qgrp:first-child { margin-top: 0; }
#view-templates .tp-qrow { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--rule-soft); background: none; padding: 10px; cursor: pointer; color: var(--ink); font: inherit; }
#view-templates .tp-qrow.on { background: var(--accent-soft); border-radius: 8px; border-bottom-color: transparent; }
#view-templates .tp-qrow .a { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
#view-templates .tp-qrow .a .faint { font-size: 12px; }
#view-templates .tp-qrow .a .r { margin-left: auto; font-weight: 600; font-size: 13px; }
#view-templates .tp-qrow .c { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
#view-templates .tp-qd { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; }
.tp-qdh { display: flex; align-items: flex-start; gap: 10px; }
.tp-qdh .grow { flex: 1; min-width: 0; }
.tp-qdh h2 { margin: 0; font-size: 21px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-tl { display: grid; gap: 0; margin: 16px 0 16px; }
.tp-tl > div { border-top: 3px solid var(--rule); padding: 7px 8px 0 0; font-size: 12px; color: var(--ink-faint); }
.tp-tl > div.on { border-top-color: var(--good); color: var(--ink); }
.tp-tl b { display: block; font-size: 13px; }
.tp-ql { width: 100%; border-collapse: collapse; font-size: 14px; }
.tp-ql th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-faint); border-bottom: 1px solid var(--rule); padding: 6px 8px 6px 0; }
.tp-ql td { border-bottom: 1px solid var(--rule-soft); padding: 9px 8px 9px 0; vertical-align: top; }
.tp-ql .num { text-align: right; white-space: nowrap; }
.tp-ql small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.tp-qtot { margin-left: auto; width: 300px; max-width: 100%; font-size: 14px; margin-top: 8px; }
.tp-qtot > div { display: flex; justify-content: space-between; padding: 3px 0; }
.tp-qtot .g { font-weight: 700; border-top: 1px solid var(--rule); padding-top: 7px; margin-top: 4px; font-size: 16px; }
/* the technician's mould job, new flow */
.tpj-phase { display: flex; gap: 6px; margin: 0 0 10px; }
.tpj-phase span { flex: 1; text-align: center; font-size: 12px; padding: 5px 0; border-radius: 6px; background: var(--tp-wash, var(--field)); color: var(--ink-faint); }
.tpj-phase span.on { background: var(--ink); color: var(--on-ink, #fff); font-weight: 600; }
.tpj-phase span.ok { background: var(--good-bg); color: var(--good); }
.tpj-foc { font-size: 13px; color: var(--tp-blue, #2f64c9); background: var(--info-bg, #e6eef7); border-radius: 8px; padding: 7px 10px; margin: -2px 0 8px; }
.tpj-sz { border-top: 1px solid var(--rule-soft); }
.tpj-szh { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.tpj-szh b { font-size: 15px; min-width: 40px; }
.tpj-szh .d { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-faint); }
.tpj-szh .chev { color: var(--ink-faint); }
.tpj-szh .ck, .tpj-mk .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); display: grid; place-items: center; font-size: 14px; color: #fff; flex: none; }
.tpj-szh .ck.on, .tpj-mk .ck.on { background: var(--good); border-color: var(--good); }
.tpj-mk .ck.half { border-color: var(--warn); }
.tpj-szb { padding: 0 12px 12px; }
.tpj-szadd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule-soft); font-size: 12px; }
.tpj-szadd input { height: 40px; width: 110px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: 15px; padding: 0 10px; color: var(--ink); }
.tpj-szadd .tp-lnk { font-size: 14px; }
.tpj-mk { display: flex; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid var(--rule-soft); }
.tpj-mk .mt { flex: 1; min-width: 0; }
.tpj-mk .mt b { font-size: 17px; }
.tpj-mk .mt em { font-style: normal; font-size: 13px; color: var(--ink-soft); margin-left: 4px; }
.tpj-mk .mt small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.tpj-slots.two { grid-template-columns: repeat(2, 1fr); }
.tpj-held { background: var(--info-bg, #e6eef7); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.tpj-held b { display: block; font-size: 15px; color: var(--tp-blue, #2f64c9); }
.tpj-held span { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.tv-pill.tunggu { background: var(--info-bg, #e6eef7); color: var(--tp-blue, #2f64c9); }
@media (max-width: 760px) {
  .tp-cols2.f2 { grid-template-columns: 1fr; }
  .tp-szt td { white-space: normal; }
  #view-templates .tp-qs { grid-template-columns: 1fr; }
  #view-templates .tp-sum { gap: 16px; }
}
