/* Отчёт охране: экран следует токенам портала, печать — компактная чёрно-белая таблица A4 в альбомной ориентации. */
.main:has(> .rp-page) { padding-top: 16px; padding-bottom: 16px; }
.rp-page { display: flex; flex-direction: column; gap: 16px; height: calc(100dvh - 108px); min-height: 0; }
.rp-page .ds-head p.muted { margin-top: 6px; }
.rp-filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 18px; }
.rp-filters .field { margin: 0; min-width: 180px; }
.rp-filters input { min-height: 44px; }
.rp-companies { position: relative; min-width: 260px; margin-right: auto; }
.rp-companies summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 44px; border: 1px solid var(--field-border); border-radius: 12px; padding: 8px 12px; cursor: pointer; }
.rp-companies summary::-webkit-details-marker { display: none; }
.rp-companies summary b { font-size: 13px; color: var(--primary); }
.rp-companies summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.rp-company-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 15; width: min(380px, calc(100vw - 64px)); padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.rp-pick-actions { display: flex; gap: 8px; padding: 8px 0; }
#rp-company-list { max-height: 260px; overflow: auto; }
#rp-company-list label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; padding: 6px 0; }
#rp-company-list label[hidden] { display: none; }
#rp-company-list input { width: 18px; min-height: 18px; flex-shrink: 0; accent-color: var(--primary); }
.rp-info { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.rp-results { overflow: auto; min-height: 0; border-radius: 16px; background: var(--surface); }
.rp-table, .rp-paper { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rp-table col:nth-child(1), .rp-paper col:nth-child(1) { width: 18%; }
.rp-table col:nth-child(2), .rp-paper col:nth-child(2) { width: 8%; }
.rp-table col:nth-child(3), .rp-paper col:nth-child(3) { width: 12%; }
.rp-table col:nth-child(4), .rp-paper col:nth-child(4) { width: 17%; }
.rp-table col:nth-child(5), .rp-paper col:nth-child(5) { width: 45%; }
.rp-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; color: var(--muted); font-size: 12px; line-height: 1.3; }
.rp-table th, .rp-table td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 10px 12px; vertical-align: top; overflow-wrap: anywhere; }
.rp-table td { font-size: 13px; line-height: 1.35; }
.rp-table th:last-child, .rp-table td:last-child { border-right: 0; }
.rp-row-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.rp-text { white-space: pre-wrap; }
.rp-names { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 14px; }
.rp-names li { break-inside: avoid; overflow-wrap: anywhere; }
.rp-empty { padding: 40px; text-align: center; }
.rp-empty h2 { font-size: 20px; margin-bottom: 8px; }
#report-print-root { display: none; }
#report-print-root.is-measure { display: block; position: fixed; left: -10000px; top: 0; width: 277mm; visibility: hidden; }
#report-print-root { color: #111; background: white; font: 8.5pt/1.15 Arial, sans-serif; }
.tabbar .anav-host { display: flex; flex: 1; justify-content: center; }
.tabbar .anav-pop { position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); top: auto; left: 16px; right: 16px; width: auto; }
.tabbar .anav-btn > .ic:last-child { display: none; }
@media (max-width: 700px) {
  .rp-page { height: calc(100dvh - 158px); }
  .rp-page h1 { font-size: 23px; }
  .rp-filters { gap: 10px; padding: 14px; }
  .rp-companies { min-width: 0; width: 100%; order: 3; }
  .rp-filters .field { flex: 1; min-width: 140px; }
  .rp-filters .btn { padding: 10px; }
  .rp-table { min-width: 1000px; }
}
@media print {
  @page off-hours-report { size: A4 landscape; margin: 10mm; }
  body.printing-report { margin: 0 !important; background: white !important; }
  body.printing-report > :not(#report-print-root) { display: none !important; }
  body.printing-report #report-print-root { display: block; page: off-hours-report; }
}

/* Эти стили действуют и при скрытом измерении перед печатью. */
.rp-paper { break-before: page; color: #111; background: white; }
.rp-paper:first-child { break-before: auto; }
.rp-paper thead { display: table-header-group; break-inside: avoid; }
.rp-paper th, .rp-paper td { border: .5pt solid #777; padding: 1.2mm 1.5mm; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.rp-paper thead > tr:first-child > th { border: 0; padding: 0 0 2mm; font-weight: normal; }
.rp-paper-head { display: flex; justify-content: space-between; align-items: start; gap: 6mm; }
.rp-paper-head b { font-size: 11pt; }
.rp-paper-head > div:last-child { text-align: right; }
.rp-paper-head small { display: block; color: #444; font-size: 7.5pt; margin-top: .5mm; }
.rp-paper .rp-columns th { font-size: 8pt; font-weight: bold; background: #f2f2f2; }
.rp-paper .rp-row-meta { font-size: 7pt; color: #444; margin-top: 1mm; }
.rp-paper .rp-text { font-size: 7.5pt; line-height: 1.1; }
.rp-paper .rp-names { column-gap: 3mm; font-size: 8.5pt; line-height: 1.15; }
.rp-paper tbody tr, .rp-paper .rp-names li { break-inside: avoid; }
.rp-paper tbody tr.rp-long-row { break-inside: auto; }
