[hidden] { display: none !important; }
.login-panel { max-width: 500px; margin: 40px auto; }
.login-panel label { margin-top: 14px; }
#message:not(:empty) { padding: 12px 16px; margin: 12px 0; border: 1px solid #c3cde2; background: #edf1fa; border-radius: 8px; white-space: pre-wrap; }
button:disabled { cursor: wait; opacity: .6; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; margin-top: 14px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 180px; object-fit: contain; background: #eef1f7; border: 1px solid var(--line); border-radius: 8px; }
.gallery figcaption { color: #59647e; font-size: .85rem; }
.stage-tab { margin: 8px 0; }
.stage-tab button[aria-pressed="true"] { background: var(--blue); color: white; }
.page-buttons { margin-top: 16px; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; }
#photo-dialog { max-width: 95vw; max-height: 95vh; border: 1px solid var(--line); border-radius: 12px; }
#photo-dialog::backdrop { background: #18223acc; }
#full-photo { display: block; max-width: 88vw; max-height: 78vh; margin-top: 12px; object-fit: contain; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-reply { margin-left: 16px; padding-left: 12px; border-left: 2px solid var(--line); }
.comment-body, .remark p, blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
.recovery-review { display: grid; gap: 14px; margin-top: 16px; }
.recovery-confirmation { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.recovery-confirmation input { flex: 0 0 auto; width: auto; margin: 5px 0 0; padding: 0; }
.recovery-confirmation span { min-width: 0; overflow-wrap: anywhere; }
.recovery-review .actions { margin-top: 0; }
.recovery-review .actions button { max-width: 100%; }
.recovery-device summary { cursor: pointer; color: var(--blue); }
.recovery-device p { overflow-wrap: anywhere; }
.remark-label { color: #a52b36; font-weight: 700; }
.revision-request { border-left: 4px solid #a52b36; }
.revision-request h2 { margin-top: 0; }
blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: #59647e; }
.report-selection { margin-top: 16px; border: 1px solid var(--line); }
.report-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; }
.report-check { display: flex; align-items: center; gap: 8px; }
.report-check input { width: auto; margin: 0; }
.report-thumbnail { width: 144px; max-width: 100%; height: auto; }
.report-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
.report-details dt { font-weight: 600; }
.report-details dd { margin: 0; overflow-wrap: anywhere; }
.report-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.report-photo-grid figure { margin: 0; }
.report-photo-grid img { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.report-photo-grid figcaption { padding: 4px 0; overflow-wrap: anywhere; }
.report-manager { margin-top: 24px; }
.quality-warning { color: #8b4d00; font-size: 0.9rem; }
#task-dialog { width: min(620px, calc(100% - 32px)); max-height: 85vh; border: 1px solid #d9e1e9; border-radius: 12px; padding: 24px; }
#task-dialog::backdrop { background: #10203580; }
#task-dialog textarea { width: 100%; box-sizing: border-box; }
#access-dialog { width: min(600px, calc(100% - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #d9e1e9; border-radius: 12px; padding: 24px; }
#access-dialog::backdrop { background: #10203580; }
#access-dialog dd { margin: 6px 0 18px; overflow-wrap: anywhere; }

@media print {
  @page { size: A4; margin: 14mm; }
  body.printing-report, body.printing-report main { background: white; color: black; margin: 0; padding: 0; max-width: none; }
  body.printing-report .mast, body.printing-report #workspace-nav,
  body.printing-report #message, body.printing-report .report-controls { display: none !important; }
  body.printing-report #report-document { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .report-section h2 { break-after: avoid; }
  .report-photo-grid { display: block; }
  .report-photo-grid figure { break-inside: avoid; margin-bottom: 6mm; }
  .report-photo-grid img { max-height: 105mm; }
  .report-manager { break-inside: avoid; }
}
