.hc-wrap{max-width:680px;margin:24px auto;padding:0 12px;font:14px/1.45 "Segoe UI",Arial,sans-serif;color:#111}
.hc-card{border:1px solid #bbb;padding:18px;box-shadow:0 1px 3px rgba(0,0,0,.04);background:#fff}
.hc-headtable{width:100%;border-collapse:collapse;margin-bottom:10px}
.hc-headtable td{border:none;padding:0;vertical-align:middle}
.hc-headtable .logo{width:150px}
.hc-headtable .logo img{display:block;max-width:140px;height:auto}
.hc-headtable .details{padding-left:12px;font-size:13px;line-height:1.4}
.hc-title{border:1px solid #888;text-align:center;font-weight:700;padding:8px;margin:6px 0 12px;font-size:16px;letter-spacing:.2px}
.hc-card h4{font-size:14px;margin:10px 0 6px;font-weight:600}
.hc-table{width:100%;border-collapse:collapse;margin:10px 0;table-layout:fixed}
.hc-table th,.hc-table td{border:1px solid #9aa1a8;padding:7px;vertical-align:top;word-break:break-word}
.hc-table th{background:#f1f3f5;text-align:left;font-weight:700;width:240px;font-size:13px}
.hc-muted{color:#333;margin:12px 0}
.hc-note{font-weight:700;margin:12px 0}
.hc-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0;justify-content:center}
.hc-actions button{padding:9px 14px;border:1px solid #1f2937;border-radius:8px;background:#111;color:#fff;cursor:pointer}
.hc-actions button.secondary{background:#fff;color:#111}
.hc-input,.hc-textarea,.hc-select{width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid #bbb;border-radius:6px}
.hc-textarea{min-height:60px}
.hc-fixed{padding:6px 8px;background:#f8f9fa;border:1px solid #bbb;border-radius:6px}
.hc-print-view{display:none}
.hc-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:8px}
.hc-photos .hc-photo{border:1px solid #ddd;border-radius:8px;overflow:hidden;background:#fafafa}
.hc-photos .hc-photo img{display:block;width:100%;height:140px;object-fit:cover}
/* Signature mobile/Edge fix */
.sig-pad{
  border:1px solid #bbb;border-radius:6px;height:120px;width:100%;background:#fff;
  touch-action:none; -ms-touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
  display:block;
}
.sig-tools{display:flex;gap:8px;margin:4px 0 10px}

/* Print */
@media print{
  @page{ size:A4 portrait; margin:10mm; }
  .hc-form,.hc-post-actions{display:none!important}
  .hc-print-view{display:block!important;width:170mm;transform:scale(0.98);transform-origin:top left}
  body{background:#fff}
  .hc-table, .hc-table th, .hc-table td{ border:none !important; }
  .hc-table th{ background:transparent !important; }
  .hc-card{ border:none !important; box-shadow:none !important; }
}

/* Mobile */
@media (max-width: 640px){
  .hc-title{font-size:15px}
  .hc-headtable .logo{width:120px}
  .hc-headtable .logo img{max-width:110px}
  .hc-table, .hc-table thead, .hc-table tbody, .hc-table tr, .hc-table th, .hc-table td{display:block;width:100%}
  .hc-table tr{border:1px solid #9aa1a8;margin-bottom:10px}
  .hc-table th{background:#f7f7f7;border-bottom:1px solid #9aa1a8;width:100%}
  .hc-table td{border:none;padding:10px}
  .hc-photos{grid-template-columns:repeat(2,1fr)}
  .hc-photos .hc-photo img{height:120px}
}

/* PDF mode */
.hc-pdf{ font-size:11px; line-height:1.35; }
.hc-pdf .hc-title{ font-size:13px; }
.hc-pdf .hc-table th{ font-size:11px; }
.hc-pdf .hc-headtable .details{ font-size:11px; }
.hc-pdf .hc-muted, .hc-pdf .hc-note{ font-size:11px; }
.hc-pdf .hc-table, .hc-pdf .hc-table th, .hc-pdf .hc-table td{ border:none !important; }
.hc-pdf .hc-table th{ background:transparent !important; }
.hc-pdf .hc-card{ border:none !important; box-shadow:none !important; }
/* Signature: make it un-stealable and visible on all devices */
.sig-pad{
  touch-action: none;     /* stop browser gestures */
  -ms-touch-action: none; /* legacy Edge */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
  background: #fff;
  cursor: crosshair;
  position: relative;
  z-index: 2;             /* stay above neighboring elements */
}