.esign-app { max-width: 1100px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.esign-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.esign-btn { padding: 8px 16px; border-radius: 6px; border: 1px solid #ccd0d4; background: #fff; cursor: pointer; font-size: 14px; }
.esign-btn-primary { background: #2271b1; border-color: #2271b1; color: #fff; }
.esign-btn-primary:hover { background: #135e96; }
.esign-btn-small { padding: 4px 10px; font-size: 12px; margin-left: 6px; }
.esign-btn-danger { color: #b32d2e; border-color: #b32d2e; }
.esign-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.esign-table th, .esign-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; }
.esign-empty-row td { color: #777; font-style: italic; }
.esign-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; text-transform: capitalize; }
.esign-status-draft { background: #eee; color: #555; }
.esign-status-in_progress { background: #fff3cd; color: #8a6100; }
.esign-status-completed { background: #d4edda; color: #1e6b33; }
.esign-field { margin-bottom: 14px; }
.esign-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.esign-field input[type=text], .esign-field input[type=email], .esign-field input[type=file] { width: 100%; max-width: 420px; padding: 8px; border: 1px solid #ccd0d4; border-radius: 4px; }
.esign-actions { display: flex; gap: 10px; margin-top: 16px; }
.esign-error { color: #b32d2e; margin-top: 10px; }
.esign-hint { color: #555; margin-bottom: 16px; }

.esign-setup-layout { display: flex; gap: 24px; align-items: flex-start; }
.esign-setup-sidebar { width: 300px; flex-shrink: 0; }
.esign-setup-viewer { flex-grow: 1; background: #f6f7f7; padding: 12px; border-radius: 6px; overflow: auto; max-height: 75vh; }

.esign-signer-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; padding: 8px; border: 1px solid #eee; border-radius: 6px; }
.esign-signer-row.esign-signer-active { border-color: #2271b1; background: #eef6fc; }
.esign-signer-row input { flex: 1; padding: 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; min-width: 0; }
.esign-signer-order { width: 22px; height: 22px; border-radius: 50%; background: #2271b1; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.esign-signer-remove { cursor: pointer; color: #b32d2e; flex-shrink: 0; }

.esign-field-list .esign-field-item { font-size: 12px; padding: 6px; border: 1px solid #eee; border-radius: 4px; margin-bottom: 4px; display: flex; justify-content: space-between; }

.esign-pdf-page-wrap { position: relative; margin-bottom: 16px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.esign-pdf-page-wrap canvas { display: block; width: 100%; height: auto; }
.esign-placed-field { position: absolute; border: 2px solid #2271b1; background: rgba(34,113,177,0.12); font-size: 11px; color: #2271b1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.esign-placed-field.esign-field-unsigned { border-color: #d98c00; background: rgba(217,140,0,0.12); color: #8a5c00; }
.esign-placed-field.esign-field-done { border-color: #1e6b33; background: rgba(30,107,51,0.15); color: #1e6b33; }

.esign-sticky-actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0; border-top: 1px solid #eee; display: flex; align-items: center; gap: 16px; }

.esign-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.esign-modal-inner { background: #fff; padding: 20px; border-radius: 8px; width: 540px; max-width: 92vw; }
.esign-sig-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.esign-tab-btn { padding: 6px 14px; border: 1px solid #ccd0d4; background: #f6f7f7; border-radius: 4px; cursor: pointer; }
.esign-tab-btn.esign-tab-active { background: #2271b1; color: #fff; border-color: #2271b1; }
#esign-sig-canvas { border: 1px dashed #aaa; border-radius: 6px; width: 100%; touch-action: none; cursor: crosshair; }
#esign-sig-typed { width: 100%; padding: 10px; font-size: 16px; border: 1px solid #ccd0d4; border-radius: 4px; }
.esign-sig-typed-preview { font-family: 'Brush Script MT', cursive; font-size: 40px; margin-top: 14px; min-height: 60px; border-bottom: 1px solid #ccc; }
