/* Equipment registers (Checks & inspections) and their printed sheets */
#equipment-panel { --eq-red: #B3141C; }
.eq-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.eq-title { margin: 0 0 4px; font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 600; letter-spacing: -0.01em; }
.eq-sub { margin: 0; color: #5F6368; font-size: 14px; max-width: 640px; }
.eq-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eq-btn { min-height: 40px; padding: 0 14px; border: 1px solid #D6D7CA; border-radius: 10px; background: #fff; color: #17181A; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.eq-btn:disabled { opacity: .6; cursor: default; }
.eq-btn-red { background: var(--eq-red, #B3141C); border-color: var(--eq-red, #B3141C); color: #fff; }
.eq-link { border: 0; background: none; padding: 4px 6px; color: #1A4E9C; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.eq-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; }
.eq-week { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.eq-week input { min-height: 40px; padding: 0 10px; border: 1px solid #C9CEC9; border-radius: 10px; font: inherit; }
.eq-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-status { min-height: 1.2em; margin: 0 0 8px; color: #33363A; font-size: 14px; }
.eq-bad { color: #B3141C; font-weight: 600; }
.eq-card { background: #fff; border: 1px solid #E4E4E0; border-radius: 14px; margin: 0 0 14px; }
.eq-project > summary { padding: 14px 16px; font-weight: 700; cursor: pointer; }
.eq-tag { margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: #FFF1D6; color: #8A5A00; font-size: 12px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 16px 16px; align-items: end; }
.eq-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #33363A; }
.eq-field input { min-height: 42px; padding: 0 10px; border: 1px solid #C9CEC9; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 400; }
.eq-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.eq-check input { width: 20px; height: 20px; }
.eq-list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; }
.eq-list-head h2 { margin: 0; font-size: 17px; }
.eq-count { margin-left: 8px; color: #5F6368; font-size: 13px; font-weight: 500; }
.eq-empty { margin: 0; padding: 0 16px 16px; color: #5F6368; }
.eq-table-wrap { overflow-x: auto; }
.eq-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eq-table th { padding: 8px; text-align: left; font-size: 12px; font-weight: 600; color: #5F6368; background: #FAFAF8; }
.eq-table td { padding: 8px; border-top: 1px solid #EFEFEB; vertical-align: middle; }
.eq-table th:first-child, .eq-table td:first-child { padding-left: 16px; }
.eq-desc { font-weight: 600; }
.eq-notok { color: #B3141C; font-weight: 600; }
.eq-row-actions { white-space: nowrap; text-align: right; }
.eq-rag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.eq-red { background: #FF0000; color: #fff; }
.eq-amber { background: #FFC000; color: #17181A; }
.eq-green { background: #E2EFDA; color: #1E5A1E; }
.eq-dialog { width: min(96vw, 520px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.eq-dialog::backdrop { background: rgba(0,0,0,.35); }
.eq-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.eq-form h2 { margin: 0; font-size: 18px; }
.eq-dialog-actions { justify-content: flex-end; }

/* ---- printed sheets: the QPFS14 Excel sheets (A4 landscape, Excel margins) ---- */
.eq-print { display: none; }
@media print {
  body.eq-printing > *:not(#eq-print) { display: none !important; }
  html, body.eq-printing { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.eq-printing #eq-print { display: block !important; }
}
@page eq-loler { size: A4 landscape; margin: 0.75in 0.7in;
  @bottom-left { content: "Document Ref: QPFS14.0"; font: 8pt Arial, sans-serif; }
  @bottom-right { content: counter(page) " of " counter(pages); font: 8pt Arial, sans-serif; } }
@page eq-puwer { size: A4 landscape; margin: 0.748in 0.709in;
  @bottom-left { content: "Document Ref: QPFS14.1"; font: 8pt Arial, sans-serif; }
  @bottom-center { content: "April 2025"; font: 8pt Arial, sans-serif; }
  @bottom-right { content: counter(page) " of " counter(pages); font: 8pt Arial, sans-serif; } }
@page eq-safety { size: A4 landscape; margin: 0.748in 0.709in;
  @bottom-left { content: "Document Ref: QPFS14.3"; font: 8pt Arial, sans-serif; }
  @bottom-center { content: "April 2025"; font: 8pt Arial, sans-serif; }
  @bottom-right { content: counter(page) " of " counter(pages); font: 8pt Arial, sans-serif; } }
.eqp-loler { page: eq-loler; } .eqp-puwer { page: eq-puwer; } .eqp-safety { page: eq-safety; }
.eqp-page { break-after: page; page-break-after: always; color: #000;
  font-family: "Aptos Narrow", "Arial Narrow", Aptos, Arial, sans-serif; font-size: calc(11pt * var(--s));
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.eqp-page:last-child { break-after: auto; page-break-after: auto; }
.eqp-table { width: var(--w); max-width: 100%; border-collapse: collapse; table-layout: fixed; }
.eqp-table th, .eqp-table td { padding: 0 calc(2pt * var(--s)); font-weight: 400; overflow: hidden; line-height: 1.1; }
.eqp-table .eqp-title { text-align: left; font: 700 calc(18pt * var(--s)) Arial, Helvetica, sans-serif; white-space: nowrap; vertical-align: middle; }
.eqp-title-red { color: #FF0000; }
.eqp-logo-cell { text-align: center; vertical-align: middle; }
.eqp-logo { max-width: 100%; max-height: calc(100pt * var(--s)); }
.eqp-lab { text-align: right; font-weight: 700 !important; white-space: nowrap; }
.eqp-val { text-align: center; white-space: nowrap; }
.eqp-wc { font-weight: 700 !important; border: 1px solid #000; }
.eqp-hd th { background: var(--head); color: #fff; font-weight: 700 !important; text-align: center; vertical-align: middle;
  border: 0.75pt solid #000; white-space: normal; }
.eqp-item { height: calc(29.5pt * var(--s)); break-inside: avoid; }
.eqp-puwer .eqp-item, .eqp-safety .eqp-item { height: calc(29pt * var(--s)); }
.eqp-item td { border: 0.75pt solid #000; vertical-align: middle; }
.eqp-desc { text-align: left; font-weight: 700 !important; }
.eqp-safety .eqp-item td:first-child { text-align: center; font-weight: 400 !important; }
.eqp-arial { font-family: Arial, Helvetica, sans-serif; }
.eqp-id { font-weight: 700 !important; }
.eqp-c { text-align: center; }
.eqp-small { font-size: calc(10pt * var(--s)); }
.eqp-box { display: inline-block; width: calc(13pt * var(--s)); height: calc(13pt * var(--s)); border: 0.75pt solid #000; border-radius: 1.5pt; vertical-align: middle; position: relative; }
.eqp-box.is-on { background: #fff; }
.eqp-box.is-on::after { content: ""; position: absolute; left: 32%; top: 8%; width: 28%; height: 58%; border: solid #000; border-width: 0 1.6pt 1.6pt 0; transform: rotate(45deg); }
td.eqp-red { background: #FF0000; }
td.eqp-amber { background: #FFC000; }
td.eqp-green { background: #E2EFDA; }
.eq-btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.eq-done { margin: 0; padding: 10px 16px; font-weight: 600; border-top: 1px solid #EFEFEB; }
.eq-done.is-done { background: #E2EFDA; color: #1E5A1E; }
.eq-done.is-open { background: #FFF6E0; color: #7A5200; }
/* supervisor sign-off */
.eq-sign { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px 16px; border-top: 1px solid #EFEFEB; background: #FBFBF9; }
.eq-sign h3 { margin: 0; font-size: 15px; }
.eq-statement { margin: 0; font-size: 15px; line-height: 1.45; max-width: 900px; }
.eq-pad-wrap { position: relative; max-width: 560px; border: 1.5px dashed #9AA09A; border-radius: 10px; background: #fff; }
.eq-pad { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.eq-pad-hint { position: absolute; left: 14px; bottom: 10px; color: #9AA09A; font-size: 13px; pointer-events: none; }
.eq-pad-wrap.is-drawn .eq-pad-hint { display: none; }
.eq-signed { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.eq-signed img { height: 60px; background: #fff; border: 1px solid #E4E4E0; border-radius: 8px; padding: 4px; }
.eq-signed p { margin: 0; font-weight: 600; color: #1E5A1E; }
.eq-changed { margin: 0; }
/* printed declaration */
.eqp-declare { margin-top: calc(10pt * var(--s)); padding: calc(5pt * var(--s)) calc(7pt * var(--s)); border: 0.75pt solid #000; max-width: 100%; break-inside: avoid; page-break-inside: avoid; }
.eqp-declare-title { font: 700 calc(12pt * var(--s)) Arial, Helvetica, sans-serif; color: #000; }
.eqp-declare-text { margin: calc(3pt * var(--s)) 0 calc(6pt * var(--s)); font-size: calc(11pt * var(--s)); }
.eqp-declare-line { display: grid; grid-template-columns: 1fr 1.3fr 0.7fr; gap: calc(14pt * var(--s)); align-items: end; }
.eqp-declare-part { display: flex; align-items: flex-end; gap: calc(4pt * var(--s)); }
.eqp-declare-lab { font-weight: 700; white-space: nowrap; }
.eqp-declare-val { flex: 1; min-height: calc(28pt * var(--s)); border-bottom: 0.75pt solid #000; display: flex; align-items: flex-end; }
.eqp-declare-sig { height: calc(34pt * var(--s)); }
.eqp-safety .eqp-item.eqp-out td:first-child { font-weight: 700 !important; }
td.eqp-struck { background: repeating-linear-gradient(135deg, #fff 0 3pt, #BDBDBD 3pt 3.8pt); }
/* the sheet on screen: same headings and columns as the printout */
.eq-sheet { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 13px; }
.eq-sheet-safety { min-width: 1400px; }
.eq-sheet th { background: var(--head, #C00000); color: #fff; font-weight: 700; font-size: 12px; text-align: center; vertical-align: middle; padding: 6px 6px; border: 1px solid #1a1a1a; line-height: 1.2; }
.eq-sheet th.eq-sheet-act { background: #fff; border: 0; }
.eq-sheet td { border: 1px solid #1a1a1a; padding: 4px 6px; height: 40px; vertical-align: middle; }
.eq-sheet td.eq-row-actions { border: 0; padding-left: 10px; }
.eq-sheet .eq-desc { font-weight: 700; min-width: 180px; }
.eq-sheet .eq-c { text-align: center; }
.eq-sheet .eq-id { font-weight: 700; }
.eq-sheet .eq-day { font-size: 11px; white-space: nowrap; }
.eq-sheet td.eq-struck { background: repeating-linear-gradient(135deg, #fff 0 5px, #CFCFCF 5px 6px); }
.eq-sheet tr.is-out .eq-desc { color: #B3141C; }
.eq-box { width: 22px; height: 22px; accent-color: #17181A; cursor: pointer; }
.eq-inline { width: 100%; min-width: 90px; min-height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; text-align: center; }
.eq-inline:hover { border-color: #D6D7CA; }
.eq-inline:focus { border-color: #1A4E9C; background: #fff; outline: none; }
.eq-sig-cell img { height: 30px; }
.eq-sign > .eq-btn { align-self: flex-start; }
.eq-outcome { margin: 0; padding: 8px 12px 10px; border: 1px solid #C9CEC9; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.eq-outcome legend { padding: 0 4px; font-size: 13px; font-weight: 600; color: #33363A; }
.eq-radio { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 15px; cursor: pointer; }
.eq-radio input { width: 20px; height: 20px; }
.eqp-row-sig { display: block; margin: 0 auto; max-width: 100%; height: calc(24pt * var(--s)); object-fit: contain; }
/* excavation register on screen */
.eq-exc-head { padding-top: 14px; border-top: 1px solid #EFEFEB; }
.eq-sheet-excavation { min-width: 1000px; }
.eq-sheet-excavation .eq-inline { text-align: left; }
.eq-empty-row { color: #5F6368; text-align: center; padding: 18px !important; }
/* the printed excavation sheet: QPFS22.0, drawn cleanly */
@page eq-excavation { size: A4 landscape; margin: 12mm 14mm 14mm;
  @bottom-left { content: "Document Ref: QPFS22.0"; font: 7.5pt Arial, sans-serif; }
  @bottom-center { content: "August 2024"; font: 7.5pt Arial, sans-serif; }
  @bottom-right { content: counter(page) " of " counter(pages); font: 7.5pt Arial, sans-serif; } }
.eqp-excavation { page: eq-excavation; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 8.5pt; }
.eqx-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.eqx-table th, .eqx-table td { padding: 1.4mm 2mm; vertical-align: middle; text-align: left; font-weight: 400; }
.eqx-top { padding: 0 0 2mm !important; }
.eqx-brand { display: flex; justify-content: space-between; align-items: flex-end; }
.eqx-logo { height: 14mm; }
.eqx-doc { font-size: 9pt; padding-bottom: 1mm; }
.eqx-title { margin-top: 3mm; font-weight: 700; font-size: 9.5pt; }
.eqx-box { border: 0.6pt solid #1F3864; }
.eqx-reg { font-weight: 700 !important; font-size: 8.5pt; height: 7mm; }
.eqx-lab { font-weight: 700 !important; }
.eqx-val { height: 6mm; }
.eqx-gap th { height: 2.5mm; padding: 0 !important; border: 0; }
.eqx-hd th { border: 0.6pt solid #1F3864; font-weight: 700; text-align: center; background: #fff; }
.eqx-line { height: 9mm; break-inside: avoid; }
.eqx-c { text-align: center !important; }
.eqx-table .eqp-box { width: 3.2mm; height: 3.2mm; border-width: 0.6pt; }
.eqx-holder { padding: 0 !important; }
.eqx-block { width: 100%; border-collapse: collapse; table-layout: fixed; }
.eqx-block th, .eqx-block td { padding: 1.4mm 2mm; text-align: left; vertical-align: middle; font-weight: 400; }

/* Ladders (QPFS22.2): the ladders on site, entered once */
.eq-ladders > summary { cursor: pointer; font-weight: 700; font-size: 17px; display: flex; gap: 10px; align-items: center; }
.eq-ladders .eq-sub { margin: 8px 0; }
.eq-new-row td { background: #faf8f2; }
@page eq-ladder { size: A4 landscape; margin: 12mm 14mm 14mm;
  @bottom-left { content: "Document Ref: QPFS22.2"; font: 7.5pt Arial, sans-serif; }
  @bottom-center { content: "August 2024"; font: 7.5pt Arial, sans-serif; }
  @bottom-right { content: counter(page) " of " counter(pages); font: 7.5pt Arial, sans-serif; } }
.eqp-ladder { page: eq-ladder; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 8.5pt; }
.eqx-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; }
.eqx-we { border: 0.6pt solid #1F3864; padding: 1.5mm 3mm; min-width: 55mm; font-size: 10pt; }

/* Temporary works register (QPFS19.4) and inspection record (QPFS19.3) */
.eq-sheet-tw th { font-size: 11.5px; line-height: 1.2; min-width: 60px; }
.eq-sheet-tw th.eq-tw-group { background: #DCE3F0; color: #1F3864; text-align: center; letter-spacing: .04em; }
.eq-sheet-tw tr.is-open td { background: #FFF6D9; }
.eq-inline.eq-auto { color: #6b6558; font-style: italic; }
.eq-tw-insp { border-top: 4px solid #E31B1B; }
@page eq-tw { size: A3 landscape; margin: 10mm 10mm 14mm;
  @bottom-center { content: "Document reference QPFS19.4      Revision August 2024"; font: 7.5pt Arial, sans-serif; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 7.5pt Arial, sans-serif; } }
.eqp-tw { page: eq-tw; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 7.5pt; }
.eqt-table { border-collapse: collapse; table-layout: fixed; width: 100%; }
.eqt-table th, .eqt-table td { border: 0.6pt solid #1F3864; padding: 1mm 1.2mm; vertical-align: middle; }
.eqt-table .eqt-top { border: 0; padding: 0 0 3mm; text-align: left; font-weight: 400; }
.eqt-ref { font-weight: 700; font-size: 12pt; }
.eqt-title { font-weight: 700; font-size: 9pt; margin: 2mm 0 1mm; }
.eqt-head { width: 100%; border-collapse: collapse; margin-bottom: 3mm; }
.eqt-head th, .eqt-head td { border: 0.6pt solid #1F3864; padding: 1.2mm 1.5mm; font-size: 8pt; text-align: left; }
.eqt-head .eqt-lab { background: #DCE3F0; font-weight: 700; width: 6%; }
.eqt-head .eqt-val { width: 13%; }
.eqt-group th { background: #fff; color: #1F3864; font-weight: 700; text-align: center; font-size: 7pt; }
.eqt-group th.eqt-blank { border-top: 0; border-left: 0; border-right: 0; }
.eqt-hd th { background: #DCE3F0; font-weight: 700; font-size: 6.8pt; text-align: center; line-height: 1.15; height: 11mm; }
.eqt-hd th.eqt-blue { color: #2F5DB8; }
.eqt-line td { height: 6.2mm; font-size: 7.2pt; word-break: break-word; }
@page eq-twi { size: A4 landscape; margin: 12mm 14mm 14mm;
  @bottom-left { content: "Document Ref: QPFS19.3"; font: 7.5pt Arial, sans-serif; }
  @bottom-center { content: "August 2024"; font: 7.5pt Arial, sans-serif; }
  @bottom-right { content: "01"; font: 7.5pt Arial, sans-serif; } }
.eqp-twi { page: eq-twi; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 8.5pt; }
.eqi-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.eqi-table th, .eqi-table td { border: 0.6pt solid #000; padding: 1.3mm 2mm; vertical-align: middle; }
.eqi-table .eqx-top { border: 0; padding: 0 0 3mm; text-align: left; }
.eqi-title { font-weight: 700; font-size: 14pt; margin-top: 2mm; }
.eqi-lab { background: #FF0000; color: #fff; font-weight: 400; text-align: right; font-size: 7.5pt; }
.eqi-val { background: #fff; }
.eqi-note { background: #FF0000; color: #fff; font-weight: 400; font-size: 6.8pt; text-align: left; line-height: 1.2; }
.eqi-hd th { background: #FF0000; color: #fff; font-weight: 400; font-size: 7.5pt; text-align: center; }
.eqi-line td { height: 7.6mm; }
.eqi-foot { break-inside: avoid; }
.eqi-foot { width: 100%; border-collapse: collapse; margin-top: 6mm; }
.eqi-foot th, .eqi-foot td { border: 0.6pt solid #000; padding: 2mm; text-align: left; font-weight: 400; }
.eqi-foot td { width: 22%; }

.eq-sent { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.eq-sent.is-open { background: #eef4ff; border: 1px solid #b8cbef; }
.eq-sent.is-done { background: #eaf6ec; border: 1px solid #9fd0a9; }

/* Checks page tabs: the same strip, with room between the names */
.checks-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 22px; padding: 0 2px; border-bottom: 1px solid #E4E0D6; }
.checks-tabs button { height: 44px; padding: 0 2px; font-size: 14.5px; white-space: nowrap; }
