/* Shared touch signature pad — Ops Approve + e-Office + Warehouse/QC hook */
.sig-pad-overlay,
.sig-pad-overlay * {
  box-sizing: border-box;
}
.sig-pad-overlay {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 14000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.62);
  padding: 16px;
  overflow: auto;
}
.sig-pad-overlay.hidden { display: none !important; }
.sig-pad-panel {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  min-width: 0;
  max-height: min(92vh, 640px);
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
  color-scheme: light;
}
.sig-pad-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  min-width: 0;
}
.sig-pad-head h4 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sig-pad-body {
  padding: 14px 16px;
  overflow: auto;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.sig-pad-preview-box {
  margin: 0 0 10px;
  padding: 8px 10px;
  max-height: 72px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sig-pad-preview-box.hidden { display: none !important; }
.sig-pad-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sig-pad-canvas-wrap {
  width: 100%;
  height: 148px;
  border: 1px solid #64748b;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  overflow: hidden;
}
.sig-pad-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.sig-pad-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.sig-pad-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  min-width: 0;
}
.sig-pad-preview {
  margin-top: 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sig-pad-preview img {
  max-height: 40px;
  max-width: 160px;
  object-fit: contain;
}
.sig-pad-embed { margin-top: 0; }
@media (max-width: 640px) {
  .sig-pad-panel { width: 100%; }
  .sig-pad-canvas-wrap { height: 160px; }
}
