/* Responsive document reading; print rules are independent of device width. */
.document-view{background:#eaf0f5}.document-view .print-sheet{width:min(210mm,calc(100% - 32px));max-width:100%;padding:16mm;line-height:1.6;color:#203345;overflow-wrap:anywhere}.document-view .print-sheet h1{letter-spacing:-.025em;line-height:1.2}.document-view .print-sheet h2{font-size:16px;margin:24px 0 12px;border-bottom:1px solid #d3e3ec;color:#087397}.document-view .print-sheet th{font-size:10px;letter-spacing:.035em}.document-view .print-sheet td{font-size:12px}.document-view .print-sheet img{max-width:100%}.document-view .print-logo,.document-view .print-top img,.document-view .report-sheet .print-logo{width:74px!important;height:48px!important;object-fit:contain}.document-view .doc-meta{gap:12px;background:#f0f6f9;border:1px solid #dce8ef;border-radius:8px;padding:14px}.document-view .doc-meta span{min-width:0}.document-view .doc-meta b{font-size:9px;letter-spacing:.045em;margin-bottom:4px}.document-view .doc-section{break-inside:auto}.document-view .report-detail-grid{display:grid;grid-template-columns:1fr;gap:8px}.document-view .report-detail-grid h3{font-size:13px;margin:12px 0 6px}.document-view .schematic-report{break-before:page;break-after:page;break-inside:avoid}.document-view .schematic-image{width:100%;height:auto;max-height:145mm;object-fit:contain;border:1px solid #dce7ed}.document-view .schematic-key{width:100%;max-width:160mm;margin:18px auto 0!important;text-align:center;break-inside:avoid}.document-view .schematic-key img{width:100%;max-height:65mm;object-fit:contain}.document-view .schematic-key figcaption{font-size:10px;color:#6c8391}.document-view .photo-grid{gap:16px}.document-view .photo-grid figure{border:1px solid #e0e9ef;padding:8px;border-radius:6px}.document-view .photo-grid img{border:0;max-height:80mm}.document-view .simple-certificate{height:auto!important;max-height:none!important;min-height:270mm;border:2px solid #1688ad;padding:14mm}.document-view .certificate-heading span{border:0;padding:0;font-size:15px;letter-spacing:.06em}.document-view .certificate-heading p{font-size:11px;margin:7px 0;color:#69808e}.document-view .certificate-heading img{width:68px!important;height:44px!important}.document-view .certificate-heading h1{font-size:30px;margin:14px 0 5px}.document-view .certificate-site{border:0!important;border-block:1px solid #c9e0eb!important;background:#f1f7fa;padding:18px!important}.document-view .certificate-compliance,.document-view .certificate-signature{border:0!important;border-top:1px solid #d4e4ed!important}.document-view .certificate-statement{font-weight:400}.document-view .certificate-note{font-size:10px}.document-view .invoice-table{table-layout:fixed}.document-view .invoice-table th:last-child,.document-view .invoice-table td:last-child{width:25%;white-space:nowrap}.document-view .totals{background:#f0f7fa;border-radius:8px;padding:12px 16px;max-width:320px}.document-view .totals .grand{border:0;margin:0;font-size:19px}.rams-heading img{width:74px;height:48px;object-fit:contain}.rams-sheet .preline{line-height:1.7}.document-view .print-actions{padding:0 14px}
@media screen and (max-width:650px){.document-view .print-sheet{width:100%;margin:0;padding:22px 16px;min-height:0;box-shadow:none;font-size:13px}.document-view .print-sheet.simple-certificate{width:calc(100% - 20px);margin:10px;padding:24px 16px;min-height:0}.document-view .doc-meta{grid-template-columns:repeat(2,minmax(0,1fr));margin:18px 0;gap:14px}.document-view .print-top{display:block}.document-view .print-site{text-align:left;max-width:100%;margin-top:16px}.document-view .print-sheet h1{font-size:24px}.document-view .print-sheet th,.document-view .print-sheet td{padding:9px 7px;font-size:11px}.document-view .readings-table{table-layout:fixed}.document-view .readings-table th:first-child{width:44%}.document-view .photo-grid{grid-template-columns:1fr}.document-view .certificate-plain-facts p{display:block;margin:10px 0}.document-view .certificate-plain-facts b{display:block}.document-view .certificate-heading h1{font-size:27px}.document-view .print-actions .button{flex:1;min-width:90px;font-size:12px;padding:11px}.document-view .schematic-image{max-height:none}.document-view .schematic-key{max-width:100%}}
@media print{@page{size:A4;margin:0}body{margin:0}.document-view .print-sheet{padding:14mm 12mm!important}.document-view{background:#fff}.document-view .print-sheet{width:100%!important;max-width:none;margin:0!important;box-shadow:none;min-height:0;font-size:10.5pt;line-height:1.5}.document-view .print-actions{display:none!important}.document-view .doc-meta{grid-template-columns:repeat(4,minmax(0,1fr))}.document-view .photo-grid{grid-template-columns:1fr 1fr}.document-view h2,.document-view h3{break-after:avoid}.document-view table thead{display:table-header-group}.document-view .print-sheet tr,.document-view figure{break-inside:avoid}.document-view .print-sheet p{orphans:3;widows:3;break-inside:auto}.document-view .simple-certificate{height:auto!important;max-height:none!important;min-height:265mm!important;padding:10mm!important;break-inside:auto}.document-view .certificate-site,.document-view .certificate-signature,.document-view .certificate-heading{break-inside:avoid}.document-view .print-footer{margin-top:18px}.document-view a{color:inherit;text-decoration:none}.document-view .rams-sheet .preline{line-height:1.6}.document-view .schematic-report{padding-top:4mm}.document-view .schematic-image{max-height:140mm}.document-view .schematic-key img{max-height:60mm}}
.document-view .report-sheet .document-logo{width:54px!important;height:37px!important;max-height:37px;object-fit:contain}
@media print{.document-view .report-sheet .schematic-report{width:100%;height:auto;min-height:255mm;max-height:none;overflow:visible}.document-view .report-sheet .schematic-key{margin-top:auto!important}.document-view .report-detail-grid>div{break-inside:auto}}

/* R28 */.r28-map{white-space:nowrap;font-size:.92em;font-weight:600}.r28-doc-logo{max-height:70px;max-width:240px;display:block;margin-bottom:8px}@media print{.r28-map{display:none}}
.r28-bk{display:flex;flex-direction:column;gap:4px}.r28-bk>.r28-map{padding:0 6px 8px}.r28-addr{margin:-6px 0 14px}
.linklike{background:none;border:0;padding:0;color:#0879b6;cursor:pointer;font:inherit}.linklike.danger,.button.danger{color:#b42318}.button.danger{border-color:#f1b5ae;background:#fff5f4}form.inline-form{display:inline}
.r28-calbar{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}.r28-calbar a{padding:6px 12px;border:1px solid #cdd9e5;border-radius:20px;background:#fff}.r28-calbar a[aria-current]{background:#0879b6;color:#fff;border-color:#0879b6}
.ui-ev small{display:block;font-weight:400;opacity:.85}.ui-day .r28-add{float:right;opacity:.35;font-weight:700}.ui-day:hover .r28-add{opacity:1}
.r28-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.r28-week>div{background:#fff;border:1px solid #dde6ee;border-radius:10px;padding:8px;min-height:160px}.r28-week h4{margin:0 0 6px;font-size:13px}.r28-week .today{border-color:#0879b6;box-shadow:0 0 0 2px #0879b633}
.r28-agenda .card{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:8px}.r28-agenda time{min-width:120px;font-weight:700}
@media(max-width:800px){.r28-week{grid-template-columns:1fr}.r28-week>div{min-height:0}}
.r28-week .ui-ev{white-space:normal;overflow:visible}.r28-points summary{cursor:pointer;padding:4px 0}
.ib-doc{display:flex;align-items:center;justify-content:center;height:140px;background:#eef4fa;border-radius:8px;font-weight:700;font-size:20px}
/* R29 weekly timesheet */
.r29 h2{margin-top:0}.r29-pick{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}.r29-chip{padding:8px 14px;border:1px solid #cdd9e5;border-radius:999px;background:#fff;font-weight:600;min-height:40px;display:inline-flex;align-items:center}.r29-chip.on{background:#0879b6;color:#fff;border-color:#0879b6}
.r29-week{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.r29-week b{font-size:1.05em;text-align:center}.r29-week .button{min-width:48px}
.r29-form{display:grid;gap:8px}.r29-day{border:1px solid #dde6ee;border-radius:12px;padding:10px 12px;background:#fafcfe}.r29-day.on{border-color:#0879b6;background:#eef7fd;box-shadow:inset 4px 0 0 #0879b6}
.r29-tick{display:flex;align-items:center;gap:10px;font-size:1.02em;cursor:pointer;min-height:40px}.r29-tick input{width:24px;height:24px;flex:none}
.r29-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,2fr);gap:8px;margin-top:6px}.r29-fields label{display:flex;flex-direction:column;gap:3px;font-size:.85em;min-width:0}.r29-fields input{width:100%;min-width:0;min-height:42px;font-size:16px;box-sizing:border-box}
.r29-day:not(.on) .r29-fields{opacity:.55}.r29-small{margin:6px 0 0;font-size:.85em;color:#55687a}
.r29-total{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:12px;background:#0b2c4d;color:#fff;font-size:1.05em}.r29-total strong{font-size:1.35em}
.r29-sum td,.r29-sum th{white-space:nowrap}.r29-grand td{font-weight:700;border-top:2px solid #0b2c4d}
@media(max-width:620px){.r29-fields{grid-template-columns:1fr 1fr}.r29-fields .r29-note{grid-column:1/-1}}
/* R29 mobile: Staff & hours / Accounts cards must never be wider than the screen */
.labour-profiles,.finance-stats{min-width:0}.labour-profiles>*,.finance-stats>*{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:700px){.labour-profiles{grid-template-columns:1fr!important}.labour-profiles .card,.finance-stats .card{overflow-wrap:anywhere}.labour-profiles form,.labour-profiles .form-grid{grid-template-columns:1fr!important}}
.r29-day:not(.on) .r29-fields{display:none}.r29-day:not(.on){padding:6px 12px;background:#fff}
.r29-form>.button{position:sticky;bottom:8px;z-index:5;box-shadow:0 6px 18px #0b2c4d33}
.r29-sum{width:100%}.r29-sum td,.r29-sum th{padding:8px 6px;text-align:left}.r29-sum td:nth-child(n+2),.r29-sum th:nth-child(n+2){text-align:right}
.r29-sum{display:grid;border:1px solid #dde6ee;border-radius:12px;overflow:hidden}.r29-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,.8fr) minmax(0,1.2fr) minmax(0,1.4fr);gap:6px;padding:10px 12px;border-top:1px solid #edf2f7;align-items:center}.r29-row>*:nth-child(n+2){text-align:right}.r29-head{border-top:0;background:#f2f6fa;font-size:.85em;color:#55687a;font-weight:600}.r29-grand{font-weight:700;background:#eef4fa;border-top:2px solid #0b2c4d}
.r29-row.r29-3{grid-template-columns:minmax(0,2fr) minmax(0,1.2fr) minmax(0,1.2fr)}
